- All Implemented Interfaces:
FrontsNode,OntClass,OntResource,RDFNode,Resource
- Direct Known Subclasses:
BooleanClassDescriptionImpl,ComplementClassImpl,EnumeratedClassImpl,RestrictionImpl
Implementation of the ontology abstraction representing ontology classes.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic ImplementationA factory for generating OntClass 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
ConstructorsConstructorDescriptionOntClassImpl(Node n, EnhGraph g) Construct an ontology class node represented by the given node in the given graph. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddDisjointWith(Resource cls) Add a class that this class is disjoint with.voidAdd a class that is equivalent to this class.voidaddSubClass(Resource cls) Add a sub-class of this class.voidaddSuperClass(Resource cls) Add a super-class of this class.Answer a view of this class as a complement classAnswer a view of this class as an enumerated classAnswer a view of this class as an intersection classAnswer a view of this class as a restriction class expressionAnswer a view of this class as a union classAnswer a view of this class as an complement of the given class.convertToEnumeratedClass(RDFList individuals) Answer a view of this class as an enumeration of the given individuals.convertToIntersectionClass(RDFList classes) Answer a view of this class as an intersection of the given classes.convertToRestriction(Property prop) Answer a view of this class as an restriction on the given property.convertToUnionClass(RDFList classes) Answer a view of this class as a union of the given classes.Answer a new individual that has this class as itsrdf:typecreateIndividual(String uri) Answer a new individual that has this class as itsrdf:typevoiddropIndividual(Resource individual) Remove the given individual from the set of instances that are members of this class.Answer a class with which this class is disjoint.Answer a class that is equivalent to this class.Answer a class that is the sub-class of this class.Answer a class that is the super-class of this class.booleanhasDeclaredProperty(Property p, boolean direct) Answer true if the given property is one of the declared properties of this class.booleanAnswer true if the given class is equivalent to this class.booleanAnswer true if this class has any sub-class in the model.booleanhasSubClass(Resource cls) Answer true if the given class is a sub-class of this class.booleanhasSubClass(Resource cls, boolean direct) Answer true if the given class is a sub-class of this class.booleanAnswer true if this class has any super-class in the model.booleanhasSuperClass(Resource cls) Answer true if the given class is a super-class of this class.booleanhasSuperClass(Resource cls, boolean direct) Answer true if the given class is a super-class of this class.booleanAnswer true if this class is a complement class expressionbooleanisDisjointWith(Resource cls) Answer true if this class is disjoint with the given class.booleanAnswer true if this class is an enumerated class expressionbooleanAnswer true if this class is one of the roots of the class hierarchy.booleanAnswer true if this class is an intersection class expressionbooleanAnswer true if this class is a property restrictionbooleanAnswer true if this class is a union class expressionEquivalent to callinglistDeclaredProperties(boolean)with default valuedirect = false.listDeclaredProperties(boolean direct) Return an iterator over the properties associated with a frame-like view of this class.Answer an iterator over all of the classes that this class is declared to be disjoint with.Answer an iterator over all of the classes that are declared to be equivalent classes to this class.Answer an iterator over the individuals in the model that have this class among their types.listInstances(boolean direct) Answer an iterator over the individuals in the model that have this class among their types, optionally excluding sub-classes of this class.Answer an iterator over all of the classes that are declared to be sub-classes of this class.listSubClasses(boolean direct) Answer an iterator over the classes that are declared to be sub-classes of this class.Answer an iterator over all of the classes that are declared to be super-classes of this class.listSuperClasses(boolean direct) Answer an iterator over all of the classes that are declared to be super-classes of this class.voidRemove the statement that this class and the given class are disjoint.voidRemove the statement that this class and the given class are equivalent.voidremoveSubClass(Resource cls) Remove the given class from the sub-classes of this class.voidremoveSuperClass(Resource cls) Remove the given class from the super-classes of this class.voidsetDisjointWith(Resource cls) Assert that this class is disjoint with the given class.voidAssert that the given class is equivalent to this class.voidsetSubClass(Resource cls) Assert that this class is super-class of the given class.voidsetSuperClass(Resource cls) Assert that this class is sub-class of the given class.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 OntClass facets from nodes in enhanced graphs. Note: should not be invoked directly by user code: useas()instead.
-
-
Constructor Details
-
OntClassImpl
Construct an ontology class 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
-
setSuperClass
Assert that this class is sub-class of the given class. Any existing statements for
subClassOfwill be removed.- Specified by:
setSuperClassin interfaceOntClass- Parameters:
cls- The class that this class is a sub-class of- Throws:
ProfileException- If theProfile.SUB_CLASS_OF()property is not supported in the current language profile.
-
addSuperClass
Add a super-class of this class.
- Specified by:
addSuperClassin interfaceOntClass- Parameters:
cls- A class that is a super-class of this class.- Throws:
ProfileException- If theProfile.SUB_CLASS_OF()property is not supported in the current language profile.
-
getSuperClass
Answer a class that is the super-class of this class. If there is more than one such class, an arbitrary selection is made.
- Specified by:
getSuperClassin interfaceOntClass- Returns:
- A super-class of this class
- Throws:
ProfileException- If theProfile.SUB_CLASS_OF()property is not supported in the current language profile.
-
listSuperClasses
Answer an iterator over all of the classes that are declared to be super-classes of this class. Each element of the iterator will be an
OntClass.- Specified by:
listSuperClassesin interfaceOntClass- Returns:
- An iterator over the super-classes of this class.
- Throws:
ProfileException- If theProfile.SUB_CLASS_OF()property is not supported in the current language profile.
-
listSuperClasses
Answer an iterator over all of the classes that are declared to be super-classes of this class. Each element of the iterator will be an
OntClass. SeelistSubClasses(boolean)for a full explanation of the direct parameter.- Specified by:
listSuperClassesin interfaceOntClass- Parameters:
direct- If true, only answer the direcly adjacent classes in the super-class relation: i.e. eliminate any class for which there is a longer route to reach that child under the super-class relation.- Returns:
- an iterator over the resources representing this class's sub-classes.
- Throws:
ProfileException- If theProfile.SUB_CLASS_OF()property is not supported in the current language profile.
-
hasSuperClass
Answer true if the given class is a super-class of this class.
- Specified by:
hasSuperClassin interfaceOntClass- Parameters:
cls- A class to test.- Returns:
- True if the given class is a super-class of this class.
- Throws:
ProfileException- If theProfile.SUB_CLASS_OF()property is not supported in the current language profile.
-
hasSuperClass
public boolean hasSuperClass()Answer true if this class has any super-class in the model. Note that when using a reasoner, all OWL classes have owl:Thing as a super-class.
- Specified by:
hasSuperClassin interfaceOntClass- Returns:
- True if this class has any known super-class.
- Throws:
ProfileException- If theProfile.SUB_CLASS_OF()property is not supported in the current language profile.
-
hasSuperClass
Answer true if the given class is a super-class of this class. See
listSubClasses(boolean)for a full explanation of the direct parameter.- Specified by:
hasSuperClassin interfaceOntClass- Parameters:
cls- A class to test.direct- If true, only search the classes that are directly adjacent to this class in the class hierarchy.- Returns:
- True if the given class is a super-class of this class.
- Throws:
ProfileException- If theProfile.SUB_CLASS_OF()property is not supported in the current language profile.
-
removeSuperClass
Remove the given class from the super-classes of this class. If this statement is not true of the current model, nothing happens.
- Specified by:
removeSuperClassin interfaceOntClass- Parameters:
cls- A class to be removed from the super-classes of this class- Throws:
ProfileException- If theProfile.SUB_CLASS_OF()class is not supported in the current language profile.
-
setSubClass
Assert that this class is super-class of the given class. Any existing statements for
subClassOfonpropwill be removed.- Specified by:
setSubClassin interfaceOntClass- Parameters:
cls- The class that is a sub-class of this class- Throws:
ProfileException- If theProfile.SUB_CLASS_OF()property is not supported in the current language profile.
-
addSubClass
Add a sub-class of this class.
- Specified by:
addSubClassin interfaceOntClass- Parameters:
cls- A class that is a sub-class of this class.- Throws:
ProfileException- If theProfile.SUB_CLASS_OF()property is not supported in the current language profile.
-
getSubClass
Answer a class that is the sub-class of this class. If there is more than one such class, an arbitrary selection is made. If there is no such class, return null.
- Specified by:
getSubClassin interfaceOntClass- Returns:
- A sub-class of this class or null
- Throws:
ProfileException- If theProfile.SUB_CLASS_OF()property is not supported in the current language profile.
-
listSubClasses
Answer an iterator over all of the classes that are declared to be sub-classes of this class. Each element of the iterator will be an
OntClass.- Specified by:
listSubClassesin interfaceOntClass- Returns:
- An iterator over the sub-classes of this class.
- Throws:
ProfileException- If theProfile.SUB_CLASS_OF()property is not supported in the current language profile.
-
listSubClasses
Answer an iterator over the classes that are declared to be sub-classes of this class. Each element of the iterator will be an
OntClass. The distinguishing extra parameter for this method is the flagdirectthat allows some selectivity over the classes that appear in the iterator. Consider the following scenario::B rdfs:subClassOf :A. :C rdfs:subClassOf :A. :D rdfs:subClassof :C. (so A has two sub-classes, B and C, and C has sub-class D). In a raw model, with no inference support, listing the sub-classes of A will answer B and C. In an inferencing model,rdfs:subClassOfis known to be transitive, so the sub-classes iterator will include D. Thedirectsub-classes are those members of the closure of the subClassOf relation, restricted to classes that cannot be reached by a longer route, i.e. the ones that are directly adjacent to the given root. Thus, the direct sub-classes of A are B and C only, and not D - even in an inferencing graph. Note that this is not the same as the entailments from the raw graph. Suppose we add to this example::D rdfs:subClassof :A. Now, in the raw graph, A has sub-class C. But the direct sub-classes of A remain B and C, since there is a longer path A-C-D that means that D is not a direct sub-class of A. The assertion in the raw graph that A has sub-class D is essentially redundant, since this can be inferred from the closure of the graph.Note: This is a change from the behaviour of Jena 1, which took a parameter
closedto compute the closure over transitivity and equivalence of sub-classes. The closure capability in Jena2 is determined by the inference engine that is wrapped with the ontology model. The direct parameter is provided to allow, for exmaple, a level-by-level traversal of the class hierarchy, starting at some given root.- Specified by:
listSubClassesin interfaceOntClass- Parameters:
direct- If true, only answer the direcly adjacent classes in the sub-class relation: i.e. eliminate any class for which there is a longer route to reach that child under the sub-class relation.- Returns:
- an iterator over the resources representing this class's sub-classes
- Throws:
ProfileException- If theProfile.SUB_CLASS_OF()property is not supported in the current language profile.
-
hasSubClass
Answer true if the given class is a sub-class of this class.
- Specified by:
hasSubClassin interfaceOntClass- Parameters:
cls- A class to test.- Returns:
- True if the given class is a sub-class of this class.
- Throws:
ProfileException- If theProfile.SUB_CLASS_OF()property is not supported in the current language profile.
-
hasSubClass
public boolean hasSubClass()Answer true if this class has any sub-class in the model. Note that when using a reasoner, all OWL classes have owl:Nothing as a sub-class.
- Specified by:
hasSubClassin interfaceOntClass- Returns:
- True if this class has any known sub-class.
- Throws:
ProfileException- If theProfile.SUB_CLASS_OF()property is not supported in the current language profile.
-
hasSubClass
Answer true if the given class is a sub-class of this class. See
listSubClasses(boolean)for a full explanation of the direct parameter.- Specified by:
hasSubClassin interfaceOntClass- Parameters:
cls- A class to test.direct- If true, only search the classes that are directly adjacent to this class in the class hierarchy.- Returns:
- True if the given class is a sub-class of this class.
- Throws:
ProfileException- If theProfile.SUB_CLASS_OF()property is not supported in the current language profile.
-
removeSubClass
Remove the given class from the sub-classes of this class. If this statement is not true of the current model, nothing happens.
- Specified by:
removeSubClassin interfaceOntClass- Parameters:
cls- A class to be removed from the sub-classes of this class- Throws:
ProfileException- If theProfile.SUB_CLASS_OF()class is not supported in the current language profile.
-
setEquivalentClass
Assert that the given class is equivalent to this class. Any existing statements for
equivalentClasswill be removed.- Specified by:
setEquivalentClassin interfaceOntClass- Parameters:
cls- The class that this class is a equivalent to.- Throws:
ProfileException- If theProfile.EQUIVALENT_CLASS()property is not supported in the current language profile.
-
addEquivalentClass
Add a class that is equivalent to this class.
- Specified by:
addEquivalentClassin interfaceOntClass- Parameters:
cls- A class that is equivalent to this class.- Throws:
ProfileException- If theProfile.EQUIVALENT_CLASS()property is not supported in the current language profile.
-
getEquivalentClass
Answer a class that is equivalent to this class. If there is more than one such class, an arbitrary selection is made.
- Specified by:
getEquivalentClassin interfaceOntClass- Returns:
- A class equivalent to this class
- Throws:
ProfileException- If theProfile.EQUIVALENT_CLASS()property is not supported in the current language profile.
-
listEquivalentClasses
Answer an iterator over all of the classes that are declared to be equivalent classes to this class. Each element of the iterator will be an
OntClass.- Specified by:
listEquivalentClassesin interfaceOntClass- Returns:
- An iterator over the classes equivalent to this class.
- Throws:
ProfileException- If theProfile.EQUIVALENT_CLASS()property is not supported in the current language profile.
-
hasEquivalentClass
Answer true if the given class is equivalent to this class.
- Specified by:
hasEquivalentClassin interfaceOntClass- Parameters:
cls- A class to test for- Returns:
- True if the given property is equivalent to this class.
- Throws:
ProfileException- If theProfile.EQUIVALENT_CLASS()property is not supported in the current language profile.
-
removeEquivalentClass
Remove the statement that this class and the given class are equivalent. If this statement is not true of the current model, nothing happens.
- Specified by:
removeEquivalentClassin interfaceOntClass- Parameters:
cls- A class that may be declared to be equivalent to this class, and which is no longer equivalent- Throws:
ProfileException- If theProfile.EQUIVALENT_CLASS()property is not supported in the current language profile.
-
setDisjointWith
Assert that this class is disjoint with the given class. Any existing statements for
disjointWithwill be removed.- Specified by:
setDisjointWithin interfaceOntClass- Parameters:
cls- The property that this class is disjoint with.- Throws:
ProfileException- If theProfile.DISJOINT_WITH()property is not supported in the current language profile.
-
addDisjointWith
Add a class that this class is disjoint with.
- Specified by:
addDisjointWithin interfaceOntClass- Parameters:
cls- A class that has no instances in common with this class.- Throws:
ProfileException- If theProfile.DISJOINT_WITH()property is not supported in the current language profile.
-
getDisjointWith
Answer a class with which this class is disjoint. If there is more than one such class, an arbitrary selection is made.
- Specified by:
getDisjointWithin interfaceOntClass- Returns:
- A class disjoint with this class
- Throws:
ProfileException- If theProfile.DISJOINT_WITH()property is not supported in the current language profile.
-
listDisjointWith
Answer an iterator over all of the classes that this class is declared to be disjoint with. Each element of the iterator will be an
OntClass.- Specified by:
listDisjointWithin interfaceOntClass- Returns:
- An iterator over the classes disjoint with this class.
- Throws:
ProfileException- If theProfile.DISJOINT_WITH()property is not supported in the current language profile.
-
isDisjointWith
Answer true if this class is disjoint with the given class.
- Specified by:
isDisjointWithin interfaceOntClass- Parameters:
cls- A class to test- Returns:
- True if the this class is disjoint with the the given class.
- Throws:
ProfileException- If theProfile.DISJOINT_WITH()property is not supported in the current language profile.
-
removeDisjointWith
Remove the statement that this class and the given class are disjoint. If this statement is not true of the current model, nothing happens.
- Specified by:
removeDisjointWithin interfaceOntClass- Parameters:
cls- A class that may be declared to be disjoint with this class, and which is no longer disjoint- Throws:
ProfileException- If theProfile.DISJOINT_WITH()property is not supported in the current language profile.
-
listDeclaredProperties
Equivalent to callinglistDeclaredProperties(boolean)with default valuedirect = false.- Specified by:
listDeclaredPropertiesin interfaceOntClass
-
listDeclaredProperties
Return an iterator over the properties associated with a frame-like view of this class. This captures an intuitive notion of the properties of a class. This can be useful in presenting an ontology class in a user interface, for example by automatically constructing a form to instantiate instances of the class. The properties in the frame-like view of the class are determined by comparing the domain of properties in this class's
OntModelwith the class itself. See: Presenting RDF as frames for more details.Note that many cases of determining whether a property is associated with a class depends on RDFS or OWL reasoning. This method may therefore return complete results only in models that have an attached reasoner.
- Specified by:
listDeclaredPropertiesin interfaceOntClass- Parameters:
direct- Iftrue, restrict the properties returned to those directly associated with this class. Iffalse, the properties of super-classes of this class will not be listed among the declared properties of this class.- Returns:
- An iteration of the properties that are associated with this class by their domain.
-
hasDeclaredProperty
Answer true if the given property is one of the declared properties of this class. For details, see
listDeclaredProperties(boolean).- Specified by:
hasDeclaredPropertyin interfaceOntClass- Parameters:
p- A property to testdirect- If true, only direct associations between classes and properties are considered- Returns:
- True if
pis one of the declared properties of this class
-
listInstances
Answer an iterator over the individuals in the model that have this class among their types.
- Specified by:
listInstancesin interfaceOntClass- Returns:
- An iterator over those instances that have this class as one of the classes to which they belong
-
listInstances
Answer an iterator over the individuals in the model that have this class among their types, optionally excluding sub-classes of this class.
- Specified by:
listInstancesin interfaceOntClass- Parameters:
direct- If true, only direct instances are counted (i.e. not instances of sub-classes of this class)- Returns:
- An iterator over those instances that have this class as one of the classes to which they belong
-
createIndividual
Answer a new individual that has this class as its
rdf:type- Specified by:
createIndividualin interfaceOntClass- Returns:
- A new anonymous individual that is an instance of this class
-
createIndividual
Answer a new individual that has this class as its
rdf:type- Specified by:
createIndividualin interfaceOntClass- Parameters:
uri- The URI of the new individual- Returns:
- A new named individual that is an instance of this class
-
dropIndividual
Remove the given individual from the set of instances that are members of this class. This is effectively equivalent to the
Individual.removeOntClass(org.apache.jena.rdf.model.Resource)method, but invoked via the class resource rather than via the individual resource.- Specified by:
dropIndividualin interfaceOntClass- Parameters:
individual- A resource denoting an individual that is no longer to be a member of this class
-
isHierarchyRoot
public boolean isHierarchyRoot()Answer true if this class is one of the roots of the class hierarchy. This will be true if either (i) this class has
owl:Thingas a direct super-class, or (ii) it has no declared super-classes (including anonymous class expressions).- Specified by:
isHierarchyRootin interfaceOntClass- Returns:
- True if this class is the root of the class hierarchy in the model it is attached to
-
asEnumeratedClass
Answer a view of this class as an enumerated class
- Specified by:
asEnumeratedClassin interfaceOntClass- Returns:
- This class, but viewed as an EnumeratedClass node
- Throws:
ConversionException- if the class cannot be converted to an enumerated class given the lanuage profile and the current state of the underlying model.
-
asUnionClass
Answer a view of this class as a union class
- Specified by:
asUnionClassin interfaceOntClass- Returns:
- This class, but viewed as a UnionClass node
- Throws:
ConversionException- if the class cannot be converted to a union class given the lanuage profile and the current state of the underlying model.
-
asIntersectionClass
Answer a view of this class as an intersection class
- Specified by:
asIntersectionClassin interfaceOntClass- Returns:
- This class, but viewed as an IntersectionClass node
- Throws:
ConversionException- if the class cannot be converted to an intersection class given the lanuage profile and the current state of the underlying model.
-
asComplementClass
Answer a view of this class as a complement class
- Specified by:
asComplementClassin interfaceOntClass- Returns:
- This class, but viewed as a ComplementClass node
- Throws:
ConversionException- if the class cannot be converted to a complement class given the lanuage profile and the current state of the underlying model.
-
asRestriction
Answer a view of this class as a restriction class expression
- Specified by:
asRestrictionin interfaceOntClass- Returns:
- This class, but viewed as a Restriction node
- Throws:
ConversionException- if the class cannot be converted to a restriction given the lanuage profile and the current state of the underlying model.
-
isEnumeratedClass
public boolean isEnumeratedClass()Answer true if this class is an enumerated class expression
- Specified by:
isEnumeratedClassin interfaceOntClass- Returns:
- True if this is an enumerated class expression
-
isUnionClass
public boolean isUnionClass()Answer true if this class is a union class expression
- Specified by:
isUnionClassin interfaceOntClass- Returns:
- True if this is a union class expression
-
isIntersectionClass
public boolean isIntersectionClass()Answer true if this class is an intersection class expression
- Specified by:
isIntersectionClassin interfaceOntClass- Returns:
- True if this is an intersection class expression
-
isComplementClass
public boolean isComplementClass()Answer true if this class is a complement class expression
- Specified by:
isComplementClassin interfaceOntClass- Returns:
- True if this is a complement class expression
-
isRestriction
public boolean isRestriction()Answer true if this class is a property restriction
- Specified by:
isRestrictionin interfaceOntClass- Returns:
- True if this is a restriction
-
convertToEnumeratedClass
Answer a view of this class as an enumeration of the given individuals.
- Specified by:
convertToEnumeratedClassin interfaceOntClass- Parameters:
individuals- A list of the individuals that will comprise the permitted values of this class converted to an enumeration- Returns:
- This ontology class, converted to an enumeration of the given individuals
-
convertToIntersectionClass
Answer a view of this class as an intersection of the given classes.
- Specified by:
convertToIntersectionClassin interfaceOntClass- Parameters:
classes- A list of the classes that will comprise the operands of the intersection- Returns:
- This ontology class, converted to an intersection of the given classes
-
convertToUnionClass
Answer a view of this class as a union of the given classes.
- Specified by:
convertToUnionClassin interfaceOntClass- Parameters:
classes- A list of the classes that will comprise the operands of the union- Returns:
- This ontology class, converted to an union of the given classes
-
convertToComplementClass
Answer a view of this class as an complement of the given class.
- Specified by:
convertToComplementClassin interfaceOntClass- Parameters:
cls- An ontology classs that will be operand of the complement- Returns:
- This ontology class, converted to an complement of the given class
-
convertToRestriction
Answer a view of this class as an restriction on the given property.
- Specified by:
convertToRestrictionin interfaceOntClass- Parameters:
prop- A property this is the subject of a property restriction class expression- Returns:
- This ontology class, converted to a restriction on the given property
-