Package org.apache.jena.assembler
Class ModelExpansion
- java.lang.Object
-
- org.apache.jena.assembler.ModelExpansion
-
public class ModelExpansion extends java.lang.Object
The ModelExpansion code expands a modelM
against a schemaS
, returning a new model which contains- the statements of M
- any statements (A rdfs:subClassOf B) from S where neither A nor B is a bnode.
- statements (A rdf:type T) if M contains (A P any) and S contains (P rdfs:domain T).
- statements (A rdf:type T) if M contains (any P A) and S contains (P rdfs:range T).
- statements (A rdf:type T) if (A rdf:type U) and (U rdfs:subClassOf T).
M
which have properties fromS
to have enough type information for AssemblerGroup dispatch.
-
-
Constructor Summary
Constructors Constructor Description ModelExpansion()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
addSubClassClosure(Model m)
Do (limited) subclass closure onm
.static Model
withSchema(Model model, Model schema)
Answer a new model which is the aggregation of the statements ofmodel
the non-bnode subclass statements ofschema
the subclass closure of those statements the rdf:type statements implied by the rdfs:domain statements ofschema
and themodel
statements using that statements property similarly for rdfs:range the rdf:type statements implied by the subclass closure
-
-
-
Method Detail
-
withSchema
public static Model withSchema(Model model, Model schema)
Answer a new model which is the aggregation of- the statements of
model
- the non-bnode subclass statements of
schema
- the subclass closure of those statements
- the rdf:type statements implied by the rdfs:domain statements
of
schema
and themodel
statements using that statements property - similarly for rdfs:range
- the rdf:type statements implied by the subclass closure
- the statements of
-
addSubClassClosure
public static void addSubClassClosure(Model m)
Do (limited) subclass closure onm
.Those classes in
m
that appear insubClassOf
statements are given as explicit superclasses all their indirect superclasses.
-
-