| org.openrdf.model.URI
All known Subclasses: org.openrdf.model.impl.URIImpl, org.openrdf.sail.memory.model.MemURI, org.openrdf.sail.rdbms.model.RdbmsURI,
URI | public interface URI extends Resource(Code) | | A URI. A URI consists of a namespace and a local name, which are derived from
a URI string by splitting it in two using the following algorithm:
- Split after the first occurrence of the '#' character,
- If this fails, split after the last occurrence of the '/' character,
- If this fails, split after the last occurrence of the ':' character.
The last step should never fail as every legal (full) URI contains at least
one ':' character to seperate the scheme from the rest of the URI. The
implementation should check this upon object creation.
See Also: URIUtil.getLocalNameIndex(String) |
Method Summary | |
public boolean | equals(Object o) Compares a URI object to another object.
Parameters: o - The object to compare this URI to. | public String | getLocalName() Gets the local name of this URI. | public String | getNamespace() Gets the namespace of this URI. | public int | hashCode() The hash code of a URI is defined as the hash code of its
String-representation: toString().hashCode. | public String | toString() Returns the String-representation of this URI. |
equals | public boolean equals(Object o)(Code) | | Compares a URI object to another object.
Parameters: o - The object to compare this URI to. true if the other object is an instance of URIand their String-representations are equal, falseotherwise. |
getLocalName | public String getLocalName()(Code) | | Gets the local name of this URI. The local name is defined as per the
algorithm described in the class documentation.
The URI's local name. |
getNamespace | public String getNamespace()(Code) | | Gets the namespace of this URI. The namespace is defined as per the
algorithm described in the class documentation.
The URI's namespace. |
hashCode | public int hashCode()(Code) | | The hash code of a URI is defined as the hash code of its
String-representation: toString().hashCode.
A hash code for the URI. |
toString | public String toString()(Code) | | Returns the String-representation of this URI.
The String-representation of this URI. |
|
|