java.lang.Object
org.apache.jena.assembler.AssemblerHelp
AssemblerHelp provides utility methods used by, and useful for working with,
the Assembler code, including the methods that expand a model to include the
required inferences and to find the most specific type of a root in an
assembler specification.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionfindAssemblerRoots
(Model model) Answer a Set of the ja:Object resources in the full expansion of the assembler specification modelmodel
.findAssemblerRoots
(Model model, Resource type) Answer a Set of the objects in the full expansion of the assembler specificationmodel
which have rdf:typetype
, which must be a subtype ofja:Object
.static Resource
findSpecificType
(Resource root) Answer the most specific type ofroot
that is a subclass of ja:Object.static Resource
findSpecificType
(Resource root, Resource baseType) Answer the most specific type ofroot
that is a subclass ofgivenType
.findSpecificTypes
(Resource root, Resource baseType) Answer all the types ofroot
which are subtypes ofbaseType
and which do not have subtypes which are also types ofroot
.static Model
fullModel
(ImportManager im, Model m) Answer the full model ofm
, with all its imports included and with the necessary properties added from the JA schema.static Model
Answer the full model ofm
, with all its imports included and with the necessary properties added from the JA schema.static Resource
Answer the resource that is the object of the statements
.static String
Answer the plain string object of the statements
.static String
Answer the String value of the literalL
, which is the object of the Statements
.static void
Load all the classes which are objects of any (t, ja:loadClass, S) statements inm
.static void
loadAssemblerClasses
(AssemblerGroup group, Model m) Load all the classes which are objects of any (t, ja:assembler, S) statements inm
.static Resource
singleModelRoot
(Model singleRoot) Answer the single resource insingleRoot
of typeja:Model
.static Resource
singleRoot
(Model singleRoot, Resource type) Answer the single resource insingleRoot
of typetype
.static Resource
withFullModel
(Resource root) Answer a Resource .equals() toroot
, but in the expanded model.
-
Constructor Details
-
AssemblerHelp
public AssemblerHelp()
-
-
Method Details
-
withFullModel
Answer a Resource .equals() toroot
, but in the expanded model. -
fullModel
Answer the full model ofm
, with all its imports included and with the necessary properties added from the JA schema. However, if the magic footprint triple (ja:this, rdf:type, ja:Expanded) is present in the model, it is returned unchanged. Imports are managed by the sharedImportManager.instance
. -
fullModel
Answer the full model ofm
, with all its imports included and with the necessary properties added from the JA schema. However, if the magic footprint triple (ja:this, rdf:type, ja:Expanded) is present in the model, it is returned unchanged. Imports are managed byim
. -
loadArbitraryClasses
Load all the classes which are objects of any (t, ja:loadClass, S) statements inm
. The order in which the classes are loaded is not specified, and loading stops immediately if any class cannot be loaded.Contrast with
loadClasses(AssemblerGroup,Model)
, which loads classes and assumes that those classes are assemblers to be added to the group. -
loadAssemblerClasses
Load all the classes which are objects of any (t, ja:assembler, S) statements inm
.group.implementWIth(t,c)
is called for each statement, wherec
is an instance of the class named byS
. The order in which the classes are loaded is not specified, and loading stops immediately if any class cannot be loaded. -
findSpecificType
Answer the most specific type ofroot
that is a subclass of ja:Object. If there are no candidate types, answergivenType
. If there is more than one type, throw a NoSpecificTypeException. -
findSpecificType
Answer the most specific type ofroot
that is a subclass ofgivenType
. If there are no candidate types, answergivenType
. If there is more than one type, throw a NoSpecificTypeException. -
findSpecificTypes
Answer all the types ofroot
which are subtypes ofbaseType
and which do not have subtypes which are also types ofroot
. -
getResource
Answer the resource that is the object of the statements
. If the object is not a resource, throw a BadObjectException with that statement. -
getString
Answer the plain string object of the statements
. If the object is not a string literal, throw a BadObjectException with that statement. -
getString
Answer the String value of the literalL
, which is the object of the Statements
. If the literal is not an XSD String or a plain string without a language code, throw a BadObjectException. -
findAssemblerRoots
Answer a Set of the ja:Object resources in the full expansion of the assembler specification modelmodel
. -
findAssemblerRoots
Answer a Set of the objects in the full expansion of the assembler specificationmodel
which have rdf:typetype
, which must be a subtype ofja:Object
. -
singleModelRoot
Answer the single resource insingleRoot
of typeja:Model
. Otherwise throw an exception. -
singleRoot
Answer the single resource insingleRoot
of typetype
. Otherwise throw an exception.
-