Class XPathQueryAttributeParameter

All Implemented Interfaces:
XPathQueryItem, XPathQueryParameter
Direct Known Subclasses:
XPathQueryIdentifierParameter

public class XPathQueryAttributeParameter extends AbstractXPathQueryParameter
Allows extraction of an element by the given attribute
  • Constructor Details

    • XPathQueryAttributeParameter

      public XPathQueryAttributeParameter(DSSAttribute attribute, String attributeValue)
      Constructor with an expected attribute value. When this constructor is used, the string case comparison is enforced.
      Parameters:
      attribute - DSSAttribute
      attributeValue - String
    • XPathQueryAttributeParameter

      public XPathQueryAttributeParameter(DSSAttribute attribute, String attributeValue, boolean ignoreCase)
      Constructor with an expected attribute value with indication on whether case is to be ignored
      Parameters:
      attribute - DSSAttribute
      attributeValue - String
      ignoreCase - whether case comparison of the attribute name is to be ignored
  • Method Details

    • getAttribute

      public DSSAttribute getAttribute()
      Gets the corresponding DSSAttribute
      Returns:
      DSSAttribute
    • getAttributeValue

      public String getAttributeValue()
      Gets the expected attribute value
      Returns:
      String
    • process

      protected boolean process(Node node)
      Description copied from class: AbstractXPathQueryItem
      This method executes the XPath query item requirement, and returns whether the node satisfies the rule
      Specified by:
      process in class AbstractXPathQueryItem
      Parameters:
      node - Node to verify
      Returns:
      TRUE if the condition matches, FALSE otherwise
    • isElementRelated

      public boolean isElementRelated()
      Description copied from interface: XPathQueryItem
      Gets whether XPath query item is related to an Element node processing
      Returns:
      TRUE if XPath query item is related to an Element node processing, FALSE otherwise
    • isAttributeRelated

      public boolean isAttributeRelated()
      Description copied from interface: XPathQueryItem
      Gets whether XPath query item is related to an Attribute node processing
      Returns:
      TRUE if XPath query item is related to an Attribute node processing, FALSE otherwise
    • getQueryString

      public String getQueryString()
      Description copied from interface: XPathQueryItem
      Gets a string representation of the XPath expression chain item
      Returns:
      String