org.ceryle.xml
Class MatchFilter

java.lang.Object
  extended by org.ceryle.xml.MatchFilter
All Implemented Interfaces:
org.w3c.dom.traversal.NodeFilter

public class MatchFilter
extends Object
implements org.w3c.dom.traversal.NodeFilter

A NodeFilter implementation that matches (or explicitly does not match) the Element name value.


Field Summary
 
Fields inherited from interface org.w3c.dom.traversal.NodeFilter
FILTER_ACCEPT, FILTER_REJECT, FILTER_SKIP, SHOW_ALL, SHOW_ATTRIBUTE, SHOW_CDATA_SECTION, SHOW_COMMENT, SHOW_DOCUMENT, SHOW_DOCUMENT_FRAGMENT, SHOW_DOCUMENT_TYPE, SHOW_ELEMENT, SHOW_ENTITY, SHOW_ENTITY_REFERENCE, SHOW_NOTATION, SHOW_PROCESSING_INSTRUCTION, SHOW_TEXT
 
Constructor Summary
MatchFilter(String name)
          Constructor with String to match name.
 
Method Summary
 short acceptNode(Node n)
          acceptNode() determines if this filter accepts a node or not.
 boolean getMatch()
          Return match value.
 String getName()
          Return the name to compare with node name.
 void setMatch(boolean match)
          Controls whether the node name is accepted when it does match the setName value, or when it does not match the setName value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MatchFilter

public MatchFilter(String name)
Constructor with String to match name. If null, all node names are successfully matched.

Method Detail

getName

public String getName()
Return the name to compare with node name.


setMatch

public void setMatch(boolean match)
Controls whether the node name is accepted when it does match the setName value, or when it does not match the setName value. If the setName value is null this match value does not matter, and all names will match. If match is true, the node name is accepted when it matches. If match is false, the node name is accepted when does not match.


getMatch

public boolean getMatch()
Return match value.


acceptNode

public short acceptNode(Node n)
acceptNode() determines if this filter accepts a node or not.

Specified by:
acceptNode in interface org.w3c.dom.traversal.NodeFilter


The Ceryle Project. Copyright ©2001-2007 Murray Altheim, All Rights Reserved. See LICENSE included with distribution.