org.umber.bellows.query
Class AttributeFilter

java.lang.Object
  extended byorg.umber.bellows.query.QueryProcessor
      extended byorg.umber.bellows.query.AttributeFilter
All Implemented Interfaces:
INodeProcessor

public class AttributeFilter
extends QueryProcessor

A query filter to extract Datum objects from a List based on the existence and/or value of a property within that node. Can return multiple results.

Author:
jsheets
See Also:
DatumQuery

Constructor Summary
AttributeFilter(java.lang.String attribute)
          Creates a new instance of AttributeFilter which will collect objects with the given attribute set.
AttributeFilter(java.lang.String attribute, java.lang.String value)
          Creates a new instance of AttributeFilter which will collect objects with the given attribute set to the given value.
 
Method Summary
protected  boolean shouldProcess(java.lang.Object node)
          Determines if the given object should be processed during the traversal.
 
Methods inherited from class org.umber.bellows.query.QueryProcessor
end, processNode, start
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AttributeFilter

public AttributeFilter(java.lang.String attribute)
Creates a new instance of AttributeFilter which will collect objects with the given attribute set.

Parameters:
attribute - the name of the attribute to search for

AttributeFilter

public AttributeFilter(java.lang.String attribute,
                       java.lang.String value)
Creates a new instance of AttributeFilter which will collect objects with the given attribute set to the given value.

Parameters:
attribute - the name of the attribute to search for
value - the value the attribute must have
Method Detail

shouldProcess

protected boolean shouldProcess(java.lang.Object node)
Determines if the given object should be processed during the traversal.

Specified by:
shouldProcess in class QueryProcessor
Parameters:
node - the object to test
Returns:
true if the object should be processed