All Libraries | This Library | Package | Class | Use | Tree | Deprecated | Index | Grand Index | Help
|  | Components |
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.sas.dataselectors.filters
Interface SimpleFilterLogicTreeInterface

All Known Implementing Classes:
  SimpleFilterLogicTreeAdapter

    @SASScope(value="ALL")
    public interface SimpleFilterLogicTreeInterface

The SimpleFilterLogicTreeInterface provides a simpler tree structure than the FilterLogicTreeInterface.

Field Summary
`static java.lang.String` | `AND` Constant value used when defining or determining the logical relationship between two expressions in a filter.
`static java.lang.String` | `OR` Constant value used when defining or determining the logical relationship between two expressions in a filter.

Method Summary
`abstract void` | `add(FilterLogicBaseNodeInterface rootNode)` Appends the given logic tree structure to this one.
`abstract void` | `add(SimpleFilterLogicTreeInterface tree)` Appends the given logic tree to this one.
`abstract void` | `addLeafAt(int index, FilterLogicTestNodeInterface testNode)` Add a new test node at the given index in the list of understood test nodes.
`abstract boolean` | `areAllNodesUnderstood()` Returns TRUE if all leaf nodes in the tree have been marked as "understood", FALSE otherwise.
`abstract void` | `cancel(java.lang.Object initialFilter)` Returns the filter model to the state specified by the given filter object.
`abstract boolean` | `canGroupLeaves(int firstIndex, int lastIndex)` Returns TRUE if the leaves (or the groups they're members of) at the given indices can be grouped together.
`abstract void` | `clear()` Removes all leaves from the tree and collapses any remaining support structure.
`abstract boolean` | `commitTree()` Commits any changes in the tree to the underlying native filter model.
`abstract SimpleFilterLogicTreeInterface` | `copy()` Constructs and returns a copy of this tree.
`abstract SimpleFilterLogicTreeInterface` | `copy(boolean copyTestNodes)` Copies the tree and optionally makes duplicates of the test nodes within it.
`abstract FilterItemInterface` | `findMatchingFilterItem(java.lang.Object itemObject)` Attempts to locate and return the filter model object that matches the specified search item from the native model.
`abstract int` | `getFirstLeafInGroup(int memberIndex)` Returns the index of the first leaf in the group that includes the leaf at the given index.
`abstract int` | `getLastLeafInGroup(int memberIndex)` Returns the index of the last leaf in the group that includes the leaf at the given index.
`abstract FilterLogicTestNodeInterface` | `getLeafAt(int index)` Returns the test node at the given index.
`abstract java.lang.String` | `getLeafConditionalRelationType(int index)` Returns the conditional relation type (AND/OR) between the leaf at the given index and the leaf at the next index.
`abstract FilterLogicBaseNodeInterface` | `getRoot()` Returns the root node of the logic tree.
`abstract java.lang.Object` | `getRootFilterItem()` Returns the root native filter object.
`abstract java.util.List` | `getUnderstoodTestNodeList()` Returns the list of understood nodes in the tree.
`abstract void` | `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).
`abstract boolean` | `isLeafGrouped(int index)` Returns TRUE if the leaf at the given index is part of a group.
`abstract boolean` | `isLeafNegated(int index)` Returns TRUE if the leaf at the given index or group that leaf is a member of is negated, FALSE otherwise.
`abstract void` | `moveLeafDown(int index)` Moves the leaf at the given index down one.
`abstract void` | `moveLeafUp(int index)` Moves the leaf at the given index up one.
`abstract void` | `refreshNodeList()` Refreshes the list of leaf nodes in the tree.
`abstract FilterLogicTestNodeInterface` | `removeLeafAt(int index)` Removes the test node at the given index.
`abstract FilterLogicTestNodeInterface` | `setLeafAt(int index, FilterLogicTestNodeInterface testNode)` Sets the test node at the given index in the list of understood test nodes.
`abstract void` | `setLeafConditionalRelationType(int index, java.lang.String value)` Sets the logical relationship between the leaf at the given index and the leaf at the next index.
`abstract void` | `setLeafNegated(int index, boolean value)` Sets whether the leaf at the given index or group that leaf is a member of is negated.
`abstract FilterLogicBaseNodeInterface` | `setRoot(FilterLogicBaseNodeInterface root)` Sets the root tree node for this tree.
`abstract void` | `splitGroup(int indexOfMember)` Splits the inner-most group containing the member at the specified index.

Field Detail

### AND

    static final java.lang.String AND

  Constant value used when defining or determining the logical relationship between two expressions in a filter. This value represents the boolean AND relationship.

  See Also:
    Constant Field Values

### OR

    static final java.lang.String OR

  Constant value used when defining or determining the logical relationship between two expressions in a filter. This value represents the boolean OR relationship.

  See Also:
    Constant Field Values

Method Detail

### addLeafAt

    void addLeafAt(int index,
                   FilterLogicTestNodeInterface testNode)

  Add a new test node at the given index in the list of understood test nodes. The new node will be inserted at the new index.

  Parameters:
    `index` - the index in the list at which the new node will be inserted
    `testNode` - the new node to add

### setLeafAt

    FilterLogicTestNodeInterface setLeafAt(int index,
                                           FilterLogicTestNodeInterface testNode)

  Sets the test node at the given index in the list of understood test nodes.

  Parameters:
    `index` - the index in the list at which the new node will be set
    `testNode` - the new node to put at the given index
  Returns:
    the old test node

### removeLeafAt

    FilterLogicTestNodeInterface removeLeafAt(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

### getLeafAt

    FilterLogicTestNodeInterface getLeafAt(int index)

  Returns the test node at the given index.

  Parameters:
    `index` - the index of the desired test node
  Returns:
    the test node at the specified index

### getRoot

    FilterLogicBaseNodeInterface getRoot()

  Returns the root node of the logic tree.

  Returns:
    the root node of the tree

### refreshNodeList

    void refreshNodeList()

  Refreshes the list of leaf nodes in the tree.

### areAllNodesUnderstood

    boolean areAllNodesUnderstood()

  Returns TRUE if all leaf nodes in the tree have been marked as "understood", FALSE otherwise.

  Returns:
    true if all nodes are understood

### getUnderstoodTestNodeList

    java.util.List getUnderstoodTestNodeList()

  Returns the list of understood nodes in the tree. This list can be used to present the structure of the filter logic in a simple, flat list.

  Returns:
    the list of understood nodes

### commitTree

    boolean commitTree()

  Commits any changes in the tree to the underlying native filter model.

  Returns:
    TRUE if the native filter model was updated successfully, FALSE otherwise

### cancel

    void cancel(java.lang.Object initialFilter)

  Returns the filter model to the state specified by the given filter object.

  Parameters:
    `initialFilter` - the initial filter state to return to

### findMatchingFilterItem

    FilterItemInterface findMatchingFilterItem(java.lang.Object itemObject)

  Attempts to locate and return the filter model object that matches the specified search item from the native model.

  Parameters:
    `itemObject` - the search item
  Returns:
    the matching filter item or null if none was found

### getRootFilterItem

    java.lang.Object getRootFilterItem()

  Returns the root native filter object.

  Returns:
    the root native filter object

### isLeafNegated

    boolean isLeafNegated(int index)

  Returns TRUE if the leaf at the given index or group that leaf is a member of is negated, FALSE otherwise.

  Parameters:
    `the` - index in the list of understood test nodes
  Returns:
    TRUE if the leaf is negated, FALSE otherwise

### setLeafNegated

    void setLeafNegated(int index,
                        boolean value)

  Sets whether the leaf at the given index or group that leaf is a member of is negated.

  Parameters:
    `the` - index in the list of understood test nodes
    `value` - the new negation value

### getLeafConditionalRelationType

    java.lang.String getLeafConditionalRelationType(int index)

  Returns the conditional relation type (AND/OR) between the leaf at the given index and the leaf at the next index.

  Returns:
    the logical relationship between the leaf at the given index and the leaf at the next index

### setLeafConditionalRelationType

    void setLeafConditionalRelationType(int index,
                                        java.lang.String 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

### splitGroup

    void splitGroup(int indexOfMember)

  Splits the inner-most group containing the member at the specified index.

  Parameters:
    `indexOfMember` - the index of the member of the group to split

### groupLeaves

    void 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

### moveLeafUp

    void moveLeafUp(int index)

  Moves the leaf at the given index up one. If the leaf is the first member of a group, the entire group will move up.

  Parameters:
    `index` - the index of the leaf to move

### moveLeafDown

    void moveLeafDown(int index)

  Moves the leaf at the given index down one. If the leaf is the last member of a group, the entire group will move down.

  Parameters:
    `index` - the index of the leaf to move

### 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.

### clear

    void clear()

  Removes all leaves from the tree and collapses any remaining support structure.

### getFirstLeafInGroup

    int getFirstLeafInGroup(int memberIndex)

  Returns the index of the first leaf in the group that includes the leaf at the given index.

  Parameters:
    `memberIndex` - the index of the node that is a member of the group to return the index of its first leaf
  Returns:
    -1 if ungrouped, otherwise the index of the first leaf in the specified group

### getLastLeafInGroup

    int getLastLeafInGroup(int memberIndex)

  Returns the index of the last leaf in the group that includes the leaf at the given index.

  Parameters:
    `memberIndex` - the index of the node that is a member of the group to return the index of its last leaf
  Returns:
    -1 if ungrouped, otherwise the index of the last leaf in the specified group

### canGroupLeaves

    boolean canGroupLeaves(int firstIndex,
                           int lastIndex)

  Returns TRUE if the leaves (or the groups they're members of) at the given indices can be grouped together.

  Parameters:
    `firstIndex` - the index of the first leaf selected
    `lastIndex` - the index of the last leaf selected
  Returns:
    TRUE if the leaves (or the groups they're members of) at the given indices can be grouped together.

### copy

    SimpleFilterLogicTreeInterface copy()

  Constructs and returns a copy of this tree.

  Returns:
    the duplicate logic tree

### copy

    SimpleFilterLogicTreeInterface copy(boolean copyTestNodes)

  Copies the tree and optionally makes duplicates of the test nodes within it.

  Parameters:
    `copyTestNodes` - TRUE if the test nodes in this tree should be duplicated
  Returns:
    A new tree

### setRoot

    FilterLogicBaseNodeInterface setRoot(FilterLogicBaseNodeInterface root)

  Sets the root tree node for this tree.

  Parameters:
    `root` - the new root node of the tree
  Returns:
    the old root node or null if none existed

### add

    void add(SimpleFilterLogicTreeInterface tree)

  Appends the given logic tree to this one.

  Parameters:
    `tree` - the tree to add

### add

    void add(FilterLogicBaseNodeInterface rootNode)

  Appends the given logic tree structure to this one.

  Parameters:
    `rootNode` -

All Libraries | This Library | Package | Class | Use | Tree | Deprecated | Index | Grand Index | Help
|  | Components |
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2009 SAS Institute Inc. All Rights Reserved.