|
Protégé-OWL 3.3.1 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface RDFResource
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. |
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 |
---|
void addComment(String comment)
comment
- the comment to addgetComments()
,
removeComment(java.lang.String)
void addDifferentFrom(RDFResource resource)
resource
- the resource to addgetDifferentFrom()
,
removeDifferentFrom(edu.stanford.smi.protegex.owl.model.RDFResource)
void addIsDefinedBy(RDFResource resource)
resource
- the resource to addgetIsDefinedBy()
,
removeIsDefinedBy(edu.stanford.smi.protegex.owl.model.RDFResource)
void addLabel(String label, String language)
label
- the text of the label to addlanguage
- the language, or null for no languagevoid 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)
void addPropertyValueListener(PropertyValueListener listener)
listener
- the listener to addremovePropertyValueListener(edu.stanford.smi.protegex.owl.model.event.PropertyValueListener)
void addProtegeType(RDFSClass type)
type
- the type to addgetProtegeTypes()
,
removeProtegeType(edu.stanford.smi.protegex.owl.model.RDFSClass)
void addRDFType(RDFSClass type)
type
- the rdf:type to addgetProtegeTypes()
,
removeProtegeType(edu.stanford.smi.protegex.owl.model.RDFSClass)
void addResourceListener(ResourceListener listener)
listener
- the listener to addremoveResourceListener(edu.stanford.smi.protegex.owl.model.event.ResourceListener)
void addSameAs(RDFResource resource)
resource
- the resource to addgetSameAs()
,
removeSameAs(edu.stanford.smi.protegex.owl.model.RDFResource)
void addVersionInfo(String versionInfo)
versionInfo
- the version info to addgetVersionInfo()
,
removeVersionInfo(java.lang.String)
RDFResource as(Class javaInterface)
javaInterface
- the Java interface to convert to
boolean canAs(Class javaInterface)
javaInterface
- the Java interface to test
void delete()
delete
in interface edu.stanford.smi.protege.model.Frame
RDFResource getAllValuesFromOnTypes(RDFProperty property)
property
- the property to check for restrictions
String getBrowserText()
getBrowserText
in interface edu.stanford.smi.protege.model.Frame
getBrowserText
in interface ProtegeInstance
getBrowserText
in interface RDFObject
Collection getComments()
addComment(java.lang.String)
,
removeComment(java.lang.String)
Collection getDifferentFrom()
addDifferentFrom(edu.stanford.smi.protegex.owl.model.RDFResource)
,
removeDifferentFrom(edu.stanford.smi.protegex.owl.model.RDFResource)
Collection getHasValuesOnTypes(RDFProperty property)
property
- the property to look for restrictions
Class getIconLocation()
getIconName()
.
getIconName()
String getIconName()
getIconLocation()
.
getIconLocation()
Collection getInferredTypes()
Collection getIsDefinedBy()
addIsDefinedBy(edu.stanford.smi.protegex.owl.model.RDFResource)
,
removeIsDefinedBy(edu.stanford.smi.protegex.owl.model.RDFResource)
Collection getLabels()
String getLocalName()
String getName()
getName
in interface edu.stanford.smi.protege.model.Frame
String getNamespace()
String getNamespacePrefix()
OWLModel getOWLModel()
Collection getPossibleRDFProperties()
getRDFProperties()
which
only returns those properties that also have a value at this resource.
getRDFProperties()
Object getPropertyValue(RDFProperty property)
getPropertyValue(property, true)
.
property
- the property to get the values for
RDFResource getPropertyValueAs(RDFProperty property, Class javaInterface)
RDFSLiteral getPropertyValueLiteral(RDFProperty property)
property
- the property to get the value from
Object getPropertyValue(RDFProperty property, boolean includingSubproperties)
property
- the property to get the values forincludingSubproperties
- true to also return the subproperty values
int getPropertyValueCount(RDFProperty property)
property
- the property
Collection getPropertyValues(RDFProperty property)
getPropertyValues(property, false)
.
property
- the property to get the values from
listPropertyValues(edu.stanford.smi.protegex.owl.model.RDFProperty)
Collection getPropertyValuesAs(RDFProperty property, Class javaInterface)
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
Collection getPropertyValues(RDFProperty property, boolean includingSubproperties)
property
- the property to get the values fromincludingSubproperties
- true to also return the subproperty values
RDFSClass getProtegeType()
getProtegeTypes()
Collection getProtegeTypes()
getRDFTypes()
: Anonymous classes are internally stored using some special
Protege metaclasses (e.g. OWLNames.Cls.COMPLEMENT_CLASS instead of owl:Class).
getProtegeType()
Collection getRDFProperties()
RDFSClass getRDFType()
getRDFTypes()
Collection getRDFTypes()
getRDFType()
Set getReferringAnonymousClasses()
Collection getSameAs()
String getURI()
http://www.mydomain.org/myontology#Name
Collection getVersionInfo()
boolean hasPropertyValue(RDFProperty property)
property
- the property
boolean hasPropertyValue(RDFProperty property, boolean includingSubproperties)
property
- the propertyincludingSubproperties
- true to also include subproperties of property
boolean hasPropertyValue(RDFProperty property, Object value)
property
- the propertyvalue
- the value (possibly an RDFSLiteral)
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
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)
boolean hasProtegeType(RDFSClass type, boolean includingSuperclasses)
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)
boolean hasRDFType(RDFSClass type, boolean includingSuperclasses)
boolean isAnonymous()
OWLModel.isAnonymousResourceName()
.
OWLModel.isAnonymousResourceName(java.lang.String)
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)
boolean isVisible()
isVisible
in interface edu.stanford.smi.protege.model.Frame
setVisible(boolean)
Iterator listPropertyValues(RDFProperty property)
property
- the property to get the values from
getPropertyValues(edu.stanford.smi.protegex.owl.model.RDFProperty)
Iterator listPropertyValuesAs(RDFProperty property, Class javaInterface)
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)
Iterator listRDFTypes()
void removeComment(String value)
value
- the comment to removeaddComment(java.lang.String)
,
getComments()
void removeDifferentFrom(RDFResource resource)
void removeIsDefinedBy(RDFResource resource)
void removeLabel(String label, String language)
label
- the text of the label to removelanguage
- the language of the label or nullvoid removePropertyValue(RDFProperty property, Object value)
void removePropertyValueListener(PropertyValueListener listener)
void removeProtegeType(RDFSClass type)
type
- the type to removeaddProtegeType(edu.stanford.smi.protegex.owl.model.RDFSClass)
,
getProtegeTypes()
void removeRDFType(RDFSClass type)
type
- the type to removeaddRDFType(edu.stanford.smi.protegex.owl.model.RDFSClass)
,
getRDFTypes()
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)
setName
in interface edu.stanford.smi.protege.model.Frame
newName
- the name name of thisgetName()
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)
setVisible
in interface edu.stanford.smi.protege.model.Frame
b
- true to make this visibleisVisible()
|
Protégé-OWL 3.3.1 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |