OBIS Schema Extractor is Java based web application - REST controller to process data schema extraction from SPARQL endpoints or OWL/RDF files. The structure of the response JSON data schema format is described at http://viziquer.lumii.lv/schema-extractor.
Contents
OBIS Schema Extractor artifact is packaged executable JAR file and needs Java 1.8 to run.
- install Java
- copy build/schema-extractor-exec.jar to any folder
- run executable JAR file
java -jar schema-extractor-exec.jar
- navigate to http://server:port/swagger-ui.html (default URL - http://localhost:8080/swagger-ui.html)
- configure the parameters, as described on the browser page
If you need different port, run executable JAR file java -jar schema-extractor-exec.jar --server.port=1234
Schema Extractor RESTful APIs are expressed using JSON services and described in Swagger http://server:port/swagger-ui.html with requests and response models examples.
Service Type and Version | Description |
---|---|
V1 SPARQL Endpoint | Extract and analyze data from SPARQL endpoint and build full schema model (version 1) |
V1 OWL/RDF File | Extract and analyze schema from OWL ontology file and then enhance with data from SPARQL endpoint (if provided) |
V2 SPARQL Endpoint | Extract and analyze data from SPARQL endpoint and build full schema model (version 2) |
GET http://server:port/schema-extractor-rest/v1/endpoint/buildFullSchema
curl -X GET "http://localhost:8080/schema-extractor-rest/v1/endpoint/buildFullSchema?endpointUrl=http%3A%2F%2Flocalhost%3A8890%2Fsparql&graphName=MiniUniv&version=fewComplexQueries&mode=full&enableLogging=false&excludeSystemClasses=true&excludeMetaDomainClasses=false&excludePropertiesWithoutClasses=true" -H "accept: application/json"
Example JSON response - SampleExtractedSchemaV1.json
POST http://server:port/schema-extractor-rest/v2/endpoint/buildFullSchema
curl -X POST "http://localhost:8080/schema-extractor-rest/v2/endpoint/buildFullSchema?endpointUrl=http%3A%2F%2Flocalhost%3A8890%2Fsparql&graphName=MiniUniv&calculateSubClassRelations=true&calculatePropertyPropertyRelations=true&calculateDomainAndRangePairs=true&calculateDataTypes=true&calculateCardinalitiesMode=propertyLevelAndClassContext&minimalAnalyzedClassSize=0&enableLogging=true" -H "accept: application/json" -H "Content-Type: multipart/form-data"
Example JSON response - SampleExtractedSchemaV2.json
POST http://server:port/schema-extractor-rest/v1/owlFile/buildFullSchema
curl -X POST "http://localhost:8080/schema-extractor-rest/v1/owlFile/buildFullSchema?abstractPropertyThreshold=10&propertyInstanceCountThreshold=1000&calculateCardinalities=false" -H "accept: application/json" -H "Content-Type: multipart/form-data" -F "[email protected];type="
Uploaded RDF/OWL schema information is converted to JSON format with data schema information.
Example RDF schema - SampleTestOntology.owl
Example JSON response - SampleTestOntology_Schema.json
Checkout the project from the GIT
$ cd OBIS-SchemaExtractor
$ mvn clean install
$ cd target
$ java -jar schema-extractor-exec.jar
If you are using IDEA, you can start services by directly running SchemaExtractorApplication.java