net.sf.xmlmatcher.strategy
Class ElementSetMatchingStrategy

java.lang.Object
  extended by net.sf.xmlmatcher.strategy.ElementSetMatchingStrategy
All Implemented Interfaces:
MatchingStrategy

public final class ElementSetMatchingStrategy
extends java.lang.Object
implements MatchingStrategy

Strategy that matches children elements as ordered/unordered sets. Actual set of elements may be superset of template children if 'extra-elem' mode is on.


Field Summary
static java.lang.String ALLOW_EXTRA_ELEMS_ATTR
           
static java.lang.String ORDER_ATTR
           
 
Constructor Summary
ElementSetMatchingStrategy()
           
 
Method Summary
 void matchContent(org.w3c.dom.Element template, org.w3c.dom.Element actual, 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
 

Field Detail

ORDER_ATTR

public static final java.lang.String ORDER_ATTR
See Also:
Constant Field Values

ALLOW_EXTRA_ELEMS_ATTR

public static final java.lang.String ALLOW_EXTRA_ELEMS_ATTR
See Also:
Constant Field Values
Constructor Detail

ElementSetMatchingStrategy

public ElementSetMatchingStrategy()
Method Detail

select

public boolean select(org.w3c.dom.Element template,
                      boolean hasChildren)
Specified by:
select in interface MatchingStrategy
Parameters:
template - template Element to compare
hasChildren - true if given template element has children elements
Returns:
true if this strategy can handle comparison of given template to some actual element

matchContent

public void matchContent(org.w3c.dom.Element template,
                         org.w3c.dom.Element actual,
                         Matcher matcher)
                  throws MatcherException
Specified by:
matchContent in interface MatchingStrategy
Parameters:
template - Element
actual - Element
matcher - Matcher (allows to match deeper levels)
Throws:
MatcherException


Copyright © 2007. All Rights Reserved.