|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Abstract super-class for all DAML resources (including properties). Defines shared
implementations and common services, such as property manipulation, vocabulary
management and rdf:type
management. Also defines accessors for common
properties, such as comment, label, and equivalentTo.
Method Summary | |
java.util.Iterator |
getAll(Property property,
boolean closed)
Answer an iterator over a set of resources that are the objects of statements with subject this DAML object and predicate the given property. |
DAMLModel |
getDAMLModel()
Answer the DAML model wherein this value is stored. |
java.util.Iterator |
getEquivalenceSet()
Answer the set of equivalent values to this value, but not including the value itself. |
java.util.Iterator |
getEquivalentValues()
Answer an iterator over all of the DAML objects that are equivalent to this value under the daml:equivalentTo relation. |
int |
getNumPropertyValues(Property property)
Answer the number of values a given property has with this value as subject. |
RDFNode |
getPropertyValue(Property property)
Answer the value of a given RDF property for this DAML value, or null if it doesn't have one. |
NodeIterator |
getPropertyValues(Property property)
Answer an iterator over the set of all values for a given RDF property. |
java.util.Iterator |
getRDFTypes(boolean closed)
Answer an iterator over all of the types to which this class belongs. |
DAMLVocabulary |
getVocabulary()
Answer the DAML+OIL vocabulary that corresponds to the namespace that this value was declared in. |
boolean |
hasRDFType(Resource damlClass)
Answer true if this DAML value is a member of the class denoted by the given DAML class object. |
boolean |
hasRDFType(java.lang.String classURI)
Answer true if this DAML value is a member of the class denoted by the given URI. |
LiteralAccessor |
prop_comment()
Accessor for the property of the comment on the value, whose value is a literal (string). |
PropertyAccessor |
prop_equivalentTo()
Property accessor for the 'equivalentTo' property of a class. |
LiteralAccessor |
prop_label()
Accessor for the property of the label on the value, whose value is a literal (string). |
PropertyAccessor |
prop_type()
Property accessor for the 'rdf:type' property of a DAML value. |
void |
remove()
Remove the DAML object from the model. |
void |
removeAll(Property prop)
Remove all the values for a given property on the principal resource. |
void |
removeProperty(Property property,
RDFNode value)
Remove the specific property-value pair from this DAML resource. |
void |
replaceProperty(Property prop,
RDFNode value)
Replace the value of the named property with the given value. |
void |
setPropertyValue(Property property,
RDFNode value)
Set the value of the given property of this DAML value to the given value, encoded as an RDFNode. |
void |
setRDFType(Resource rdfClass)
Set the RDF type property for this node in the underlying model, replacing any existing type property. |
void |
setRDFType(Resource rdfClass,
boolean replace)
Add an RDF type property for this node in the underlying model. |
Methods inherited from interface com.hp.hpl.mesa.rdf.jena.model.Resource |
abort, addProperty, addProperty, addProperty, addProperty, addProperty, addProperty, addProperty, addProperty, addProperty, begin, commit, equals, getId, getLocalName, getModel, getNameSpace, getProperty, getURI, hasProperty, hasProperty, hasProperty, hasProperty, hasProperty, hasProperty, hasProperty, hasProperty, hasProperty, hasProperty, isAnon, listProperties, listProperties, removeProperties, toString |
Method Detail |
public DAMLModel getDAMLModel()
public void setRDFType(Resource rdfClass)
setRDFType( Resource, false )
.rdfClass
- The RDF resource denoting the new value for the rdf:type property,
which will replace any existing type property.public void setRDFType(Resource rdfClass, boolean replace)
rdfClass
- The RDF resource denoting the class that will be new value for the rdf:type property.replace
- If true, the given class will replace any existing type property for this
value, otherwise it will be added as an extra type statement.public boolean hasRDFType(java.lang.String classURI)
classURI
- String denoting the URI of the class to test againstrdf:type
.public boolean hasRDFType(Resource damlClass)
damlClass
- Denotes a class to which this value may belongrdf:type
.public java.util.Iterator getRDFTypes(boolean closed)
{Dog, Vaccinated}
,
i.e. the set of classes for which rdf:type statements exist for fido,
while the closed set might be
{Dog, Vaccinated, Mammal, Pet, Vertebrate, Thing, MedicallyCertified}
closed
- If true, generate the closed set by considering the super-classes of
the known classes of this value.public RDFNode getPropertyValue(Property property)
property
- An RDF propertypublic NodeIterator getPropertyValues(Property property)
property
- The property whose values are soughtpublic void setPropertyValue(Property property, RDFNode value)
addProperty
.property
- The property to updatevalue
- The new value of the property as an RDFNode, or null to
effectively remove this property.public void removeProperty(Property property, RDFNode value)
property
- The property to be removedvalue
- The specific value of the property to be removedpublic void removeAll(Property prop)
prop
- The RDF resource that defines the property to be removedpublic void replaceProperty(Property prop, RDFNode value)
prop
- The RDF property to be updatedvalue
- The new value.public int getNumPropertyValues(Property property)
property
- The property to be testedpublic java.util.Iterator getAll(Property property, boolean closed)
property
- The property whose values are soughtclosed
- If true, and the given property is transitive, generate the
closure over the given property from this value.property
or one of its equivalentspublic DAMLVocabulary getVocabulary()
public java.util.Iterator getEquivalentValues()
daml:equivalentTo
relation.
Note that the first member of the iteration is
always the DAML value on which the method is invoked: trivially, a value is
a member of the set of values equivalent to itself. If the caller wants
the set of values equivalent to this one, not including itself, simply ignore
the first element of the iteration.public java.util.Iterator getEquivalenceSet()
public void remove()
public LiteralAccessor prop_label()
public LiteralAccessor prop_comment()
public PropertyAccessor prop_equivalentTo()
public PropertyAccessor prop_type()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |