|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.alfresco.service.cmr.repository.Path
public final class Path
Representation of a simple path e.g.
/x/y/z
In the above example, there will be 4 elements, the first being a reference
to the root node, followed by qname elements for x, y and z.
Methods and constructors are available to construct a Path
instance
from a path string or by building the path incrementally, including the ability to
append and prepend path elements.
Path elements supported:
Nested Class Summary | |
---|---|
static class |
Path.AttributeElement
Represents a qualified path to an attribute, including the sibling for repeated properties/attributes to retrieve e.g. |
static class |
Path.ChildAssocElement
Represents a qualified path between a parent and a child node, including the sibling to retrieve e.g. |
static class |
Path.DescendentOrSelfElement
Represents the // or /descendant-or-self::node() xpath element |
static class |
Path.Element
Represents a path element. |
static class |
Path.ParentElement
Represents the /.. xpath element |
static class |
Path.SelfElement
Represents the /. xpath element |
Constructor Summary | |
---|---|
Path()
|
Method Summary | |
---|---|
Path |
append(Path.Element pathElement)
Appends a path element to the end of the path |
Path |
append(Path path)
Append the given path of this path. |
boolean |
equals(java.lang.Object o)
Override equals to check equality of Path instances |
Path.Element |
first()
|
Path.Element |
get(int n)
|
int |
hashCode()
Override hashCode to check hash equality of Path instances |
java.util.Iterator |
iterator()
|
Path.Element |
last()
|
Path |
prepend(Path.Element pathElement)
Add a path element to the beginning of the path. |
Path |
prepend(Path path)
Merge the given path into the beginning of this path. |
int |
size()
|
Path |
subPath(int depth)
Return a new Path representing this path to the specified depth |
Path |
subPath(int start,
int end)
Return a new Path representing this path to the specified depth For example, subPath(2, 4) would return the third and forth elements in the Path. |
java.lang.String |
toDisplayPath(NodeService nodeService,
PermissionService permissionService)
Return the human readable form of the specified node Path. |
java.lang.String |
toPrefixString(NamespacePrefixResolver resolver)
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Path()
Method Detail |
---|
public java.util.Iterator iterator()
iterator
in interface java.lang.Iterable
public Path prepend(Path.Element pathElement)
pathElement
-
public Path prepend(Path path)
path
-
public Path append(Path.Element pathElement)
pathElement
-
public Path append(Path path)
path
-
public Path.Element first()
public Path.Element last()
public int size()
public Path.Element get(int n)
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String toPrefixString(NamespacePrefixResolver resolver)
public java.lang.String toDisplayPath(NodeService nodeService, PermissionService permissionService)
public Path subPath(int depth)
depth
- the path depth (0 based)
public Path subPath(int start, int end)
start
- position (0 based)end
- position (0 based)
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |