com.sas.dataselectors.filters
Class OLAPMemberValueAndTreeModel

com.sas.dataselectors.filters.OLAPMemberValueAndTreeModel
All Implemented Interfaces:
FilterValueInterface, FilterValuesInterface, OLAPMemberTreePathFactoryInterface, java.io.Serializable, javax.swing.tree.TreeModel

public class OLAPMemberValueAndTreeModel
implements FilterValueInterface

This model extends the OLAPMemberTreeModel to implement the additional filter model interface, FilterValueInterface. This interface allows the tree model itself to represent a selectable value within the filter model.

See Also:
FilterValueInterface, Serialized Form

Field Summary
 
Fields inherited from class com.sas.dataselectors.filters.OLAPMemberTreeModel
_itemValues, _itemValuesIterator, _label, _metadata, RB_KEY
 
Fields inherited from interface com.sas.dataselectors.filters.FilterValuesInterface
GETTHRESHHOLDALLVALUES
 
Constructor Summary
OLAPMemberValueAndTreeModel(com.sas.iquery.metadata.business.DataItem dataItem, MetadataInterface metadata)
          Constructs a new tree model and prepopulates it using metadata gathered from the given DataItem and MetadataInterface objects.
OLAPMemberValueAndTreeModel(DimensionInterface dimension)
          Constructs a new tree model and prepopulates it using metadata gathered from the given DimensionInterface object.
OLAPMemberValueAndTreeModel(OLAPMemberTreeNode root)
          Constructs a new model with the given node as the root.
OLAPMemberValueAndTreeModel(OLAPMemberTreeNode root, boolean asksAllowsChildren)
          Constructs a new model with the given node as the root.
 
Method Summary
 java.lang.Object getData()
          Returns the native model data for this value.
 int getDataType()
          Returns the type of data this value represents.
 java.lang.Object getFormat()
          Returns the format for this value.
 java.lang.String getFormattedValue()
          Returns the formatted representation of this value.
 java.lang.Object getUnformattedValue()
          Returns the unformatted representation of this value.
 
Methods inherited from class com.sas.dataselectors.filters.OLAPMemberTreeModel
getFirstValues, getListLabel, getMemberArrayForPathNodeList, getMetadata, getNextValues, getTreePathNodeList, getTreePathNodeList, getTreePathNodeList, getTreePathNodeList, getTreePathNodeList, getTreePathNodeList, getTreePathNodeList, hasMoreValues, setListLabel, setMetadata, setRoot, toString
 

Constructor Detail

OLAPMemberValueAndTreeModel

public OLAPMemberValueAndTreeModel(OLAPMemberTreeNode root)
Constructs a new model with the given node as the root.

Parameters:
root - the root node of the new model

OLAPMemberValueAndTreeModel

public OLAPMemberValueAndTreeModel(OLAPMemberTreeNode root,
                                   boolean asksAllowsChildren)
Constructs a new model with the given node as the root.

Parameters:
root - the root node of the new model
askAllowsChildren - a boolean, false if any node can have children, true if each node is asked to see if it can have children
See Also:
DefaultTreeModel.asksAllowsChildren

OLAPMemberValueAndTreeModel

public OLAPMemberValueAndTreeModel(com.sas.iquery.metadata.business.DataItem dataItem,
                                   MetadataInterface metadata)
                            throws com.sas.iquery.metadata.MetadataException
Constructs a new tree model and prepopulates it using metadata gathered from the given DataItem and MetadataInterface objects.

Parameters:
dataItem - the entry point in the OLAP member tree
metadata - the interface to use when getting metadata from an OLAP source
Throws:
com.sas.iquery.metadata.MetadataException - if any errors occur while retrieving data from the OLAP metadata server

OLAPMemberValueAndTreeModel

public OLAPMemberValueAndTreeModel(DimensionInterface dimension)
                            throws OLAPException
Constructs a new tree model and prepopulates it using metadata gathered from the given DimensionInterface object.

Parameters:
dimension - the entry point in the OLAP member tree
Throws:
OLAPException - if any errors occur while retrieving data from the OLAP metadata server
Method Detail

getFormattedValue

public java.lang.String getFormattedValue()
Returns the formatted representation of this value.

Specified by:
getFormattedValue in interface FilterValueInterface
Returns:
the formatted value
See Also:
FilterValueInterface.getFormattedValue()

getUnformattedValue

public java.lang.Object getUnformattedValue()
Returns the unformatted representation of this value.

Specified by:
getUnformattedValue in interface FilterValueInterface
Returns:
the unformatted value
See Also:
FilterValueInterface.getUnformattedValue()

getDataType

public int getDataType()
Returns the type of data this value represents.

Specified by:
getDataType in interface FilterValueInterface
Returns:
the data type
See Also:
FilterValueInterface.getDataType()

getFormat

public java.lang.Object getFormat()
Returns the format for this value.

Specified by:
getFormat in interface FilterValueInterface
Returns:
the format
See Also:
FilterValueInterface.getFormat()

getData

public java.lang.Object getData()
Returns the native model data for this value.

Specified by:
getData in interface FilterValueInterface
Returns:
the data for this value
See Also:
FilterValueInterface.getData()



Copyright © 2009 SAS Institute Inc. All Rights Reserved.