|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--com.hp.hpl.jena.daml.common.PropertyAccessorImpl
Encapsulates the standard methods of modifying a property on a DAML value.
| Constructor Summary | |
PropertyAccessorImpl(Property property,
DAMLCommon val)
Construct a new accessor for the given property, which takes the given value type as it range. |
|
| Method Summary | |
void |
add(Resource value)
Add a value to the encapsulated property. |
int |
count()
Answer the number of values that the encapsulated property has in the RDF model. |
RDFNode |
get()
Answer a general value of the encapsulated property. |
java.util.Iterator |
getAll(boolean closed)
Answer an iteration over the values that this property has in the RDF model. |
DAMLCommon |
getDAMLValue()
Answer a value of the encapsulated property, making the assumption that it is a DAML value. |
Property |
getProperty()
Answer the property that this accessor works on |
boolean |
hasValue(DAMLCommon value)
Answer true if the encapsulated property has the given value as one of its values. |
void |
remove(DAMLCommon value)
Remove a value from the encapsulated property. |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public PropertyAccessorImpl(Property property,
DAMLCommon val)
property - The property that this accessor works onval - The underlying DAML value that this is an accessor to| Method Detail |
public Property getProperty()
getProperty in interface PropertyAccessorpublic int count()
count counts all RDF values, so it
is possible for this method to return a non-zero value, but getDAMLValue()
to return null, if none of the values are DAML values.
count in interface PropertyAccessorpublic java.util.Iterator getAll(boolean closed)
RDFNode
objects.
getAll in interface PropertyAccessorclosed - If true, and the property is transitive, generate the closure
of the property starting from the encapsulated resource.
public RDFNode get()
getDAMLValue() instead.
get in interface PropertyAccessorpublic DAMLCommon getDAMLValue()
get().
getDAMLValue in interface PropertyAccessorpublic void add(Resource value)
add in interface PropertyAccessorvalue - The value to be added.public void remove(DAMLCommon value)
remove in interface PropertyAccessorvalue - The value to be removed.public boolean hasValue(DAMLCommon value)
hasValue in interface PropertyAccessorvalue - A DAML value to test for
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||