|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface ONodeID
An ONodeID represents the id of either a blank node or a resource.
If the node represented by this is a blank node, name space will be
blank and the resource name will be whatever internal name for the
blank node the implementation uses. If the node respresented by this
is a named resource, the ID will be an URI consisting of a name space
and a resource name.
TODO: plan for URI/IRI encodings and comparion of OURIs that have non-ASCII
resource names. Most likely each ORUI will remember the string it was
created from and return that string for getResourceName or toString.
The toDisplayString method will always generate a valid IRI, and the
toASCIIString will always generate a valid URI representation.
Whether these representations are stored or generated on the fly and which
of these representations are used with the backend is implementation
dependent.
| Method Summary | |
|---|---|
int |
compareTo(ONodeID other)
|
boolean |
equals(Object other)
|
String |
getNameSpace()
|
String |
getResourceName()
|
int |
hashCode()
|
boolean |
isAnonymousResource()
Return if this represents a blank node or a named resource. |
String |
toASCIIString()
Return the node ID as a pure ASCII string. |
String |
toDisplayString()
Return the node ID as a unicode string. |
String |
toString()
Return the node ID as the string from which the ID was originally created. |
String |
toTurtle()
Return a representation of the node that conforms to Turtle syntax. |
void |
validate()
Validate if the string that was passed on as a bnode id or as an URI/IRI to the constructor of the implementing class can be converted to a blank node identifier or and URI/IRI that conforms to the implementaion. |
| Method Detail |
|---|
String getNameSpace()
String getResourceName()
String toString()
toString in class ObjectString toASCIIString()
NOTE: URI encoding and translation from/to IRIs is not implemented yet!
String toDisplayString()
NOTE: not implemented yet!
boolean isAnonymousResource()
NOTE: not implemented yet!
int compareTo(ONodeID other)
compareTo in interface Comparable<ONodeID>boolean equals(Object other)
equals in class Objectint hashCode()
hashCode in class ObjectString toTurtle()
TODO: at the moment, this only returns either the blank node ID unchanged or the URI as returned by toString() between "<" and ">". This will have to use a proper ASCII representation of the URI or an IRI representation instead.
void validate()
throws IllegalArgumentException
TODO: this is not yet implemented.
IllegalArgumentException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||