-
Method Summary
Modifier and TypeMethodDescriptionstatic ModelassembleModelFrom(Model singleRoot) Answer a Model constructed from the single resource insingleRootof typeja:Model.static ModelassembleModelFrom(Resource root) Answer a Model as described the Assembler specification rooted at the Resourcerootin its Model.static ModelAnswer a fresh Model for use with the Model API.static InfModelBuild an inference model from an InfGraph.static InfModelcreateInfModel(Reasoner reasoner, Model model) Build an inferred model by attaching the given RDF model to the given reasoner.static InfModelcreateInfModel(Reasoner reasoner, Model schema, Model model) Build an inferred model by attaching the given RDF model to the given reasoner.static ModelMakerDeprecated, for removal: This API element is subject to removal in a future version.Use org.apache.jena.ontapi.static ModelAnswer a model that encapsulates the given graph.static ModelAnswer a fresh Model with "same term" semantics.static ModelAnswer a fresh Model with "same value" semantics.static OntModelDeprecated, for removal: This API element is subject to removal in a future version.Use org.apache.jena.ontapi.static OntModelcreateOntologyModel(String languageURI) Deprecated, for removal: This API element is subject to removal in a future version.Use org.apache.jena.ontapi.static OntModelDeprecated, for removal: This API element is subject to removal in a future version.Use org.apache.jena.ontapi.static OntModelcreateOntologyModel(OntModelSpec spec, ModelMaker maker, Model base) Deprecated, for removal: This API element is subject to removal in a future version.Use org.apache.jena.ontapi.static OntModelcreateOntologyModel(OntModelSpec spec, Model base) Deprecated, for removal: This API element is subject to removal in a future version.Use org.apache.jena.ontapi.static InfModelcreateRDFSModel(Model model) Return a Model through which all the RDFS entailments derivable from the given model are accessible.static InfModelcreateRDFSModel(Model schema, Model model) Return a Model through which all the RDFS entailments derivable from the given data and schema models are accessible.static ModelcreateUnion(Model m1, Model m2) Answer a new model that is the dynamic union of two other models.Answer a Set of resources present inmthat are explicitly or implicitly of type ja:Object, i.e., suitable as roots forassemblerModelFrom.
-
Method Details
-
createDefaultModel
Answer a fresh Model for use with the Model API.This model is "same value" for Model API compatibility.
- See Also:
-
createModelSameTerm
Answer a fresh Model with "same term" semantics. -
createModelSameValue
Answer a fresh Model with "same value" semantics. -
createModelForGraph
Answer a model that encapsulates the given graph. Existing prefixes are undisturbed.- Parameters:
g- A graph structure- Returns:
- A model presenting an API view of graph g
-
createMemModelMaker
Deprecated, for removal: This API element is subject to removal in a future version.Use org.apache.jena.ontapi.Answer a ModelMaker that constructs memory-based Models that do not persist past JVM termination.- Returns:
- a ModelMaker that constructs memory-based models
-
createRDFSModel
Return a Model through which all the RDFS entailments derivable from the given model are accessible. Some work is done when the inferenced model is created but each query will also trigger some additional inference work.- Parameters:
model- the Model containing both instance data and schema assertions to be inferenced over
-
createRDFSModel
Return a Model through which all the RDFS entailments derivable from the given data and schema models are accessible. There is no strict requirement to separate schema and instance data between the two arguments.- Parameters:
model- a Model containing instance data assertionsschema- a Model containing RDFS schema data
-
createInfModel
Build an inferred model by attaching the given RDF model to the given reasoner.- Parameters:
reasoner- the reasoner to use to process the datamodel- the Model containing both instance data and schema assertions to be inferenced over, any statements added to the InfModel will be added to this underlying data model.
-
createInfModel
Build an inferred model by attaching the given RDF model to the given reasoner. This form of the call allows two data sets to be merged and reasoned over - conventionally one contains schema data and one instance data but this is not a formal requirement.- Parameters:
reasoner- the reasoner to use to process the dataschema- a Model containing RDFS schema datamodel- a Model containing instance data assertions, any statements added to the InfModel will be added to this underlying data model.
-
createInfModel
Build an inference model from an InfGraph. Graphs and InfGraphs are internal implementation level objects rather than normal user objects so this method should only be used if you are sure this is what you need.- Parameters:
g- and inference graph- Returns:
- the same graph wrapped up as an InfModel
-
createOntologyModel
Deprecated, for removal: This API element is subject to removal in a future version.Use org.apache.jena.ontapi.Answer a new ontology model which will process in-memory models of ontologies expressed the default ontology language (OWL). The default document manager will be used to load the ontology's included documents.
Note:The default model chosen for OWL and RDFS includes a weak reasoner that includes some entailments (such as transitive closure on the sub-class and sub-property hierarchies). Users who want either no inference at all, or alternatively more complete reasoning, should use one of the other
createOntologyModelmethods that allow the preferred OntModel specification to be stated.- Returns:
- A new ontology model
- See Also:
-
assembleModelFrom
Answer a Model constructed from the single resource insingleRootof typeja:Model. See the Assembler howto (doc/assembler/assembler-howto.html) for documentation of Assembler descriptions. See alsofindAssemblerRootsto find the set of possible roots in a description, andassemblerModelFrom(Resource)for assembling a model from its single description. -
findAssemblerRoots
Answer a Set of resources present inmthat are explicitly or implicitly of type ja:Object, i.e., suitable as roots forassemblerModelFrom. Note that the resource objects returned need not havemas theirgetModel()- they may be members of an extended constructed model. -
assembleModelFrom
Answer a Model as described the Assembler specification rooted at the Resourcerootin its Model.Resourcemust be of rdf:typeja:Object, wherejais the prefix of Jena Assembler objects. -
createOntologyModel
Deprecated, for removal: This API element is subject to removal in a future version.Use org.apache.jena.ontapi.Answer a new ontology model which will process in-memory models of ontologies in the given language. The default document manager will be used to load the ontology's included documents.
- Parameters:
languageURI- The URI specifying the ontology language we want to process- Returns:
- A new ontology model
- See Also:
-
createOntologyModel
@Deprecated(forRemoval=true) public static OntModel createOntologyModel(OntModelSpec spec, ModelMaker maker, Model base) Deprecated, for removal: This API element is subject to removal in a future version.Use org.apache.jena.ontapi.Answer a new ontology model which will process in-memory models of ontologies expressed the default ontology language (OWL). The default document manager will be used to load the ontology's included documents.
- Parameters:
spec- An ontology model specification that defines the language and reasoner to usemaker- A model maker that is used to get the initial store for the ontology (unless the base model is given), and create addtional stores for the models in the imports closurebase- The base model, which contains the contents of the ontology to be processed- Returns:
- A new ontology model
- See Also:
-
createOntologyModel
@Deprecated(forRemoval=true) public static OntModel createOntologyModel(OntModelSpec spec, Model base) Deprecated, for removal: This API element is subject to removal in a future version.Use org.apache.jena.ontapi.Answer a new ontology model, constructed according to the given ontology model specification, and starting with the ontology data in the given model.
- Parameters:
spec- An ontology model specification object, that will be used to construct the ontology model with different options of ontology language, reasoner, document manager and storage modelbase- An existing model to treat as an ontology model, or null.- Returns:
- A new ontology model
- See Also:
-
createOntologyModel
Deprecated, for removal: This API element is subject to removal in a future version.Use org.apache.jena.ontapi.Answer a new ontology model constructed according to the specification, which includes a ModelMaker which will create the necessary base model. -
createUnion
Answer a new model that is the dynamic union of two other models. By dynamic union, we mean that changes to eitherm1orm2will be reflected in the result model, and vice versa: specifically, additions to and removals from the union will be implemented as operations onm1only. See also the behaviour of OntModel and the MultiUnion class.createUniononly creates two-element unions.
-