edu.uky.rch.ept.xmlSegmentTree
Class TagFilter

java.lang.Object
  extended byedu.uky.rch.ept.xmlSegmentTree.TagFilter
All Implemented Interfaces:
ElementFilter
Direct Known Subclasses:
DTDFilter

public class TagFilter
extends Object
implements ElementFilter

An ElementFilter that matches tagged elements with any of a set of tags, and optionally string elements as well.


Constructor Summary
TagFilter(Collection tags)
          Create a TagFilter which matches the tags in a collection, as well as string elements.
TagFilter(Collection tags, boolean strings)
          Create a TagFilter which matches the tags in a collection, and optionally string elements.
TagFilter(String[] tags)
          Create a TagFilter which matches the tags in an array, as well as string elements.
TagFilter(String[] tags, boolean strings)
          Create a TagFilter which matches the tags in an array, and optionally string elements.
 
Method Summary
 boolean matches(Element e)
          Test whether this filter matches an element.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TagFilter

public TagFilter(String[] tags,
                 boolean strings)
Create a TagFilter which matches the tags in an array, and optionally string elements.

Parameters:
tags - the tags to be matched by the filter.
strings - true if string elements should be matched.

TagFilter

public TagFilter(String[] tags)
Create a TagFilter which matches the tags in an array, as well as string elements.

Parameters:
tags - the tags to be matched by the filter.

TagFilter

public TagFilter(Collection tags,
                 boolean strings)
Create a TagFilter which matches the tags in a collection, and optionally string elements.

Parameters:
tags - the tags to be matched by the filter.
strings - true if string elements should be matched.

TagFilter

public TagFilter(Collection tags)
Create a TagFilter which matches the tags in a collection, as well as string elements.

Parameters:
tags - the tags to be matched by the filter.
Method Detail

matches

public boolean matches(Element e)
Test whether this filter matches an element.

Specified by:
matches in interface ElementFilter
Parameters:
e - the element under consideration.
Returns:
true if e should be passed to the SegmentTreeVisitor