gistoolkit.datasources.filter
Class AttributeFilter

java.lang.Object
  extended bygistoolkit.datasources.filter.AttributeFilter
All Implemented Interfaces:
Filter
Direct Known Subclasses:
DateAttributeFilter, NumberAttributeFilter, StringAttributeFilter

public abstract class AttributeFilter
extends java.lang.Object
implements Filter

Base class for filtering Attributes.


Field Summary
static int ATTRIBUTE_EQUALS
          Returns all the records where this attribute is equal to this value.
static int ATTRIBUTE_GREATER
          Returns all the records where this attribute is greater than this value.
static int ATTRIBUTE_LESS
          Returns all the records where this attribute is less than this value.
protected static java.lang.String ATTRIBUTE_VALUE
           
 
Constructor Summary
AttributeFilter()
           
 
Method Summary
 java.lang.String createFilterName()
          Construct the filter name
protected  int findAttribute(Record inRecord)
          Finds the attribute in the attribute array, returns -1 if it is not found.
 java.lang.String getAttributeName()
          Get the attribute name to use in comparisons.
abstract  java.lang.Object getAttributeValue()
          Return the attribute value.
 int getComparison()
          Returns the type of comparison to perform.
 java.lang.String getFilterName()
          Get the name for this filter.
 Node getNode()
          Get the configuration information for this filter
protected  void setAttributeName(java.lang.String inAttributeName)
          Set the attribute name to use in comparisons.
protected  void setComparison(int inComparison)
          Sets the comparison to use.
 void setFilterName(java.lang.String inFilterName)
          Set the name for this filter.
 void setNode(Node inNode)
          Set the configuration information for this data source
abstract  void setValue(java.lang.String inValue)
          Set the attribute value.
 java.lang.String toString()
          The tostring for this filter will nust return the name.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface gistoolkit.datasources.filter.Filter
contains
 

Field Detail

ATTRIBUTE_EQUALS

public static final int ATTRIBUTE_EQUALS
Returns all the records where this attribute is equal to this value.

See Also:
Constant Field Values

ATTRIBUTE_GREATER

public static final int ATTRIBUTE_GREATER
Returns all the records where this attribute is greater than this value.

See Also:
Constant Field Values

ATTRIBUTE_LESS

public static final int ATTRIBUTE_LESS
Returns all the records where this attribute is less than this value.

See Also:
Constant Field Values

ATTRIBUTE_VALUE

protected static final java.lang.String ATTRIBUTE_VALUE
See Also:
Constant Field Values
Constructor Detail

AttributeFilter

public AttributeFilter()
Method Detail

setFilterName

public void setFilterName(java.lang.String inFilterName)
Set the name for this filter.


getFilterName

public java.lang.String getFilterName()
Get the name for this filter.

Specified by:
getFilterName in interface Filter

setComparison

protected void setComparison(int inComparison)
Sets the comparison to use.


getComparison

public int getComparison()
Returns the type of comparison to perform.


setAttributeName

protected void setAttributeName(java.lang.String inAttributeName)
Set the attribute name to use in comparisons.


getAttributeName

public java.lang.String getAttributeName()
Get the attribute name to use in comparisons.


getAttributeValue

public abstract java.lang.Object getAttributeValue()
Return the attribute value.


setValue

public abstract void setValue(java.lang.String inValue)
Set the attribute value.


findAttribute

protected int findAttribute(Record inRecord)
Finds the attribute in the attribute array, returns -1 if it is not found.


toString

public java.lang.String toString()
The tostring for this filter will nust return the name.


createFilterName

public java.lang.String createFilterName()
Construct the filter name


getNode

public Node getNode()
Get the configuration information for this filter

Specified by:
getNode in interface Filter

setNode

public void setNode(Node inNode)
             throws java.lang.Exception
Set the configuration information for this data source

Specified by:
setNode in interface Filter
Throws:
java.lang.Exception