Protégé-OWL 3.4 beta

edu.stanford.smi.protegex.owl.model.impl
Class DefaultRDFProperty

java.lang.Object
  extended by edu.stanford.smi.protege.model.DefaultFrame
      extended by edu.stanford.smi.protege.model.DefaultInstance
          extended by edu.stanford.smi.protege.model.DefaultSlot
              extended by edu.stanford.smi.protegex.owl.model.impl.DefaultRDFProperty
All Implemented Interfaces:
edu.stanford.smi.protege.model.Frame, edu.stanford.smi.protege.model.Instance, edu.stanford.smi.protege.model.Localizable, edu.stanford.smi.protege.model.Slot, Deprecatable, ProtegeInstance, ProtegeSlot, RDFObject, RDFProperty, RDFResource, Visitable, Serializable, Comparable<edu.stanford.smi.protege.model.Frame>
Direct Known Subclasses:
AbstractOWLProperty

public class DefaultRDFProperty
extends edu.stanford.smi.protege.model.DefaultSlot
implements RDFProperty

The default implementation of the OWLProperty interface.

Author:
Holger Knublauch
See Also:
Serialized Form

Constructor Summary
DefaultRDFProperty()
           
DefaultRDFProperty(edu.stanford.smi.protege.model.KnowledgeBase kb, edu.stanford.smi.protege.model.FrameID id)
           
 
Method Summary
 void accept(OWLModelVisitor visitor)
          This method is provided to be used with the OWLModelVisitor, which is part of the visitor design pattern.
 void addComment(String comment)
          Adds an rdfs:comment to this resource.
 void addDifferentFrom(RDFResource resource)
          Adds an owl:differentFrom to this resource.
 void addEquivalentProperty(RDFProperty property)
          Adds a property to the list of equivalent properties of this.
 void addIsDefinedBy(RDFResource instance)
          Adds an rdfs:isDefinedBy to this resource.
 void addLabel(String label, String language)
          Adds a label to this.
 void addPropertyListener(PropertyListener listener)
          Adds a PropertyListener to receive events on changes in the property.
 void addPropertyValue(RDFProperty property, Object value)
          Adds a value for a given property to this resource.
 void addPropertyValueListener(PropertyValueListener listener)
          Adds a PropertyValueListener to receive events when property values have changed.
 void addProtegeType(RDFSClass type)
          Adds an type to this resource.
 void addRDFType(RDFSClass type)
          Adds an rdf:type to this resource.
 void addResourceListener(ResourceListener listener)
          Adds a ResourceListener to receive events when the type of this has changed.
 void addSameAs(RDFResource resource)
          Adds an owl:sameAs to this resource.
 void addSuperproperty(RDFProperty superProperty)
          Adds a property to the super properties of this.
 void addUnionDomainClass(RDFSClass domainClass)
          Adss a class to the domain of this, applying union semantics.
 void addVersionInfo(String versionInfo)
          Adds an owl:versionInfo to this resource.
 RDFResource as(Class javaInterface)
          Converts this dynamically into an instance of a given Java interface.
 boolean canAs(Class javaInterface)
          Checks whether this can be dynamically morphed into an instance of a given Java interface.
 boolean equalsStructurally(RDFObject object)
          Determines whether or not the specified class is structurally equal to this class.
 RDFResource getAllValuesFromOnTypes(RDFProperty property)
          Checks for rdfs:range or owl:allValuesFrom restrictions on the types of this resource.
 ImageIcon getBaseImageIcon()
           
 Collection getComments()
          Gets all rdfs:comments for this resource.
 Collection getDifferentFrom()
          Gets all owl:differentFroms for this resource.
 Collection getDocumentation()
           
 RDFSClass getDomain(boolean includingSuperproperties)
          Gets the first value of the rdfs:domain property.
 Collection getDomains(boolean includingSuperproperties)
          Gets the values of the rdfs:domain property.
 Collection getEquivalentProperties()
          Gets the equivalent slots of this.
 RDFProperty getFirstSuperproperty()
          Gets the first superproperty of this (if any exists).
 Collection getHasValuesOnTypes(RDFProperty property)
          Checks if there are any owl:hasValue restrictions defined on any rdf:type of this and returns the fillers of the restrictions (if found).
 Icon getIcon()
           
 Class getIconLocation()
          Gets a class that serves as a location of the icon resource.
 String getIconName()
          Gets the local name of an icon for this type of resource.
 Collection getInferredTypes()
          Gets the direct types that were inferred during the most recent execution of a reasoner.
 Icon getInheritedIcon()
           
 RDFProperty getInverseProperty()
          Gets the inverse property of this.
 Collection getIsDefinedBy()
          Gets all rdfs:isDefinedBy for this resource.
 Collection getLabels()
          Gets the rdfs:labels that are currenly defined for this.
 String getLocalName()
          Gets the local part of the full URI (name) of this resource.
 String getNamespace()
          Gets the namespace of this resource.
 String getNamespacePrefix()
          Gets the prefix of the namespace, i.e.
 OWLModel getOWLModel()
          Gets the OWLModel this resource is defined in.
 Collection getPossibleRDFProperties()
          Gets a Collection of all RDFProperties that this resource could take values for.
 String getPrefixedName()
          Gets the qualified name as a namespace, local name pair (e.g.
 Object getPropertyValue(RDFProperty property)
          Gets all (direct) values of a given property.
 Object getPropertyValue(RDFProperty property, boolean includingSubproperties)
          Gets all values of a given property, and optionally its subproperties.
 RDFResource getPropertyValueAs(RDFProperty property, Class javaInterface)
           
 int getPropertyValueCount(RDFProperty property)
          Gets the number of all (direct) values of a given property.
 RDFSLiteral getPropertyValueLiteral(RDFProperty property)
          Gets the first value of a given property as an RDFSLiteral.
 Collection getPropertyValueLiterals(RDFProperty property)
          Gets all (direct) values of a given property at this as RDFSLiterals.
 Collection getPropertyValues(RDFProperty property)
          Gets all (direct) values of a given property at this resource.
 Collection getPropertyValues(RDFProperty property, boolean includingSubproperties)
          Gets all values of a given property, optionally including the values of the subproperties of the property.
 Collection getPropertyValuesAs(RDFProperty property, Class javaInterface)
           
 RDFSClass getProtegeType()
          Gets the first asserted type of this resource.
 Collection getProtegeTypes()
          Gets the asserted types of this resource.
 RDFResource getRange()
          Equivalent to getRange(false).
 RDFResource getRange(boolean includingSuperproperties)
          Gets the range defined at this.
 RDFSDatatype getRangeDatatype()
          Gets the direct or inherited RDFSDatatype of this.
 Collection getRanges(boolean includingSuperproperties)
          Gets all range definitions at this (or optionally its superproperties).
 Collection getRDFProperties()
          Gets all RDFProperties that have at least one value at this.
 RDFSClass getRDFType()
          Gets the first asserted rdf:type of this resource.
 Collection getRDFTypes()
          Gets the asserted rdf:types of this resource.
 Set getReferringAnonymousClasses()
          Gets a Collection of all OWLAnonymousClasses that have a reference to this.
 Collection getSameAs()
          Gets the values of the owl:sameAs property.
 Collection getSubproperties(boolean transitive)
          Gets the subproperties of this, and possibly the subproperties of the subproperties etc.
 int getSubpropertyCount()
          Gets the number of properties that have this as rdfs:subPropertyOf.
 Collection getSuperproperties(boolean transitive)
          Gets the superproperties of this, and possibly the superproperties of the superproperties etc.
 int getSuperpropertyCount()
          Gets the number of values of the rdfs:subPropertyOf properties.
 Collection getUnionDomain()
          Equivalent to getUnionDomain(false).
 Collection getUnionDomain(boolean includingSuperproperties)
          Gets the domain of this, with union semantics.
 Collection getUnionRangeClasses()
          Gets the range of this with union semantics.
 String getURI()
          Gets the full URI of this resource.
 Collection getVersionInfo()
          Gets the values of the owl:versionInfo property.
 boolean hasDatatypeRange()
          Checks whether this can take only primitive, datatype values.
 boolean hasObjectRange()
          Checks whether this can take only object/reference values.
 boolean hasPropertyValue(RDFProperty property)
          Checks whether this has any (direct) property value.
 boolean hasPropertyValue(RDFProperty property, boolean includingSubproperties)
          Checks whether this has any property value.
 boolean hasPropertyValue(RDFProperty property, Object value)
          Checks whether this has a certain (direct) property value.
 boolean hasPropertyValue(RDFProperty property, Object value, boolean includingSuperproperties)
          Checks whether this has a certain property value.
 boolean hasProtegeType(RDFSClass type)
          Checks whether this resource has a given type.
 boolean hasProtegeType(RDFSClass type, boolean includingSuperclasses)
           
 boolean hasRange(boolean includingSuperproperties)
          Checks whether this has any concrete range definition.
 boolean hasRDFType(RDFSClass type)
          Checks whether this resource has a given rdf:type.
 boolean hasRDFType(RDFSClass type, boolean includingSuperclasses)
           
 boolean isAnnotationProperty()
          Checks whether this Slot is an OWL AnnotationProperty.
 boolean isAnonymous()
          Checks whether this represents an anonymous resource / bnode.
 boolean isDeprecated()
          Checks whether this has been declared deprecated (using owl:DeprecatedClass or owl:DeprecatedProperty).
 boolean isDomainDefined()
          Checks whether the domain of this property has been explicitly defined.
 boolean isDomainDefined(boolean transitive)
          Checks whether the domain of this property has been explicitly defined.
 boolean isFunctional()
          Checks whether this is a functional property.
 boolean isRangeDefined()
          Checks whether this property defines its own range.
 boolean isReadOnly()
          Checks if the values of this slot should be treated as read-only.
 boolean isSubpropertyOf(RDFProperty superProperty, boolean transitive)
          Checks if this is a subproperty of a given superproperty.
protected  boolean isUntyped()
           
 boolean isValidPropertyValue(RDFProperty property, Object object)
          A convenience method to access the corresponding method in OWLModel.
 Iterator listPropertyValues(RDFProperty property)
          Gets all direct values of a certain property as an Iterator.
 Iterator listPropertyValues(RDFProperty property, boolean includingSubproperties)
          Gets all values of a certain property as an Iterator.
 Iterator listPropertyValuesAs(RDFProperty property, Class javaInterface)
           
 Iterator listRDFTypes()
          Gets an Iterator on the rdf:types of this.
 void removeComment(String value)
          Removes an rdfs:comment from this resource.
 void removeDifferentFrom(RDFResource resource)
           
 void removeEquivalentProperty(OWLProperty property)
          Removes a property from the list of equivalent properties.
 void removeIsDefinedBy(RDFResource resource)
           
 void removeLabel(String label, String language)
          Removes a label that has been previously added.
 void removePropertyListener(PropertyListener listener)
          Removes a PropertyListener to receive events on changes in the property.
 void removePropertyValue(RDFProperty property, Object value)
           
 void removePropertyValueListener(PropertyValueListener listener)
           
 void removeProtegeType(RDFSClass type)
          Removes a type from this resource.
 void removeRDFType(RDFSClass type)
          Removes an rdf:type from this resource.
 void removeResourceListener(ResourceListener listener)
           
 void removeSameAs(RDFResource resource)
           
 void removeSuperproperty(RDFProperty property)
          Removes a superproperty.
 void removeUnionDomainClass(RDFSClass domainClass)
          Removes a domain class, with union semantics.
 void removeVersionInfo(String versionInfo)
           
 void setComment(String comment)
           
 void setComments(Collection comments)
           
 void setDeprecated(boolean value)
           
 void setDocumentation(String value)
           
 void setDomain(RDFSClass domainClass)
          Sets the value of rdfs:domain to the given class.
 void setDomainDefined(boolean value)
          Specifies whether the domain of this property is defined or not.
 void setDomains(Collection domainClasses)
          Sets the values of the rdfs:domain property at this.
 void setEquivalentProperties(Collection slots)
          Sets the equivalent properties of this.
 void setFunctional(boolean value)
          Adds or removes owl:FunctionalProperty to/from the rdf:types of this.
 void setInferredTypes(Collection types)
           
 void setInverseProperty(RDFProperty inverseProperty)
          Sets the inverse property of this.
 void setPropertyValue(RDFProperty property, Object value)
           
 void setPropertyValues(RDFProperty property, Collection values)
           
 void setProtegeType(RDFSClass type)
           
 void setProtegeTypes(Collection types)
           
 void setRange(RDFResource range)
          Sets the rdfs:range of this.
 void setRanges(Collection ranges)
          Sets all ranges of this (in the unlikely case that multiple are needed).
 void setRDFType(RDFSClass type)
           
 void setRDFTypeOfSubproperties(RDFSNamedClass type)
           
 void setRDFTypes(Collection types)
           
 void setUnionRangeClasses(Collection classes)
           
 void synchronizeDomainAndRangeOfInverse()
          Makes sure that the range and domain of the current inverse property match the domain and range of this.
 String toString()
           
protected  void updateRDFType(boolean value, RDFSClass metaclass)
           
 
Methods inherited from class edu.stanford.smi.protege.model.DefaultSlot
addDirectSuperslot, addSlotListener, deepCopy, getAllowedClses, getAllowedParents, getAllowedValues, getAllowsMultipleValues, getAssociatedFacet, getDefaultValues, getDirectDomain, getDirectSubslotCount, getDirectSubslots, getDirectSuperslotCount, getDirectSuperslots, getDomain, getInverseSlot, getMaximumCardinality, getMaximumValue, getMinimumCardinality, getMinimumValue, getSubslots, getSuperslots, getTemplateSlotClses, getValues, getValueType, hasDirectSuperslot, hasSuperslot, hasValueAtSomeFrame, moveDirectSubslot, removeDirectSuperslot, removeSlotListener, rename, setAllowedClses, setAllowedParents, setAllowedValues, setAllowsMultipleValues, setAssociatedFacet, setDefaultValues, setDirectTypeOfSubslots, setInverseSlot, setMaximumCardinality, setMaximumValue, setMinimumCardinality, setMinimumValue, setValues, setValueType
 
Methods inherited from class edu.stanford.smi.protege.model.DefaultInstance
addDirectType, addInstanceListener, copy, getBrowserText, getDirectType, getDirectTypes, getOwnFacetValue, getOwnFacetValues, getReachableSimpleInstances, hasDirectType, hasType, moveDirectType, removeDirectType, removeInstanceListener, setDirectType, setDirectTypes, shallowCopy
 
Methods inherited from class edu.stanford.smi.protege.model.DefaultFrame
addFrameListener, addOwnFacetValue, addOwnSlotValue, areValidOwnSlotValues, assertFrameName, compareTo, delete, equals, equals, getDefaultKnowledgeBase, getDefiningProjectURI, getDirectOwnSlotValue, getDirectOwnSlotValues, getFrameID, getInvalidOwnSlotValuesText, getInvalidOwnSlotValueText, getKnowledgeBase, getName, getOwnSlotAllowsMultipleValues, getOwnSlotAndSubslotValues, getOwnSlotDefaultValues, getOwnSlotFacets, getOwnSlotFacetValues, getOwnSlots, getOwnSlotValue, getOwnSlotValueCount, getOwnSlotValues, getOwnSlotValueType, getProject, getReferences, getReferences, hashCode, hasOwnSlot, isBeingDeleted, isDeleted, isEditable, isIncluded, isSystem, isValid, isValidOwnSlotValue, isVisible, localize, markDeleted, markDeleting, moveDirectOwnSlotValue, removeFrameListener, removeOwnSlotValue, setDirectOwnSlotValue, setDirectOwnSlotValues, setDocumentation, setEditable, setIncluded, setOwnFacetValue, setOwnFacetValues, setOwnSlotValue, setOwnSlotValues, setSystem, setVisible
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface edu.stanford.smi.protegex.owl.model.ProtegeSlot
addDirectSuperslot, addSlotListener, getAllowedClses, getAllowedParents, getAllowedValues, getAllowsMultipleValues, getAssociatedFacet, getDefaultValues, getDirectDomain, getDirectSubslotCount, getDirectSubslots, getDirectSuperslotCount, getDirectSuperslots, getDomain, getInverseSlot, getMaximumCardinality, getMaximumValue, getMinimumCardinality, getMinimumValue, getSubslots, getSuperslots, getValues, getValueType, hasDirectSuperslot, hasSuperslot, hasValueAtSomeFrame, moveDirectSubslot, removeDirectSuperslot, removeSlotListener, setAllowedClses, setAllowedParents, setAllowedValues, setAllowsMultipleValues, setAssociatedFacet, setDefaultValues, setDirectTypeOfSubslots, setInverseSlot, setMaximumCardinality, setMaximumValue, setMinimumCardinality, setMinimumValue, setValues, setValueType
 
Methods inherited from interface edu.stanford.smi.protegex.owl.model.ProtegeInstance
addDirectType, addFrameListener, addInstanceListener, addOwnFacetValue, addOwnSlotValue, areValidOwnSlotValues, copy, deepCopy, getDirectOwnSlotValue, getDirectOwnSlotValues, getDirectType, getDirectTypes, getFrameID, getInvalidOwnSlotValuesText, getInvalidOwnSlotValueText, getKnowledgeBase, getOwnFacetValue, getOwnFacetValues, getOwnSlotAllowsMultipleValues, getOwnSlotAndSubslotValues, getOwnSlotDefaultValues, getOwnSlotFacets, getOwnSlotFacetValues, getOwnSlots, getOwnSlotValue, getOwnSlotValueCount, getOwnSlotValues, getOwnSlotValueType, getProject, getReachableSimpleInstances, getReferences, getReferences, hasDirectType, hasOwnSlot, hasType, isBeingDeleted, isDeleted, isEditable, isIncluded, isSystem, isValidOwnSlotValue, markDeleted, markDeleting, removeDirectType, removeFrameListener, removeInstanceListener, removeOwnSlotValue, setDirectOwnSlotValue, setDirectOwnSlotValues, setDirectType, setDirectTypes, setDocumentation, setEditable, setIncluded, setOwnFacetValue, setOwnFacetValues, setOwnSlotValue, setOwnSlotValues, shallowCopy
 
Methods inherited from interface edu.stanford.smi.protege.model.Instance
moveDirectType
 
Methods inherited from interface edu.stanford.smi.protege.model.Frame
assertFrameName, isValid, moveDirectOwnSlotValue
 
Methods inherited from interface java.lang.Comparable
compareTo
 
Methods inherited from interface edu.stanford.smi.protege.model.Slot
getTemplateSlotClses, rename
 
Methods inherited from interface edu.stanford.smi.protege.model.Instance
moveDirectType
 
Methods inherited from interface edu.stanford.smi.protege.model.Frame
assertFrameName, isValid, moveDirectOwnSlotValue
 
Methods inherited from interface java.lang.Comparable
compareTo
 
Methods inherited from interface edu.stanford.smi.protegex.owl.model.RDFResource
delete, getBrowserText, getName, isVisible, setVisible
 
Methods inherited from interface edu.stanford.smi.protegex.owl.model.ProtegeInstance
addDirectType, addFrameListener, addInstanceListener, addOwnFacetValue, addOwnSlotValue, areValidOwnSlotValues, copy, deepCopy, getDirectOwnSlotValue, getDirectOwnSlotValues, getDirectType, getDirectTypes, getFrameID, getInvalidOwnSlotValuesText, getInvalidOwnSlotValueText, getKnowledgeBase, getOwnFacetValue, getOwnFacetValues, getOwnSlotAllowsMultipleValues, getOwnSlotAndSubslotValues, getOwnSlotDefaultValues, getOwnSlotFacets, getOwnSlotFacetValues, getOwnSlots, getOwnSlotValue, getOwnSlotValueCount, getOwnSlotValues, getOwnSlotValueType, getProject, getReachableSimpleInstances, getReferences, getReferences, hasDirectType, hasOwnSlot, hasType, isBeingDeleted, isDeleted, isEditable, isIncluded, isSystem, isValidOwnSlotValue, markDeleted, markDeleting, removeDirectType, removeFrameListener, removeInstanceListener, removeOwnSlotValue, setDirectOwnSlotValue, setDirectOwnSlotValues, setDirectType, setDirectTypes, setDocumentation, setEditable, setIncluded, setOwnFacetValue, setOwnFacetValues, setOwnSlotValue, setOwnSlotValues, shallowC