|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.priha.util.QName
org.priha.path.Path.Component
public static class Path.Component
A Path component consists of a QName with an optional index (to support same name siblings).
This class also stores a rendered version of its own name internally for speed purposes.
Field Summary | |
---|---|
static Path.Component |
ROOT_COMPONENT
Name of the root component. |
Constructor Summary | |
---|---|
Path.Component(QName name)
|
|
Path.Component(QName name,
int index)
|
|
Path.Component(java.lang.String localPart)
|
|
Path.Component(java.lang.String namespaceURI,
java.lang.String localpart)
|
Method Summary | |
---|---|
int |
compareTo(QName o)
|
boolean |
equals(java.lang.Object o)
|
int |
getIndex()
|
QName |
getQName()
Returns a plain QName of this Component (discarding the index). |
java.lang.String |
toString()
Returns the QName String representation of the Component, including the index. |
java.lang.String |
toString(NamespaceMapper ns)
Returns the String representation of the Component, including the index, using a NamespaceMapper. |
static Path.Component |
valueOf(java.lang.String s)
|
Methods inherited from class org.priha.util.QName |
---|
getLocalPart, getNamespaceURI, getPrefix, hashCode |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final Path.Component ROOT_COMPONENT
Constructor Detail |
---|
public Path.Component(java.lang.String localPart)
public Path.Component(java.lang.String namespaceURI, java.lang.String localpart)
public Path.Component(QName name)
public Path.Component(QName name, int index)
Method Detail |
---|
public final int getIndex()
public static Path.Component valueOf(java.lang.String s)
public final java.lang.String toString()
toString
in class QName
public final java.lang.String toString(NamespaceMapper ns) throws javax.jcr.NamespaceException
The difference between using ns.fromQName(component) and component.toString(ns) is that the first one will NOT return the index. Sometimes this may be desireable.
javax.jcr.NamespaceException
public final boolean equals(java.lang.Object o)
equals
in class QName
public QName getQName()
public int compareTo(QName o)
compareTo
in interface java.lang.Comparable<QName>
compareTo
in class QName
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |