|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.nsdl.mptstore.rdf.URIReference
public class URIReference
An RDF URI reference.
This is an absolute URI with an optional fragment identifier.
A URIReference can play the part of a subject, predicate,
or object in an RDF triple.
| Constructor Summary | |
|---|---|
URIReference(java.lang.String uri)
Construct a URIReference given a URI string. |
|
URIReference(java.net.URI uri)
Construct a URIReference given an existing URI. |
|
| Method Summary | |
|---|---|
boolean |
equals(java.lang.Object obj)
Tell whether this Node should be considered equivalent
to the given object. |
java.net.URI |
getURI()
Get the URI. |
java.lang.String |
getValue()
Get the lexical value of the node. |
int |
hashCode()
Return a hash code for this node. |
java.lang.String |
toString()
Get an N-Triples string representing this node. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public URIReference(java.net.URI uri)
throws java.net.URISyntaxException
URIReference given an existing URI.
uri - The existing URI.
java.net.URISyntaxException - if the URI is not absolute.
public URIReference(java.lang.String uri)
throws java.net.URISyntaxException
URIReference given a URI string.
uri - The URI string.
java.net.URISyntaxException - if the given string is not a valid URI
or is not absolute.| Method Detail |
|---|
public java.net.URI getURI()
public java.lang.String getValue()
The lexical value of a URIReference node is the URI
as a string.
The lexical value of a Literal node is a string
representation of the value, and does not include the language or
data type, if any.
getValue in interface Nodenull.public java.lang.String toString()
For URIReference nodes, this is <$uri>.
For Literal nodes, this is one of the following:
Note:
toString in interface NodetoString in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
Node should be considered equivalent
to the given object.
A URIReference node is equal to the given
object if all of the following conditions are met:
obj != nullobj instanceof URIReferenceobj.getURI().equals(this.getURI())
A Literal node is equal to the given
object if all of the following conditions are met:
obj != nullobj instanceof Literalobj.getValue().equals(this.getValue())
equals in interface Nodeequals in class java.lang.Objectobj - the object to compare to this one.
public int hashCode()
The hash code of a URIReference is the hash code of getURI(). The hash code of a Literal is the hash code of getValue().
hashCode in interface NodehashCode in class java.lang.Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||