com.sas.dataselectors.filters
Class DefaultFilterLogicTestNode

com.sas.dataselectors.filters.DefaultFilterLogicTestNode
All Implemented Interfaces:
FilterLogicBaseNodeInterface, FilterLogicEditableTestNodeInterface, FilterLogicTestNodeInterface, java.io.Serializable, java.lang.Cloneable, javax.swing.tree.MutableTreeNode, javax.swing.tree.TreeNode

public class DefaultFilterLogicTestNode
implements FilterLogicTestNodeInterface, FilterLogicEditableTestNodeInterface

See Also:
Serialized Form

Field Summary
protected  FilterConditionInterface condition
           
protected  FilterItemInterface item
           
protected  java.util.List qualifiers
           
protected  java.util.List values
           
 
Fields inherited from class com.sas.dataselectors.filters.AbstractFilterLogicBaseNode
description, label, propertyChangeSupport
 
Constructor Summary
DefaultFilterLogicTestNode()
          Constructs a new test node with the default properties.
DefaultFilterLogicTestNode(FilterItemInterface item, java.util.List qualifiers, FilterConditionInterface condition, java.util.List values)
          Constructs a new test node with the given properties.
DefaultFilterLogicTestNode(FilterLogicTestNodeInterface duplicate)
          Constructs a new test node as a duplicate of the given test node.
DefaultFilterLogicTestNode(java.lang.Object userObject)
           
 
Method Summary
 java.lang.Object clone()
          Creates a new node with the same user object, label, and description.
 boolean equals(java.lang.Object obj)
          Returns true if the given object implements FilterLogicTestNodeInterface and the properties of this test node and the given test node are equivalent.
 boolean getAllowsChildren()
          Returns true if the node allows children, false otherwise.
 FilterConditionInterface getCondition()
          Returns the filter condition for this test node.
 FilterItemInterface getFilterItem()
          Returns the filter item for this test node.
 java.util.List getFilterItemQualifiers()
          Returns the list of qualifiers applied to the filter item for this test node to further refine the filter.
 int getMaxChildren()
          Returns the maximum number of child nodes allowed.
 java.util.List getTestValuesList()
          Returns a List of objects that were selected as values for this test node or null if none have been supplied.
 boolean isLeaf()
          Returns true if the node is a leaf, false otherwise.
 void setCondition(FilterConditionInterface condition)
          Sets the filter condition for this test node.
 void setFilterItem(FilterItemInterface item)
          Sets the filter item assigned to this test node.
 void setFilterItemQualifiers(java.util.List qualifiers)
          Sets the list of qualifiers to be applied to the filter item for this test node to further refine the resulting filter.
 void setTestValuesList(java.util.List values)
          Sets the list of values for this test node.
 java.lang.String toString()
          Returns a text representation of this test node.
 
Methods inherited from class com.sas.dataselectors.filters.AbstractFilterLogicBaseNode
addPropertyChangeListener, dispose, firePropertyChange, firePropertyChange, getChildLogicNodeAt, getFilterDescription, getFilterLabel, getIndex, getParentLogicNode, removePropertyChangeListener, setFilterDescription, setFilterLabel, setUserObject
 
Methods inherited from interface com.sas.dataselectors.filters.FilterLogicEditableTestNodeInterface
setFilterDescription, setFilterLabel
 
Methods inherited from interface com.sas.dataselectors.filters.FilterLogicBaseNodeInterface
dispose, getChildLogicNodeAt, getFilterDescription, getFilterLabel, getParentLogicNode, getUserObject
 

Field Detail

item

protected transient FilterItemInterface item

qualifiers

protected transient java.util.List qualifiers

condition

protected transient FilterConditionInterface condition

values

protected transient java.util.List values
Constructor Detail

DefaultFilterLogicTestNode

public DefaultFilterLogicTestNode()
Constructs a new test node with the default properties.


DefaultFilterLogicTestNode

public DefaultFilterLogicTestNode(java.lang.Object userObject)

DefaultFilterLogicTestNode

public DefaultFilterLogicTestNode(FilterItemInterface item,
                                  java.util.List qualifiers,
                                  FilterConditionInterface condition,
                                  java.util.List values)
Constructs a new test node with the given properties.

Parameters:
item - the filter item for this node
qualfiers - an optional list of qualifiers
condition - the filter condition for this node
values - the list of test values

DefaultFilterLogicTestNode

public DefaultFilterLogicTestNode(FilterLogicTestNodeInterface duplicate)
Constructs a new test node as a duplicate of the given test node.

Parameters:
duplicate - the test node to copy
Method Detail

clone

public java.lang.Object clone()
Description copied from class: AbstractFilterLogicBaseNode
Creates a new node with the same user object, label, and description. The children and parent nodes are not included in the new node.

Overrides:
clone in class AbstractFilterLogicBaseNode
Returns:
a new node as a copy of this one

toString

public java.lang.String toString()
Returns a text representation of this test node.

Overrides:
toString in class javax.swing.tree.DefaultMutableTreeNode
Returns:
a text representation of this test node

getFilterItem

public FilterItemInterface getFilterItem()
Returns the filter item for this test node.

Specified by:
getFilterItem in interface FilterLogicTestNodeInterface
Returns:
this node's filter item

getFilterItemQualifiers

public java.util.List getFilterItemQualifiers()
Returns the list of qualifiers applied to the filter item for this test node to further refine the filter. This list may be null if no qualifiers were supplied.

Specified by:
getFilterItemQualifiers in interface FilterLogicTestNodeInterface
Returns:
the list of active qualifiers for this test node

getCondition

public FilterConditionInterface getCondition()
Returns the filter condition for this test node.

Specified by:
getCondition in interface FilterLogicTestNodeInterface
Returns:
the filter condition

getTestValuesList

public java.util.List getTestValuesList()
Returns a List of objects that were selected as values for this test node or null if none have been supplied.

Specified by:
getTestValuesList in interface FilterLogicTestNodeInterface
Returns:
the list of test values

setFilterItem

public void setFilterItem(FilterItemInterface item)
Sets the filter item assigned to this test node.

Specified by:
setFilterItem in interface FilterLogicEditableTestNodeInterface
Parameters:
item - the new filter item for this node

setFilterItemQualifiers

public void setFilterItemQualifiers(java.util.List qualifiers)
Sets the list of qualifiers to be applied to the filter item for this test node to further refine the resulting filter. If no qualifiers are desired, null may be used to remove any qualifiers.

Specified by:
setFilterItemQualifiers in interface FilterLogicEditableTestNodeInterface
Parameters:
qualifiers - the list of qualifiers to apply or null if none are to be applied

setCondition

public void setCondition(FilterConditionInterface condition)
Sets the filter condition for this test node.

Specified by:
setCondition in interface FilterLogicEditableTestNodeInterface
Parameters:
condition - the filter condition

setTestValuesList

public void setTestValuesList(java.util.List values)
Sets the list of values for this test node.

Specified by:
setTestValuesList in interface FilterLogicEditableTestNodeInterface
Parameters:
values - the new list of test values

getMaxChildren

public int getMaxChildren()
Returns the maximum number of child nodes allowed.

Specified by:
getMaxChildren in interface FilterLogicBaseNodeInterface
Overrides:
getMaxChildren in class AbstractFilterLogicBaseNode
Returns:
0, Allows no child nodes

getAllowsChildren

public boolean getAllowsChildren()
Returns true if the node allows children, false otherwise.

Specified by:
getAllowsChildren in interface javax.swing.tree.TreeNode
Overrides:
getAllowsChildren in class javax.swing.tree.DefaultMutableTreeNode
Returns:
false, children should never be allowed for this type of node

isLeaf

public boolean isLeaf()
Returns true if the node is a leaf, false otherwise.

Specified by:
isLeaf in interface javax.swing.tree.TreeNode
Overrides:
isLeaf in class javax.swing.tree.DefaultMutableTreeNode
Returns:
true, this node always not be a leaf

equals

public boolean equals(java.lang.Object obj)
Returns true if the given object implements FilterLogicTestNodeInterface and the properties of this test node and the given test node are equivalent.

Overrides:
equals in class java.lang.Object
Parameters:
obj - the object to compare to this object
Returns:
TRUE if the given object is equal to this test node, FALSE otherwise
See Also:
Object.equals(Object)



Copyright © 2009 SAS Institute Inc. All Rights Reserved.