The RDF model that holds the vocabulary terms
*/ - private static OntModel m_model = ModelFactory.createOntologyModel(OntModelSpec.OWL_MEM, null); + private static OntModel m_model = OntModelFactory.createModel(OntSpecification.OWL2_FULL_MEM); /**The namespace of the vocabulary as a string
*/ public static final String NS = "https://w3id.org/atomgraph/core#"; @@ -47,33 +52,33 @@ public static String getURI() public static final Resource NAMESPACE = m_model.createResource( NS ); /** Dataset file property */ - public static final DatatypeProperty dataset = m_model.createDatatypeProperty( NS + "dataset" ); + public static final Property dataset = m_model.createDataProperty( NS + "dataset" ); /** Graph Store URL property */ - public static final ObjectProperty graphStore = m_model.createObjectProperty( NS + "graphStore" ); + public static final Property graphStore = m_model.createObjectProperty( NS + "graphStore" ); /** Quad store URL property */ - public static final ObjectProperty quadStore = m_model.createObjectProperty( NS + "quadStore" ); + public static final Property quadStore = m_model.createObjectProperty( NS + "quadStore" ); /**Cache-Control property **/
- public static final DatatypeProperty cacheControl = m_model.createDatatypeProperty( NS + "cacheControl" );
+ public static final Property cacheControl = m_model.createDataProperty( NS + "cacheControl" );
/** Result limit property */
- public static final DatatypeProperty resultLimit = m_model.createDatatypeProperty( NS + "resultLimit" );
+ public static final Property resultLimit = m_model.createDataProperty( NS + "resultLimit" );
/** Cache models property */
- public static final DatatypeProperty cacheModelLoads = m_model.createDatatypeProperty( NS + "cacheModelLoads" );
+ public static final Property cacheModelLoads = m_model.createDataProperty( NS + "cacheModelLoads" );
/** Preemptive HTTP Basic auth property */
- public static final DatatypeProperty preemptiveAuth = m_model.createDatatypeProperty( NS + "preemptiveAuth" );
+ public static final Property preemptiveAuth = m_model.createDataProperty( NS + "preemptiveAuth" );
/** Max GET request size property */
- public static final DatatypeProperty maxGetRequestSize = m_model.createDatatypeProperty( NS + "maxGetRequestSize" );
+ public static final Property maxGetRequestSize = m_model.createDataProperty( NS + "maxGetRequestSize" );
/** HTTP Basic auth user property */
- public static final DatatypeProperty authUser = m_model.createDatatypeProperty( NS + "authUser" );
+ public static final Property authUser = m_model.createDataProperty( NS + "authUser" );
/** HTTP Basic auth password property */
- public static final DatatypeProperty authPwd = m_model.createDatatypeProperty( NS + "authPwd" );
+ public static final Property authPwd = m_model.createDataProperty( NS + "authPwd" );
}
\ No newline at end of file
diff --git a/src/main/java/com/atomgraph/core/vocabulary/SD.java b/src/main/java/com/atomgraph/core/vocabulary/SD.java
index 2b2d773..886312c 100644
--- a/src/main/java/com/atomgraph/core/vocabulary/SD.java
+++ b/src/main/java/com/atomgraph/core/vocabulary/SD.java
@@ -16,12 +16,11 @@
*/
package com.atomgraph.core.vocabulary;
-import org.apache.jena.ontology.Individual;
-import org.apache.jena.ontology.ObjectProperty;
-import org.apache.jena.ontology.OntClass;
-import org.apache.jena.ontology.OntModel;
-import org.apache.jena.ontology.OntModelSpec;
-import org.apache.jena.rdf.model.ModelFactory;
+import org.apache.jena.ontapi.OntModelFactory;
+import org.apache.jena.ontapi.OntSpecification;
+import org.apache.jena.ontapi.model.OntClass;
+import org.apache.jena.ontapi.model.OntModel;
+import org.apache.jena.rdf.model.Property;
import org.apache.jena.rdf.model.Resource;
/**
@@ -30,12 +29,18 @@
*/
public class SD
{
+
+ static
+ {
+ org.apache.jena.sys.JenaSystem.init(); // ensure Jena (RDFS vocab) is initialized before ontapi touches it
+ }
+
/** The RDF model that holds the vocabulary terms
*/ - private static OntModel m_model = ModelFactory.createOntologyModel(OntModelSpec.OWL_MEM, null); - + private static OntModel m_model = OntModelFactory.createModel(OntSpecification.OWL2_FULL_MEM); + /**The namespace of the vocabulary as a string
*/ public static final String NS = "http://www.w3.org/ns/sparql-service-description#"; - + /**The namespace of the vocabulary as a string
* @return namespace URI * @see #NS */ @@ -43,36 +48,36 @@ public static String getURI() { return NS; } - + /**The namespace of the vocabulary as a resource
*/ public static final Resource NAMESPACE = m_model.createResource( NS ); - - public static final OntClass Dataset = m_model.createClass( NS + "Dataset" ); - public static final OntClass Service = m_model.createClass( NS + "Service" ); + public static final OntClass Dataset = m_model.createOntClass( NS + "Dataset" ); + + public static final OntClass Service = m_model.createOntClass( NS + "Service" ); + + public static final OntClass Graph = m_model.createOntClass( NS + "Graph" ); + + public static final OntClass NamedGraph = m_model.createOntClass( NS + "NamedGraph" ); + + public static final OntClass Language = m_model.createOntClass( NS + "Language" ); + + public static final Property endpoint = m_model.createObjectProperty( NS + "endpoint" ); + + public static final Property graph = m_model.createObjectProperty( NS + "graph" ); + + public static final Property name = m_model.createObjectProperty( NS + "name" ); - public static final OntClass Graph = m_model.createClass( NS + "Graph" ); - - public static final OntClass NamedGraph = m_model.createClass( NS + "NamedGraph" ); - - public static final OntClass Language = m_model.createClass( NS + "Language" ); - - public static final ObjectProperty endpoint = m_model.createObjectProperty( NS + "endpoint" ); + public static final Property defaultGraph = m_model.createObjectProperty( NS + "defaultGraph" ); - public static final ObjectProperty graph = m_model.createObjectProperty( NS + "graph" ); + public static final Property namedGraph = m_model.createObjectProperty( NS + "namedGraph" ); - public static final ObjectProperty name = m_model.createObjectProperty( NS + "name" ); + public static final Property supportedLanguage = m_model.createObjectProperty( NS + "supportedLanguage" ); - public static final ObjectProperty defaultGraph = m_model.createObjectProperty( NS + "defaultGraph" ); + public static final Resource SPARQL10Query = m_model.createIndividual(NS + "SPARQL10Query", Language); - public static final ObjectProperty namedGraph = m_model.createObjectProperty( NS + "namedGraph" ); - - public static final ObjectProperty supportedLanguage = m_model.createObjectProperty( NS + "supportedLanguage" ); - - public static final Individual SPARQL10Query = m_model.createIndividual(NS + "SPARQL10Query", Language); - - public static final Individual SPARQL11Query = m_model.createIndividual(NS + "SPARQL11Query", Language); + public static final Resource SPARQL11Query = m_model.createIndividual(NS + "SPARQL11Query", Language); - public static final Individual SPARQL11Update = m_model.createIndividual(NS + "SPARQL11Update", Language); + public static final Resource SPARQL11Update = m_model.createIndividual(NS + "SPARQL11Update", Language); }