|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
The base interface for various OWL classes, slots and instances.
Method Summary | |
void |
addComment(String comment)
Adds an rdfs:comment to this resource. |
void |
addDifferentFrom(RDFResource resource)
Adds an owl:differentFrom to this resource. |
void |
addIsDefinedBy(RDFResource resource)
Adds an rdfs:isDefinedBy to this resource. |
void |
addLabel(String label,
String language)
Adds a label to this. |
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 |
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. |
void |
delete()
Deletes this resource from the model. |
RDFResource |
getAllValuesFromOnTypes(RDFProperty property)
Checks for rdfs:range or owl:allValuesFrom restrictions on the types of this resource. |
String |
getBrowserText()
Gets a human-readable visual representation of this resource. |
Collection |
getComments()
Gets all rdfs:comments for this resource. |
Collection |
getDifferentFrom()
Gets all owl:differentFroms for this resource. |
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). |
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. |
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 |
getName()
Gets the Protege name of this resource. |
String |
getNamespace()
Gets the namespace of this resource. |
String |
getNamespacePrefix()
Gets the prefix of the namespace, i.e. the abbreviated name of the namespace. |
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. |
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. |
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. |
String |
getURI()
Gets the full URI of this resource. |
Collection |
getVersionInfo()
Gets the values of the owl:versionInfo property. |
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 includingSubproperties)
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 |
hasRDFType(RDFSClass type)
Checks whether this resource has a given rdf:type. |
boolean |
hasRDFType(RDFSClass type,
boolean includingSuperclasses)
|
boolean |
isAnonymous()
Checks whether this represents an anonymous resource / bnode. |
boolean |
isValidPropertyValue(RDFProperty property,
Object object)
A convenience method to access the corresponding method in OWLModel. |
boolean |
isVisible()
Checks whether this resource has been declared to be invisible in the user interface. |
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 |
removeIsDefinedBy(RDFResource resource)
|
void |
removeLabel(String label,
String language)
Removes a label that has been previously added. |
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 |
removeVersionInfo(String versionInfo)
|
void |
setComment(String comment)
|
void |
setComments(Collection comments)
|
void |
setInferredTypes(Collection types)
|
void |
setName(String newName)
Sets the Protege name of this resource. |
void |
setPropertyValue(RDFProperty property,
Object value)
|
void |
setPropertyValues(RDFProperty property,
Collection values)
|
void |
setProtegeType(RDFSClass type)
|
void |
setProtegeTypes(Collection types)
|
void |
setRDFType(RDFSClass type)
|
void |
setRDFTypes(Collection types)
|
void |
setVisible(boolean b)
Sets this resource visible or invisible. |
Methods inherited from interface edu.stanford.smi.protege.model.Instance |
moveDirectType |
Methods inherited from interface edu.stanford.smi.protege.model.Frame |
isValid, moveDirectOwnSlotValue |
Methods inherited from interface java.lang.Comparable |
compareTo |
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 |
Method Detail |
public void addComment(String comment)
comment
- the comment to addgetComments()
,
removeComment(java.lang.String)
public void addDifferentFrom(RDFResource resource)
resource
- the resource to addgetDifferentFrom()
,
removeDifferentFrom(edu.stanford.smi.protegex.owl.model.RDFResource)
public void addIsDefinedBy(RDFResource resource)
resource
- the resource to addgetIsDefinedBy()
,
removeIsDefinedBy(edu.stanford.smi.protegex.owl.model.RDFResource)
public void addLabel(String label, String language)
label
- the text of the label to addlanguage
- the language, or null for no languagepublic void addPropertyValue(RDFProperty property, Object value)
property
- the property to add a value forvalue
- the value to add (may be an RDFSLiteral, a primitive value or another Resource)getPropertyValue(edu.stanford.smi.protegex.owl.model.RDFProperty)
,
getPropertyValues(edu.stanford.smi.protegex.owl.model.RDFProperty)
,
listPropertyValues(edu.stanford.smi.protegex.owl.model.RDFProperty)
,
removePropertyValue(edu.stanford.smi.protegex.owl.model.RDFProperty, java.lang.Object)
public void addPropertyValueListener(PropertyValueListener listener)
listener
- the listener to addremovePropertyValueListener(edu.stanford.smi.protegex.owl.model.event.PropertyValueListener)
public void addProtegeType(RDFSClass type)
type
- the type to addgetProtegeTypes()
,
removeProtegeType(edu.stanford.smi.protegex.owl.model.RDFSClass)
public void addRDFType(RDFSClass type)
type
- the rdf:type to addgetProtegeTypes()
,
removeProtegeType(edu.stanford.smi.protegex.owl.model.RDFSClass)
public void addResourceListener(ResourceListener listener)
listener
- the listener to addremoveResourceListener(edu.stanford.smi.protegex.owl.model.event.ResourceListener)
public void addSameAs(RDFResource resource)
resource
- the resource to addgetSameAs()
,
removeSameAs(edu.stanford.smi.protegex.owl.model.RDFResource)
public void addVersionInfo(String versionInfo)
versionInfo
- the version info to addgetVersionInfo()
,
removeVersionInfo(java.lang.String)
public RDFResource as(Class javaInterface)
javaInterface
- the Java interface to convert to
public boolean canAs(Class javaInterface)
javaInterface
- the Java interface to test
public void delete()
delete
in interface edu.stanford.smi.protege.model.Frame
public RDFResource getAllValuesFromOnTypes(RDFProperty property)
property
- the property to check for restrictions
public String getBrowserText()
getBrowserText
in interface ProtegeInstance
public Collection getComments()
addComment(java.lang.String)
,
removeComment(java.lang.String)
public Collection getDifferentFrom()
addDifferentFrom(edu.stanford.smi.protegex.owl.model.RDFResource)
,
removeDifferentFrom(edu.stanford.smi.protegex.owl.model.RDFResource)
public Collection getHasValuesOnTypes(RDFProperty property)
property
- the property to look for restrictions
public Class getIconLocation()
getIconName()
.
getIconName()
public String getIconName()
getIconLocation()
.
getIconLocation()
public Collection getInferredTypes()
public Collection getIsDefinedBy()
addIsDefinedBy(edu.stanford.smi.protegex.owl.model.RDFResource)
,
removeIsDefinedBy(edu.stanford.smi.protegex.owl.model.RDFResource)
public Collection getLabels()
public String getLocalName()
public String getName()
getName
in interface edu.stanford.smi.protege.model.Frame
public String getNamespace()
public String getNamespacePrefix()
public OWLModel getOWLModel()
public Collection getPossibleRDFProperties()
getRDFProperties()
which
only returns those properties that also have a value at this resource.
getRDFProperties()
public Object getPropertyValue(RDFProperty property)
getPropertyValue(property, true)
.
property
- the property to get the values for
public RDFResource getPropertyValueAs(RDFProperty property, Class javaInterface)
public RDFSLiteral getPropertyValueLiteral(RDFProperty property)
property
- the property to get the value from
public Object getPropertyValue(RDFProperty property, boolean includingSubproperties)
property
- the property to get the values forincludingSubproperties
- true to also return the subproperty values
public int getPropertyValueCount(RDFProperty property)
property
- the property
public Collection getPropertyValues(RDFProperty property)
getPropertyValues(property, false)
.
property
- the property to get the values from
listPropertyValues(edu.stanford.smi.protegex.owl.model.RDFProperty)
public Collection getPropertyValuesAs(RDFProperty property, Class javaInterface)
public Collection getPropertyValueLiterals(RDFProperty property)
getPropertyValues
,
which may return values as primitive values (without the wrapping in an RDFSLiteral).
The caller must make sure that the property only holds datatype values
prior to the call.
property
- the property to get the values from
public Collection getPropertyValues(RDFProperty property, boolean includingSubproperties)
property
- the property to get the values fromincludingSubproperties
- true to also return the subproperty values
public RDFSClass getProtegeType()
getProtegeTypes()
public Collection getProtegeTypes()
getRDFTypes()
: Anonymous classes are internally stored using some special
Protege metaclasses (e.g. OWLNames.Cls.COMPLEMENT_CLASS instead of owl:Class).
getProtegeType()
public Collection getRDFProperties()
public RDFSClass getRDFType()
getRDFTypes()
public Collection getRDFTypes()
getRDFType()
public Set getReferringAnonymousClasses()
public Collection getSameAs()
public String getURI()
http://www.mydomain.org/myontology#Name
public Collection getVersionInfo()
public boolean hasPropertyValue(RDFProperty property)
property
- the property
public boolean hasPropertyValue(RDFProperty property, boolean includingSubproperties)
property
- the propertyincludingSubproperties
- true to also include subproperties of property
public boolean hasPropertyValue(RDFProperty property, Object value)
property
- the propertyvalue
- the value (possibly an RDFSLiteral)
public boolean hasPropertyValue(RDFProperty property, Object value, boolean includingSubproperties)
getPropertyValues(property).contains(value);
.
property
- the propertyvalue
- the value (possibly an RDFSLiteral)includingSubproperties
- true to also include subproperties of property
public boolean hasProtegeType(RDFSClass type)
hasProtegeType(type, false)
.
type
- the type in question
addProtegeType(edu.stanford.smi.protegex.owl.model.RDFSClass)
,
getProtegeTypes()
,
removeProtegeType(edu.stanford.smi.protegex.owl.model.RDFSClass)
public boolean hasProtegeType(RDFSClass type, boolean includingSuperclasses)
public boolean hasRDFType(RDFSClass type)
hasProtegeType(type, false)
.
type
- the type in question
addProtegeType(edu.stanford.smi.protegex.owl.model.RDFSClass)
,
getProtegeTypes()
,
removeProtegeType(edu.stanford.smi.protegex.owl.model.RDFSClass)
public boolean hasRDFType(RDFSClass type, boolean includingSuperclasses)
public boolean isAnonymous()
OWLModel.isAnonymousResourceName()
.
OWLModel.isAnonymousResourceName(java.lang.String)
public boolean isValidPropertyValue(RDFProperty property, Object object)
property
- the property to check againstobject
- the potential property value
OWLModel.isValidPropertyValue(edu.stanford.smi.protegex.owl.model.RDFResource, edu.stanford.smi.protegex.owl.model.RDFProperty, java.lang.Object)
public boolean isVisible()
isVisible
in interface edu.stanford.smi.protege.model.Frame
setVisible(boolean)
public Iterator listPropertyValues(RDFProperty property)
property
- the property to get the values from
getPropertyValues(edu.stanford.smi.protegex.owl.model.RDFProperty)
public Iterator listPropertyValuesAs(RDFProperty property, Class javaInterface)
public Iterator listPropertyValues(RDFProperty property, boolean includingSubproperties)
property
- the property to get the values fromincludingSubproperties
- true to also return values of subproperties
getPropertyValues(edu.stanford.smi.protegex.owl.model.RDFProperty)
public Iterator listRDFTypes()
public void removeComment(String value)
value
- the comment to removeaddComment(java.lang.String)
,
getComments()
public void removeDifferentFrom(RDFResource resource)
public void removeIsDefinedBy(RDFResource resource)
public void removeLabel(String label, String language)
label
- the text of the label to removelanguage
- the language of the label or nullpublic void removePropertyValue(RDFProperty property, Object value)
public void removePropertyValueListener(PropertyValueListener listener)
public void removeProtegeType(RDFSClass type)
type
- the type to removeaddProtegeType(edu.stanford.smi.protegex.owl.model.RDFSClass)
,
getProtegeTypes()
public void removeRDFType(RDFSClass type)
type
- the type to removeaddRDFType(edu.stanford.smi.protegex.owl.model.RDFSClass)
,
getRDFTypes()
public void removeResourceListener(ResourceListener listener)
public void removeSameAs(RDFResource resource)
public void removeVersionInfo(String versionInfo)
public void setComment(String comment)
public void setComments(Collection comments)
public void setInferredTypes(Collection types)
public void setName(String newName)
setName
in interface edu.stanford.smi.protege.model.Frame
newName
- the name name of thisgetName()
public void setPropertyValue(RDFProperty property, Object value)
public void setPropertyValues(RDFProperty property, Collection values)
public void setProtegeType(RDFSClass type)
public void setProtegeTypes(Collection types)
public void setRDFType(RDFSClass type)
public void setRDFTypes(Collection types)
public void setVisible(boolean b)
setVisible
in interface edu.stanford.smi.protege.model.Frame
b
- true to make this visibleisVisible()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |