Class AbstractXPathQueryItem

java.lang.Object
eu.europa.esig.dss.xml.common.xpath.item.AbstractXPathQueryItem
All Implemented Interfaces:
XPathQueryItem
Direct Known Subclasses:
AbstractXPathQueryParameter, XPathQueryAnyItem, XPathQueryAttributeItem, XPathQueryElementItem

public abstract class AbstractXPathQueryItem extends Object implements XPathQueryItem
Contains common implementation of the XPath expression item.
  • Constructor Details

    • AbstractXPathQueryItem

      protected AbstractXPathQueryItem()
      Default constructor
  • Method Details

    • nextItem

      public XPathQueryItem nextItem()
      Description copied from interface: XPathQueryItem
      Gets the next XPath chain item, if any
      Specified by:
      nextItem in interface XPathQueryItem
      Returns:
      XPathQueryItem if next chain item is present, FALSE otherwise
    • setNextItem

      public XPathQueryItem setNextItem(XPathQueryItem nextItem)
      Description copied from interface: XPathQueryItem
      Sets the next eu.europa.esig.dss.xml.common.definition.xpath.item.XPathChainItem as part of the XPath expression
      Specified by:
      setNextItem in interface XPathQueryItem
      Parameters:
      nextItem - XPathQueryItem to set
      Returns:
      XPathQueryItem that has been set
    • matchNode

      public boolean matchNode(Node node)
      Description copied from interface: XPathQueryItem
      This method verifies whether the given node matches the XPathQueryItem
      Specified by:
      matchNode in interface XPathQueryItem
      Parameters:
      node - Node to be evaluated against the XPath Query Item
      Returns:
      TRUE if the Node matches the value, FALSE otherwise
    • process

      protected abstract boolean process(Node node)
      This method executes the XPath query item requirement, and returns whether the node satisfies the rule
      Parameters:
      node - Node to verify
      Returns:
      TRUE if the condition matches, FALSE otherwise
    • addParameter

      public void addParameter(XPathQueryParameter parameter)
      Description copied from interface: XPathQueryItem
      Adds a parameter to the given XPath query item
      Specified by:
      addParameter in interface XPathQueryItem
      Parameters:
      parameter - XPathQueryParameter
    • getParameters

      public List<XPathQueryParameter> getParameters()
      Description copied from interface: XPathQueryItem
      Gets parameters related to the given XPathQueryItem, if any
      Specified by:
      getParameters in interface XPathQueryItem
      Returns:
      a list of XPathQueryParameters
    • isEmpty

      public boolean isEmpty()
      Description copied from interface: XPathQueryItem
      Gets whether the XPath query item is empty
      Specified by:
      isEmpty in interface XPathQueryItem
      Returns:
      TRUE if the XPath query item is empty, FALSE otherwise
    • getLocalName

      protected String getLocalName(Node node)
      Gets the local name of a Node, without prefix, if any
      Parameters:
      node - Node
      Returns:
      String
    • toString

      public String toString()
      Overrides:
      toString in class Object