-
Notifications
You must be signed in to change notification settings - Fork 18
Webservice User Guide
Open a console and navigate to the folder where all the modules are: OLGAAsAService/OLGA and you can compile and package the web service from there:
cd /path/to/OLGAAsAService/OLGA
mvn --projects OLGA-Core,OLGA-Ws clean install
Grab a coffee, stretch your legs, this will take some time... Or skip the tests :
cd /path/to/OLGAAsAService/OLGA
mvn --projects OLGA-Core,OLGA-Ws clean install -DskipTests
The above commands generate the OLGA web service.jar in the folder target inside the module OLGA-Ws, to run the web service with its default parameter do as follow:
cd OLGA-Ws/target
java -jar ./OLGA-Ws-0.0.4-with-dependencies.jar
The web service is now running on port 9090, and is reachable at http://localhost:9090/Ontology/OLGAsaas/1.0.0/1.0. If you want to run the service on another port, open your file explorer and create an application.properties file in the target folder of Olga-Ws and enter the text "server.port=${port}" with your desired port as ${port} or you can modify it before building the web service in "/OLGA-Ws/src/main/resources/application.properties", run the web service as follow:
java -jar ./OLGA-Ws-0.0.4-with-dependencies.jar application.properties
The service is now running on port ${port}.
OLGA As A Service has three end points:
-
Post request to generate the object oriented model based on an ontology model and the URL ends with "/1.0/generate".
Parameters:
* code -> "java or cs or python". * name -> String. * library-> "trinity[cs] or rdf4j[java] or rdfalchemy[python]. * preserve-> Boolean "Optional". * version-> String follow the version convention "Optional". * partial-> Boolean "Optional".
Header: Content-Type-> application/zip.
Body: a zipped folder with your ontology(ies).
Response: Generated project.
-
Get request to collect all of the daily log files and the URL ends with "/1.0/admin/collectlogs".
Response: All of the uncleared log files.
-
Get request to clear all of the daily log files and the URL ends with "/1.0/admin/clearlogs".