public class ItemPath extends Object implements Serializable, Cloneable
Modifier and Type | Class and Description |
---|---|
static class |
ItemPath.CompareResult |
Modifier and Type | Field and Description |
---|---|
static ItemPath |
EMPTY_PATH |
static QName |
XSD_TYPE |
Constructor and Description |
---|
ItemPath() |
ItemPath(ItemPath parentPath,
ItemPath childPath) |
ItemPath(ItemPath parentPath,
ItemPathSegment subSegment) |
ItemPath(ItemPath parentPath,
QName subName) |
ItemPath(ItemPathSegment... segments) |
ItemPath(List<ItemPathSegment> segments) |
ItemPath(List<ItemPathSegment> segments,
ItemPathSegment subSegment) |
ItemPath(List<ItemPathSegment> segments,
QName subName) |
ItemPath(Object... namesOrIds) |
ItemPath(QName... qnames) |
ItemPath(String... names) |
Modifier and Type | Method and Description |
---|---|
ItemPath |
allExceptLast()
Returns a path containing all segments except the last one.
|
ItemPath |
allUpTo(ItemPathSegment segment)
Returns a path containing all segments up to (not including) the specified one;
counted from backwards.
|
ItemPath |
allUpToIncluding(int i) |
ItemPath |
allUpToIncluding(ItemPathSegment segment)
Returns a path containing all segments up to (including) the specified one;
counted from backwards.
|
ItemPath |
allUpToLastNamed()
Returns a path containing all segments up to (and not including) the last one.
|
ItemPath |
append(ItemPath childPath) |
ItemPath |
append(QName childName) |
static ItemPath[] |
asPathArray(QName... names) |
QName |
asSingleName() |
static QName |
asSingleName(ItemPath path) |
static void |
checkNoReferences(ItemPath path) |
ItemPath |
clone() |
ItemPath.CompareResult |
compareComplex(ItemPath otherPath) |
static boolean |
containsEquivalent(Collection<ItemPath> paths,
ItemPath pathToBeFound) |
boolean |
containsName(QName name) |
static boolean |
containsSingleNameSegment(ItemPath path) |
boolean |
containsSpecialSymbols() |
static boolean |
containsSpecialSymbols(ItemPath path) |
static boolean |
containsSubpathOrEquivalent(Collection<ItemPath> paths,
ItemPath pathToBeFound) |
static ItemPathSegment |
createSegment(QName qname,
boolean variable) |
boolean |
equals(Object obj)
More strict version of ItemPath comparison.
|
boolean |
equals(Object obj,
boolean exact) |
boolean |
equivalent(ItemPath otherPath)
Compares two paths semantically.
|
ItemPathSegment |
first() |
static List<ItemPath> |
fromStringList(List<String> pathsAsStrings) |
static IdItemPathSegment |
getFirstIdSegment(ItemPath itemPath) |
static QName |
getFirstName(ItemPath itemPath) |
static NameItemPathSegment |
getFirstNameSegment(ItemPath itemPath) |
static QName |
getName(ItemPathSegment segment)
Convenience static method with checks
|
Map<String,String> |
getNamespaceMap() |
List<ItemPathSegment> |
getSegments() |
int |
hashCode() |
ItemPath |
head()
Returns first segment in a form of path.
|
boolean |
isEmpty() |
static boolean |
isNullOrEmpty(ItemPath itemPath) |
boolean |
isSubPath(ItemPath otherPath) |
boolean |
isSubPathOrEquivalent(ItemPath otherPath) |
boolean |
isSuperPath(ItemPath otherPath) |
ItemPathSegment |
last() |
NameItemPathSegment |
lastNamed() |
ItemPath |
namedSegmentsOnly() |
ItemPath |
normalize()
Makes the path "normal" by inserting null Id segments where they were omitted.
|
static ItemPath |
pathRestStartingWithName(ItemPath path) |
ItemPath |
remainder(ItemPath otherPath)
Returns the remainder of "this" path after passing all segments from the other path.
|
ItemPath |
rest() |
void |
setNamespaceMap(Map<String,String> namespaceMap) |
int |
size() |
boolean |
startsWith(Class<? extends ItemPathSegment> clazz) |
boolean |
startsWith(ItemPath other) |
boolean |
startsWithName(QName name) |
ItemPath |
subPath(ItemPath subPath) |
static ItemPath |
subPath(ItemPath prefix,
ItemPathSegment subSegment)
Null-proof static version.
|
ItemPath |
subPath(ItemPathSegment subSegment) |
ItemPath |
subPath(Long id) |
ItemPath |
subPath(QName subName) |
ItemPath |
substract(ItemPath otherPath) |
ItemPath |
tail() |
ItemPath |
tail(int n)
Returns path containing all segments except the first N.
|
String |
toString() |
public static final QName XSD_TYPE
public static final ItemPath EMPTY_PATH
public ItemPath()
public ItemPath(QName... qnames)
public ItemPath(String... names)
public ItemPath(Object... namesOrIds)
public ItemPath(List<ItemPathSegment> segments)
public ItemPath(List<ItemPathSegment> segments, ItemPathSegment subSegment)
public ItemPath(List<ItemPathSegment> segments, QName subName)
public ItemPath(ItemPathSegment... segments)
public ItemPath(ItemPath parentPath, ItemPathSegment subSegment)
public ItemPath subPath(ItemPathSegment subSegment)
public static ItemPath subPath(ItemPath prefix, ItemPathSegment subSegment)
public static ItemPathSegment createSegment(QName qname, boolean variable)
public List<ItemPathSegment> getSegments()
public ItemPathSegment first()
public ItemPath rest()
public NameItemPathSegment lastNamed()
public ItemPathSegment last()
public ItemPath head()
public ItemPath tail(int n)
public ItemPath tail()
public ItemPath allExceptLast()
public ItemPath allUpToLastNamed()
public ItemPath allUpTo(ItemPathSegment segment)
public ItemPath allUpToIncluding(ItemPathSegment segment)
public ItemPath allUpToIncluding(int i)
public int size()
public boolean isEmpty()
public ItemPath normalize()
public ItemPath.CompareResult compareComplex(ItemPath otherPath)
public static boolean containsEquivalent(Collection<ItemPath> paths, ItemPath pathToBeFound)
public static boolean containsSubpathOrEquivalent(Collection<ItemPath> paths, ItemPath pathToBeFound)
public ItemPath namedSegmentsOnly()
public static boolean isNullOrEmpty(ItemPath itemPath)
public static boolean containsSingleNameSegment(ItemPath path)
public boolean startsWith(Class<? extends ItemPathSegment> clazz)
public boolean startsWith(ItemPath other)
public boolean startsWithName(QName name)
public QName asSingleName()
public boolean isSubPath(ItemPath otherPath)
public boolean isSuperPath(ItemPath otherPath)
public boolean isSubPathOrEquivalent(ItemPath otherPath)
public boolean equivalent(ItemPath otherPath)
otherPath
- public ItemPath remainder(ItemPath otherPath)
otherPath
- public static QName getName(ItemPathSegment segment)
public static IdItemPathSegment getFirstIdSegment(ItemPath itemPath)
public static NameItemPathSegment getFirstNameSegment(ItemPath itemPath)
public boolean containsName(QName name)
public boolean equals(Object obj, boolean exact)
public boolean equals(Object obj)
public static boolean containsSpecialSymbols(ItemPath path)
public boolean containsSpecialSymbols()
public static void checkNoReferences(ItemPath path)
Copyright © 2016 evolveum. All rights reserved.