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

public class ItemName extends QName implements ItemPath
See Also:
  • Constructor Details

    • ItemName

      public ItemName(String namespaceURI, String localPart)
    • ItemName

      public ItemName(String namespaceURI, String localPart, String prefix)
    • ItemName

      public ItemName(String localPart)
    • ItemName

      public ItemName(@NotNull @NotNull QName name)
  • Method Details

    • fromQName

      public static ItemName fromQName(QName name)
    • isEmpty

      public boolean isEmpty()
      Description copied from interface: ItemPath
      Returns true if the path is empty i.e. has no components.
      Specified by:
      isEmpty in interface ItemPath
    • getSegments

      @NotNull public @NotNull List<?> 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 interface ItemPath
    • getSegment

      public Object getSegment(int i)
      Description copied from interface: ItemPath
      Returns the given path segment.
      Specified by:
      getSegment in interface ItemPath
    • size

      public int size()
      Description copied from interface: ItemPath
      Returns path size i.e. the number of components.
      Specified by:
      size in interface ItemPath
    • first

      public Object first()
      Description copied from interface: ItemPath
      Returns the first segment or null if the path is empty.
      Specified by:
      first in interface ItemPath
    • rest

      @NotNull public @NotNull ItemPath rest()
      Description copied from interface: ItemPath
      Returns the rest of the path (the tail).
      Specified by:
      rest in interface ItemPath
    • rest

      @NotNull public @NotNull ItemPath rest(int n)
      Description copied from interface: ItemPath
      Returns the rest of the path (the tail), starting at position "n".
      Specified by:
      rest in interface ItemPath
    • firstToIdOrNull

      public Long 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 interface ItemPath
    • namedSegmentsOnly

      @NotNull public @NotNull ItemPath namedSegmentsOnly()
      Description copied from interface: ItemPath
      Returns the path containing only the regular named segments.
      Specified by:
      namedSegmentsOnly in interface ItemPath
    • removeIds

      @NotNull public @NotNull ItemPath removeIds()
      Description copied from interface: ItemPath
      Returns the path with no Id segments.
      Specified by:
      removeIds in interface ItemPath
    • asSingleName

      public ItemName 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 interface ItemPath
    • 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 interface ItemPath
    • lastName

      public ItemName lastName()
      Description copied from interface: ItemPath
      Returns the last name segment value; or null if there's no name segment.
      Specified by:
      lastName in interface ItemPath
    • last

      public Object last()
      Description copied from interface: ItemPath
      Returns the last segment (or null if the path is empty).
      Specified by:
      last in interface ItemPath
    • firstAsPath

      public ItemPath firstAsPath()
      Description copied from interface: ItemPath
      Returns the first segment as an ItemPath. TODO consider the necessity of such method
      Specified by:
      firstAsPath in interface ItemPath
    • allExceptLast

      @NotNull public @NotNull ItemPath allExceptLast()
      Description copied from interface: ItemPath
      Returns all segments except the last one.
      Specified by:
      allExceptLast in interface ItemPath
    • toString

      public String toString()
      Overrides:
      toString in class QName
    • shortDump

      public void shortDump(StringBuilder sb)
      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 interface ItemPath
      Specified by:
      shortDump in interface ShortDumpable
      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: ItemPath
      Returns a sub-path from (including) to (excluding) given indices.
      Specified by:
      subPath in interface ItemPath
    • matches

      public boolean matches(QName other)