uk.ac.manchester.cs.owl.owlapi
Class OWLObjectPropertyImpl

java.lang.Object
  extended by uk.ac.manchester.cs.owl.owlapi.OWLObjectImpl
      extended by uk.ac.manchester.cs.owl.owlapi.OWLPropertyExpressionImpl<OWLClassExpression,OWLObjectPropertyExpression>
          extended by uk.ac.manchester.cs.owl.owlapi.OWLObjectPropertyExpressionImpl
              extended by uk.ac.manchester.cs.owl.owlapi.OWLObjectPropertyImpl
All Implemented Interfaces:
java.lang.Comparable<OWLObject>, OWLEntity, OWLLogicalEntity, OWLNamedObject, OWLObject, OWLObjectProperty, OWLObjectPropertyExpression, OWLProperty<OWLClassExpression,OWLObjectPropertyExpression>, OWLPropertyExpression<OWLClassExpression,OWLObjectPropertyExpression>, SWRLPredicate

public class OWLObjectPropertyImpl
extends OWLObjectPropertyExpressionImpl
implements OWLObjectProperty

Author: Matthew Horridge
The University Of Manchester
Bio-Health Informatics Group
Date: 26-Oct-2006


Constructor Summary
OWLObjectPropertyImpl(OWLDataFactory dataFactory, IRI iri)
           
 
Method Summary
 void accept(OWLEntityVisitor visitor)
           
<O> O
accept(OWLEntityVisitorEx<O> visitor)
           
 void accept(OWLNamedObjectVisitor visitor)
           
 void accept(OWLObjectVisitor visitor)
           
<O> O
accept(OWLObjectVisitorEx<O> visitor)
           
 void accept(OWLPropertyExpressionVisitor visitor)
           
<O> O
accept(OWLPropertyExpressionVisitorEx<O> visitor)
           
 OWLAnnotationProperty asOWLAnnotationProperty()
          A convenience method that obtains this entity as an OWLAnnotationProperty (in order to avoid explicit casting).
 OWLClass asOWLClass()
          A convenience method that obtains this entity as an OWLClass (in order to avoid explicit casting).
 OWLDataProperty asOWLDataProperty()
          A convenience method that obtains this entity as an OWLDataProperty (in order to avoid explicit casting).
 OWLDatatype asOWLDatatype()
          A convenience method that obtains this entity as an OWLDatatype (in order to avoid explicit casting).
 OWLNamedIndividual asOWLNamedIndividual()
          A convenience method that obtains this entity as an OWLNamedIndividual (in order to avoid explicit casting).
 OWLObjectProperty asOWLObjectProperty()
          A convenience method that obtains this entity as an OWLObjectProperty (in order to avoid explicit casting).
protected  int compareObjectOfSameType(OWLObject object)
           
 boolean equals(java.lang.Object obj)
           
 java.util.Set<OWLAnnotationAssertionAxiom> getAnnotationAssertionAxioms(OWLOntology ontology)
           
 java.util.Set<OWLAnnotation> getAnnotations(OWLOntology ontology)
          Gets the annotations for this entity.
 java.util.Set<OWLAnnotation> getAnnotations(OWLOntology ontology, OWLAnnotationProperty annotationProperty)
          Obtains the annotations on this entity where the annotation has the specified URI.
 EntityType getEntityType()
          Gets the entity type for this entity
 IRI getIRI()
          Gets the IRI of this object
<E extends OWLEntity>
E
getOWLEntity(EntityType<E> entityType)
          Gets an entity that has the same IRI as this entity but is of the specified type.
 java.util.Set<OWLAxiom> getReferencingAxioms(OWLOntology ontology)
          Gets the axioms in the specified ontology that contain this entity in their signature.
 java.util.Set<OWLAxiom> getReferencingAxioms(OWLOntology ontology, boolean includeImports)
          Gets the axioms in the specified ontology and possibly its imports closure that contain this entity in their signature.
protected  java.util.Set<? extends OWLSubPropertyAxiom<OWLObjectPropertyExpression>> getSubPropertyAxiomsForRHS(OWLOntology ont)
           
 java.net.URI getURI()
           
 boolean isAnonymous()
          Determines if this property expression is anonymous.
 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).
 boolean isBuiltIn()
          Determines if this entity is a built in entity.
 boolean isOWLAnnotationProperty()
          A convenience method that determines if this entity is an OWLAnnotationProperty
 boolean isOWLBottomDataProperty()
          Determines if this is the owl:bottomDataProperty
 boolean isOWLBottomObjectProperty()
          Determines if this is the owl:bottomObjectProperty
 boolean isOWLClass()
          A convenience method that determines if this entity is an OWLClass
 boolean isOWLDataProperty()
          A convenience method that determines if this entity is an OWLDataProperty
 boolean isOWLDatatype()
          A convenience method that determines if this entity is an OWLDatatype
 boolean isOWLNamedIndividual()
          A convenience method that determines if this entity is an OWLNamedIndividual
 boolean isOWLObjectProperty()
          A convenience method that determines if this entity is an OWLObjectProperty
 boolean isOWLTopDataProperty()
          Determines if this is the owl:topDataProperty
 boolean isOWLTopObjectProperty()
          Determines if this is the owl:topObjectProperty
 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).
 boolean isType(EntityType entityType)
          Tests to see if this entity is of the specified type
 java.lang.String toStringID()
          Returns a string representation that can be used as the ID of this entity.
 
Methods inherited from class uk.ac.manchester.cs.owl.owlapi.OWLObjectPropertyExpressionImpl
getDisjointPropertiesAxioms, getDomainAxioms, getEquivalentPropertiesAxioms, getInverseProperty, getInverses, getInverses, getNamedProperty, getRangeAxioms, getSimplified, getSubPropertyAxioms, isAsymmetric, isAsymmetric, isDataPropertyExpression, isFunctional, isFunctional, isInverseFunctional, isInverseFunctional, isIrreflexive, isIrreflexive, isObjectPropertyExpression, isReflexive, isReflexive, isSymmetric, isSymmetric, isTransitive, isTransitive
 
Methods inherited from class uk.ac.manchester.cs.owl.owlapi.OWLPropertyExpressionImpl
getDisjointProperties, getDisjointProperties, getDomains, getDomains, getEquivalentProperties, getEquivalentProperties, getRanges, getRanges, getSubProperties, getSubProperties, getSuperProperties, getSuperProperties
 
Methods inherited from class uk.ac.manchester.cs.owl.owlapi.OWLObjectImpl
compareSets, compareTo, getClassesInSignature, getDataPropertiesInSignature, getDatatypesInSignature, getIndividualsInSignature, getNestedClassExpressions, getObjectPropertiesInSignature, getOWLDataFactory, getSignature, hashCode, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.semanticweb.owlapi.model.OWLObjectPropertyExpression
getInverseProperty, getInverses, getInverses, getNamedProperty, getSimplified, isAsymmetric, isAsymmetric, isInverseFunctional, isInverseFunctional, isIrreflexive, isIrreflexive, isReflexive, isReflexive, isSymmetric, isSymmetric, isTransitive, isTransitive
 
Methods inherited from interface org.semanticweb.owlapi.model.OWLPropertyExpression
getDisjointProperties, getDisjointProperties, getDomains, getDomains, getEquivalentProperties, getEquivalentProperties, getRanges, getRanges, getSubProperties, getSubProperties, getSuperProperties, getSuperProperties, isDataPropertyExpression, isFunctional, isFunctional, isObjectPropertyExpression
 
Methods inherited from interface org.semanticweb.owlapi.model.OWLPropertyExpression
getDisjointProperties, getDisjointProperties, getDomains, getDomains, getEquivalentProperties, getEquivalentProperties, getRanges, getRanges, getSubProperties, getSubProperties, getSuperProperties, getSuperProperties, isDataPropertyExpression, isFunctional, isFunctional, isObjectPropertyExpression
 

Constructor Detail

OWLObjectPropertyImpl

public OWLObjectPropertyImpl(OWLDataFactory dataFactory,
                             IRI iri)
Method Detail

isTopEntity

public boolean isTopEntity()
Description copied from interface: OWLObject
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).

Specified by:
isTopEntity in interface OWLObject
Overrides:
isTopEntity in class OWLObjectImpl
Returns:
true if this object corresponds to one of the above entities.

isBottomEntity

public boolean isBottomEntity()
Description copied from interface: OWLObject
Determines if this object is either, owl:Nothing (the bottom class), owl:bottomObjectProperty (the bottom object property) , owl:bottomDataProperty (the bottom data property).

Specified by:
isBottomEntity in interface OWLObject
Overrides:
isBottomEntity in class OWLObjectImpl
Returns:
true if this object corresponds to one of the above entities.

getEntityType

public EntityType getEntityType()
Gets the entity type for this entity

Specified by:
getEntityType in interface OWLEntity
Returns:
The entity type

getOWLEntity

public <E extends OWLEntity> E getOWLEntity(EntityType<E> entityType)
Gets an entity that has the same IRI as this entity but is of the specified type.

Specified by:
getOWLEntity in interface OWLEntity
Parameters:
entityType - The type of the entity to obtain. This entity is not affected in any way.
Returns:
An entity that has the same IRI as this entity and is of the specified type

isType

public boolean isType(EntityType entityType)
Tests to see if this entity is of the specified type

Specified by:
isType in interface OWLEntity
Parameters:
entityType - The entity type
Returns:
true if this entity is of the specified type, otherwise false.

toStringID

public java.lang.String toStringID()
Returns a string representation that can be used as the ID of this entity. This is the toString representation of the IRI

Specified by:
toStringID in interface OWLEntity
Returns:
A string representing the toString of the IRI of this entity.

getIRI

public IRI getIRI()
Description copied from interface: OWLNamedObject
Gets the IRI of this object

Specified by:
getIRI in interface OWLNamedObject
Returns:
The IRI of this object

getURI

public java.net.URI getURI()

isBuiltIn

public boolean isBuiltIn()
Description copied from interface: OWLEntity
Determines if this entity is a built in entity. The entity is a built in entity if it is:

Specified by:
isBuiltIn in interface OWLEntity
Returns:
true if this entity is a built in entity, or false if this entity is not a builtin entity.

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class OWLObjectPropertyExpressionImpl

accept

public void accept(OWLEntityVisitor visitor)
Specified by:
accept in interface OWLEntity

accept

public void accept(OWLPropertyExpressionVisitor visitor)
Specified by:
accept in interface OWLPropertyExpression<OWLClassExpression,OWLObjectPropertyExpression>

accept

public void accept(OWLObjectVisitor visitor)
Specified by:
accept in interface OWLObject

accept

public void accept(OWLNamedObjectVisitor visitor)
Specified by:
accept in interface OWLNamedObject

accept

public <O> O accept(OWLEntityVisitorEx<O> visitor)
Specified by:
accept in interface OWLEntity

accept

public <O> O accept(OWLPropertyExpressionVisitorEx<O> visitor)
Specified by:
accept in interface OWLPropertyExpression<OWLClassExpression,OWLObjectPropertyExpression>

accept

public <O> O accept(OWLObjectVisitorEx<O> visitor)
Specified by:
accept in interface OWLObject

isAnonymous

public boolean isAnonymous()
Description copied from interface: OWLPropertyExpression
Determines if this property expression is anonymous.

Specified by:
isAnonymous in interface OWLPropertyExpression<OWLClassExpression,OWLObjectPropertyExpression>
Returns:
true if the property expression is anonymous (because it is the inverse of a property). false if this property is a named object property or named data property.

asOWLObjectProperty

public OWLObjectProperty asOWLObjectProperty()
Description copied from interface: OWLEntity
A convenience method that obtains this entity as an OWLObjectProperty (in order to avoid explicit casting).

Specified by:
asOWLObjectProperty in interface OWLEntity
Specified by:
asOWLObjectProperty in interface OWLObjectPropertyExpression
Returns:
The entity as an OWLObjectProperty.

getSubPropertyAxiomsForRHS

protected java.util.Set<? extends OWLSubPropertyAxiom<OWLObjectPropertyExpression>> getSubPropertyAxiomsForRHS(OWLOntology ont)
Specified by:
getSubPropertyAxiomsForRHS in class OWLPropertyExpressionImpl<OWLClassExpression,OWLObjectPropertyExpression>

getAnnotations

public java.util.Set<OWLAnnotation> getAnnotations(OWLOntology ontology)
Description copied from interface: OWLEntity
Gets the annotations for this entity. These are deemed to be annotations in annotation assertion axioms that have a subject that is an IRI that is equal to the IRI of this entity.

Specified by:
getAnnotations in interface OWLEntity
Parameters:
ontology - The ontology to be examined for annotation assertion axioms
Returns:
The annotations that participate directly in an annotation assertion whose subject is an IRI corresponding to the IRI of this entity.

getAnnotationAssertionAxioms

public java.util.Set<OWLAnnotationAssertionAxiom> getAnnotationAssertionAxioms(OWLOntology ontology)
Specified by:
getAnnotationAssertionAxioms in interface OWLEntity

getAnnotations

public java.util.Set<OWLAnnotation> getAnnotations(OWLOntology ontology,
                                                   OWLAnnotationProperty annotationProperty)
Description copied from interface: OWLEntity
Obtains the annotations on this entity where the annotation has the specified URI.

Specified by:
getAnnotations in interface OWLEntity
Parameters:
ontology - The ontology to examine for annotation axioms
annotationProperty - The annotation property
Returns:
A set of OWLAnnotation objects that have the specified URI.

asOWLDataProperty

public OWLDataProperty asOWLDataProperty()
Description copied from interface: OWLEntity
A convenience method that obtains this entity as an OWLDataProperty (in order to avoid explicit casting).

Specified by:
asOWLDataProperty in interface OWLEntity
Returns:
The entity as an OWLDataProperty.

asOWLDatatype

public OWLDatatype asOWLDatatype()
Description copied from interface: OWLEntity
A convenience method that obtains this entity as an OWLDatatype (in order to avoid explicit casting).

Specified by:
asOWLDatatype in interface OWLEntity
Returns:
The entity as an OWLDatatype.

asOWLNamedIndividual

public OWLNamedIndividual asOWLNamedIndividual()
Description copied from interface: OWLEntity
A convenience method that obtains this entity as an OWLNamedIndividual (in order to avoid explicit casting).

Specified by:
asOWLNamedIndividual in interface OWLEntity
Returns:
The entity as an OWLNamedIndividual.

asOWLClass

public OWLClass asOWLClass()
Description copied from interface: OWLEntity
A convenience method that obtains this entity as an OWLClass (in order to avoid explicit casting).

Specified by:
asOWLClass in interface OWLEntity
Returns:
The entity as an OWLClass.

isOWLClass

public boolean isOWLClass()
Description copied from interface: OWLEntity
A convenience method that determines if this entity is an OWLClass

Specified by:
isOWLClass in interface OWLEntity
Returns:
true if this entity is an OWLClass, otherwise false

isOWLDataProperty

public boolean isOWLDataProperty()
Description copied from interface: OWLEntity
A convenience method that determines if this entity is an OWLDataProperty

Specified by:
isOWLDataProperty in interface OWLEntity
Returns:
true if this entity is an OWLDataProperty, otherwise false

isOWLDatatype

public boolean isOWLDatatype()
Description copied from interface: OWLEntity
A convenience method that determines if this entity is an OWLDatatype

Specified by:
isOWLDatatype in interface OWLEntity
Returns:
true if this entity is an OWLDatatype, otherwise false

isOWLNamedIndividual

public boolean isOWLNamedIndividual()
Description copied from interface: OWLEntity
A convenience method that determines if this entity is an OWLNamedIndividual

Specified by:
isOWLNamedIndividual in interface OWLEntity
Returns:
true if this entity is an OWLNamedIndividual, otherwise false

isOWLObjectProperty

public boolean isOWLObjectProperty()
Description copied from interface: OWLEntity
A convenience method that determines if this entity is an OWLObjectProperty

Specified by:
isOWLObjectProperty in interface OWLEntity
Returns:
true if this entity is an OWLObjectProperty, otherwise false

asOWLAnnotationProperty

public OWLAnnotationProperty asOWLAnnotationProperty()
Description copied from interface: OWLEntity
A convenience method that obtains this entity as an OWLAnnotationProperty (in order to avoid explicit casting).

Specified by:
asOWLAnnotationProperty in interface OWLEntity
Returns:
The entity as an OWLAnnotationProperty.

isOWLAnnotationProperty

public boolean isOWLAnnotationProperty()
Description copied from interface: OWLEntity
A convenience method that determines if this entity is an OWLAnnotationProperty

Specified by:
isOWLAnnotationProperty in interface OWLEntity
Returns:
true if this entity is an OWLAnnotationProperty, otherwise false

compareObjectOfSameType

protected int compareObjectOfSameType(OWLObject object)
Specified by:
compareObjectOfSameType in class OWLObjectImpl

isOWLTopObjectProperty

public boolean isOWLTopObjectProperty()
Determines if this is the owl:topObjectProperty

Specified by:
isOWLTopObjectProperty in interface OWLPropertyExpression<OWLClassExpression,OWLObjectPropertyExpression>
Returns:
true if this property is the owl:topObjectProperty otherwise false

isOWLBottomObjectProperty

public boolean isOWLBottomObjectProperty()
Determines if this is the owl:bottomObjectProperty

Specified by:
isOWLBottomObjectProperty in interface OWLPropertyExpression<OWLClassExpression,OWLObjectPropertyExpression>
Returns:
true if this property is the owl:bottomObjectProperty otherwise false

isOWLTopDataProperty

public boolean isOWLTopDataProperty()
Determines if this is the owl:topDataProperty

Specified by:
isOWLTopDataProperty in interface OWLPropertyExpression<OWLClassExpression,OWLObjectPropertyExpression>
Returns:
true if this property is the owl:topDataProperty otherwise false

isOWLBottomDataProperty

public boolean isOWLBottomDataProperty()
Determines if this is the owl:bottomDataProperty

Specified by:
isOWLBottomDataProperty in interface OWLPropertyExpression<OWLClassExpression,OWLObjectPropertyExpression>
Returns:
true if this property is the owl:bottomDataProperty otherwise false

getReferencingAxioms

public java.util.Set<OWLAxiom> getReferencingAxioms(OWLOntology ontology)
Description copied from interface: OWLEntity
Gets the axioms in the specified ontology that contain this entity in their signature.

Specified by:
getReferencingAxioms in interface OWLEntity
Parameters:
ontology - The ontology that will be searched for axioms
Returns:
The axioms in the specified ontology whose signature contains this entity.

getReferencingAxioms

public java.util.Set<OWLAxiom> getReferencingAxioms(OWLOntology ontology,
                                                    boolean includeImports)
Description copied from interface: OWLEntity
Gets the axioms in the specified ontology and possibly its imports closure that contain this entity in their signature.

Specified by:
getReferencingAxioms in interface OWLEntity
Parameters:
ontology - The ontology that will be searched for axioms
includeImports - If true then axioms in the imports closure will also be returned, if false then only the axioms in the specified ontology will be returned.
Returns:
The axioms in the specified ontology whose signature contains this entity.