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
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description @NotNull UniformItemPathallExceptLast()Returns a path containing all segments except the last one.UniformItemPathallUpToIncluding(int i)Returns all segments up to the specified one (including it).@NotNull UniformItemPathallUpToLastName()Returns a path containing all segments up to (and not including) the last one.@NotNull UniformItemPathappend(Object... components)Returns a newly created path containing all the segments of this path with added components.ItemPathTypeasItemPathType()UniformItemPathclone()static UniformItemPathcreate(Object... segments)Creates the path from given components.static ItemPathSegmentcreateSegment(QName qname, boolean variable)static UniformItemPathempty()booleanequals(Object obj)More strict version of ItemPath comparison.ItemPathSegmentfirst()Returns the first segment or null if the path is empty.UniformItemPathfirstAsPath()Returns first segment in a form of path.static @NotNull UniformItemPathfrom(ItemPath path)Map<String,String>getNamespaceMap()ItemPathSegmentgetSegment(int i)Returns the given path segment.@NotNull List<ItemPathSegment>getSegments()Returns the path segments.@Nullable ItemPathSegmentlast()Returns the last segment (or null if the path is empty).@NotNull UniformItemPathnamedSegmentsOnly()Returns the path containing only the regular named segments.UniformItemPathnormalize()Makes the path "normal" by inserting null Id segments where they were omitted.UniformItemPathremainder(ItemPath prefix)Returns the remainder of "this" path after passing all segments from the other path.@NotNull UniformItemPathremoveIds()Returns the path with no Id segments.default @NotNull UniformItemPathrest()Returns the rest of the path (the tail).@NotNull UniformItemPathrest(int n)Returns the rest of the path (the tail), starting at position "n".voidsetNamespaceMap(Map<String,String> namespaceMap)@NotNull UniformItemPathstripVariableSegment()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, toStringStandalone
-
Methods inherited from interface com.evolveum.midpoint.util.ShortDumpable
shortDump, shortDumpLazily
-
-
-
-
Method Detail
-
getSegments
@NotNull @NotNull List<ItemPathSegment> getSegments()
Description copied from interface:ItemPathReturns 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:
getSegmentsin interfaceItemPath
-
first
ItemPathSegment first()
Description copied from interface:ItemPathReturns the first segment or null if the path is empty.
-
rest
@NotNull default @NotNull UniformItemPath rest()
Description copied from interface:ItemPathReturns the rest of the path (the tail).
-
last
@Nullable @Nullable ItemPathSegment last()
Description copied from interface:ItemPathReturns the last segment (or null if the path is empty).
-
firstAsPath
UniformItemPath firstAsPath()
Returns first segment in a form of path.- Specified by:
firstAsPathin interfaceItemPath
-
rest
@NotNull @NotNull UniformItemPath rest(int n)
Description copied from interface:ItemPathReturns 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:
allExceptLastin interfaceItemPath
-
allUpToLastName
@NotNull @NotNull UniformItemPath allUpToLastName()
Returns a path containing all segments up to (and not including) the last one.- Specified by:
allUpToLastNamein interfaceItemPath
-
allUpToIncluding
UniformItemPath allUpToIncluding(int i)
Description copied from interface:ItemPathReturns all segments up to the specified one (including it).- Specified by:
allUpToIncludingin 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:ItemPathReturns the path with no Id segments.
-
namedSegmentsOnly
@NotNull @NotNull UniformItemPath namedSegmentsOnly()
Description copied from interface:ItemPathReturns the path containing only the regular named segments.- Specified by:
namedSegmentsOnlyin interfaceItemPath
-
stripVariableSegment
@NotNull @NotNull UniformItemPath stripVariableSegment()
Description copied from interface:ItemPathRemoves the leading variable segment, if present.- Specified by:
stripVariableSegmentin interfaceItemPath
-
append
@NotNull @NotNull UniformItemPath append(Object... components)
Description copied from interface:ItemPathReturns a newly created path containing all the segments of this path with added components.
-
remainder
UniformItemPath remainder(ItemPath prefix)
Description copied from interface:ItemPathReturns 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:ItemPathReturns the given path segment.- Specified by:
getSegmentin interfaceItemPath
-
empty
static UniformItemPath empty()
-
create
static UniformItemPath create(Object... segments)
Description copied from interface:ItemPathCreates 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)
-
-