Package com.evolveum.midpoint.prism.path
Class ItemName
- java.lang.Object
-
- javax.xml.namespace.QName
-
- com.evolveum.midpoint.prism.path.ItemName
-
- All Implemented Interfaces:
ItemPath,ShortDumpable,Serializable
public class ItemName extends QName implements ItemPath
- See Also:
- Serialized Form
-
-
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 Concrete Methods Modifier and Type Method Description @NotNull ItemPathallExceptLast()Returns all segments except the last one.ItemNameasSingleName()If the path consists of a single name segment (not variable nor special symbol), returns the corresponding value.Objectfirst()Returns the first segment or null if the path is empty.ItemPathfirstAsPath()Returns the first segment as an ItemPath.LongfirstToIdOrNull()Returns the value of the first segment if it is a Id segment; otherwise null.static ItemNamefromQName(QName name)ObjectgetSegment(int i)Returns the given path segment.@NotNull List<?>getSegments()Returns the path segments.booleanisEmpty()Returns true if the path is empty i.e.booleanisSingleName()Returns true if the path consists of a single name segment.Objectlast()Returns the last segment (or null if the path is empty).ItemNamelastName()Returns the last name segment value; or null if there's no name segment.booleanmatches(QName other)@NotNull ItemPathnamedSegmentsOnly()Returns the path containing only the regular named segments.@NotNull ItemPathremoveIds()Returns the path with no Id segments.@NotNull ItemPathrest()Returns the rest of the path (the tail).@NotNull ItemPathrest(int n)Returns the rest of the path (the tail), starting at position "n".voidshortDump(StringBuilder sb)Show the content of the object intended for diagnostics.intsize()Returns path size i.e.ItemPathsubPath(int from, int to)Returns a sub-path from (including) to (excluding) given indices.StringtoString()-
Methods inherited from class javax.xml.namespace.QName
equals, getLocalPart, getNamespaceURI, getPrefix, hashCode, valueOf
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.evolveum.midpoint.prism.path.ItemPath
allUpToIncluding, allUpToLastName, append, asSingleNameOrFail, compareComplex, containsNameExactly, containsSpecialSymbols, containsSpecialSymbolsExceptParent, equals, equivalent, firstName, firstNameIndex, firstNameOrFail, firstToId, firstToName, firstToNameOrNull, firstToQName, firstToVariableNameOrNull, isSubPath, isSubPathOrEquivalent, isSuperPath, isSuperPathOrEquivalent, lastNameIndex, remainder, startsWith, startsWithId, startsWithIdentifier, startsWithName, startsWithName, startsWithNullId, startsWithObjectReference, startsWithParent, startsWithVariable, stripVariableSegment, toBean, toStringStandalone
-
Methods inherited from interface com.evolveum.midpoint.util.ShortDumpable
shortDump, shortDumpLazily
-
-
-
-
Method Detail
-
isEmpty
public boolean isEmpty()
Description copied from interface:ItemPathReturns true if the path is empty i.e. has no components.
-
getSegments
@NotNull public @NotNull List<?> 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
-
getSegment
public Object getSegment(int i)
Description copied from interface:ItemPathReturns the given path segment.- Specified by:
getSegmentin interfaceItemPath
-
size
public int size()
Description copied from interface:ItemPathReturns path size i.e. the number of components.
-
first
public Object first()
Description copied from interface:ItemPathReturns the first segment or null if the path is empty.
-
rest
@NotNull public @NotNull ItemPath rest()
Description copied from interface:ItemPathReturns the rest of the path (the tail).
-
rest
@NotNull public @NotNull ItemPath rest(int n)
Description copied from interface:ItemPathReturns the rest of the path (the tail), starting at position "n".
-
firstToIdOrNull
public Long firstToIdOrNull()
Description copied from interface:ItemPathReturns the value of the first segment if it is a Id segment; otherwise null.- Specified by:
firstToIdOrNullin interfaceItemPath
-
namedSegmentsOnly
@NotNull public @NotNull ItemPath namedSegmentsOnly()
Description copied from interface:ItemPathReturns the path containing only the regular named segments.- Specified by:
namedSegmentsOnlyin interfaceItemPath
-
removeIds
@NotNull public @NotNull ItemPath removeIds()
Description copied from interface:ItemPathReturns the path with no Id segments.
-
asSingleName
public ItemName asSingleName()
Description copied from interface:ItemPathIf the path consists of a single name segment (not variable nor special symbol), returns the corresponding value. Otherwise returns null.- Specified by:
asSingleNamein interfaceItemPath
-
isSingleName
public boolean isSingleName()
Description copied from interface:ItemPathReturns true if the path consists of a single name segment. (Not variable nor special symbol.)- Specified by:
isSingleNamein interfaceItemPath
-
lastName
public ItemName lastName()
Description copied from interface:ItemPathReturns the last name segment value; or null if there's no name segment.
-
last
public Object last()
Description copied from interface:ItemPathReturns the last segment (or null if the path is empty).
-
firstAsPath
public ItemPath firstAsPath()
Description copied from interface:ItemPathReturns the first segment as an ItemPath. TODO consider the necessity of such method- Specified by:
firstAsPathin interfaceItemPath
-
allExceptLast
@NotNull public @NotNull ItemPath allExceptLast()
Description copied from interface:ItemPathReturns all segments except the last one.- Specified by:
allExceptLastin interfaceItemPath
-
shortDump
public void shortDump(StringBuilder sb)
Description copied from interface:ShortDumpableShow the content of the object intended for diagnostics. This method is supposed to append a compact, human-readable output in a single line. Unlike toString() method, there is no requirement to identify the actual class or type of the object. It is assumed that the class/type will be obvious from the context in which the output is used.- Specified by:
shortDumpin interfaceItemPath- Specified by:
shortDumpin interfaceShortDumpable- Parameters:
sb- StringBuilder to which to a compact one-line content of the object intended for diagnostics by system administrator should be appended.
-
subPath
public ItemPath subPath(int from, int to)
Description copied from interface:ItemPathReturns a sub-path from (including) to (excluding) given indices.
-
matches
public boolean matches(QName other)
-
-