|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
An RDFResource representing an rdf:Property or an instance of a subclass of rdf:Property such as owl:ObjectProperty and owl:FunctionalProperty.
Method Summary | |
void |
addEquivalentProperty(RDFProperty property)
Adds a property to the list of equivalent properties of this. |
void |
addPropertyListener(PropertyListener listener)
Adds a PropertyListener to receive events on changes in the property. |
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. |
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). |
Icon |
getInheritedIcon()
|
RDFProperty |
getInverseProperty()
Gets the inverse property of this. |
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 |
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. |
boolean |
hasDatatypeRange()
Checks whether this can take only primitive, datatype values. |
boolean |
hasObjectRange()
Checks whether this can take only object/reference values. |
boolean |
hasRange(boolean includingSuperproperties)
Checks whether this has any concrete range definition. |
boolean |
isAnnotationProperty()
Checks whether this Slot is an OWL AnnotationProperty. |
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. |
void |
removeEquivalentProperty(OWLProperty property)
Removes a property from the list of equivalent properties. |
void |
removePropertyListener(PropertyListener listener)
Removes a PropertyListener to receive events on changes in the property. |
void |
removeSuperproperty(RDFProperty superproperty)
Removes a superproperty. |
void |
removeUnionDomainClass(RDFSClass domainClass)
Removes a domain class, with union semantics. |
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 properties)
Sets the equivalent properties of this. |
void |
setFunctional(boolean value)
Adds or removes owl:FunctionalProperty to/from the rdf:types of this. |
void |
setInverseProperty(RDFProperty inverseProperty)
Sets the inverse property of this. |
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 |
setUnionRangeClasses(Collection classes)
|
void |
synchronizeDomainAndRangeOfInverse()
Makes sure that the range and domain of the current inverse property match the domain and range of this. |
Methods inherited from interface edu.stanford.smi.protege.model.Instance |
moveDirectType |
Methods inherited from interface edu.stanford.smi.protege.model.Frame |
delete, getName, isValid, isVisible, moveDirectOwnSlotValue, setName, setVisible |
Methods inherited from interface java.lang.Comparable |
compareTo |
Methods inherited from interface edu.stanford.smi.protege.model.Slot |
getTemplateSlotClses |
Methods inherited from interface edu.stanford.smi.protegex.owl.model.RDFObject |
equalsStructurally |
Methods inherited from interface edu.stanford.smi.protegex.owl.model.visitor.Visitable |
accept |
Methods inherited from interface edu.stanford.smi.protegex.owl.model.Deprecatable |
isDeprecated, setDeprecated |
Method Detail |
public void addEquivalentProperty(RDFProperty property)
property
- the property to declare to be equivalent to thispublic void addPropertyListener(PropertyListener listener)
listener
- the PropertyListener to add (must be a PropertyAdapter)public void addSuperproperty(RDFProperty superProperty)
superProperty
- the new super propertypublic void addUnionDomainClass(RDFSClass domainClass)
domainClass
- the new domain classpublic RDFSClass getDomain(boolean includingSuperproperties)
includingSuperproperties
- true to also consider superproperties
public Collection getDomains(boolean includingSuperproperties)
includingSuperproperties
- true to also consider superproperties
public Collection getEquivalentProperties()
public RDFProperty getFirstSuperproperty()
public Icon getInheritedIcon()
public RDFProperty getInverseProperty()
public RDFResource getRange()
getRange(false)
.
public RDFResource getRange(boolean includingSuperproperties)
includingSuperproperties
- true to also consider superproperties
setRange(edu.stanford.smi.protegex.owl.model.RDFResource)
,
hasDatatypeRange()
,
hasObjectRange()
public RDFSDatatype getRangeDatatype()
public Collection getRanges(boolean includingSuperproperties)
includingSuperproperties
- true to also consider superproperties
public Collection getSubproperties(boolean transitive)
transitive
- true to get subproperties recursively
public int getSubpropertyCount()
public Collection getSuperproperties(boolean transitive)
transitive
- true to get superproperties recursively
public int getSuperpropertyCount()
public Collection getUnionDomain()
getUnionDomain(false)
.
public Collection getUnionDomain(boolean includingSuperproperties)
includingSuperproperties
- true to walk up the superproperty tree
public Collection getUnionRangeClasses()
public boolean hasDatatypeRange()
public boolean hasObjectRange()
public boolean hasRange(boolean includingSuperproperties)
includingSuperproperties
- true to also look at the range of the superproperties
public boolean isAnnotationProperty()
public boolean isDomainDefined()
isDomainDefined(false)
.
public boolean isDomainDefined(boolean transitive)
transitive
- true to also consider the superproperties recursively
public boolean isFunctional()
public boolean isRangeDefined()
public boolean isReadOnly()
public boolean isSubpropertyOf(RDFProperty superproperty, boolean transitive)
superproperty
- the potential superpropertytransitive
- true to traverse the superproperty hierarchy recursively
public void removeEquivalentProperty(OWLProperty property)
property
- the equivalent property to removepublic void removePropertyListener(PropertyListener listener)
listener
- the PropertyListener to remove (must be a PropertyAdapter)public void removeSuperproperty(RDFProperty superproperty)
superproperty
- the property to remove from the superpropertiespublic void removeUnionDomainClass(RDFSClass domainClass)
domainClass
- the domain class to remove from the domainpublic void setDomain(RDFSClass domainClass)
domainClass
- the new domainpublic void setDomains(Collection domainClasses)
domainClasses
- the new domains (RDFSClasses)public void setDomainDefined(boolean value)
public void setEquivalentProperties(Collection properties)
properties
- a Collection of RDFProperty objectspublic void setFunctional(boolean value)
value
- true to make this a functional property, false to make this unfunctionalpublic void setInverseProperty(RDFProperty inverseProperty)
inverseProperty
- the new inverse property or null to clear the valuepublic void setRange(RDFResource range)
OWLModel.getXSDint
. If this is supposed
to hold instances of multiple classes, you can pass in a union class.
Note that this call will completely replace any previous ranges of this.
range
- the new range of this property or null to delete the rangepublic void setRanges(Collection ranges)
ranges
- a Collection of RDFResources (possibly empty)setRange(edu.stanford.smi.protegex.owl.model.RDFResource)
public void setUnionRangeClasses(Collection classes)
public void synchronizeDomainAndRangeOfInverse()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |