Package org.semanticweb.owlapi.model
Interface OWLClassExpression
- All Superinterfaces:
AsOWLClass
,Comparable<OWLObject>
,HasAnnotationPropertiesInSignature
,HasAnonymousIndividuals
,HasClassesInSignature
,HasComponents
,HasContainsEntityInSignature
,HasDataPropertiesInSignature
,HasDatatypesInSignature
,HasHashIndex
,HasIndex
,HasIndividualsInSignature
,HasObjectPropertiesInSignature
,HasSignature
,IsAnonymous
,OWLObject
,OWLPropertyRange
,Serializable
,SWRLPredicate
- All Known Subinterfaces:
OWLAnonymousClassExpression
,OWLBooleanClassExpression
,OWLCardinalityRestriction<F>
,OWLClass
,OWLDataAllValuesFrom
,OWLDataCardinalityRestriction
,OWLDataExactCardinality
,OWLDataHasValue
,OWLDataMaxCardinality
,OWLDataMinCardinality
,OWLDataRestriction
,OWLDataSomeValuesFrom
,OWLHasValueRestriction<V>
,OWLNaryBooleanClassExpression
,OWLObjectAllValuesFrom
,OWLObjectCardinalityRestriction
,OWLObjectComplementOf
,OWLObjectExactCardinality
,OWLObjectHasSelf
,OWLObjectHasValue
,OWLObjectIntersectionOf
,OWLObjectMaxCardinality
,OWLObjectMinCardinality
,OWLObjectOneOf
,OWLObjectRestriction
,OWLObjectSomeValuesFrom
,OWLObjectUnionOf
,OWLQuantifiedDataRestriction
,OWLQuantifiedObjectRestriction
,OWLQuantifiedRestriction<F>
,OWLRestriction
- All Known Implementing Classes:
OWLAnonymousClassExpressionImpl
,OWLCardinalityRestrictionImpl
,OWLClassExpressionImpl
,OWLClassImpl
,OWLDataAllValuesFromImpl
,OWLDataCardinalityRestrictionImpl
,OWLDataExactCardinalityImpl
,OWLDataHasValueImpl
,OWLDataMaxCardinalityImpl
,OWLDataMinCardinalityImpl
,OWLDataSomeValuesFromImpl
,OWLNaryBooleanClassExpressionImpl
,OWLObjectAllValuesFromImpl
,OWLObjectCardinalityRestrictionImpl
,OWLObjectComplementOfImpl
,OWLObjectExactCardinalityImpl
,OWLObjectHasSelfImpl
,OWLObjectHasValueImpl
,OWLObjectIntersectionOfImpl
,OWLObjectMaxCardinalityImpl
,OWLObjectMinCardinalityImpl
,OWLObjectOneOfImpl
,OWLObjectSomeValuesFromImpl
,OWLObjectUnionOfImpl
,OWLQuantifiedDataRestrictionImpl
,OWLQuantifiedObjectRestrictionImpl
,OWLQuantifiedRestrictionImpl
,OWLValueRestrictionImpl
Represents Class Expressions in
the OWL 2 specification. This interface covers named and anonymous classes.
- Since:
- 2.0.0
- Author:
- Matthew Horridge The University Of Manchester Bio-Health Informatics Group
-
Method Summary
Modifier and TypeMethodDescriptionvoid
accept
(OWLClassExpressionVisitor visitor) Accepts a visit from anOWLExpressionVisitor
.<O> O
accept
(OWLClassExpressionVisitorEx<O> visitor) Interprets this expression as a conjunction and returns the conjuncts.Interprets this expression as a disjunction and returns the disjuncts.default Stream
<OWLClassExpression> Interprets this expression as a conjunction and returns the conjuncts.boolean
Determines if this class expression contains a particular conjunct.default Stream
<OWLClassExpression> Interprets this expression as a disjunction and returns the disjuncts.Gets the class expression type for this class expression.Gets the negation normal form of the complement of this expression.getNNF()
Gets this expression in negation normal form.Gets the object complement of this class expression.default boolean
Determines if this class is a literal.boolean
Determines if this expression is the built in class owl:Nothing.boolean
Determines if this expression is the built in class owl:Thing.Methods inherited from interface org.semanticweb.owlapi.model.AsOWLClass
asOWLClass, isOWLClass
Methods inherited from interface java.lang.Comparable
compareTo
Methods inherited from interface org.semanticweb.owlapi.model.HasAnnotationPropertiesInSignature
annotationPropertiesInSignature, getAnnotationPropertiesInSignature
Methods inherited from interface org.semanticweb.owlapi.model.HasAnonymousIndividuals
anonymousIndividuals, getAnonymousIndividuals
Methods inherited from interface org.semanticweb.owlapi.model.HasClassesInSignature
classesInSignature, getClassesInSignature
Methods inherited from interface org.semanticweb.owlapi.model.HasComponents
components, componentsAnnotationsFirst, componentsWithoutAnnotations
Methods inherited from interface org.semanticweb.owlapi.model.HasContainsEntityInSignature
containsEntityInSignature
Methods inherited from interface org.semanticweb.owlapi.model.HasDataPropertiesInSignature
dataPropertiesInSignature, getDataPropertiesInSignature
Methods inherited from interface org.semanticweb.owlapi.model.HasDatatypesInSignature
datatypesInSignature, getDatatypesInSignature
Methods inherited from interface org.semanticweb.owlapi.model.HasHashIndex
hashIndex
Methods inherited from interface org.semanticweb.owlapi.model.HasIndividualsInSignature
getIndividualsInSignature, individualsInSignature
Methods inherited from interface org.semanticweb.owlapi.model.HasObjectPropertiesInSignature
getObjectPropertiesInSignature, objectPropertiesInSignature
Methods inherited from interface org.semanticweb.owlapi.model.HasSignature
getSignature, signature, unsortedSignature
Methods inherited from interface org.semanticweb.owlapi.model.IsAnonymous
isAnonymous, isNamed
Methods inherited from interface org.semanticweb.owlapi.model.OWLObject
accept, accept, getNestedClassExpressions, hasSharedStructure, initHashCode, isAnonymousExpression, isAxiom, isBottomEntity, isIndividual, isIRI, isOntology, isTopEntity, nestedClassExpressions
-
Method Details
-
getClassExpressionType
ClassExpressionType getClassExpressionType()Gets the class expression type for this class expression.- Returns:
- The class expression type
-
isClassExpressionLiteral
default boolean isClassExpressionLiteral()Determines if this class is a literal. A literal being either a named class or the negation of a named class (i.e. A or not(A)).- Returns:
true
if this is a literal, or false if this is not a literal.
-
isOWLThing
boolean isOWLThing()Determines if this expression is the built in class owl:Thing. This method does not determine if the class is equivalent to owl:Thing.- Returns:
true
if this expression is owl:Thing, orfalse
if this expression is not owl:Thing
-
isOWLNothing
boolean isOWLNothing()Determines if this expression is the built in class owl:Nothing. This method does not determine if the class is equivalent to owl:Nothing.- Returns:
true
if this expression is owl:Nothing, orfalse
if this expression is not owl:Nothing.
-
getNNF
OWLClassExpression getNNF()Gets this expression in negation normal form.- Returns:
- The expression in negation normal form.
-
getComplementNNF
OWLClassExpression getComplementNNF()Gets the negation normal form of the complement of this expression.- Returns:
- A expression that represents the NNF of the complement of this expression.
-
getObjectComplementOf
OWLClassExpression getObjectComplementOf()Gets the object complement of this class expression.- Returns:
- A class expression that is the complement of this class expression.
-
conjunctSet
Interprets this expression as a conjunction and returns the conjuncts. This method does not normalise the expression (full CNF is not computed).- Returns:
- The conjuncts of this expression if it is a conjunction (object intersection of), or otherwise a singleton set containing this expression. Note that nested conjunctions will be flattened, for example, calling this method on (A and B) and C will return the set {A, B, C}
-
asConjunctSet
Set<OWLClassExpression> asConjunctSet()Interprets this expression as a conjunction and returns the conjuncts. This method does not normalise the expression (full CNF is not computed).- Returns:
- The sorted stream of conjuncts of this expression if it is a conjunction (object intersection of), or otherwise a singleton set containing this expression. Note that nested conjunctions will be flattened, for example, calling this method on (A and B) and C will return the set {A, B, C}
-
containsConjunct
Determines if this class expression contains a particular conjunct. This method does not do any normalisation such as applying DeMorgan's rules.- Parameters:
ce
- The conjunct to test for- Returns:
true
if this class expression is equal toce
or if this class expression is anObjectIntersectionOf
(possibly nested within anotherObjectIntersectionOf
) that containsce
, otherwisefalse
.
-
disjunctSet
Interprets this expression as a disjunction and returns the disjuncts. This method does not normalise the expression (full DNF is not computed).- Returns:
- The sorted stream of disjuncts of this expression if it is a disjunction (object union of), or otherwise a singleton set containing this expression. Note that nested disjunctions will be flattened, for example, calling this method on (A or B) or C will return the set {A, B, C}
-
asDisjunctSet
Set<OWLClassExpression> asDisjunctSet()Interprets this expression as a disjunction and returns the disjuncts. This method does not normalise the expression (full DNF is not computed).- Returns:
- The disjuncts of this expression if it is a disjunction (object union of), or otherwise a singleton set containing this expression. Note that nested disjunctions will be flattened, for example, calling this method on (A or B) or C will return the set {A, B, C}
-
accept
Accepts a visit from anOWLExpressionVisitor
.- Parameters:
visitor
- The visitor that wants to visit
-
accept
- Type Parameters:
O
- visitor return type- Parameters:
visitor
- visitor- Returns:
- visitor return value
-