com.sas.dataselectors.filters
Interface SimpleFilterLogicInterface

All Superinterfaces:
FilterLogicListInterface
All Known Implementing Classes:
SimpleFilterLogicTree

public interface SimpleFilterLogicInterface
extends FilterLogicListInterface

This interface is intended to provide list-like access to the methods required by the selector.


Field Summary
static int ADD_AT_END
          Constant to specify for the index of the 'addLeafAt' method when the new node should be added at the end of the list of leaves.
 
Method Summary
 boolean addLeaf(int index, FilterLogicTestNodeInterface leaf)
          Adds the given test node at the specified index.
 boolean canGroupLeaves(int startIndex, int endIndex)
          Returns TRUE if the leaves (or the groups they're members of) at the given indices can be grouped together.
 void clear()
          Removes all existing filter logic from the model.
 ConditionalRelationType getConditionalRelationType(int index)
          Gets the logical relationship between the leaf at the given index and the leaf at the next index.
 FilterLogicTestNodeInterface getLeaf(int index)
           
 int getLeafCount()
           
 boolean groupLeaves(int startIndex, int endIndex)
          Groups the leaves (including any groups they are members of) at the specified locations together (along with any nodes in between them).
 boolean isLeafGrouped(int index)
          Returns TRUE if the leaf at the given index is part of a group.
 boolean isLeafNegated(int index)
          Returns TRUE if the leaf at the given index has been negated, FALSE otherwise.
 boolean isModifiable()
          A flag specifying whether the tree can/should be modified.
 boolean isModified()
          A flag specifying whether the tree has been modified since it was last initialized.
 boolean moveLeafDown(int index)
          Moves the leaf at the given index down a position in the list of leaves.
 boolean moveLeafUp(int index)
          Moves the leaf at the given index up a position in the list of leaves.
 void refreshFilterList()
          Refreshes the list of leaf nodes in the tree.
 FilterLogicTestNodeInterface removeLeaf(int index)
          Removes the test node at the given index.
 void setConditionalRelationType(int index, ConditionalRelationType value)
          Sets the logical relationship between the leaf at the given index and the leaf at the next index.
 boolean setFilterObject(java.lang.Object filterObject)
           
 FilterLogicTestNodeInterface setLeaf(int index, FilterLogicTestNodeInterface leaf)
          Sets the test node at the given index.
 void setLeafNegated(int index, boolean value)
          Sets the negation flag for the leaf at the given index.
 boolean splitOnMember(int indexOfMember)
          Splits the inner-most group containing the leaf at the specified index.
 
Methods inherited from interface com.sas.dataselectors.filters.FilterLogicListInterface
getFilterList, getFilterListDescription, getFilterListLabel
 

Field Detail

ADD_AT_END

static final int ADD_AT_END
Constant to specify for the index of the 'addLeafAt' method when the new node should be added at the end of the list of leaves.

See Also:
Constant Field Values
Method Detail

isLeafGrouped

boolean isLeafGrouped(int index)
Returns TRUE if the leaf at the given index is part of a group.

Parameters:
index - the index in the list of understood nodes of the leaf to check
Returns:
boolean TRUE if the leaf is part of a group, FALSE otherwise.

setLeaf

FilterLogicTestNodeInterface setLeaf(int index,
                                     FilterLogicTestNodeInterface leaf)
Sets the test node at the given index.

Parameters:
index - the index of the test node, in the list of understood nodes, to be assigned
leaf - the test node to assign to the specified index
Returns:
the old object at the specified index

removeLeaf

FilterLogicTestNodeInterface removeLeaf(int index)
Removes the test node at the given index.

Parameters:
index - the index of the test node, in the list of understood nodes, to be removed
Returns:
the removed node closest to the top of the tree

addLeaf

boolean addLeaf(int index,
                FilterLogicTestNodeInterface leaf)
Adds the given test node at the specified index.

Parameters:
index - the index of the test node, in the list of understood nodes, to be removed
leaf - the test node to add to the filter logic
Returns:
true if the tree changed from this call, false otherwise

getLeaf

FilterLogicTestNodeInterface getLeaf(int index)
Parameters:
index - the index of the leaf to retrieve
Returns:
the test node at the given index

setConditionalRelationType

void setConditionalRelationType(int index,
                                ConditionalRelationType value)
Sets the logical relationship between the leaf at the given index and the leaf at the next index. Valid values are "AND" and "OR".

Parameters:
index - the index of the first leaf in the pair
value - the logical condition

getConditionalRelationType

ConditionalRelationType getConditionalRelationType(int index)
Gets the logical relationship between the leaf at the given index and the leaf at the next index.

Parameters:
index - the index of the first leaf in the pair
Returns:
null if there is no relationship assigned, or a ConditionalRelationType instance defining the relationship.

refreshFilterList

void refreshFilterList()
Refreshes the list of leaf nodes in the tree.


setLeafNegated

void setLeafNegated(int index,
                    boolean value)
Sets the negation flag for the leaf at the given index. If the leaf is part of a group, the entire group's negation value will be modified.

Parameters:
index - the index of the leaf to modify
value - the new value for the negation flag for that leaf

isLeafNegated

boolean isLeafNegated(int index)
Returns TRUE if the leaf at the given index has been negated, FALSE otherwise.

Parameters:
index - the index of the leaf to examine
Returns:
TRUE if the leaf at the given index has been negated, FALSE otherwise.

canGroupLeaves

boolean canGroupLeaves(int startIndex,
                       int endIndex)
Returns TRUE if the leaves (or the groups they're members of) at the given indices can be grouped together.

Parameters:
startIndex - the start of the new group
endIndex - the end of the new group
Returns:
TRUE if the leaves (or the groups they're members of) at the given indices can be grouped together.

groupLeaves

boolean groupLeaves(int startIndex,
                    int endIndex)
Groups the leaves (including any groups they are members of) at the specified locations together (along with any nodes in between them).

Parameters:
startIndex - the start of the new group
endIndex - the end of the new group

splitOnMember

boolean splitOnMember(int indexOfMember)
Splits the inner-most group containing the leaf at the specified index.

Parameters:
indexOfMember - the index of a member of the group to be split

moveLeafUp

boolean moveLeafUp(int index)
Moves the leaf at the given index up a position in the list of leaves. If a leaf is a member of a group, the leaf moves up within the group unless it is the first member of the group, in which case the entire group is moved. If the leaf or group to be moved is next to a group, it moves around the entire group.

Parameters:
index - the index of the leaf to manipulate

moveLeafDown

boolean moveLeafDown(int index)
Moves the leaf at the given index down a position in the list of leaves. If a leaf is a member of a group, the leaf moves down within the group unless it is the last member of the group, in which case the entire group is moved. If the leaf or group to be moved is next to a group, it moves around the entire group.

Parameters:
index - the index of the leaf to manipulate

isModifiable

boolean isModifiable()
A flag specifying whether the tree can/should be modified.

Returns:
true if modifiable, false otherwise.

isModified

boolean isModified()
A flag specifying whether the tree has been modified since it was last initialized. This flag does not distinguish between changes within a tree node and changes to the tree structure.

Returns:
true if the tree has been modified, false otherwise.

clear

void clear()
Removes all existing filter logic from the model.


getLeafCount

int getLeafCount()
Returns:
the number of leaves present in the filter logic

setFilterObject

boolean setFilterObject(java.lang.Object filterObject)
Parameters:
filterObject -



Copyright © 2009 SAS Institute Inc. All Rights Reserved.