- All Implemented Interfaces:
FrontsNode,Ontology,OntResource,RDFNode,Resource
Implementation of the Ontology interface, encapsulating nodes that hold the meta-data about whole ontologies.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic ImplementationA factory for generating Ontology facets from nodes in enhanced graphs.Fields inherited from class org.apache.jena.ontology.impl.OntResourceImpl
KNOWN_LANGUAGESFields inherited from class org.apache.jena.rdf.model.impl.ResourceImpl
rdfNodeFactory -
Constructor Summary
ConstructorsConstructorDescriptionOntologyImpl(Node n, EnhGraph g) Construct an ontology metadata node represented by the given node in the given graph. -
Method Summary
Modifier and TypeMethodDescriptionvoidAdd a resource representing an ontology that this ontology (strictly, the ontology represented by this node) is backwards compatible with.voidAdd a resource representing an ontology that this ontology (strictly, the ontology represented by this node) imports.voidAdd a resource representing an ontology that this ontology (strictly, the ontology represented by this node) is incompatible with.voidaddPriorVersion(Resource res) Add a resource representing an ontology that this ontology (strictly, the ontology represented by this node) supercedes.Answer a resource that represents an ontology that is backwards compatible with this ontology.Answer a resource that represents an ontology imported by this ontology.Answer a resource that represents an ontology that is incompatible with this ontology.Answer a resource that represents an ontology that is superceded by this ontology.booleanhasPriorVersion(Resource res) Answer true if this ontology (the ontology represented by this resource) supercedes the given resource.booleanAnswer true if this ontology (the ontology represented by this resource) imports the given resource.booleanAnswer true if this ontology (the ontology represented by this resource) is backward compatible with the given resource.booleanAnswer true if this ontology (the ontology represented by this resource) is incompatible with the given resource.Answer an iterator over all of the resources representing ontologies that this ontology is backwards compatible with.Answer an iterator over all of the resources representing ontologies imported by this ontology.Answer an iterator over all of the resources representing ontologies that this ontology is incompatible with.Answer an iterator over all of the resources representing ontologies that this ontology supercedes.voidRemove the statement that this ontology is backwards compatible with the ontology represented by the given resource.voidremoveImport(Resource res) Remove the statement that this ontology imports the ontology represented by the given resource.voidRemove the statement that the given ontology is incompatible with this ontology.voidRemove the statement that the given ontology is a prior version of this ontology.voidAssert that this ontology is backward compatible with the given ontology.voidAssert that this ontology imports only the given ontology.voidAssert that this ontology is incompatible with the given ontology.voidsetPriorVersion(Resource res) Assert that this ontology is a new version of the given ontology.Methods inherited from class org.apache.jena.ontology.impl.OntResourceImpl
addComment, addComment, addDifferentFrom, addIsDefinedBy, addLabel, addLabel, addRDFType, addSameAs, addSeeAlso, addVersionInfo, asAllDifferent, asAnnotationProperty, asClass, asDataRange, asDatatypeProperty, asIndividual, asObjectProperty, asOntology, asProperty, getCardinality, getComment, getDifferentFrom, getIsDefinedBy, getLabel, getOntModel, getProfile, getPropertyValue, getRDFType, getRDFType, getSameAs, getSeeAlso, getVersionInfo, hasComment, hasComment, hasLabel, hasLabel, hasRDFType, hasRDFType, hasRDFType, hasSeeAlso, hasVersionInfo, isAllDifferent, isAnnotationProperty, isClass, isDataRange, isDatatypeProperty, isDefinedBy, isDifferentFrom, isIndividual, isObjectProperty, isOntLanguageTerm, isOntology, isProperty, isSameAs, listComments, listDifferentFrom, listIsDefinedBy, listLabels, listPropertyValues, listRDFTypes, listSameAs, listSeeAlso, listVersionInfo, remove, removeComment, removeComment, removeDefinedBy, removeDifferentFrom, removeLabel, removeLabel, removeProperty, removeRDFType, removeSameAs, removeSeeAlso, removeVersionInfo, setComment, setDifferentFrom, setIsDefinedBy, setLabel, setPropertyValue, setRDFType, setSameAs, setSeeAlso, setVersionInfoMethods inherited from class org.apache.jena.rdf.model.impl.ResourceImpl
abort, addLiteral, addLiteral, addLiteral, addLiteral, addLiteral, addLiteral, addLiteral, addProperty, addProperty, addProperty, addProperty, addProperty, addProperty, addProperty, asLiteral, asResource, asStatementTerm, begin, commit, getId, getLocalName, getModel, getNameSpace, getProperty, getProperty, getPropertyResourceValue, getRequiredProperty, getRequiredProperty, getURI, hasLiteral, hasLiteral, hasLiteral, hasLiteral, hasLiteral, hasLiteral, hasProperty, hasProperty, hasProperty, hasProperty, hasURI, inModel, listProperties, listProperties, listProperties, removeAll, removeProperties, toString, visitWithMethods inherited from class org.apache.jena.enhanced.EnhNode
as, asNode, canAs, equals, getGraph, hashCode, isAnon, isLiteral, isResource, isStatementTerm, isURIResource, isValid, viewAsMethods inherited from class org.apache.jena.enhanced.Polymorphic
addView, supportsMethods inherited from interface org.apache.jena.graph.FrontsNode
asNodeMethods inherited from interface org.apache.jena.ontology.OntResource
addComment, addComment, addDifferentFrom, addIsDefinedBy, addLabel, addLabel, addRDFType, addSameAs, addSeeAlso, addVersionInfo, asAllDifferent, asAnnotationProperty, asClass, asDataRange, asDatatypeProperty, asIndividual, asObjectProperty, asOntology, asProperty, getCardinality, getComment, getDifferentFrom, getIsDefinedBy, getLabel, getOntModel, getProfile, getPropertyValue, getRDFType, getRDFType, getSameAs, getSeeAlso, getVersionInfo, hasComment, hasComment, hasLabel, hasLabel, hasRDFType, hasRDFType, hasRDFType, hasSeeAlso, hasVersionInfo, isAllDifferent, isAnnotationProperty, isClass, isDataRange, isDatatypeProperty, isDefinedBy, isDifferentFrom, isIndividual, isObjectProperty, isOntLanguageTerm, isOntology, isProperty, isSameAs, listComments, listDifferentFrom, listIsDefinedBy, listLabels, listPropertyValues, listRDFTypes, listSameAs, listSeeAlso, listVersionInfo, remove, removeComment, removeComment, removeDefinedBy, removeDifferentFrom, removeLabel, removeLabel, removeProperty, removeRDFType, removeSameAs, removeSeeAlso, removeVersionInfo, setComment, setDifferentFrom, setIsDefinedBy, setLabel, setPropertyValue, setRDFType, setSameAs, setSeeAlso, setVersionInfoMethods inherited from interface org.apache.jena.rdf.model.RDFNode
as, asLiteral, asResource, asStatementTerm, canAs, getModel, isAnon, isLiteral, isResource, isStatementTerm, isURIResource, visitWithMethods inherited from interface org.apache.jena.rdf.model.Resource
abort, addLiteral, addLiteral, addLiteral, addLiteral, addLiteral, addLiteral, addLiteral, addProperty, addProperty, addProperty, addProperty, begin, commit, equals, getId, getLocalName, getNameSpace, getProperty, getProperty, getPropertyResourceValue, getRequiredProperty, getRequiredProperty, getURI, hasLiteral, hasLiteral, hasLiteral, hasLiteral, hasLiteral, hasLiteral, hasProperty, hasProperty, hasProperty, hasProperty, hasURI, inModel, listProperties, listProperties, listProperties, removeAll, removeProperties, toString
-
Field Details
-
factory
A factory for generating Ontology facets from nodes in enhanced graphs.
-
-
Constructor Details
-
OntologyImpl
Construct an ontology metadata node represented by the given node in the given graph.
- Parameters:
n- The node that represents the resourceg- The enh graph that contains n
-
-
Method Details
-
setImport
Assert that this ontology imports only the given ontology. Any existing statements for
sameAswill be removed.- Specified by:
setImportin interfaceOntology- Parameters:
res- Represents a resource that this ontology imports.- Throws:
ProfileException- If theProfile.IMPORTS()property is not supported in the current language profile.
-
addImport
Add a resource representing an ontology that this ontology (strictly, the ontology represented by this node) imports.
- Specified by:
addImportin interfaceOntology- Parameters:
res- Represents a resource that this ontology imports.- Throws:
ProfileException- If theProfile.IMPORTS()property is not supported in the current language profile.
-
getImport
Answer a resource that represents an ontology imported by this ontology. If there is more than one such resource, an arbitrary selection is made.
- Specified by:
getImportin interfaceOntology- Returns:
- An ont resource representing a resource that this ontology imports
- Throws:
ProfileException- If theProfile.IMPORTS()property is not supported in the current language profile.
-
listImports
Answer an iterator over all of the resources representing ontologies imported by this ontology. Each element of the iterator will be an
OntResource.- Specified by:
listImportsin interfaceOntology- Returns:
- An iterator over the ontology import resources
- Throws:
ProfileException- If theProfile.IMPORTS()property is not supported in the current language profile.
-
imports
Answer true if this ontology (the ontology represented by this resource) imports the given resource.
-
removeImport
Remove the statement that this ontology imports the ontology represented by the given resource. If this statement is not true of the current model, nothing happens.
- Specified by:
removeImportin interfaceOntology- Parameters:
res- A resource that represents an ontology that is no longer to be imported
-
setBackwardCompatibleWith
Assert that this ontology is backward compatible with the given ontology. Any existing statements for
sameAswill be removed.- Specified by:
setBackwardCompatibleWithin interfaceOntology- Parameters:
res- Represents a resource that this ontology is compatible with.- Throws:
ProfileException- If theProfile.BACKWARD_COMPATIBLE_WITH()property is not supported in the current language profile.
-
addBackwardCompatibleWith
Add a resource representing an ontology that this ontology (strictly, the ontology represented by this node) is backwards compatible with.
- Specified by:
addBackwardCompatibleWithin interfaceOntology- Parameters:
res- Represents a resource that this ontology is compatible with.- Throws:
ProfileException- If theProfile.BACKWARD_COMPATIBLE_WITH()property is not supported in the current language profile.
-
getBackwardCompatibleWith
Answer a resource that represents an ontology that is backwards compatible with this ontology. If there is more than one such resource, an arbitrary selection is made.
- Specified by:
getBackwardCompatibleWithin interfaceOntology- Returns:
- An ont resource representing an ontology that this ontology is compatible with
- Throws:
ProfileException- If theProfile.BACKWARD_COMPATIBLE_WITH()property is not supported in the current language profile.
-
listBackwardCompatibleWith
Answer an iterator over all of the resources representing ontologies that this ontology is backwards compatible with. Each element of the iterator will be an
OntResource.- Specified by:
listBackwardCompatibleWithin interfaceOntology- Returns:
- An iterator over the ontology resources compatible with this ontology
- Throws:
ProfileException- If theProfile.BACKWARD_COMPATIBLE_WITH()property is not supported in the current language profile.
-
isBackwardCompatibleWith
Answer true if this ontology (the ontology represented by this resource) is backward compatible with the given resource.
- Specified by:
isBackwardCompatibleWithin interfaceOntology- Parameters:
res- A resource to test against- Returns:
- True if this ontology is compatible with the ontology represented by
res
-
removeBackwardCompatibleWith
Remove the statement that this ontology is backwards compatible with the ontology represented by the given resource. If this statement is not true of the current model, nothing happens.
- Specified by:
removeBackwardCompatibleWithin interfaceOntology- Parameters:
res- A resource that represents an ontology that is no longer to be imported
-
setPriorVersion
Assert that this ontology is a new version of the given ontology. Any existing statements for
priorVersionwill be removed.- Specified by:
setPriorVersionin interfaceOntology- Parameters:
res- Represents a resource that this ontology supercedes.- Throws:
ProfileException- If theProfile.PRIOR_VERSION()property is not supported in the current language profile.
-
addPriorVersion
Add a resource representing an ontology that this ontology (strictly, the ontology represented by this node) supercedes.
- Specified by:
addPriorVersionin interfaceOntology- Parameters:
res- Represents a resource that this ontology supercedes.- Throws:
ProfileException- If theProfile.PRIOR_VERSION()property is not supported in the current language profile.
-
getPriorVersion
Answer a resource that represents an ontology that is superceded by this ontology. If there is more than one such resource, an arbitrary selection is made.
- Specified by:
getPriorVersionin interfaceOntology- Returns:
- An ont resource representing an ontology that this ontology supercedes
- Throws:
ProfileException- If theProfile.PRIOR_VERSION()property is not supported in the current language profile.
-
listPriorVersion
Answer an iterator over all of the resources representing ontologies that this ontology supercedes. Each element of the iterator will be an
OntResource.- Specified by:
listPriorVersionin interfaceOntology- Returns:
- An iterator over the ontology resources superceded by this ontology
- Throws:
ProfileException- If theProfile.PRIOR_VERSION()property is not supported in the current language profile.
-
hasPriorVersion
Answer true if this ontology (the ontology represented by this resource) supercedes the given resource.
- Specified by:
hasPriorVersionin interfaceOntology- Parameters:
res- A resource to test against- Returns:
- True if this ontology supercedes the ontology represented by
res
-
removePriorVersion
Remove the statement that the given ontology is a prior version of this ontology. If this statement is not true of the current model, nothing happens.
- Specified by:
removePriorVersionin interfaceOntology- Parameters:
res- A resource that represents an ontology that is no longer a prior version of this ontology
-
setIncompatibleWith
Assert that this ontology is incompatible with the given ontology. Any existing statements for
incompatibleWithwill be removed.- Specified by:
setIncompatibleWithin interfaceOntology- Parameters:
res- Represents a resource that this ontology is incompatible with.- Throws:
ProfileException- If theProfile.INCOMPATIBLE_WITH()property is not supported in the current language profile.
-
addIncompatibleWith
Add a resource representing an ontology that this ontology (strictly, the ontology represented by this node) is incompatible with.
- Specified by:
addIncompatibleWithin interfaceOntology- Parameters:
res- Represents a resource that this ontology is incompatible with.- Throws:
ProfileException- If theProfile.INCOMPATIBLE_WITH()property is not supported in the current language profile.
-
getIncompatibleWith
Answer a resource that represents an ontology that is incompatible with this ontology. If there is more than one such resource, an arbitrary selection is made.
- Specified by:
getIncompatibleWithin interfaceOntology- Returns:
- An ont resource representing an ontology that this ontology is incompatible with
- Throws:
ProfileException- If theProfile.INCOMPATIBLE_WITH()property is not supported in the current language profile.
-
listIncompatibleWith
Answer an iterator over all of the resources representing ontologies that this ontology is incompatible with. Each element of the iterator will be an
OntResource.- Specified by:
listIncompatibleWithin interfaceOntology- Returns:
- An iterator over the ontology resources that this ontology is incompatible with
- Throws:
ProfileException- If theProfile.INCOMPATIBLE_WITH()property is not supported in the current language profile.
-
isIncompatibleWith
Answer true if this ontology (the ontology represented by this resource) is incompatible with the given resource.
- Specified by:
isIncompatibleWithin interfaceOntology- Parameters:
res- A resource to test against- Returns:
- True if this ontology is incompatible with the ontology represented by
res
-
removeIncompatibleWith
Remove the statement that the given ontology is incompatible with this ontology. If this statement is not true of the current model, nothing happens.
- Specified by:
removeIncompatibleWithin interfaceOntology- Parameters:
res- A resource that represents an ontology that is no longer incompatible with this ontology
-