|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.apache.commons.xmlio.in.SimplePath
Rudimentary representation of a path to an XML element.
Two paths match in two cases:
equals(java.lang.Object) method.
/root/tag matches /root/tag and/root/tag matches tag.
| Field Summary | |
protected java.lang.String |
path
|
protected Item[] |
pathList
|
| Constructor Summary | |
SimplePath(SimplePath path)
Copy ctor. |
|
SimplePath(java.lang.String path)
Creates a path object from a string describing it. |
|
SimplePath(java.lang.String path,
Item[] pathList)
Creates a path object from a string describing it. |
|
| Method Summary | |
boolean |
equals(java.lang.Object o)
|
boolean |
matches(Item name)
Checks if an item matches the last segment of this path. |
boolean |
matches(Item[] path)
Checks if the given array of items matches this path. |
boolean |
matches(Item[] path,
boolean isRelative)
Checks if the given array of items matches this path. |
boolean |
matches(SimplePath matchPath)
Finds out if the the given path matches this one. |
boolean |
matches(java.lang.String matchPath)
Finds out if the path represented by the given string matches this one. |
boolean |
matchesFromRoot(Item[] path)
Checks if the given array of items matches this path from the root. |
boolean |
matchsAny(java.util.Collection paths)
Checks if this path matches any of the paths stored in paths collection. |
boolean |
matchsAny(java.lang.String[] paths)
Checks if this path matches any of the paths stored in paths collection. |
static java.lang.String |
stripEndingSlash(java.lang.String path)
Strips off ending slash from a string if there is one. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
protected final java.lang.String path
protected final Item[] pathList
| Constructor Detail |
public SimplePath(java.lang.String path)
public SimplePath(java.lang.String path,
Item[] pathList)
public SimplePath(SimplePath path)
| Method Detail |
public static final java.lang.String stripEndingSlash(java.lang.String path)
public boolean matches(Item name)
public boolean matches(Item[] path,
boolean isRelative)
public boolean matchesFromRoot(Item[] path)
matchesFromRoot(new Item[] { new Item("rootPath"), new Item("valid")})
&&
matches(new Item("valid"))
public boolean matches(Item[] path)
public boolean matches(SimplePath matchPath)
public boolean matches(java.lang.String matchPath)
matches(SimplePath)public boolean matchsAny(java.util.Collection paths)
paths collection. This means we iterate through
paths and match every entry to this path.
public boolean matchsAny(java.lang.String[] paths)
paths collection. This means we iterate through
paths and match every entry to this path.
public java.lang.String toString()
public boolean equals(java.lang.Object o)
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||