net.sf.xmlmatcher.strategy
Class RegExTextMatchingStrategy
java.lang.Object
net.sf.xmlmatcher.strategy.TextValueMatchingStrategy
net.sf.xmlmatcher.strategy.RegExTextMatchingStrategy
- All Implemented Interfaces:
- MatchingStrategy
public final class RegExTextMatchingStrategy
- extends TextValueMatchingStrategy
Match text of actual element with regex pattern defined in template element
Field Summary |
static java.lang.String |
KEY_ATTR
|
Method Summary |
protected void |
matchTextContent(org.w3c.dom.Element template,
org.w3c.dom.Element actual,
java.lang.String patternValue,
java.lang.String actualValue,
Matcher matcher)
|
boolean |
select(org.w3c.dom.Element template,
boolean hasChildren)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
KEY_ATTR
public static final java.lang.String KEY_ATTR
- See Also:
- Constant Field Values
RegExTextMatchingStrategy
public RegExTextMatchingStrategy()
select
public boolean select(org.w3c.dom.Element template,
boolean hasChildren)
- Parameters:
template
- template Element to comparehasChildren
- true if given template element has children elements
- Returns:
- true if this strategy can handle comparison of given template to some actual element
matchTextContent
protected void matchTextContent(org.w3c.dom.Element template,
org.w3c.dom.Element actual,
java.lang.String patternValue,
java.lang.String actualValue,
Matcher matcher)
throws XMLMismatchException,
InvalidTemplateException
- Specified by:
matchTextContent
in class TextValueMatchingStrategy
patternValue
- non-nullable StringactualValue
- non-nullable String
- Throws:
XMLMismatchException
InvalidTemplateException
Copyright © 2007. All Rights Reserved.