Class CompositeMatcher

java.lang.Object
org.apache.tika.sax.xpath.Matcher
org.apache.tika.sax.xpath.CompositeMatcher

public class CompositeMatcher extends Matcher
Composite XPath evaluation state. Used when XPath evaluation results in two or more branches of independent evaluation states.
  • Field Summary

    Fields inherited from class org.apache.tika.sax.xpath.Matcher

    FAIL
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    descend(String namespace, String name)
    Returns the XPath evaluation state that results from descending to a child element with the given name.
    boolean
    matchesAttribute(String namespace, String name)
    Returns true if the XPath expression matches the named attribute of the element associated with this evaluation state.
    boolean
    Returns true if the XPath expression matches the element associated with this evaluation state.
    boolean
    Returns true if the XPath expression matches all text nodes whose parent is the element associated with this evaluation state.

    Methods inherited from class java.lang.Object

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

  • Method Details

    • descend

      public Matcher descend(String namespace, String name)
      Description copied from class: Matcher
      Returns the XPath evaluation state that results from descending to a child element with the given name.
      Overrides:
      descend in class Matcher
      Parameters:
      namespace - element namespace or null
      name - element name
      Returns:
      next XPath evaluation state
    • matchesElement

      public boolean matchesElement()
      Description copied from class: Matcher
      Returns true if the XPath expression matches the element associated with this evaluation state.
      Overrides:
      matchesElement in class Matcher
      Returns:
      XPath evaluation state for this element
    • matchesAttribute

      public boolean matchesAttribute(String namespace, String name)
      Description copied from class: Matcher
      Returns true if the XPath expression matches the named attribute of the element associated with this evaluation state.
      Overrides:
      matchesAttribute in class Matcher
      Parameters:
      namespace - attribute namespace or null
      name - attribute name
      Returns:
      XPath evaluation state for named attribute of this element
    • matchesText

      public boolean matchesText()
      Description copied from class: Matcher
      Returns true if the XPath expression matches all text nodes whose parent is the element associated with this evaluation state.
      Overrides:
      matchesText in class Matcher
      Returns:
      XPath evaluation state for text children of this element