|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
An RDF Resource or an RDF Literal.
RDFNode
represents the methods which RDF Resources and RDF
Literals have in common.
Chris added the _as_ method to allow RDFNodes to participate in polymorphic conversions.
Method Summary | |
RDFNode |
as(java.lang.Class view)
RDFNodes can be converted to different implementation types. |
Node |
asNode()
a presentation-layer RDFNode is build on top of an SPI-layer Node; get it. |
boolean |
canAs(java.lang.Class view)
return true iff this RDFNode can be viewed as a _view_. |
RDFNode |
inModel(Model m)
returns a .equals() version of this node, except that its in the model m. |
java.lang.String |
toString()
Return a String representation of the node. |
java.lang.Object |
visitWith(RDFVisitor rv)
Apply the appropriate method of the visitor to this node's content and return the result. |
Method Detail |
public java.lang.String toString()
public Node asNode()
public RDFNode as(java.lang.Class view)
It is not clear what should happen if this RDFNode cannot be viewed as a _view_. Should it deliver null or should it throw an exception? Or deliver a half-baked instance?
public boolean canAs(java.lang.Class view)
public RDFNode inModel(Model m)
m
- a model to move the node to
public java.lang.Object visitWith(RDFVisitor rv)
rv
- an RDFVisitor with a method for URI/blank/literal nodes
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |