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

public interface OWLClassExpression extends OWLObject, OWLPropertyRange, SWRLPredicate, AsOWLClass
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 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, or false 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, or false if this expression is not owl:Nothing.
    • 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

      default Stream<OWLClassExpression> 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

      boolean containsConjunct(OWLClassExpression ce)
      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 to ce or if this class expression is an ObjectIntersectionOf (possibly nested within another ObjectIntersectionOf) that contains ce, otherwise false.
    • disjunctSet

      default Stream<OWLClassExpression> 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

      void accept(OWLClassExpressionVisitor visitor)
      Accepts a visit from an OWLExpressionVisitor.
      Parameters:
      visitor - The visitor that wants to visit
    • accept

      <O> O accept(OWLClassExpressionVisitorEx<O> visitor)
      Type Parameters:
      O - visitor return type
      Parameters:
      visitor - visitor
      Returns:
      visitor return value