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
- Direct Known Subclasses:
InfraItemName
,ItemName.WithoutPrefix
- See Also:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
ItemName without prefix specified, ideal item name for runtime data, constants, etc.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
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescription@NotNull ItemPath
Returns all segments except the last one.If the path consists of a single name segment (not variable nor special symbol), returns the corresponding value.first()
Returns the first segment or null if the path is empty.Returns the first segment as an ItemPath.Returns the value of the first segment if it is a Id segment; otherwise null.static ItemName.WithoutPrefix
Creates ItemName without prefix specified.static ItemName
getSegment
(int i) Returns the given path segment.@NotNull List<?>
Returns the path segments.static ItemName.WithoutPrefix
boolean
isEmpty()
Returns true if the path is empty i.e. has no components.boolean
Returns true if the path consists of a single name segment.last()
Returns the last segment (or null if the path is empty).lastName()
Returns the last name segment value; or null if there's no name segment.boolean
@NotNull ItemPath
Returns the path containing only the regular named segments.@NotNull ItemPath
Returns the path with no Id segments.@NotNull ItemPath
rest()
Returns the rest of the path (the tail).@NotNull ItemPath
rest
(int n) Returns the rest of the path (the tail), starting at position "n".void
Show the content of the object intended for diagnostics.int
size()
Returns path size i.e. the number of components.subPath
(int from, int to) Returns a sub-path from (including) to (excluding) given indices.toString()
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, isMetadataRelated, 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
-
Constructor Details
-
ItemName
Deprecated. -
ItemName
-
ItemName
-
ItemName
-
-
Method Details
-
fromQName
-
from
Creates ItemName without prefix specified. Instance of Item Name is internalized (deduplicated, ensured that only one such instance using this method exists in JVM)- Parameters:
namespace
-localPart
-- Returns:
- ItemName without prefix. Instance should be deduplicated inside JVM.
-
interned
-
isEmpty
public boolean isEmpty()Description copied from interface:ItemPath
Returns true if the path is empty i.e. has no components. -
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
-
getSegment
Description copied from interface:ItemPath
Returns the given path segment.- Specified by:
getSegment
in interfaceItemPath
-
size
public int size()Description copied from interface:ItemPath
Returns path size i.e. the number of components. -
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). -
rest
Description copied from interface:ItemPath
Returns the rest of the path (the tail), starting at position "n". -
firstToIdOrNull
Description copied from interface:ItemPath
Returns the value of the first segment if it is a Id segment; otherwise null.- Specified by:
firstToIdOrNull
in interfaceItemPath
-
namedSegmentsOnly
Description copied from interface:ItemPath
Returns the path containing only the regular named segments.- Specified by:
namedSegmentsOnly
in interfaceItemPath
-
removeIds
Description copied from interface:ItemPath
Returns the path with no Id segments. -
asSingleName
Description copied from interface:ItemPath
If the path consists of a single name segment (not variable nor special symbol), returns the corresponding value. Otherwise returns null.- Specified by:
asSingleName
in interfaceItemPath
-
isSingleName
public boolean isSingleName()Description copied from interface:ItemPath
Returns true if the path consists of a single name segment. (Not variable nor special symbol.)- Specified by:
isSingleName
in interfaceItemPath
-
lastName
Description copied from interface:ItemPath
Returns the last name segment value; or null if there's no name segment. -
last
Description copied from interface:ItemPath
Returns the last segment (or null if the path is empty). -
firstAsPath
Description copied from interface:ItemPath
Returns the first segment as an ItemPath. TODO consider the necessity of such method- Specified by:
firstAsPath
in interfaceItemPath
-
allExceptLast
Description copied from interface:ItemPath
Returns all segments except the last one.- Specified by:
allExceptLast
in interfaceItemPath
-
toString
-
shortDump
Description copied from interface:ShortDumpable
Show 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:
shortDump
in interfaceItemPath
- Specified by:
shortDump
in 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
Description copied from interface:ItemPath
Returns a sub-path from (including) to (excluding) given indices. -
matches
-
withoutNamespace
-