Package com.evolveum.midpoint.prism.path
Interface UniformItemPath
-
- All Superinterfaces:
Cloneable
,ItemPath
,Serializable
,ShortDumpable
public interface UniformItemPath extends Serializable, Cloneable, ShortDumpable, ItemPath
- Author:
- semancik
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.evolveum.midpoint.prism.path.ItemPath
ItemPath.CompareResult
-
-
Field Summary
-
Fields inherited from interface com.evolveum.midpoint.prism.path.ItemPath
EMPTY_PATH, SELF_PATH
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description @NotNull UniformItemPath
allExceptLast()
Returns a path containing all segments except the last one.UniformItemPath
allUpToIncluding(int i)
Returns all segments up to the specified one (including it).@NotNull UniformItemPath
allUpToLastName()
Returns a path containing all segments up to (and not including) the last one.@NotNull UniformItemPath
append(Object... components)
Returns a newly created path containing all the segments of this path with added components.ItemPathType
asItemPathType()
UniformItemPath
clone()
static UniformItemPath
create(Object... segments)
Creates the path from given components.static ItemPathSegment
createSegment(QName qname, boolean variable)
static UniformItemPath
empty()
boolean
equals(Object obj)
More strict version of ItemPath comparison.ItemPathSegment
first()
Returns the first segment or null if the path is empty.UniformItemPath
firstAsPath()
Returns first segment in a form of path.static @NotNull UniformItemPath
from(ItemPath path)
Map<String,String>
getNamespaceMap()
ItemPathSegment
getSegment(int i)
Returns the given path segment.@NotNull List<ItemPathSegment>
getSegments()
Returns the path segments.@Nullable ItemPathSegment
last()
Returns the last segment (or null if the path is empty).@NotNull UniformItemPath
namedSegmentsOnly()
Returns the path containing only the regular named segments.UniformItemPath
normalize()
Makes the path "normal" by inserting null Id segments where they were omitted.UniformItemPath
remainder(ItemPath prefix)
Returns the remainder of "this" path after passing all segments from the other path.@NotNull UniformItemPath
removeIds()
Returns the path with no Id segments.default @NotNull UniformItemPath
rest()
Returns the rest of the path (the tail).@NotNull UniformItemPath
rest(int n)
Returns the rest of the path (the tail), starting at position "n".void
setNamespaceMap(Map<String,String> namespaceMap)
@NotNull UniformItemPath
stripVariableSegment()
Removes the leading variable segment, if present.-
Methods inherited from interface com.evolveum.midpoint.prism.path.ItemPath
asSingleName, asSingleNameOrFail, compareComplex, containsNameExactly, containsSpecialSymbols, containsSpecialSymbolsExceptParent, equals, equivalent, firstName, firstNameIndex, firstNameOrFail, firstToId, firstToIdOrNull, firstToName, firstToNameOrNull, firstToQName, firstToVariableNameOrNull, isEmpty, isSingleName, isSubPath, isSubPathOrEquivalent, isSuperPath, isSuperPathOrEquivalent, lastName, lastNameIndex, shortDump, size, startsWith, startsWithId, startsWithIdentifier, startsWithName, startsWithName, startsWithNullId, startsWithObjectReference, startsWithParent, startsWithVariable, subPath, toBean, toStringStandalone
-
Methods inherited from interface com.evolveum.midpoint.util.ShortDumpable
shortDump, shortDumpLazily
-
-
-
-
Method Detail
-
getSegments
@NotNull @NotNull List<ItemPathSegment> getSegments()
Description copied from interface:ItemPath
Returns the path segments. Avoid using this method and access segments directly. Instead try to find suitable method in ItemPath interface. NEVER change path content using this method. TODO consider returning unmodifiable collection here (beware of performance implications)- Specified by:
getSegments
in interfaceItemPath
-
first
ItemPathSegment first()
Description copied from interface:ItemPath
Returns the first segment or null if the path is empty.
-
rest
@NotNull default @NotNull UniformItemPath rest()
Description copied from interface:ItemPath
Returns the rest of the path (the tail).
-
last
@Nullable @Nullable ItemPathSegment last()
Description copied from interface:ItemPath
Returns the last segment (or null if the path is empty).
-
firstAsPath
UniformItemPath firstAsPath()
Returns first segment in a form of path.- Specified by:
firstAsPath
in interfaceItemPath
-
rest
@NotNull @NotNull UniformItemPath rest(int n)
Description copied from interface:ItemPath
Returns the rest of the path (the tail), starting at position "n".
-
allExceptLast
@NotNull @NotNull UniformItemPath allExceptLast()
Returns a path containing all segments except the last one.- Specified by:
allExceptLast
in interfaceItemPath
-
allUpToLastName
@NotNull @NotNull UniformItemPath allUpToLastName()
Returns a path containing all segments up to (and not including) the last one.- Specified by:
allUpToLastName
in interfaceItemPath
-
allUpToIncluding
UniformItemPath allUpToIncluding(int i)
Description copied from interface:ItemPath
Returns all segments up to the specified one (including it).- Specified by:
allUpToIncluding
in interfaceItemPath
-
normalize
UniformItemPath normalize()
Makes the path "normal" by inserting null Id segments where they were omitted.
-
removeIds
@NotNull @NotNull UniformItemPath removeIds()
Description copied from interface:ItemPath
Returns the path with no Id segments.
-
namedSegmentsOnly
@NotNull @NotNull UniformItemPath namedSegmentsOnly()
Description copied from interface:ItemPath
Returns the path containing only the regular named segments.- Specified by:
namedSegmentsOnly
in interfaceItemPath
-
stripVariableSegment
@NotNull @NotNull UniformItemPath stripVariableSegment()
Description copied from interface:ItemPath
Removes the leading variable segment, if present.- Specified by:
stripVariableSegment
in interfaceItemPath
-
append
@NotNull @NotNull UniformItemPath append(Object... components)
Description copied from interface:ItemPath
Returns a newly created path containing all the segments of this path with added components.
-
remainder
UniformItemPath remainder(ItemPath prefix)
Description copied from interface:ItemPath
Returns the remainder of "this" path after passing all segments from the other path. (I.e. this path must begin with the content of the other path. Throws an exception when it is not the case.)
-
equals
boolean equals(Object obj)
More strict version of ItemPath comparison. Does not use any normalization nor approximate matching QNames via QNameUtil.match. For semantic-level comparison, please use equivalent(..) method.
-
clone
UniformItemPath clone()
-
asItemPathType
ItemPathType asItemPathType()
-
getSegment
ItemPathSegment getSegment(int i)
Description copied from interface:ItemPath
Returns the given path segment.- Specified by:
getSegment
in interfaceItemPath
-
empty
static UniformItemPath empty()
-
create
static UniformItemPath create(Object... segments)
Description copied from interface:ItemPath
Creates the path from given components. The components can contain objects of various kinds: - QName -> interpreted as either named segment or a special segment (if the name exactly matches special segment name) - Integer/Long -> interpreted as Id path segment - null -> interpreted as null Id path segment - ItemPathSegment -> interpreted as such - ItemPath, Object[], Collection -> interpreted recursively as a sequence of components Creates the default implementation of ItemPathImpl. Components are normalized on creation as necessary; although the number of object creation is minimized.
-
from
@NotNull static @NotNull UniformItemPath from(ItemPath path)
-
createSegment
static ItemPathSegment createSegment(QName qname, boolean variable)
-
-