public class OntClassImpl extends OntResourceImpl implements OntClass
Implementation of the ontology abstraction representing ontology classes.
asAnnotationProperty, asDatatypeProperty, asObjectProperty, asProperty, isAnnotationProperty, isDatatypeProperty, isObjectProperty, isProperty
asAnnotationProperty, asDatatypeProperty, asObjectProperty, asProperty, isAnnotationProperty, isDatatypeProperty, isObjectProperty, isProperty
Modifier and Type | Field and Description |
---|---|
static Implementation |
factory
A factory for generating OntClass facets from nodes in enhanced graphs.
|
KNOWN_LANGUAGES
rdfNodeFactory
Constructor and Description |
---|
OntClassImpl(Node n,
EnhGraph g)
Construct an ontology class node represented by the given node in the given graph.
|
Modifier and Type | Method and Description |
---|---|
void |
addDisjointWith(Resource cls)
Add a class that this class is disjoint with.
|
void |
addEquivalentClass(Resource cls)
Add a class that is equivalent to this class.
|
void |
addSubClass(Resource cls)
Add a sub-class of this class.
|
void |
addSuperClass(Resource cls)
Add a super-class of this class.
|
ComplementClass |
asComplementClass()
Answer a view of this class as a complement class
|
EnumeratedClass |
asEnumeratedClass()
Answer a view of this class as an enumerated class
|
IntersectionClass |
asIntersectionClass()
Answer a view of this class as an intersection class
|
Restriction |
asRestriction()
Answer a view of this class as a restriction class expression
|
UnionClass |
asUnionClass()
Answer a view of this class as a union class
|
ComplementClass |
convertToComplementClass(Resource cls)
Answer a view of this class as an complement of the given class.
|
EnumeratedClass |
convertToEnumeratedClass(RDFList individuals)
Answer a view of this class as an enumeration of the given individuals.
|
IntersectionClass |
convertToIntersectionClass(RDFList classes)
Answer a view of this class as an intersection of the given classes.
|
Restriction |
convertToRestriction(Property prop)
Answer a view of this class as an restriction on the given property.
|
UnionClass |
convertToUnionClass(RDFList classes)
Answer a view of this class as a union of the given classes.
|
Individual |
createIndividual()
Answer a new individual that has this class as its
rdf:type |
Individual |
createIndividual(String uri)
Answer a new individual that has this class as its
rdf:type |
void |
dropIndividual(Resource individual)
Remove the given individual from the set of instances that are members of
this class.
|
OntClass |
getDisjointWith()
Answer a class with which this class is disjoint.
|
OntClass |
getEquivalentClass()
Answer a class that is equivalent to this class.
|
OntClass |
getSubClass()
Answer a class that is the sub-class of this class.
|
OntClass |
getSuperClass()
Answer a class that is the super-class of this class.
|
boolean |
hasDeclaredProperty(Property p,
boolean direct)
Answer true if the given property is one of the declared properties
of this class.
|
boolean |
hasEquivalentClass(Resource cls)
Answer true if the given class is equivalent to this class.
|
boolean |
hasSubClass()
Answer true if this class has any sub-class in the model.
|
boolean |
hasSubClass(Resource cls)
Answer true if the given class is a sub-class of this class.
|
boolean |
hasSubClass(Resource cls,
boolean direct)
Answer true if the given class is a sub-class of this class.
|
boolean |
hasSuperClass()
Answer true if this class has any super-class in the model.
|
boolean |
hasSuperClass(Resource cls)
Answer true if the given class is a super-class of this class.
|
boolean |
hasSuperClass(Resource cls,
boolean direct)
Answer true if the given class is a super-class of this class.
|
boolean |
isComplementClass()
Answer true if this class is a complement class expression
|
boolean |
isDisjointWith(Resource cls)
Answer true if this class is disjoint with the given class.
|
boolean |
isEnumeratedClass()
Answer true if this class is an enumerated class expression
|
boolean |
isHierarchyRoot()
Answer true if this class is one of the roots of the class hierarchy.
|
boolean |
isIntersectionClass()
Answer true if this class is an intersection class expression
|
boolean |
isRestriction()
Answer true if this class is a property restriction
|
boolean |
isUnionClass()
Answer true if this class is a union class expression
|
ExtendedIterator<OntProperty> |
listDeclaredProperties()
Equivalent to calling
listDeclaredProperties(boolean) with
default value direct = false . |
ExtendedIterator<OntProperty> |
listDeclaredProperties(boolean direct)
Return an iterator over the properties associated with a frame-like
view of this class.
|
ExtendedIterator<OntClass> |
listDisjointWith()
Answer an iterator over all of the classes that this class is declared to be disjoint with.
|
ExtendedIterator<OntClass> |
listEquivalentClasses()
Answer an iterator over all of the classes that are declared to be equivalent classes to
this class.
|
ExtendedIterator<Individual> |
listInstances()
Answer an iterator over the individuals in the model that have this
class among their types.
|
ExtendedIterator<Individual> |
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.
|
ExtendedIterator<OntClass> |
listSubClasses()
Answer an iterator over all of the classes that are declared to be sub-classes of
this class.
|
ExtendedIterator<OntClass> |
listSubClasses(boolean direct)
Answer an iterator over the classes that are declared to be sub-classes of
this class.
|
ExtendedIterator<OntClass> |
listSuperClasses()
Answer an iterator over all of the classes that are declared to be super-classes of
this class.
|
ExtendedIterator<OntClass> |
listSuperClasses(boolean direct)
Answer an iterator over all of the classes that are declared to be super-classes of
this class.
|
void |
removeDisjointWith(Resource cls)
Remove the statement that this class and the given class are
disjoint.
|
void |
removeEquivalentClass(Resource cls)
Remove the statement that this class and the given class are
equivalent.
|
void |
removeSubClass(Resource cls)
Remove the given class from the sub-classes of this class.
|
void |
removeSuperClass(Resource cls)
Remove the given class from the super-classes of this class.
|
void |
setDisjointWith(Resource cls)
Assert that this class is disjoint with the given class.
|
void |
setEquivalentClass(Resource cls)
Assert that the given class is equivalent to this class.
|
void |
setSubClass(Resource cls)
Assert that this class is super-class of the given class.
|
void |
setSuperClass(Resource cls)
Assert that this class is sub-class of the given class.
|
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, setVersionInfo
abort, addLiteral, addLiteral, addLiteral, addLiteral, addLiteral, addLiteral, addLiteral, addProperty, addProperty, addProperty, addProperty, addProperty, addProperty, addProperty, asLiteral, asResource, 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, visitWith
as, asNode, canAs, equals, getGraph, hashCode, isAnon, isLiteral, isResource, isURIResource, isValid, viewAs
addView, supports
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, setVersionInfo
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
as, asLiteral, asResource, canAs, getModel, isAnon, isLiteral, isResource, isURIResource, visitWith
asNode
public static Implementation factory
as()
instead.public void setSuperClass(Resource cls)
Assert that this class is sub-class of the given class. Any existing
statements for subClassOf
will be removed.
setSuperClass
in interface OntClass
cls
- The class that this class is a sub-class ofProfileException
- If the Profile.SUB_CLASS_OF()
property is not supported in the current language profile.public void addSuperClass(Resource cls)
Add a super-class of this class.
addSuperClass
in interface OntClass
cls
- A class that is a super-class of this class.ProfileException
- If the Profile.SUB_CLASS_OF()
property is not supported in the current language profile.public OntClass 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.
getSuperClass
in interface OntClass
ProfileException
- If the Profile.SUB_CLASS_OF()
property is not supported in the current language profile.public ExtendedIterator<OntClass> 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
.
listSuperClasses
in interface OntClass
ProfileException
- If the Profile.SUB_CLASS_OF()
property is not supported in the current language profile.public ExtendedIterator<OntClass> listSuperClasses(boolean direct)
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
.
See listSubClasses( boolean )
for a full explanation of the direct
parameter.
listSuperClasses
in interface OntClass
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.ProfileException
- If the Profile.SUB_CLASS_OF()
property is not supported in the current language profile.public boolean hasSuperClass(Resource cls)
Answer true if the given class is a super-class of this class.
hasSuperClass
in interface OntClass
cls
- A class to test.ProfileException
- If the Profile.SUB_CLASS_OF()
property is not supported in the current language profile.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.
hasSuperClass
in interface OntClass
ProfileException
- If the Profile.SUB_CLASS_OF()
property is not supported in the current language profile.public boolean hasSuperClass(Resource cls, boolean direct)
Answer true if the given class is a super-class of this class.
See listSubClasses( boolean )
for a full explanation of the direct
parameter.
hasSuperClass
in interface OntClass
cls
- A class to test.direct
- If true, only search the classes that are directly adjacent to this
class in the class hierarchy.ProfileException
- If the Profile.SUB_CLASS_OF()
property is not supported in the current language profile.public void removeSuperClass(Resource cls)
Remove the given class from the super-classes of this class. If this statement is not true of the current model, nothing happens.
removeSuperClass
in interface OntClass
cls
- A class to be removed from the super-classes of this classProfileException
- If the Profile.SUB_CLASS_OF()
class is not supported in the current language profile.public void setSubClass(Resource cls)
Assert that this class is super-class of the given class. Any existing
statements for subClassOf
on prop
will be removed.
setSubClass
in interface OntClass
cls
- The class that is a sub-class of this classProfileException
- If the Profile.SUB_CLASS_OF()
property is not supported in the current language profile.public void addSubClass(Resource cls)
Add a sub-class of this class.
addSubClass
in interface OntClass
cls
- A class that is a sub-class of this class.ProfileException
- If the Profile.SUB_CLASS_OF()
property is not supported in the current language profile.public OntClass 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.
getSubClass
in interface OntClass
ProfileException
- If the Profile.SUB_CLASS_OF()
property is not supported in the current language profile.public ExtendedIterator<OntClass> 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
.
listSubClasses
in interface OntClass
ProfileException
- If the Profile.SUB_CLASS_OF()
property is not supported in the current language profile.public ExtendedIterator<OntClass> listSubClasses(boolean direct)
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 flag direct
that allows some selectivity over the classes that appear in the iterator.
Consider the following scenario:
(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,
:B rdfs:subClassOf :A.
:C rdfs:subClassOf :A.
:D rdfs:subClassof :C.
rdfs:subClassOf
is known to be transitive, so
the sub-classes iterator will include D. The direct
sub-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:
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.
:D rdfs:subClassof :A.
Note: This is a change from the behaviour of Jena 1, which took a
parameter closed
to 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.
listSubClasses
in interface OntClass
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.ProfileException
- If the Profile.SUB_CLASS_OF()
property is not supported in the current language profile.public boolean hasSubClass(Resource cls)
Answer true if the given class is a sub-class of this class.
hasSubClass
in interface OntClass
cls
- A class to test.ProfileException
- If the Profile.SUB_CLASS_OF()
property is not supported in the current language profile.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.
hasSubClass
in interface OntClass
ProfileException
- If the Profile.SUB_CLASS_OF()
property is not supported in the current language profile.public boolean hasSubClass(Resource cls, boolean direct)
Answer true if the given class is a sub-class of this class.
See listSubClasses( boolean )
for a full explanation of the direct
parameter.
hasSubClass
in interface OntClass
cls
- A class to test.direct
- If true, only search the classes that are directly adjacent to this
class in the class hierarchy.ProfileException
- If the Profile.SUB_CLASS_OF()
property is not supported in the current language profile.public void removeSubClass(Resource cls)
Remove the given class from the sub-classes of this class. If this statement is not true of the current model, nothing happens.
removeSubClass
in interface OntClass
cls
- A class to be removed from the sub-classes of this classProfileException
- If the Profile.SUB_CLASS_OF()
class is not supported in the current language profile.public void setEquivalentClass(Resource cls)
Assert that the given class is equivalent to this class. Any existing
statements for equivalentClass
will be removed.
setEquivalentClass
in interface OntClass
cls
- The class that this class is a equivalent to.ProfileException
- If the Profile.EQUIVALENT_CLASS()
property is not supported in the current language profile.public void addEquivalentClass(Resource cls)
Add a class that is equivalent to this class.
addEquivalentClass
in interface OntClass
cls
- A class that is equivalent to this class.ProfileException
- If the Profile.EQUIVALENT_CLASS()
property is not supported in the current language profile.public OntClass getEquivalentClass()
Answer a class that is equivalent to this class. If there is more than one such class, an arbitrary selection is made.
getEquivalentClass
in interface OntClass
ProfileException
- If the Profile.EQUIVALENT_CLASS()
property is not supported in the current language profile.public ExtendedIterator<OntClass> 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
.
listEquivalentClasses
in interface OntClass
ProfileException
- If the Profile.EQUIVALENT_CLASS()
property is not supported in the current language profile.public boolean hasEquivalentClass(Resource cls)
Answer true if the given class is equivalent to this class.
hasEquivalentClass
in interface OntClass
cls
- A class to test forProfileException
- If the Profile.EQUIVALENT_CLASS()
property is not supported in the current language profile.public void removeEquivalentClass(Resource cls)
Remove the statement that this class and the given class are equivalent. If this statement is not true of the current model, nothing happens.
removeEquivalentClass
in interface OntClass
cls
- A class that may be declared to be equivalent to this class, and which is no longer equivalentProfileException
- If the Profile.EQUIVALENT_CLASS()
property is not supported in the current language profile.public void setDisjointWith(Resource cls)
Assert that this class is disjoint with the given class. Any existing
statements for disjointWith
will be removed.
setDisjointWith
in interface OntClass
cls
- The property that this class is disjoint with.ProfileException
- If the Profile.DISJOINT_WITH()
property is not supported in the current language profile.public void addDisjointWith(Resource cls)
Add a class that this class is disjoint with.
addDisjointWith
in interface OntClass
cls
- A class that has no instances in common with this class.ProfileException
- If the Profile.DISJOINT_WITH()
property is not supported in the current language profile.public OntClass getDisjointWith()
Answer a class with which this class is disjoint. If there is more than one such class, an arbitrary selection is made.
getDisjointWith
in interface OntClass
ProfileException
- If the Profile.DISJOINT_WITH()
property is not supported in the current language profile.public ExtendedIterator<OntClass> 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
.
listDisjointWith
in interface OntClass
ProfileException
- If the Profile.DISJOINT_WITH()
property is not supported in the current language profile.public boolean isDisjointWith(Resource cls)
Answer true if this class is disjoint with the given class.
isDisjointWith
in interface OntClass
cls
- A class to testProfileException
- If the Profile.DISJOINT_WITH()
property is not supported in the current language profile.public void removeDisjointWith(Resource cls)
Remove the statement that this class and the given class are disjoint. If this statement is not true of the current model, nothing happens.
removeDisjointWith
in interface OntClass
cls
- A class that may be declared to be disjoint with this class, and which is no longer disjointProfileException
- If the Profile.DISJOINT_WITH()
property is not supported in the current language profile.public ExtendedIterator<OntProperty> listDeclaredProperties()
listDeclaredProperties(boolean)
with
default value direct = false
.listDeclaredProperties
in interface OntClass
public ExtendedIterator<OntProperty> listDeclaredProperties(boolean direct)
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 OntModel
with 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.
listDeclaredProperties
in interface OntClass
direct
- If true
, restrict the properties returned to those directly
associated with this class. If false
, the properties of super-classes of
this class will not be listed among the declared properties of this class.public boolean hasDeclaredProperty(Property p, boolean direct)
Answer true if the given property is one of the declared properties
of this class. For details, see listDeclaredProperties(boolean)
.
hasDeclaredProperty
in interface OntClass
p
- A property to testdirect
- If true, only direct associations between classes and properties
are consideredp
is one of the declared properties of
this classpublic ExtendedIterator<Individual> listInstances()
Answer an iterator over the individuals in the model that have this class among their types.
listInstances
in interface OntClass
public ExtendedIterator<Individual> 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.
listInstances
in interface OntClass
direct
- If true, only direct instances are counted (i.e. not instances
of sub-classes of this class)public Individual createIndividual()
Answer a new individual that has this class as its rdf:type
createIndividual
in interface OntClass
public Individual createIndividual(String uri)
Answer a new individual that has this class as its rdf:type
createIndividual
in interface OntClass
uri
- The URI of the new individualpublic void dropIndividual(Resource individual)
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.
dropIndividual
in interface OntClass
individual
- A resource denoting an individual that is no longer to be a member
of this classpublic 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:Thing
as a direct super-class, or (ii) it has
no declared super-classes (including anonymous class expressions).
isHierarchyRoot
in interface OntClass
public EnumeratedClass asEnumeratedClass()
Answer a view of this class as an enumerated class
asEnumeratedClass
in interface OntClass
ConversionException
- if the class cannot be converted to an enumerated class
given the lanuage profile and the current state of the underlying model.public UnionClass asUnionClass()
Answer a view of this class as a union class
asUnionClass
in interface OntClass
ConversionException
- if the class cannot be converted to a union class
given the lanuage profile and the current state of the underlying model.public IntersectionClass asIntersectionClass()
Answer a view of this class as an intersection class
asIntersectionClass
in interface OntClass
ConversionException
- if the class cannot be converted to an intersection class
given the lanuage profile and the current state of the underlying model.public ComplementClass asComplementClass()
Answer a view of this class as a complement class
asComplementClass
in interface OntClass
ConversionException
- if the class cannot be converted to a complement class
given the lanuage profile and the current state of the underlying model.public Restriction asRestriction()
Answer a view of this class as a restriction class expression
asRestriction
in interface OntClass
ConversionException
- if the class cannot be converted to a restriction
given the lanuage profile and the current state of the underlying model.public boolean isEnumeratedClass()
Answer true if this class is an enumerated class expression
isEnumeratedClass
in interface OntClass
public boolean isUnionClass()
Answer true if this class is a union class expression
isUnionClass
in interface OntClass
public boolean isIntersectionClass()
Answer true if this class is an intersection class expression
isIntersectionClass
in interface OntClass
public boolean isComplementClass()
Answer true if this class is a complement class expression
isComplementClass
in interface OntClass
public boolean isRestriction()
Answer true if this class is a property restriction
isRestriction
in interface OntClass
public EnumeratedClass convertToEnumeratedClass(RDFList individuals)
Answer a view of this class as an enumeration of the given individuals.
convertToEnumeratedClass
in interface OntClass
individuals
- A list of the individuals that will comprise the permitted values of this
class converted to an enumerationpublic IntersectionClass convertToIntersectionClass(RDFList classes)
Answer a view of this class as an intersection of the given classes.
convertToIntersectionClass
in interface OntClass
classes
- A list of the classes that will comprise the operands of the intersectionpublic UnionClass convertToUnionClass(RDFList classes)
Answer a view of this class as a union of the given classes.
convertToUnionClass
in interface OntClass
classes
- A list of the classes that will comprise the operands of the unionpublic ComplementClass convertToComplementClass(Resource cls)
Answer a view of this class as an complement of the given class.
convertToComplementClass
in interface OntClass
cls
- An ontology classs that will be operand of the complementpublic Restriction convertToRestriction(Property prop)
Answer a view of this class as an restriction on the given property.
convertToRestriction
in interface OntClass
prop
- A property this is the subject of a property restriction class expressionLicenced under the Apache License, Version 2.0