Class XPath

java.lang.Object
org.apache.sis.util.Static
org.apache.sis.filter.XPath

final class XPath extends Static
Basic support of X-Path in PropertyValue expression. This is intended to be only a lightweight support, not a replacement for javax.xml.xpath implementations.
Since:
0.4
Version:
1.3
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final char
    The separator between path components.
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    private
    Do not allow instantiation of this class.
  • Method Summary

    Modifier and Type
    Method
    Description
    (package private) static List<String>
    split(String xpath)
    Splits the given URL around the '/' separator, or returns null if there is no separator.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • SEPARATOR

      public static final char SEPARATOR
      The separator between path components.
      See Also:
  • Constructor Details

    • XPath

      private XPath()
      Do not allow instantiation of this class.
  • Method Details

    • split

      static List<String> split(String xpath)
      Splits the given URL around the '/' separator, or returns null if there is no separator. By convention if the URL is absolute, then the leading '/' character is kept in the first element. For example, "/∗/property" is splitted as two elements: "/∗" and "property".

      This method trims the whitespaces of components except the last one (the tip), for consistency with the case where this method returns null.

      Parameters:
      xpath - the URL to split.
      Returns:
      the splitted URL with the heading separator kept in the first element, or null if there is no separator. If non-null, the list always contains at least one element.
      Throws:
      IllegalArgumentException - if the XPath contains at least one empty component.