Interface OWLObject

All Superinterfaces:
Comparable<OWLObject>, HasAnnotationPropertiesInSignature, HasAnonymousIndividuals, HasClassesInSignature, HasComponents, HasContainsEntityInSignature, HasDataPropertiesInSignature, HasDatatypesInSignature, HasHashIndex, HasIndex, HasIndividualsInSignature, HasObjectPropertiesInSignature, HasSignature, IsAnonymous, Serializable
All Known Subinterfaces:
HasIncrementalSignatureGenerationSupport, OWLAnnotation, OWLAnnotationAssertionAxiom, OWLAnnotationAxiom, OWLAnnotationObject, OWLAnnotationProperty, OWLAnnotationPropertyDomainAxiom, OWLAnnotationPropertyRangeAxiom, OWLAnnotationSubject, OWLAnnotationValue, OWLAnonymousClassExpression, OWLAnonymousIndividual, OWLAsymmetricObjectPropertyAxiom, OWLAxiom, OWLBooleanClassExpression, OWLCardinalityRestriction<F>, OWLClass, OWLClassAssertionAxiom, OWLClassAxiom, OWLClassExpression, OWLDataAllValuesFrom, OWLDataCardinalityRestriction, OWLDataComplementOf, OWLDataExactCardinality, OWLDataHasValue, OWLDataIntersectionOf, OWLDataMaxCardinality, OWLDataMinCardinality, OWLDataOneOf, OWLDataProperty, OWLDataPropertyAssertionAxiom, OWLDataPropertyAxiom, OWLDataPropertyCharacteristicAxiom, OWLDataPropertyDomainAxiom, OWLDataPropertyExpression, OWLDataPropertyRangeAxiom, OWLDataRange, OWLDataRestriction, OWLDataSomeValuesFrom, OWLDatatype, OWLDatatypeDefinitionAxiom, OWLDatatypeRestriction, OWLDataUnionOf, OWLDeclarationAxiom, OWLDifferentIndividualsAxiom, OWLDisjointClassesAxiom, OWLDisjointDataPropertiesAxiom, OWLDisjointObjectPropertiesAxiom, OWLDisjointUnionAxiom, OWLEntity, OWLEquivalentClassesAxiom, OWLEquivalentDataPropertiesAxiom, OWLEquivalentObjectPropertiesAxiom, OWLFacetRestriction, OWLFunctionalDataPropertyAxiom, OWLFunctionalObjectPropertyAxiom, OWLHasKeyAxiom, OWLHasValueRestriction<V>, OWLIndividual, OWLIndividualAxiom, OWLInverseFunctionalObjectPropertyAxiom, OWLInverseObjectPropertiesAxiom, OWLIrreflexiveObjectPropertyAxiom, OWLLiteral, OWLLogicalAxiom, OWLLogicalEntity, OWLMutableOntology, OWLNamedIndividual, OWLNamedObject, OWLNaryAxiom<C>, OWLNaryBooleanClassExpression, OWLNaryClassAxiom, OWLNaryDataRange, OWLNaryIndividualAxiom, OWLNaryPropertyAxiom<P>, OWLNegativeDataPropertyAssertionAxiom, OWLNegativeObjectPropertyAssertionAxiom, OWLObjectAllValuesFrom, OWLObjectCardinalityRestriction, OWLObjectComplementOf, OWLObjectExactCardinality, OWLObjectHasSelf, OWLObjectHasValue, OWLObjectIntersectionOf, OWLObjectInverseOf, OWLObjectMaxCardinality, OWLObjectMinCardinality, OWLObjectOneOf, OWLObjectProperty, OWLObjectPropertyAssertionAxiom, OWLObjectPropertyAxiom, OWLObjectPropertyCharacteristicAxiom, OWLObjectPropertyDomainAxiom, OWLObjectPropertyExpression, OWLObjectPropertyRangeAxiom, OWLObjectRestriction, OWLObjectSomeValuesFrom, OWLObjectUnionOf, OWLOntology, OWLPrimitive, OWLProperty, OWLPropertyAssertionAxiom<P,O>, OWLPropertyAssertionObject, OWLPropertyAxiom, OWLPropertyDomain, OWLPropertyDomainAxiom<P>, OWLPropertyExpression, OWLPropertyRange, OWLPropertyRangeAxiom<P,R>, OWLQuantifiedDataRestriction, OWLQuantifiedObjectRestriction, OWLQuantifiedRestriction<F>, OWLReflexiveObjectPropertyAxiom, OWLRestriction, OWLSameIndividualAxiom, OWLSubAnnotationPropertyOfAxiom, OWLSubClassOfAxiom, OWLSubDataPropertyOfAxiom, OWLSubObjectPropertyOfAxiom, OWLSubPropertyAxiom<P>, OWLSubPropertyChainOfAxiom, OWLSymmetricObjectPropertyAxiom, OWLTransitiveObjectPropertyAxiom, OWLUnaryPropertyAxiom<P>, SWRLArgument, SWRLAtom, SWRLBinaryAtom<A,B>, SWRLBuiltInAtom, SWRLClassAtom, SWRLDArgument, SWRLDataPropertyAtom, SWRLDataRangeAtom, SWRLDifferentIndividualsAtom, SWRLIArgument, SWRLIndividualArgument, SWRLLiteralArgument, SWRLObject, SWRLObjectPropertyAtom, SWRLRule, SWRLSameIndividualAtom, SWRLUnaryAtom<A>, SWRLVariable
All Known Implementing Classes:
ConcurrentOWLOntologyImpl, IRI, OWL2DatatypeImpl, OWLAnnotationAssertionAxiomImpl, OWLAnnotationImpl, OWLAnnotationImplNotAnnotated, OWLAnnotationPropertyDomainAxiomImpl, OWLAnnotationPropertyImpl, OWLAnnotationPropertyRangeAxiomImpl, OWLAnonymousClassExpressionImpl, OWLAnonymousIndividualImpl, OWLAsymmetricObjectPropertyAxiomImpl, OWLAxiomImpl, OWLAxiomIndexImpl, OWLCardinalityRestrictionImpl, OWLClassAssertionAxiomImpl, OWLClassAxiomImpl, OWLClassExpressionImpl, OWLClassImpl, OWLDataAllValuesFromImpl, OWLDataCardinalityRestrictionImpl, OWLDataComplementOfImpl, OWLDataExactCardinalityImpl, OWLDataHasValueImpl, OWLDataIntersectionOfImpl, OWLDataMaxCardinalityImpl, OWLDataMinCardinalityImpl, OWLDataOneOfImpl, OWLDataPropertyAssertionAxiomImpl, OWLDataPropertyCharacteristicAxiomImpl, OWLDataPropertyDomainAxiomImpl, OWLDataPropertyImpl, OWLDataPropertyRangeAxiomImpl, OWLDataSomeValuesFromImpl, OWLDatatypeDefinitionAxiomImpl, OWLDatatypeImpl, OWLDatatypeRestrictionImpl, OWLDataUnionOfImpl, OWLDeclarationAxiomImpl, OWLDifferentIndividualsAxiomImpl, OWLDisjointClassesAxiomImpl, OWLDisjointDataPropertiesAxiomImpl, OWLDisjointObjectPropertiesAxiomImpl, OWLDisjointUnionAxiomImpl, OWLEquivalentClassesAxiomImpl, OWLEquivalentDataPropertiesAxiomImpl, OWLEquivalentObjectPropertiesAxiomImpl, OWLFacetRestrictionImpl, OWLFunctionalDataPropertyAxiomImpl, OWLFunctionalObjectPropertyAxiomImpl, OWLHasKeyAxiomImpl, OWLImmutableOntologyImpl, OWLIndividualAxiomImpl, OWLIndividualImpl, OWLIndividualRelationshipAxiomImpl, OWLInverseFunctionalObjectPropertyAxiomImpl, OWLInverseObjectPropertiesAxiomImpl, OWLIrreflexiveObjectPropertyAxiomImpl, OWLLiteralImpl, OWLLiteralImplBoolean, OWLLiteralImplDouble, OWLLiteralImplFloat, OWLLiteralImplInteger, OWLLiteralImplLong, OWLLiteralImplNoCompression, OWLLiteralImplPlain, OWLLiteralImplString, OWLLogicalAxiomImpl, OWLNamedIndividualImpl, OWLNaryBooleanClassExpressionImpl, OWLNaryClassAxiomImpl, OWLNaryDataRangeImpl, OWLNaryIndividualAxiomImpl, OWLNaryPropertyAxiomImpl, OWLNegativeDataPropertyAssertionAxiomImpl, OWLNegativeObjectPropertyAssertionAxiomImpl, OWLObjectAllValuesFromImpl, OWLObjectCardinalityRestrictionImpl, OWLObjectComplementOfImpl, OWLObjectExactCardinalityImpl, OWLObjectHasSelfImpl, OWLObjectHasValueImpl, OWLObjectImpl, OWLObjectIntersectionOfImpl, OWLObjectInverseOfImpl, OWLObjectMaxCardinalityImpl, OWLObjectMinCardinalityImpl, OWLObjectOneOfImpl, OWLObjectPropertyAssertionAxiomImpl, OWLObjectPropertyCharacteristicAxiomImpl, OWLObjectPropertyDomainAxiomImpl, OWLObjectPropertyImpl, OWLObjectPropertyRangeAxiomImpl, OWLObjectSomeValuesFromImpl, OWLObjectUnionOfImpl, OWLOntologyImpl, OWLPropertyAxiomImpl, OWLPropertyDomainAxiomImpl, OWLPropertyRangeAxiomImpl, OWLQuantifiedDataRestrictionImpl, OWLQuantifiedObjectRestrictionImpl, OWLQuantifiedRestrictionImpl, OWLReflexiveObjectPropertyAxiomImpl, OWLSameIndividualAxiomImpl, OWLSubAnnotationPropertyOfAxiomImpl, OWLSubClassOfAxiomImpl, OWLSubDataPropertyOfAxiomImpl, OWLSubObjectPropertyOfAxiomImpl, OWLSubPropertyAxiomImpl, OWLSubPropertyChainAxiomImpl, OWLSymmetricObjectPropertyAxiomImpl, OWLTransitiveObjectPropertyAxiomImpl, OWLUnaryPropertyAxiomImpl, OWLValueRestrictionImpl, SWRLAtomImpl, SWRLBinaryAtomImpl, SWRLBuiltInAtomImpl, SWRLClassAtomImpl, SWRLDataPropertyAtomImpl, SWRLDataRangeAtomImpl, SWRLDifferentIndividualsAtomImpl, SWRLIndividualArgumentImpl, SWRLLiteralArgumentImpl, SWRLObjectPropertyAtomImpl, SWRLRuleImpl, SWRLSameIndividualAtomImpl, SWRLUnaryAtomImpl, SWRLVariableImpl

Since:
2.0.0
Author:
Matthew Horridge, The University Of Manchester, Bio-Health Informatics Group
  • Method Details

    • getNestedClassExpressions

      default Set<OWLClassExpression> getNestedClassExpressions()
      Gets all of the nested (includes top level) class expressions (anonymous and named) that are used in this object. For an ontology, this method visits the logical axioms, so entities that are only declared (and possibly annotated) but do not appear in any logical axiom are not returned as part of the set. The default implementation of this method returns an empty, modifiable set.
      Returns:
      A set of OWLClassExpressions that represent the nested class expressions used in this object. The set that is returned is a copy; modifications to the returned set will not be reflected in this object.
    • nestedClassExpressions

      default Stream<OWLClassExpression> nestedClassExpressions()
      Gets all of the nested (includes top level) class expressions (anonymous and named) that are used in this object. For an ontology, this method visits the logical axioms, so entities that are only declared (and possibly annotated) but do not appear in any logical axiom are not returned as part of the stream. The default implementation of this method returns an empty stream.
      Returns:
      A stream of OWLClassExpressions that represent the nested class expressions used in this object.
    • accept

      void accept(OWLObjectVisitor visitor)
      Accepts a visitor
      Parameters:
      visitor - The visitor
    • accept

      <O> O accept(OWLObjectVisitorEx<O> visitor)
      Accepts a visitor
      Type Parameters:
      O - visitor return type
      Parameters:
      visitor - The visitor
      Returns:
      visitor value
    • isTopEntity

      default boolean isTopEntity()
      Determines if this object is either, owl:Thing (the top class), owl:topObjectProperty (the top object property) , owl:topDataProperty (the top data property) or rdfs:Literal (the top datatype).
      Returns:
      true if this object corresponds to one of the above entities.
    • isBottomEntity

      default boolean isBottomEntity()
      Determines if this object is either, owl:Nothing (the bottom class), owl:bottomObjectProperty (the bottom object property) , owl:bottomDataProperty (the bottom data property).
      Returns:
      true if this object corresponds to one of the above entities.
    • isIRI

      default boolean isIRI()
      Returns:
      true if this object is an IRI.
    • isIndividual

      default boolean isIndividual()
      Returns:
      true if this object is an individual.
    • isAxiom

      default boolean isAxiom()
      Returns:
      true if this object is an axiom.
    • isOntology

      default boolean isOntology()
      Returns:
      true for ontologies, false for any other OWL object
    • isAnonymousExpression

      default boolean isAnonymousExpression()
      Returns:
      true if this object is not an axiom, not an individual and anonymous; this is true for class and property expressions, as well as data ranges.
    • hasSharedStructure

      default boolean hasSharedStructure()
      Returns:
      true if this object contains anonymous expressions referred multiple times. This is called structure sharing. An example can be:
       some P C subClassOf some Q (some P C)
               

      This can happen in axioms as well as in expressions:
       (some P C) and (some Q (some P C))
               

    • initHashCode

      int initHashCode()
      Returns:
      hash code for the object; called on first use, cached by OWLObjectImpl in the default implementation.
    • hashIteration

      static int hashIteration(int a, int b)
      Iteration for hash codes
      Parameters:
      a - existing hash
      b - hash to add
      Returns:
      new hash