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.dataitems
Class BusinessModelTreeModelFactory

    com.sas.dataselectors.dataitems.BusinessModelTreeModelFactory

    public class BusinessModelTreeModelFactory

This is the factory class for DefaultTreeModel instances created from the objects in a BusinessModel. The returned tree models contain nodes of type DisabledNode that have a user object of type DataItemTreeNodeInfo attached. This user object contains information necessary for displaying the nodes.

Since:
  3.1
See Also:
  `DisabledNode`, `DataItemTreeNodeInfo`

Field Summary
`static java.lang.String` | `COLUMNS`
`static java.lang.String` | `DIMENSIONS`
`static java.lang.String` | `HIERARCHIES`
`static java.lang.String` | `LEVELS`
`static java.lang.String` | `MEASURES`
`static java.lang.String` | `RB_KEY` Key used to look up resources in the resource bundle

Constructor Summary
`BusinessModelTreeModelFactory()`

Method Summary
`static javax.swing.tree.TreeNode` | `getSelectedModelNode(java.lang.String roleLabel, java.lang.String roleName, java.util.List selectedItems, com.sas.util.transforms.TransformInterface transform, java.lang.String selectedRole)` Returns a tree node representing a role and the items assigned to that role.
`static javax.swing.tree.TreeModel` | `getTreeModel(java.util.List allItems, java.util.List availableItems, com.sas.util.transforms.TransformInterface transform, boolean groupitems, java.util.Locale locale, java.lang.String rootName, com.sas.iquery.metadata.business.InformationMap infomap)` Returns a TreeModel representation of the DataItems contained in the allItems list.

Field Detail

### HIERARCHIES

    public static final java.lang.String HIERARCHIES

See Also:
  Constant Field Values

### LEVELS

    public static final java.lang.String LEVELS

See Also:
  Constant Field Values

### MEASURES

    public static final java.lang.String MEASURES

See Also:
  Constant Field Values

### DIMENSIONS

    public static final java.lang.String DIMENSIONS

See Also:
  Constant Field Values

### COLUMNS

    public static final java.lang.String COLUMNS

See Also:
  Constant Field Values

### RB_KEY

    public static final java.lang.String RB_KEY

  Key used to look up resources in the resource bundle

  See Also:
    Constant Field Values

Constructor Detail

### BusinessModelTreeModelFactory

    public BusinessModelTreeModelFactory()

Method Detail

### getTreeModel

    public static javax.swing.tree.TreeModel getTreeModel(java.util.List allItems,
                                                          java.util.List availableItems,
                                                          com.sas.util.transforms.TransformInterface transform,
                                                          boolean groupitems,
                                                          java.util.Locale locale,
                                                          java.lang.String rootName,
                                                          com.sas.iquery.metadata.business.InformationMap infomap)

  Returns a TreeModel representation of the DataItems contained in the allItems list. The nodes in the TreeModel are of type DisabledNode, and have a user object of type DataItemTreeNodeInfo that stores information necessary to properly display the nodes. Items that are not in the availableItems list have the enabled property of the user object set to false. Nodes may be grouped into Hierarchies, Levels, and Measures categories for OLAP queries. Relational queries are represented by a tree with only leaf nodes representing the data item. For both relational and OLAP queries, the root node of the tree is not visible. Nodes can be transformed into nodes of any type by passing in an optional transform object.

  Parameters:
    `allItems` - - the list of items to be represented by the tree model
    `availableItems` - - the list of items that are available for selection (these are enabled in the tree
    `transform` - - an optional transform object (this can be null)
    `groupItems` - - a boolean flag indicating that nodes in the tree should be grouped into item categories
    `locale` - - the user locale object
    `rootName` - - an optional name for the root node of the tree
    `infomap` - - the information map used to populate the tree

### getSelectedModelNode

    public static javax.swing.tree.TreeNode getSelectedModelNode(java.lang.String roleLabel,
                                                                 java.lang.String roleName,
                                                                 java.util.List selectedItems,
                                                                 com.sas.util.transforms.TransformInterface transform,
                                                                 java.lang.String selectedRole)

  Returns a tree node representing a role and the items assigned to that role. This is used in building a tree model that represents the item selections for the selected tree model. The tree nodes created are of type DisabledNode, but may be tranformed to nodes of any type by passing in a tranform object. The node returned will be expanded to display all leaf nodes.

  Parameters:
    `roleLabel` - - the label of the role object
    `roleName` - - the name of the role object
    `selectedItems` - - the list of items selected for the role
    `transform` - - an optional transform object
    `selectedRole` - - the name of the role being modified by the user. If this is equal to the passed in role name, then the node created is expanded to show the leaf nodes, otherwise the node is collapsed to only display the role label.
  Returns:
    a tree node representing the items assigned to a role

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.