public class UnionPattern extends Pattern
| Modifier and Type | Field and Description |
|---|---|
protected Pattern |
p1 |
protected Pattern |
p2 |
| Constructor and Description |
|---|
UnionPattern(Pattern p1,
Pattern p2)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
Pattern |
analyze(StaticContext env,
ItemType contextItemType)
Type-check the pattern.
|
Pattern |
getLHS()
Get the LHS of the union
|
int |
getNodeKind()
Determine the types of nodes to which this pattern applies.
|
NodeTest |
getNodeTest()
Get a NodeTest that all the nodes matching this pattern must satisfy
|
Pattern |
getRHS()
Get the RHS of the union
|
boolean |
matches(NodeInfo e,
XPathContext context)
Determine if the supplied node matches the pattern
|
void |
setLineNumber(int lineNumber)
Override method to set the system ID, so it's set on both halves
|
void |
setOriginalText(java.lang.String pattern)
Set the original text
|
void |
setSystemId(java.lang.String systemId)
Override method to set the system ID, so it's set on both halves
|
Pattern |
simplify(StaticContext env)
Simplify the pattern: perform any context-independent optimisations
|
getColumnNumber, getDefaultPriority, getDependencies, getExecutable, getFingerprint, getHostLanguage, getLineNumber, getLocationProvider, getPublicId, getSystemId, internalMatches, iterateSubExpressions, make, promote, replaceSubExpression, setExecutable, toStringpublic Pattern simplify(StaticContext env) throws XPathException
simplify in class PatternXPathExceptionpublic Pattern analyze(StaticContext env, ItemType contextItemType) throws XPathException
analyze in class PatternXPathExceptionpublic void setOriginalText(java.lang.String pattern)
setOriginalText in class Patternpublic boolean matches(NodeInfo e, XPathContext context) throws XPathException
matches in class Patterne - the node to be comparedcontext - The dynamic context. Only relevant if the pattern
uses variables, or contains calls on functions such as document() or key().XPathExceptionpublic int getNodeKind()
getNodeKind in class Patternpublic NodeTest getNodeTest()
getNodeTest in class Patternpublic Pattern getLHS()
public Pattern getRHS()
public void setSystemId(java.lang.String systemId)
setSystemId in class Patternpublic void setLineNumber(int lineNumber)
setLineNumber in class Pattern