com.sas.dataselectors.filters
Class OLAPMemberTreeNode

com.sas.dataselectors.filters.OLAPMemberTreeNode
All Implemented Interfaces:
FilterValueInterface, LabeledStringValueInterface, java.io.Serializable, java.lang.Cloneable, javax.swing.tree.MutableTreeNode, javax.swing.tree.TreeNode
Direct Known Subclasses:
OLAPMemberDeferredRetrievalTreeNode

public class OLAPMemberTreeNode
implements FilterValueInterface, LabeledStringValueInterface

This class defines a single node within an OLAP member tree model. It combines the FilterValueInterface and LabeledStringValueInterface to provide for selectable entries in both the filter model and qualifier selector model.

See Also:
Serialized Form

Constructor Summary
  OLAPMemberTreeNode(com.sas.iquery.metadata.business.DataItem dataItem)
          Constructs a new tree node from the given source model object.
  OLAPMemberTreeNode(DimensionInterface dimension)
          Constructs a new tree node from the given source model object.
  OLAPMemberTreeNode(HierarchyInterface hierarchy)
          Constructs a new tree node from the given source model object.
  OLAPMemberTreeNode(LevelInterface level)
          Constructs a new tree node from the given source model object.
  OLAPMemberTreeNode(MemberInterface member)
          Constructs a new tree node from the given source model object.
protected OLAPMemberTreeNode(MetadataEntityInterface entity)
          Constructs a new tree node from the given source model object.
  OLAPMemberTreeNode(java.lang.Object userObject)
          Constructs a new tree node containing the specified data object.
  OLAPMemberTreeNode(java.lang.Object userObject, boolean allowsChildren)
          Constructs a new tree node containing the specified data object.
  OLAPMemberTreeNode(TupleElementInterface element)
          Constructs a new tree node from the given source model object.
 
Method Summary
 java.lang.Object getData()
          Returns the data for this node.
 int getDataType()
          Returns the data type 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.String getLabel()
          Returns the label for this node.
 java.lang.Object getUnformattedValue()
          Returns the unformatted representation of this value.
 java.lang.String getValue()
          Returns the value for this node.
 void setDataType(int i)
          Sets the data type this value represents.
 void setFormat(java.lang.Object object)
          Sets the format for this value.
 void setLabel(java.lang.String string)
          Sets the label for this node.
 void setValue(java.lang.Object object)
          Sets the data for this node.
 java.lang.String toString()
          Returns a text representation of this node.
 

Constructor Detail

OLAPMemberTreeNode

public OLAPMemberTreeNode(java.lang.Object userObject)
Constructs a new tree node containing the specified data object.

Parameters:
userObject - the data for this node

OLAPMemberTreeNode

public OLAPMemberTreeNode(java.lang.Object userObject,
                          boolean allowsChildren)
Constructs a new tree node containing the specified data object.

Parameters:
userObject - the data for this node
allowsChildren - if true, the node is allowed to have child nodes -- otherwise, it is always a leaf node
See Also:
DefaultMutableTreeNode.getAllowsChildren()

OLAPMemberTreeNode

protected OLAPMemberTreeNode(MetadataEntityInterface entity)
                      throws OLAPException
Constructs a new tree node from the given source model object.

Parameters:
entity - the source object to examine
Throws:
OLAPException - if any errors occur while gathering metadata

OLAPMemberTreeNode

public OLAPMemberTreeNode(HierarchyInterface hierarchy)
                   throws OLAPException
Constructs a new tree node from the given source model object.

Parameters:
hierarchy - the source object to examine
Throws:
OLAPException - if any errors occur while gathering metadata

OLAPMemberTreeNode

public OLAPMemberTreeNode(DimensionInterface dimension)
                   throws OLAPException
Constructs a new tree node from the given source model object.

Parameters:
dimension - the source object to examine
Throws:
OLAPException - if any errors occur while gathering metadata

OLAPMemberTreeNode

public OLAPMemberTreeNode(LevelInterface level)
                   throws OLAPException
Constructs a new tree node from the given source model object.

Parameters:
level - the source object to examine
Throws:
OLAPException - if any errors occur while gathering metadata

OLAPMemberTreeNode

public OLAPMemberTreeNode(MemberInterface member)
                   throws OLAPException
Constructs a new tree node from the given source model object.

Parameters:
member - the source object to examine
Throws:
OLAPException - if any errors occur while gathering metadata

OLAPMemberTreeNode

public OLAPMemberTreeNode(com.sas.iquery.metadata.business.DataItem dataItem)
                   throws com.sas.iquery.metadata.MetadataException
Constructs a new tree node from the given source model object.

Parameters:
dataItem - the source object to examine
Throws:
com.sas.iquery.metadata.MetadataException - if any errors occur while gathering metadata

OLAPMemberTreeNode

public OLAPMemberTreeNode(TupleElementInterface element)
                   throws OLAPException
Constructs a new tree node from the given source model object.

Parameters:
element - the source object to examine
Throws:
OLAPException - if any errors occur while gathering metadata
Method Detail

getLabel

public java.lang.String getLabel()
Returns the label for this node.

Specified by:
getLabel in interface LabeledStringValueInterface
Returns:
the label for this node

getValue

public java.lang.String getValue()
Returns the value for this node.

Specified by:
getValue in interface LabeledStringValueInterface
Returns:
the value for this node

setLabel

public void setLabel(java.lang.String string)
Sets the label for this node.

Parameters:
string - the new label for this node

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 data type this value represents.

Specified by:
getDataType in interface FilterValueInterface
Returns:
the data type this value represents

getFormat

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

Specified by:
getFormat in interface FilterValueInterface
Returns:
the format for this value

getData

public java.lang.Object getData()
Returns the data for this node.

Specified by:
getData in interface FilterValueInterface
Returns:
the data for this node

toString

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

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

setDataType

public void setDataType(int i)
Sets the data type this value represents.

Parameters:
i - the new data type

setFormat

public void setFormat(java.lang.Object object)
Sets the format for this value.

Parameters:
object - the new format for this value

setValue

public void setValue(java.lang.Object object)
Sets the data for this node.

Parameters:
object - the data for this node



Copyright © 2009 SAS Institute Inc. All Rights Reserved.