|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.apache.jackrabbit.name.Path.PathElement
Object representation of a single JCR path element. A PathElement object contains the qualified name and optional index of a single JCR path element.
Once created, a PathElement object is immutable.
| Method Summary | |
boolean |
denotesCurrent()
Returns true if this element denotes the current
('.') element, otherwise returns false. |
boolean |
denotesName()
Returns true if this element represents a regular name
(i.e. |
boolean |
denotesParent()
Returns true if this element denotes the parent
('..') element, otherwise returns false. |
boolean |
denotesRoot()
Returns true if this element denotes the root element,
otherwise returns false. |
boolean |
equals(Object obj)
Check for path element equality. |
static Path.PathElement |
fromString(String s)
Parses the given path element string into a path element object. |
int |
getIndex()
Returns the 1-based index or 0 if no index was specified (which is equivalent to specifying 1). |
QName |
getName()
Returns the qualified name of this path element. |
int |
hashCode()
Computes a hash code for this path element. |
String |
toJCRName(NamespaceResolver resolver)
Returns the JCR name representation of this path element. |
void |
toJCRName(NamespaceResolver resolver,
StringBuffer buf)
Appends the JCR name representation of this path element to the given string buffer. |
String |
toString()
Returns a string representation of this path element. |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Method Detail |
public QName getName()
public int getIndex()
public boolean denotesRoot()
true if this element denotes the root element,
otherwise returns false.
true if this element denotes the root
element; otherwise falsepublic boolean denotesParent()
true if this element denotes the parent
('..') element, otherwise returns false.
true if this element denotes the parent
element; otherwise falsepublic boolean denotesCurrent()
true if this element denotes the current
('.') element, otherwise returns false.
true if this element denotes the current
element; otherwise falsepublic boolean denotesName()
true if this element represents a regular name
(i.e. neither root, '.' nor '..'), otherwise returns false.
true if this element represents a regular name;
otherwise false
public String toJCRName(NamespaceResolver resolver)
throws NoPrefixDeclaredException
resolver - namespace resolver
NoPrefixDeclaredException - if the namespace of the path
element name can not be resolved
public void toJCRName(NamespaceResolver resolver,
StringBuffer buf)
throws NoPrefixDeclaredException
resolver - namespace resolverbuf - string buffer where the JCR name representation
should be appended to
NoPrefixDeclaredException - if the namespace of the path
element name can not be resolvedtoJCRName(NamespaceResolver)public String toString()
{uri}name
syntax. Use the toJCRName
method to get the prefixed string representation of the path element.
public static Path.PathElement fromString(String s)
throws IllegalArgumentException
s - path element string
IllegalArgumentException - if the given path element string
is null or if its
format is invalidpublic int hashCode()
public boolean equals(Object obj)
obj - the object to compare with
true if the path elements are equal
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||