Ontology Service
Github repository: https://github.com/ATTX-project/ontology-service
The service makes use of: https://jena.apache.org/documentation/inference
NOTE
There is a bug in the service images that cause messagebroker connection to fail when starting the service for the first time. In order to get the service connected you have to restart it.
- docker ps
- docker restart [ontology-service-container-id]
Table of Contents
Overview
The Indexing REST API has the following endpoints:
infer
- infer new data based on a schema/ontlogy and a data graph;report
- validated RDF data agains a schema/ontology and retrieve a report;health
- checks if the application is running.
Current version: 0.2
(URL for the endpoint should take into consideration for the API http://host:4305/version/endpoint
)
Building Ontology Service
In order to work with the service start with:
- Ontology Service source - contains information on building both the project and the Docker image and testing from the source code;
Build with Gradle and run:
gradle run
Message Broker Connection
Ontology Service needs RabbitMQ Message Broker .
Environment Variables
MHOST
- container name or address for the MessageBroker-RabbitMQ database (defaults tolocalhost
);MUSER
- user name for MessageBroker (defaults touser
);MPASS
- password for MessageBroker (defaults topassword
).
Service API Endpoints
health Endpoint
health
GET API:- simple: http://localhost:4305/health reponds with
200
in order for other applications to know the service is running.
- simple: http://localhost:4305/health reponds with
alias Endpoint
/infer
POST API: infer new data.
{
"schemaGraph": "file:///resources/owlDemoSchema.ttl",
"dataGraph":"file:///resources/owlDemoData.ttl"
}
data Endpoint
/report
POST API: validity report.
{
"schemaGraph": "file:///resources/owlDemoSchema.ttl",
"dataGraph":"file:///resources/owlDemoData.ttl"
}