Compare commits
9 Commits
f9f6e07696
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
| c7f5083b17 | |||
| ba740cd87d | |||
| 68991fe061 | |||
| ec427a70b8 | |||
| df8e665e15 | |||
| cf2950907a | |||
| 8399f70285 | |||
| 63307e2deb | |||
| d0bfbd3f5c |
38
.idea/artifacts/ProtegeToAASMini_jar.xml
generated
Normal file
38
.idea/artifacts/ProtegeToAASMini_jar.xml
generated
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
<component name="ArtifactManager">
|
||||||
|
<artifact type="jar" name="ProtegeToAASMini:jar">
|
||||||
|
<output-path>$PROJECT_DIR$/out/artifacts/ProtegeToAASMini_jar</output-path>
|
||||||
|
<root id="archive" name="ProtegeToAASMini.jar">
|
||||||
|
<element id="module-output" name="ProtegeToAASMini" />
|
||||||
|
<element id="extracted-dir" path="$MAVEN_REPOSITORY$/org/tinylog/tinylog/1.3.6/tinylog-1.3.6.jar" path-in-jar="/" />
|
||||||
|
<element id="extracted-dir" path="$MAVEN_REPOSITORY$/org/slf4j/slf4j-simple/1.8.0-beta4/slf4j-simple-1.8.0-beta4.jar" path-in-jar="/" />
|
||||||
|
<element id="extracted-dir" path="$MAVEN_REPOSITORY$/org/slf4j/slf4j-api/1.8.0-beta4/slf4j-api-1.8.0-beta4.jar" path-in-jar="/" />
|
||||||
|
<element id="extracted-dir" path="$MAVEN_REPOSITORY$/org/projectlombok/lombok/1.18.34/lombok-1.18.34.jar" path-in-jar="/" />
|
||||||
|
<element id="extracted-dir" path="$MAVEN_REPOSITORY$/com/google/code/gson/gson/2.11.0/gson-2.11.0.jar" path-in-jar="/" />
|
||||||
|
<element id="extracted-dir" path="$MAVEN_REPOSITORY$/com/google/errorprone/error_prone_annotations/2.27.0/error_prone_annotations-2.27.0.jar" path-in-jar="/" />
|
||||||
|
<element id="extracted-dir" path="$PROJECT_DIR$/../../../../../../apache-cxf/3.5.9/lib/cxf-manifest.jar" path-in-jar="/" />
|
||||||
|
<element id="extracted-dir" path="$MAVEN_REPOSITORY$/io/javalin/javalin/4.6.8/javalin-4.6.8.jar" path-in-jar="/" />
|
||||||
|
<element id="extracted-dir" path="$MAVEN_REPOSITORY$/org/slf4j/slf4j-api/1.7.36/slf4j-api-1.7.36.jar" path-in-jar="/" />
|
||||||
|
<element id="extracted-dir" path="$MAVEN_REPOSITORY$/org/eclipse/jetty/jetty-server/9.4.51.v20230217/jetty-server-9.4.51.v20230217.jar" path-in-jar="/" />
|
||||||
|
<element id="extracted-dir" path="$MAVEN_REPOSITORY$/javax/servlet/javax.servlet-api/3.1.0/javax.servlet-api-3.1.0.jar" path-in-jar="/" />
|
||||||
|
<element id="extracted-dir" path="$MAVEN_REPOSITORY$/org/eclipse/jetty/jetty-http/9.4.51.v20230217/jetty-http-9.4.51.v20230217.jar" path-in-jar="/" />
|
||||||
|
<element id="extracted-dir" path="$MAVEN_REPOSITORY$/org/eclipse/jetty/jetty-util/9.4.51.v20230217/jetty-util-9.4.51.v20230217.jar" path-in-jar="/" />
|
||||||
|
<element id="extracted-dir" path="$MAVEN_REPOSITORY$/org/eclipse/jetty/jetty-io/9.4.51.v20230217/jetty-io-9.4.51.v20230217.jar" path-in-jar="/" />
|
||||||
|
<element id="extracted-dir" path="$MAVEN_REPOSITORY$/org/eclipse/jetty/jetty-webapp/9.4.51.v20230217/jetty-webapp-9.4.51.v20230217.jar" path-in-jar="/" />
|
||||||
|
<element id="extracted-dir" path="$MAVEN_REPOSITORY$/org/eclipse/jetty/jetty-xml/9.4.51.v20230217/jetty-xml-9.4.51.v20230217.jar" path-in-jar="/" />
|
||||||
|
<element id="extracted-dir" path="$MAVEN_REPOSITORY$/org/eclipse/jetty/jetty-servlet/9.4.51.v20230217/jetty-servlet-9.4.51.v20230217.jar" path-in-jar="/" />
|
||||||
|
<element id="extracted-dir" path="$MAVEN_REPOSITORY$/org/eclipse/jetty/jetty-security/9.4.51.v20230217/jetty-security-9.4.51.v20230217.jar" path-in-jar="/" />
|
||||||
|
<element id="extracted-dir" path="$MAVEN_REPOSITORY$/org/eclipse/jetty/jetty-util-ajax/9.4.51.v20230217/jetty-util-ajax-9.4.51.v20230217.jar" path-in-jar="/" />
|
||||||
|
<element id="extracted-dir" path="$MAVEN_REPOSITORY$/org/eclipse/jetty/websocket/websocket-server/9.4.51.v20230217/websocket-server-9.4.51.v20230217.jar" path-in-jar="/" />
|
||||||
|
<element id="extracted-dir" path="$MAVEN_REPOSITORY$/org/eclipse/jetty/websocket/websocket-common/9.4.51.v20230217/websocket-common-9.4.51.v20230217.jar" path-in-jar="/" />
|
||||||
|
<element id="extracted-dir" path="$MAVEN_REPOSITORY$/org/eclipse/jetty/websocket/websocket-api/9.4.51.v20230217/websocket-api-9.4.51.v20230217.jar" path-in-jar="/" />
|
||||||
|
<element id="extracted-dir" path="$MAVEN_REPOSITORY$/org/eclipse/jetty/websocket/websocket-client/9.4.51.v20230217/websocket-client-9.4.51.v20230217.jar" path-in-jar="/" />
|
||||||
|
<element id="extracted-dir" path="$MAVEN_REPOSITORY$/org/eclipse/jetty/jetty-client/9.4.51.v20230217/jetty-client-9.4.51.v20230217.jar" path-in-jar="/" />
|
||||||
|
<element id="extracted-dir" path="$MAVEN_REPOSITORY$/org/eclipse/jetty/websocket/websocket-servlet/9.4.51.v20230217/websocket-servlet-9.4.51.v20230217.jar" path-in-jar="/" />
|
||||||
|
<element id="extracted-dir" path="$MAVEN_REPOSITORY$/org/jetbrains/kotlin/kotlin-stdlib-jdk8/1.5.32/kotlin-stdlib-jdk8-1.5.32.jar" path-in-jar="/" />
|
||||||
|
<element id="extracted-dir" path="$MAVEN_REPOSITORY$/org/jetbrains/kotlin/kotlin-stdlib/1.5.32/kotlin-stdlib-1.5.32.jar" path-in-jar="/" />
|
||||||
|
<element id="extracted-dir" path="$MAVEN_REPOSITORY$/org/jetbrains/annotations/13.0/annotations-13.0.jar" path-in-jar="/" />
|
||||||
|
<element id="extracted-dir" path="$MAVEN_REPOSITORY$/org/jetbrains/kotlin/kotlin-stdlib-common/1.5.32/kotlin-stdlib-common-1.5.32.jar" path-in-jar="/" />
|
||||||
|
<element id="extracted-dir" path="$MAVEN_REPOSITORY$/org/jetbrains/kotlin/kotlin-stdlib-jdk7/1.5.32/kotlin-stdlib-jdk7-1.5.32.jar" path-in-jar="/" />
|
||||||
|
</root>
|
||||||
|
</artifact>
|
||||||
|
</component>
|
||||||
8
.idea/compiler.xml
generated
Normal file
8
.idea/compiler.xml
generated
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="CompilerConfiguration">
|
||||||
|
<annotationProcessing>
|
||||||
|
<profile default="true" name="Default" enabled="true" />
|
||||||
|
</annotationProcessing>
|
||||||
|
</component>
|
||||||
|
</project>
|
||||||
14
.idea/deployment.xml
generated
Normal file
14
.idea/deployment.xml
generated
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="PublishConfigData" serverName="pi" remoteFilesAllowedToDisappearOnAutoupload="false">
|
||||||
|
<serverData>
|
||||||
|
<paths name="pi">
|
||||||
|
<serverdata>
|
||||||
|
<mappings>
|
||||||
|
<mapping deploy="/ProtegeConnector" local="$PROJECT_DIR$" web="/" />
|
||||||
|
</mappings>
|
||||||
|
</serverdata>
|
||||||
|
</paths>
|
||||||
|
</serverData>
|
||||||
|
</component>
|
||||||
|
</project>
|
||||||
44
.idea/libraries/io_javalin.xml
generated
44
.idea/libraries/io_javalin.xml
generated
@@ -1,28 +1,30 @@
|
|||||||
<component name="libraryTable">
|
<component name="libraryTable">
|
||||||
<library name="io.javalin" type="repository">
|
<library name="io.javalin" type="repository">
|
||||||
<properties maven-id="io.javalin:javalin:6.3.0" />
|
<properties maven-id="io.javalin:javalin:4.6.8" />
|
||||||
<CLASSES>
|
<CLASSES>
|
||||||
<root url="jar://$MAVEN_REPOSITORY$/io/javalin/javalin/6.3.0/javalin-6.3.0.jar!/" />
|
<root url="jar://$MAVEN_REPOSITORY$/io/javalin/javalin/4.6.8/javalin-4.6.8.jar!/" />
|
||||||
<root url="jar://$MAVEN_REPOSITORY$/org/slf4j/slf4j-api/2.0.16/slf4j-api-2.0.16.jar!/" />
|
<root url="jar://$MAVEN_REPOSITORY$/org/slf4j/slf4j-api/1.7.36/slf4j-api-1.7.36.jar!/" />
|
||||||
<root url="jar://$MAVEN_REPOSITORY$/org/eclipse/jetty/jetty-server/11.0.23/jetty-server-11.0.23.jar!/" />
|
<root url="jar://$MAVEN_REPOSITORY$/org/eclipse/jetty/jetty-server/9.4.51.v20230217/jetty-server-9.4.51.v20230217.jar!/" />
|
||||||
<root url="jar://$MAVEN_REPOSITORY$/org/eclipse/jetty/jetty-http/11.0.23/jetty-http-11.0.23.jar!/" />
|
<root url="jar://$MAVEN_REPOSITORY$/javax/servlet/javax.servlet-api/3.1.0/javax.servlet-api-3.1.0.jar!/" />
|
||||||
<root url="jar://$MAVEN_REPOSITORY$/org/eclipse/jetty/jetty-util/11.0.23/jetty-util-11.0.23.jar!/" />
|
<root url="jar://$MAVEN_REPOSITORY$/org/eclipse/jetty/jetty-http/9.4.51.v20230217/jetty-http-9.4.51.v20230217.jar!/" />
|
||||||
<root url="jar://$MAVEN_REPOSITORY$/org/eclipse/jetty/jetty-io/11.0.23/jetty-io-11.0.23.jar!/" />
|
<root url="jar://$MAVEN_REPOSITORY$/org/eclipse/jetty/jetty-util/9.4.51.v20230217/jetty-util-9.4.51.v20230217.jar!/" />
|
||||||
<root url="jar://$MAVEN_REPOSITORY$/org/eclipse/jetty/toolchain/jetty-jakarta-servlet-api/5.0.2/jetty-jakarta-servlet-api-5.0.2.jar!/" />
|
<root url="jar://$MAVEN_REPOSITORY$/org/eclipse/jetty/jetty-io/9.4.51.v20230217/jetty-io-9.4.51.v20230217.jar!/" />
|
||||||
<root url="jar://$MAVEN_REPOSITORY$/org/eclipse/jetty/websocket/websocket-jetty-server/11.0.23/websocket-jetty-server-11.0.23.jar!/" />
|
<root url="jar://$MAVEN_REPOSITORY$/org/eclipse/jetty/jetty-webapp/9.4.51.v20230217/jetty-webapp-9.4.51.v20230217.jar!/" />
|
||||||
<root url="jar://$MAVEN_REPOSITORY$/org/eclipse/jetty/jetty-servlet/11.0.23/jetty-servlet-11.0.23.jar!/" />
|
<root url="jar://$MAVEN_REPOSITORY$/org/eclipse/jetty/jetty-xml/9.4.51.v20230217/jetty-xml-9.4.51.v20230217.jar!/" />
|
||||||
<root url="jar://$MAVEN_REPOSITORY$/org/eclipse/jetty/jetty-security/11.0.23/jetty-security-11.0.23.jar!/" />
|
<root url="jar://$MAVEN_REPOSITORY$/org/eclipse/jetty/jetty-servlet/9.4.51.v20230217/jetty-servlet-9.4.51.v20230217.jar!/" />
|
||||||
<root url="jar://$MAVEN_REPOSITORY$/org/eclipse/jetty/jetty-webapp/11.0.23/jetty-webapp-11.0.23.jar!/" />
|
<root url="jar://$MAVEN_REPOSITORY$/org/eclipse/jetty/jetty-security/9.4.51.v20230217/jetty-security-9.4.51.v20230217.jar!/" />
|
||||||
<root url="jar://$MAVEN_REPOSITORY$/org/eclipse/jetty/jetty-xml/11.0.23/jetty-xml-11.0.23.jar!/" />
|
<root url="jar://$MAVEN_REPOSITORY$/org/eclipse/jetty/jetty-util-ajax/9.4.51.v20230217/jetty-util-ajax-9.4.51.v20230217.jar!/" />
|
||||||
<root url="jar://$MAVEN_REPOSITORY$/org/eclipse/jetty/websocket/websocket-jetty-api/11.0.23/websocket-jetty-api-11.0.23.jar!/" />
|
<root url="jar://$MAVEN_REPOSITORY$/org/eclipse/jetty/websocket/websocket-server/9.4.51.v20230217/websocket-server-9.4.51.v20230217.jar!/" />
|
||||||
<root url="jar://$MAVEN_REPOSITORY$/org/eclipse/jetty/websocket/websocket-jetty-common/11.0.23/websocket-jetty-common-11.0.23.jar!/" />
|
<root url="jar://$MAVEN_REPOSITORY$/org/eclipse/jetty/websocket/websocket-common/9.4.51.v20230217/websocket-common-9.4.51.v20230217.jar!/" />
|
||||||
<root url="jar://$MAVEN_REPOSITORY$/org/eclipse/jetty/websocket/websocket-core-common/11.0.23/websocket-core-common-11.0.23.jar!/" />
|
<root url="jar://$MAVEN_REPOSITORY$/org/eclipse/jetty/websocket/websocket-api/9.4.51.v20230217/websocket-api-9.4.51.v20230217.jar!/" />
|
||||||
<root url="jar://$MAVEN_REPOSITORY$/org/eclipse/jetty/websocket/websocket-servlet/11.0.23/websocket-servlet-11.0.23.jar!/" />
|
<root url="jar://$MAVEN_REPOSITORY$/org/eclipse/jetty/websocket/websocket-client/9.4.51.v20230217/websocket-client-9.4.51.v20230217.jar!/" />
|
||||||
<root url="jar://$MAVEN_REPOSITORY$/org/eclipse/jetty/websocket/websocket-core-server/11.0.23/websocket-core-server-11.0.23.jar!/" />
|
<root url="jar://$MAVEN_REPOSITORY$/org/eclipse/jetty/jetty-client/9.4.51.v20230217/jetty-client-9.4.51.v20230217.jar!/" />
|
||||||
<root url="jar://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/kotlin-stdlib-jdk8/1.9.25/kotlin-stdlib-jdk8-1.9.25.jar!/" />
|
<root url="jar://$MAVEN_REPOSITORY$/org/eclipse/jetty/websocket/websocket-servlet/9.4.51.v20230217/websocket-servlet-9.4.51.v20230217.jar!/" />
|
||||||
<root url="jar://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/kotlin-stdlib/1.9.25/kotlin-stdlib-1.9.25.jar!/" />
|
<root url="jar://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/kotlin-stdlib-jdk8/1.5.32/kotlin-stdlib-jdk8-1.5.32.jar!/" />
|
||||||
|
<root url="jar://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/kotlin-stdlib/1.5.32/kotlin-stdlib-1.5.32.jar!/" />
|
||||||
<root url="jar://$MAVEN_REPOSITORY$/org/jetbrains/annotations/13.0/annotations-13.0.jar!/" />
|
<root url="jar://$MAVEN_REPOSITORY$/org/jetbrains/annotations/13.0/annotations-13.0.jar!/" />
|
||||||
<root url="jar://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/kotlin-stdlib-jdk7/1.9.25/kotlin-stdlib-jdk7-1.9.25.jar!/" />
|
<root url="jar://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/kotlin-stdlib-common/1.5.32/kotlin-stdlib-common-1.5.32.jar!/" />
|
||||||
|
<root url="jar://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/kotlin-stdlib-jdk7/1.5.32/kotlin-stdlib-jdk7-1.5.32.jar!/" />
|
||||||
</CLASSES>
|
</CLASSES>
|
||||||
<JAVADOC />
|
<JAVADOC />
|
||||||
<SOURCES />
|
<SOURCES />
|
||||||
|
|||||||
11
.idea/libraries/slf4j_simple.xml
generated
Normal file
11
.idea/libraries/slf4j_simple.xml
generated
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
<component name="libraryTable">
|
||||||
|
<library name="slf4j.simple" type="repository">
|
||||||
|
<properties maven-id="org.slf4j:slf4j-simple:1.8.0-beta4" />
|
||||||
|
<CLASSES>
|
||||||
|
<root url="jar://$MAVEN_REPOSITORY$/org/slf4j/slf4j-simple/1.8.0-beta4/slf4j-simple-1.8.0-beta4.jar!/" />
|
||||||
|
<root url="jar://$MAVEN_REPOSITORY$/org/slf4j/slf4j-api/1.8.0-beta4/slf4j-api-1.8.0-beta4.jar!/" />
|
||||||
|
</CLASSES>
|
||||||
|
<JAVADOC />
|
||||||
|
<SOURCES />
|
||||||
|
</library>
|
||||||
|
</component>
|
||||||
8
.idea/sshConfigs.xml
generated
Normal file
8
.idea/sshConfigs.xml
generated
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="SshConfigs">
|
||||||
|
<configs>
|
||||||
|
<sshConfig authType="PASSWORD" host="192.168.10.70" id="5e3c74ed-e990-4abc-bd0b-6feca476d448" port="22" nameFormat="DESCRIPTIVE" username="pi" useOpenSSHConfig="true" />
|
||||||
|
</configs>
|
||||||
|
</component>
|
||||||
|
</project>
|
||||||
14
.idea/webServers.xml
generated
Normal file
14
.idea/webServers.xml
generated
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="WebServers">
|
||||||
|
<option name="servers">
|
||||||
|
<webServer id="1b978483-d576-4e39-b6b8-3bb40d973f6b" name="pi">
|
||||||
|
<fileTransfer rootFolder="/home/pi" accessType="SFTP" host="192.168.10.70" port="22" sshConfigId="5e3c74ed-e990-4abc-bd0b-6feca476d448" sshConfig="pi@192.168.10.70:22 password">
|
||||||
|
<advancedOptions>
|
||||||
|
<advancedOptions dataProtectionLevel="Private" keepAliveTimeout="0" passiveMode="true" shareSSLContext="true" />
|
||||||
|
</advancedOptions>
|
||||||
|
</fileTransfer>
|
||||||
|
</webServer>
|
||||||
|
</option>
|
||||||
|
</component>
|
||||||
|
</project>
|
||||||
34
Properties/simplelogger.properties
Normal file
34
Properties/simplelogger.properties
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
# SLF4J's SimpleLogger configuration file
|
||||||
|
# Simple implementation of Logger that sends all enabled log messages, for all defined loggers, to System.err.
|
||||||
|
|
||||||
|
# Default logging detail level for all instances of SimpleLogger.
|
||||||
|
# Must be one of ("trace", "debug", "info", "warn", or "error").
|
||||||
|
# If not specified, defaults to "info".
|
||||||
|
org.slf4j.simpleLogger.defaultLogLevel=warn
|
||||||
|
|
||||||
|
# Logging detail level for a SimpleLogger instance named "xxxxx".
|
||||||
|
# Must be one of ("trace", "debug", "info", "warn", or "error").
|
||||||
|
# If not specified, the default logging detail level is used.
|
||||||
|
#org.slf4j.simpleLogger.log.xxxxx=
|
||||||
|
|
||||||
|
# Set to true if you want the current date and time to be included in output messages.
|
||||||
|
# Default is false, and will output the number of milliseconds elapsed since startup.
|
||||||
|
#org.slf4j.simpleLogger.showDateTime=false
|
||||||
|
|
||||||
|
# The date and time format to be used in the output messages.
|
||||||
|
# The pattern describing the date and time format is the same that is used in java.text.SimpleDateFormat.
|
||||||
|
# If the format is not specified or is invalid, the default format is used.
|
||||||
|
# The default format is yyyy-MM-dd HH:mm:ss:SSS Z.
|
||||||
|
#org.slf4j.simpleLogger.dateTimeFormat=yyyy-MM-dd HH:mm:ss:SSS Z
|
||||||
|
|
||||||
|
# Set to true if you want to output the current thread name.
|
||||||
|
# Defaults to true.
|
||||||
|
#org.slf4j.simpleLogger.showThreadName=true
|
||||||
|
|
||||||
|
# Set to true if you want the Logger instance name to be included in output messages.
|
||||||
|
# Defaults to true.
|
||||||
|
#org.slf4j.simpleLogger.showLogName=true
|
||||||
|
|
||||||
|
# Set to true if you want the last component of the name to be included in output messages.
|
||||||
|
# Defaults to false.
|
||||||
|
#org.slf4j.simpleLogger.showShortLogName=false
|
||||||
9
Properties/tinylog.properties
Normal file
9
Properties/tinylog.properties
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
//writer = rolling file
|
||||||
|
writer=console
|
||||||
|
writer.file=logs/{date:yyyy-MM-dd}.log
|
||||||
|
writer.format={date:yyyy-MM-dd HH:mm:ss} {level}: {class}.{method}() {message}
|
||||||
|
writer.policies=daily
|
||||||
|
writer.buffered=true
|
||||||
|
writer.charset=UTF-8
|
||||||
|
writer.level=info
|
||||||
|
writer.append=true
|
||||||
@@ -5,6 +5,7 @@
|
|||||||
<content url="file://$MODULE_DIR$">
|
<content url="file://$MODULE_DIR$">
|
||||||
<sourceFolder url="file://$MODULE_DIR$/Web" isTestSource="false" />
|
<sourceFolder url="file://$MODULE_DIR$/Web" isTestSource="false" />
|
||||||
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
|
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
|
||||||
|
<sourceFolder url="file://$MODULE_DIR$/Properties" isTestSource="false" />
|
||||||
</content>
|
</content>
|
||||||
<orderEntry type="inheritedJdk" />
|
<orderEntry type="inheritedJdk" />
|
||||||
<orderEntry type="sourceFolder" forTests="false" />
|
<orderEntry type="sourceFolder" forTests="false" />
|
||||||
@@ -21,5 +22,6 @@
|
|||||||
<orderEntry type="library" name="io.javalin" level="project" />
|
<orderEntry type="library" name="io.javalin" level="project" />
|
||||||
<orderEntry type="library" name="projectlombok.lombok" level="project" />
|
<orderEntry type="library" name="projectlombok.lombok" level="project" />
|
||||||
<orderEntry type="library" name="google.code.gson" level="project" />
|
<orderEntry type="library" name="google.code.gson" level="project" />
|
||||||
|
<orderEntry type="library" name="slf4j.simple" level="project" />
|
||||||
</component>
|
</component>
|
||||||
</module>
|
</module>
|
||||||
3
Web/META-INF/MANIFEST.MF
Normal file
3
Web/META-INF/MANIFEST.MF
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
Manifest-Version: 1.0
|
||||||
|
Main-Class: Main
|
||||||
|
|
||||||
@@ -4,11 +4,16 @@ import org.pmw.tinylog.Logger;
|
|||||||
|
|
||||||
import java.net.InetAddress;
|
import java.net.InetAddress;
|
||||||
import java.net.Socket;
|
import java.net.Socket;
|
||||||
|
import java.nio.charset.StandardCharsets;
|
||||||
|
import java.util.Arrays;
|
||||||
|
|
||||||
@SuppressWarnings("unused")
|
|
||||||
|
@SuppressWarnings({"FieldCanBeLocal", "UnusedReturnValue"})
|
||||||
public class AASMini {
|
public class AASMini {
|
||||||
private final String targetIP;
|
private final String targetIP;
|
||||||
private final int targetPort;
|
private final int targetPort;
|
||||||
|
private final int msgId = 1;
|
||||||
|
private final String zones = "Zone_1,Zone_2,Zone_3,Zone_4";
|
||||||
private Socket socket;
|
private Socket socket;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -19,8 +24,10 @@ public class AASMini {
|
|||||||
public AASMini(String ip , int port){
|
public AASMini(String ip , int port){
|
||||||
this.targetIP = ip;
|
this.targetIP = ip;
|
||||||
this.targetPort = port;
|
this.targetPort = port;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Check if the AAS Mini is connected
|
* Check if the AAS Mini is connected
|
||||||
* @return true if connected, false otherwise
|
* @return true if connected, false otherwise
|
||||||
@@ -66,7 +73,37 @@ public class AASMini {
|
|||||||
socket = null;
|
socket = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
//TODO protocol untuk kirim data ke AAS Mini
|
private String ConvertToString(byte[] data){
|
||||||
|
StringBuilder sb = new StringBuilder();
|
||||||
|
for (byte b : data){
|
||||||
|
if (b>0x1F && b<0x7F)
|
||||||
|
sb.append((char)b);
|
||||||
|
else break;
|
||||||
|
|
||||||
|
}
|
||||||
|
return sb.toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void SendPlatNoToAAS(String platNo){
|
||||||
|
|
||||||
|
String protocol = "BROADCAST;"+msgId+";IND;$PLATNOMOR$="+platNo+";"+zones;
|
||||||
|
byte[] data = protocol.getBytes();
|
||||||
|
byte[] rplyData = SendAndReceive(data);
|
||||||
|
if (rplyData!=null && rplyData.length>0){
|
||||||
|
String rplyInStr = ConvertToString(rplyData);
|
||||||
|
Logger.info("Response from AAS : {}", rplyInStr);
|
||||||
|
String[] rply = rplyInStr.split(";");
|
||||||
|
if (rply.length ==2){
|
||||||
|
if (rply[0].equals("BROADCAST")){
|
||||||
|
if (rply[1].equals("OK")){
|
||||||
|
Logger.info("Success sending data to AAS!");
|
||||||
|
}else Logger.info("Failed sending data to AAS!");
|
||||||
|
}else Logger.info("Wrong format answer!");
|
||||||
|
}else Logger.info("Wrong size answer");
|
||||||
|
} else Logger.info("SendAndReceive return null");
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Send data to AAS Mini and receive response
|
* Send data to AAS Mini and receive response
|
||||||
@@ -81,9 +118,7 @@ public class AASMini {
|
|||||||
byte[] buffer = new byte[1024];
|
byte[] buffer = new byte[1024];
|
||||||
int read = socket.getInputStream().read(buffer);
|
int read = socket.getInputStream().read(buffer);
|
||||||
if (read>0){
|
if (read>0){
|
||||||
byte[] result = new byte[read];
|
return buffer;
|
||||||
System.arraycopy(buffer, 0, result, 0, read);
|
|
||||||
return result;
|
|
||||||
}
|
}
|
||||||
} catch (Exception e){
|
} catch (Exception e){
|
||||||
Logger.error("Failed to send data to {}:{}, Error : {}", targetIP, targetPort, e.getMessage());
|
Logger.error("Failed to send data to {}:{}, Error : {}", targetIP, targetPort, e.getMessage());
|
||||||
@@ -93,10 +128,10 @@ public class AASMini {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/*
|
||||||
* Send data to AAS Mini
|
* Send data to AAS Mini
|
||||||
* @param data Data to be sent
|
* @param data Data to be sent
|
||||||
*/
|
|
||||||
private void SendData(byte[] data){
|
private void SendData(byte[] data){
|
||||||
if (IsConnected()){
|
if (IsConnected()){
|
||||||
if (data!=null && data.length>0){
|
if (data!=null && data.length>0){
|
||||||
@@ -108,4 +143,5 @@ public class AASMini {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,34 +4,35 @@ import Web.WebResponse;
|
|||||||
import Web.WebServer;
|
import Web.WebServer;
|
||||||
import org.pmw.tinylog.Logger;
|
import org.pmw.tinylog.Logger;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
|
import java.io.InputStream;
|
||||||
|
import java.nio.file.Files;
|
||||||
|
|
||||||
public class Main {
|
public class Main {
|
||||||
private static AASMini aas;
|
private static AASMini aas;
|
||||||
private static ProtegeGX protegeGX;
|
private static ProtegeGX protegeGX;
|
||||||
private static WebServer web;
|
private static WebServer web;
|
||||||
private static String aasIP = "192.168.10.10";
|
private static String aasIP = "localhost";
|
||||||
private static int aasPort = 5000;
|
private static int aasPort = 5000;
|
||||||
private static int webPort = 8080;
|
private static int webPort = 8080;
|
||||||
|
private final static String currentDirectory = System.getProperty("user.dir");
|
||||||
|
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
|
ExtractFile("tinylog.properties");
|
||||||
|
ExtractFile("simplelogger.properties");
|
||||||
GetArguments(args);
|
GetArguments(args);
|
||||||
Runtime.getRuntime().addShutdownHook(new Thread(() -> {
|
Runtime.getRuntime().addShutdownHook(new Thread(() -> {
|
||||||
System.out.println("Shutting down...");
|
Logger.info("Shutting down...");
|
||||||
if (aas!=null) aas.Disconnect();
|
|
||||||
if (protegeGX!=null) protegeGX.Disconnect();
|
if (protegeGX!=null) protegeGX.Disconnect();
|
||||||
if (web!=null) web.Stop();
|
if (web!=null) web.Stop();
|
||||||
}));
|
}));
|
||||||
|
|
||||||
System.out.println("Protege to AAS Mini Connector");
|
Logger.info("Protege to AAS Mini Connector");
|
||||||
|
|
||||||
protegeGX = new ProtegeGX();
|
protegeGX = new ProtegeGX(5004);
|
||||||
protegeGX.setOnCardRead(data -> {
|
protegeGX.setOnCardRead(data -> SendPlatNomor(data.LastName));
|
||||||
Logger.info(data);
|
|
||||||
if (aas!=null && aas.IsConnected()){
|
|
||||||
// send something to AAS
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
aas = new AASMini(aasIP, aasPort);
|
aas = new AASMini(aasIP, aasPort);
|
||||||
aas.Connect();
|
|
||||||
|
|
||||||
web = new WebServer();
|
web = new WebServer();
|
||||||
web.Start(webPort);
|
web.Start(webPort);
|
||||||
@@ -47,6 +48,35 @@ public class Main {
|
|||||||
WebResponse response = new WebResponse();
|
WebResponse response = new WebResponse();
|
||||||
return response;
|
return response;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private static void SendPlatNomor(String platNomor){
|
||||||
|
if (aas!=null){
|
||||||
|
if (aas.Connect()){
|
||||||
|
aas.SendPlatNoToAAS(platNomor);
|
||||||
|
aas.Disconnect();
|
||||||
|
} else Logger.error("Failed to connect to AAS Mini");
|
||||||
|
} else Logger.error("AAS Mini is not created");
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private static void ExtractFile(String filename){
|
||||||
|
File target = new File(currentDirectory,filename);
|
||||||
|
if (target.isFile()) {
|
||||||
|
Logger.info("File {} already exists", filename);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
try{
|
||||||
|
InputStream in = Main.class.getResourceAsStream("/"+filename);
|
||||||
|
if (in!=null){
|
||||||
|
Files.copy(in, target.toPath());
|
||||||
|
Logger.info("File {} extracted", filename);
|
||||||
|
} else throw new Exception("File not found");
|
||||||
|
} catch (Exception e){
|
||||||
|
Logger.error("Failed to extract file {}, Message : {}", filename, e.getMessage());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void GetArguments(String[] args){
|
private static void GetArguments(String[] args){
|
||||||
|
|||||||
@@ -1,12 +1,43 @@
|
|||||||
package ProtegeGX;
|
package ProtegeGX;
|
||||||
|
|
||||||
|
import java.util.regex.Pattern;
|
||||||
|
|
||||||
public class ProtegeData {
|
public class ProtegeData {
|
||||||
public String ReaderID;
|
public String FirstName;
|
||||||
public String CardID;
|
public String LastName;
|
||||||
public String Description;
|
public String CardNumber;
|
||||||
|
public int UserNode;
|
||||||
|
public String DoorName;
|
||||||
|
public int DoorNode;
|
||||||
|
public String FieldTime;
|
||||||
|
public String LoggedTime;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString(){
|
public String toString(){
|
||||||
return "ReaderID = " + ReaderID + ", CardID = " + CardID + ", Description = " + Description;
|
return String.format("FirstName: %s\nLastName: %s\nCardNumber: %s\nUserNode: %d\nDoorName: %s\nDoorNode: %d\nFieldTime: %s\nLoggedTime: %s", FirstName, LastName, CardNumber, UserNode, DoorName, DoorNode, FieldTime, LoggedTime);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* create EventData object from string data using Regex
|
||||||
|
* @param data string data
|
||||||
|
* @return EventData object if valid, or null if invalid
|
||||||
|
*/
|
||||||
|
public static ProtegeData Parse(String data){
|
||||||
|
final String regex = "<Description>User (\\w*) (\\w*) \\(([:0-9]*)\\) \\(UN(\\d+)\\).*?To (.*?) \\(DR(\\d+)\\).*?</Description>.*?<FieldTime>(.*?)</FieldTime>.*?<LoggedTime>(.*?)</LoggedTime>";
|
||||||
|
final Pattern pattern = Pattern.compile(regex, Pattern.DOTALL);
|
||||||
|
final java.util.regex.Matcher matcher = pattern.matcher(data);
|
||||||
|
if (matcher.find()){
|
||||||
|
ProtegeData event = new ProtegeData();
|
||||||
|
event.FirstName = matcher.group(1);
|
||||||
|
event.LastName = matcher.group(2);
|
||||||
|
event.CardNumber = matcher.group(3);
|
||||||
|
event.UserNode = Integer.parseInt(matcher.group(4));
|
||||||
|
event.DoorName = matcher.group(5);
|
||||||
|
event.DoorNode = Integer.parseInt(matcher.group(6));
|
||||||
|
event.FieldTime = matcher.group(7);
|
||||||
|
event.LoggedTime = matcher.group(8);
|
||||||
|
return event;
|
||||||
|
}
|
||||||
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,23 +1,87 @@
|
|||||||
package ProtegeGX;
|
package ProtegeGX;
|
||||||
|
|
||||||
|
import lombok.Getter;
|
||||||
import lombok.Setter;
|
import lombok.Setter;
|
||||||
|
import org.pmw.tinylog.Logger;
|
||||||
|
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.io.InputStream;
|
||||||
|
import java.net.ServerSocket;
|
||||||
|
import java.net.Socket;
|
||||||
import java.util.function.Consumer;
|
import java.util.function.Consumer;
|
||||||
|
|
||||||
@SuppressWarnings("unused")
|
|
||||||
public class ProtegeGX {
|
public class ProtegeGX {
|
||||||
@Setter private Consumer<ProtegeData> onCardRead;
|
@Setter private Consumer<ProtegeData> onCardRead;
|
||||||
|
private ServerSocket serverSocket;
|
||||||
|
@Getter private boolean running ;
|
||||||
|
|
||||||
|
private void UpdateCardData(String data){
|
||||||
|
if (data!=null && !data.isEmpty()){
|
||||||
|
ProtegeData cardData = ProtegeData.Parse(data);
|
||||||
|
if (cardData!=null){
|
||||||
|
Logger.info("Card data: "+cardData);
|
||||||
|
if (onCardRead!=null){
|
||||||
|
onCardRead.accept(cardData);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private void updateCardRead(ProtegeData data){
|
|
||||||
if (onCardRead!=null) onCardRead.accept(data);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public ProtegeGX(){
|
|
||||||
System.out.println("ProtegeGX Constructor");
|
|
||||||
//TODO belum ada codingan, tunggu apache cxf jar nya
|
public ProtegeGX(int localport) {
|
||||||
|
running = false;
|
||||||
|
try{
|
||||||
|
serverSocket = new ServerSocket(localport);
|
||||||
|
running = true;
|
||||||
|
Logger.info("ProtegeGX server started on port "+localport);
|
||||||
|
// Thread untuk serverSocket accept client
|
||||||
|
new Thread(()->{
|
||||||
|
while(running){
|
||||||
|
try {
|
||||||
|
Socket client = serverSocket.accept();
|
||||||
|
// Thread untuk komunikasi dengan client
|
||||||
|
new Thread(()->{
|
||||||
|
try {
|
||||||
|
Logger.info("Client connected: "+client.getInetAddress().getHostAddress());
|
||||||
|
InputStream in = client.getInputStream();
|
||||||
|
while(running){
|
||||||
|
byte[] buffer = new byte[1024];
|
||||||
|
int bytesRead = in.read(buffer);
|
||||||
|
if (bytesRead>0){
|
||||||
|
String data = new String(buffer, 0, bytesRead);
|
||||||
|
//Logger.info("Data received: "+data);
|
||||||
|
UpdateCardData(data);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
client.close();
|
||||||
|
Logger.info("Client disconnected: "+client.getInetAddress().getHostAddress());
|
||||||
|
} catch (IOException e) {
|
||||||
|
Logger.error("Failed to read data from client: "+e.getMessage());
|
||||||
|
}
|
||||||
|
|
||||||
|
}).start();
|
||||||
|
} catch (IOException e) {
|
||||||
|
Logger.error("Failed to accept client connection: "+e.getMessage());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}).start();
|
||||||
|
} catch (Exception e){
|
||||||
|
Logger.error("Failed to create server socket: "+e.getMessage());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Disconnect(){
|
public void Disconnect() {
|
||||||
//TODO belum ada codingan, tunggu apache cxf jar nya
|
running = false;
|
||||||
|
if (serverSocket!=null){
|
||||||
|
try{
|
||||||
|
serverSocket.close();
|
||||||
|
Logger.info("ProtegeGX server stopped");
|
||||||
|
} catch (Exception e){
|
||||||
|
Logger.error("Failed to close server socket: "+e.getMessage());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
serverSocket = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,7 +2,11 @@ package Web;
|
|||||||
|
|
||||||
import com.google.gson.Gson;
|
import com.google.gson.Gson;
|
||||||
import io.javalin.Javalin;
|
import io.javalin.Javalin;
|
||||||
|
import io.javalin.core.util.JavalinLogger;
|
||||||
|
import io.javalin.http.staticfiles.Location;
|
||||||
|
import io.javalin.jetty.JettyUtil;
|
||||||
import lombok.Setter;
|
import lombok.Setter;
|
||||||
|
import org.eclipse.jetty.util.log.Log;
|
||||||
|
|
||||||
import java.util.function.Function;
|
import java.util.function.Function;
|
||||||
|
|
||||||
@@ -30,51 +34,43 @@ public class WebServer {
|
|||||||
|
|
||||||
Javalin app;
|
Javalin app;
|
||||||
public WebServer(){
|
public WebServer(){
|
||||||
|
JettyUtil.disableJettyLogger();
|
||||||
|
JavalinLogger.enabled = false;
|
||||||
app = Javalin.create(config -> {
|
app = Javalin.create(config -> {
|
||||||
config.useVirtualThreads = true;
|
config.addStaticFiles("/Web", Location.CLASSPATH);
|
||||||
config.staticFiles.add("/Web");
|
});
|
||||||
config.router.apiBuilder(()->{
|
app.get("/", ctx -> ctx.result("Hello World"));
|
||||||
// API for AAS Mini
|
app.get("/aasmini", ctx -> ctx.result("AAS Mini API"));
|
||||||
path("aasmini", ()->{
|
app.get("/protegegx", ctx -> ctx.result("ProtegeGX API"));
|
||||||
//TODO implement API for AAS Mini
|
app.post("/aasmini", ctx ->{
|
||||||
get(ctx -> ctx.result("AAS Mini API"));
|
try{
|
||||||
post(ctx -> {
|
WebRequest request = gson.fromJson(ctx.body(), WebRequest.class);
|
||||||
try{
|
WebResponse response = ProcessAAS(request);
|
||||||
WebRequest request = gson.fromJson(ctx.body(), WebRequest.class);
|
if (response!=null){
|
||||||
WebResponse response = ProcessAAS(request);
|
ctx.result(gson.toJson(response));
|
||||||
if (response!=null){
|
} else {
|
||||||
ctx.result(gson.toJson(response));
|
ctx.status(400);
|
||||||
} else {
|
ctx.result("No response from AAS Mini");
|
||||||
ctx.status(400);
|
}
|
||||||
ctx.result("No response from AAS Mini");
|
} catch(Exception e){
|
||||||
}
|
ctx.status(400);
|
||||||
} catch(Exception e){
|
ctx.result("Exception: "+e.getMessage());
|
||||||
ctx.status(400);
|
}
|
||||||
ctx.result("Exception: "+e.getMessage());
|
});
|
||||||
}
|
app.post("/protegegx", ctx ->{
|
||||||
});
|
try{
|
||||||
});
|
WebRequest request = gson.fromJson(ctx.body(), WebRequest.class);
|
||||||
// API for ProtegeGX
|
WebResponse response = ProcessProtegeGX(request);
|
||||||
path("protegegx", ()->{
|
if (response!=null){
|
||||||
//TODO implement API for ProtegeGX
|
ctx.result(gson.toJson(response));
|
||||||
get(ctx -> ctx.result("ProtegeGX API"));
|
} else {
|
||||||
post(ctx -> {
|
ctx.status(400);
|
||||||
try{
|
ctx.result("No response from ProtegeGX");
|
||||||
WebRequest request = gson.fromJson(ctx.body(), WebRequest.class);
|
}
|
||||||
WebResponse response = ProcessProtegeGX(request);
|
} catch(Exception e){
|
||||||
if (response!=null){
|
ctx.status(400);
|
||||||
ctx.result(gson.toJson(response));
|
ctx.result("Exception: "+e.getMessage());
|
||||||
} else {
|
}
|
||||||
ctx.status(400);
|
|
||||||
ctx.result("No response from ProtegeGX");
|
|
||||||
}
|
|
||||||
} catch(Exception e){
|
|
||||||
ctx.status(400);
|
|
||||||
ctx.result("Exception: "+e.getMessage());
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user