Package com.evolveum.midpoint.prism.path
Interface UniformItemPath
- All Superinterfaces:
Cloneable
,ItemPath
,Serializable
,ShortDumpable
- 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
Modifier and TypeMethodDescription@NotNull UniformItemPath
Returns a path containing all segments except the last one.allUpToIncluding
(int i) Returns all segments up to the specified one (including it).@NotNull UniformItemPath
Returns a path containing all segments up to (and not including) the last one.@NotNull UniformItemPath
Returns a newly created path containing all the segments of this path with added components.clone()
static UniformItemPath
Creates the path from given components.static ItemPathSegment
createSegment
(QName qname, boolean variable) static UniformItemPath
empty()
boolean
More strict version of ItemPath comparison.first()
Returns the first segment or null if the path is empty.Returns first segment in a form of path.static @NotNull UniformItemPath
getSegment
(int i) Returns the given path segment.@NotNull List<ItemPathSegment>
Returns the path segments.@Nullable ItemPathSegment
last()
Returns the last segment (or null if the path is empty).@NotNull UniformItemPath
Returns the path containing only the regular named segments.Makes the path "normal" by inserting null Id segments where they were omitted.Returns the remainder of "this" path after passing all segments from the other path.@NotNull UniformItemPath
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
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, isMetadataRelated, 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 Details
-
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
Description copied from interface:ItemPath
Returns the rest of the path (the tail). -
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
Description copied from interface:ItemPath
Returns the rest of the path (the tail), starting at position "n". -
allExceptLast
Returns a path containing all segments except the last one.- Specified by:
allExceptLast
in interfaceItemPath
-
allUpToLastName
Returns a path containing all segments up to (and not including) the last one.- Specified by:
allUpToLastName
in interfaceItemPath
-
allUpToIncluding
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
Description copied from interface:ItemPath
Returns the path with no Id segments. -
namedSegmentsOnly
Description copied from interface:ItemPath
Returns the path containing only the regular named segments.- Specified by:
namedSegmentsOnly
in interfaceItemPath
-
stripVariableSegment
Description copied from interface:ItemPath
Removes the leading variable segment, if present.- Specified by:
stripVariableSegment
in interfaceItemPath
-
append
Description copied from interface:ItemPath
Returns a newly created path containing all the segments of this path with added components. -
remainder
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
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
Description copied from interface:ItemPath
Returns the given path segment.- Specified by:
getSegment
in interfaceItemPath
-
setNamespaceMap
-
getNamespaceMap
-
empty
-
create
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
-
createSegment
-