Package org.apache.tika.sax.xpath
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.
-
-
Constructor Summary
Constructors Constructor Description CompositeMatcher(Matcher a, Matcher b)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Matcherdescend(String namespace, String name)Returns the XPath evaluation state that results from descending to a child element with the given name.booleanmatchesAttribute(String namespace, String name)Returnstrueif the XPath expression matches the named attribute of the element associated with this evaluation state.booleanmatchesElement()Returnstrueif the XPath expression matches the element associated with this evaluation state.booleanmatchesText()Returnstrueif the XPath expression matches all text nodes whose parent is the element associated with this evaluation state.
-
-
-
Method Detail
-
descend
public Matcher descend(String namespace, String name)
Description copied from class:MatcherReturns the XPath evaluation state that results from descending to a child element with the given name.
-
matchesElement
public boolean matchesElement()
Description copied from class:MatcherReturnstrueif the XPath expression matches the element associated with this evaluation state.- Overrides:
matchesElementin classMatcher- Returns:
- XPath evaluation state for this element
-
matchesAttribute
public boolean matchesAttribute(String namespace, String name)
Description copied from class:MatcherReturnstrueif the XPath expression matches the named attribute of the element associated with this evaluation state.- Overrides:
matchesAttributein classMatcher- Parameters:
namespace- attribute namespace ornullname- attribute name- Returns:
- XPath evaluation state for named attribute of this element
-
matchesText
public boolean matchesText()
Description copied from class:MatcherReturnstrueif the XPath expression matches all text nodes whose parent is the element associated with this evaluation state.- Overrides:
matchesTextin classMatcher- Returns:
- XPath evaluation state for text children of this element
-
-