Interface UniformItemPath

All Superinterfaces:
Cloneable, ItemPath, Serializable, ShortDumpable

public interface UniformItemPath extends Serializable, Cloneable, ShortDumpable, ItemPath
Author:
semancik
  • Method Details

    • getSegments

      @NotNull @NotNull List<ItemPathSegment> 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
    • 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 default @NotNull UniformItemPath rest()
      Description copied from interface: ItemPath
      Returns the rest of the path (the tail).
      Specified by:
      rest in interface ItemPath
    • last

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

      UniformItemPath firstAsPath()
      Returns first segment in a form of path.
      Specified by:
      firstAsPath in interface ItemPath
    • rest

      @NotNull @NotNull UniformItemPath 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
    • allExceptLast

      @NotNull @NotNull UniformItemPath allExceptLast()
      Returns a path containing all segments except the last one.
      Specified by:
      allExceptLast in interface ItemPath
    • allUpToLastName

      @NotNull @NotNull UniformItemPath allUpToLastName()
      Returns a path containing all segments up to (and not including) the last one.
      Specified by:
      allUpToLastName in interface ItemPath
    • allUpToIncluding

      UniformItemPath allUpToIncluding(int i)
      Description copied from interface: ItemPath
      Returns all segments up to the specified one (including it).
      Specified by:
      allUpToIncluding in interface ItemPath
    • 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: ItemPath
      Returns the path with no Id segments.
      Specified by:
      removeIds in interface ItemPath
    • namedSegmentsOnly

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

      @NotNull @NotNull UniformItemPath stripVariableSegment()
      Description copied from interface: ItemPath
      Removes the leading variable segment, if present.
      Specified by:
      stripVariableSegment in interface ItemPath
    • append

      @NotNull @NotNull UniformItemPath append(Object... components)
      Description copied from interface: ItemPath
      Returns a newly created path containing all the segments of this path with added components.
      Specified by:
      append in interface ItemPath
    • remainder

      UniformItemPath remainder(ItemPath prefix)
      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.)
      Specified by:
      remainder in interface ItemPath
    • 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.
      Overrides:
      equals in class Object
    • clone

    • asItemPathType

      ItemPathType asItemPathType()
    • getSegment

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

      void setNamespaceMap(Map<String,String> namespaceMap)
    • getNamespaceMap

      Map<String,String> getNamespaceMap()
    • empty

      static UniformItemPath empty()
    • create

      static UniformItemPath create(Object... segments)
      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

      @NotNull static @NotNull UniformItemPath from(ItemPath path)
    • createSegment

      static ItemPathSegment createSegment(QName qname, boolean variable)