com.sas.dataselectors.qualifiers
Class QualifiersSelectorAdapter

com.sas.dataselectors.qualifiers.QualifiersSelectorAdapter
All Implemented Interfaces:
com.sas.dataselectors.qualifiers.QualifiersSelectorInterface, com.sas.swing.dataselectors.editors.EditorInterface, com.sas.swing.dataselectors.editors.QualifiersEditorInterface

public class QualifiersSelectorAdapter
implements com.sas.dataselectors.qualifiers.QualifiersSelectorInterface, com.sas.swing.dataselectors.editors.QualifiersEditorInterface


Constructor Summary
QualifiersSelectorAdapter()
          Constructor for QualifierSelectorAdapter.
QualifiersSelectorAdapter(com.sas.iquery.metadata.business.BusinessModel model)
           
QualifiersSelectorAdapter(com.sas.iquery.metadata.business.BusinessQuery query)
           
QualifiersSelectorAdapter(com.sas.iquery.metadata.business.BusinessQuery query, java.util.Map map)
           
 
Method Summary
 void clearButtonText(java.lang.String text)
          Set the text displayed by the "clear" button, e.g.
 com.sas.iquery.metadata.business.BusinessModel getBusinessModel()
          Returns the businessModel.
 com.sas.iquery.metadata.business.BusinessQuery getBusinessQuery()
          Returns the businessQuery.
 java.lang.String getCubeName()
           
 com.sas.iquery.metadata.business.DataItem getDataItem(java.lang.String id)
           
 java.lang.String getDescription(int item)
          The description for an item in the list.
 int getIndexForTreeValue(java.lang.String name)
           
 java.util.Map getInitialValues()
          Get a map containing the initial values for each item.
 java.lang.String getItemName()
          Get the name of the item which the qualifiers apply to, e.g.
 MetadataInterface getMetadata()
           
 java.lang.String getName(int item)
          The display name for an item in the list.
 int getNumberOfItems()
          The number of items in the list.
 java.lang.Object getSelectedNodeFor(int index, javax.swing.tree.TreeModel treemodel)
           
 java.lang.String getSelectedValue(int item)
           
 java.lang.String getSkipItem()
          Get the name of the item to skip in the list of items.
 javax.swing.tree.TreeModel getTreeModel(com.sas.iquery.metadata.business.DataItem dataItem)
           
 javax.swing.tree.TreeModel getTreeModel(DimensionInterface dimension)
           
 javax.swing.tree.TreeModel getTreeModel(int item)
          Returns the TreeModel for an item in the list.
 javax.swing.tree.TreePath getTreePath(int item)
           
 java.lang.String getValue(int item)
          The value for an item in the list.
 void init(java.util.Map map)
           
 void initialValues(java.util.Map values)
          Set the initial values of the items
 boolean isEditOK()
          Returns a status code specifying whether the user OK'ed or cancelled out of editor.
 void itemLabel(java.lang.String label)
          Set the label of the item which the qualifiers apply to, e.g.
 void itemName(java.lang.String name)
          Set the name of the item which the qualifiers apply to, e.g.
 void itemsLabel(java.lang.String label)
          Set the label for the list of items which the qualifiers can be set to, e.g.
 void itemsListHeight(int height)
          Sets the height of the list that displays the items, for Swing only, to be used together with preferredSize().
 void itemsNameColumnLabel(java.lang.String label)
          Set the label of the column of the item names in the list of items, e.g.
 void itemsValueColumnLabel(java.lang.String label)
          Set the label of the column that contains the values of the qualifiers set on the items, in the list of items, e.g.
 void releaseMetadata()
           
 java.util.Map selectedValues()
          Returns the values that have been selected in the editor.
 void setBusinessModel(com.sas.iquery.metadata.business.BusinessModel businessModel)
          Sets the businessModel.
 void setBusinessQuery(com.sas.iquery.metadata.business.BusinessQuery model)
          Sets the businessQuery.
 void setInitialValues(java.util.Map map)
           
 void setItemName(java.lang.String string)
           
 void setSelectedValues(java.util.List newValues)
           
 void setSkipItem(java.lang.String string)
           
 void showEditor(java.lang.Object userData)
          Displays the editor.
 void size(int width, int height)
          Set the size of the dialog being displayed, only for Swing
 void skipItem(java.lang.String itemID)
          Set the index of the item not to be displayed in the list of items.
 

Constructor Detail

QualifiersSelectorAdapter

public QualifiersSelectorAdapter(com.sas.iquery.metadata.business.BusinessQuery query,
                                 java.util.Map map)

QualifiersSelectorAdapter

public QualifiersSelectorAdapter(com.sas.iquery.metadata.business.BusinessQuery query)

QualifiersSelectorAdapter

public QualifiersSelectorAdapter(com.sas.iquery.metadata.business.BusinessModel model)

QualifiersSelectorAdapter

public QualifiersSelectorAdapter()
Constructor for QualifierSelectorAdapter.

Method Detail

init

public void init(java.util.Map map)

getBusinessQuery

public com.sas.iquery.metadata.business.BusinessQuery getBusinessQuery()
Returns the businessQuery.

Returns:
BusinessQuery

setBusinessQuery

public void setBusinessQuery(com.sas.iquery.metadata.business.BusinessQuery model)
Sets the businessQuery.

Parameters:
businessQuery - The businessQuery to set

getBusinessModel

public com.sas.iquery.metadata.business.BusinessModel getBusinessModel()
Returns the businessModel.

Returns:
BusinessModel

setBusinessModel

public void setBusinessModel(com.sas.iquery.metadata.business.BusinessModel businessModel)
Sets the businessModel.

Parameters:
businessModel - The businessModel to set

getCubeName

public java.lang.String getCubeName()

getNumberOfItems

public int getNumberOfItems()
Description copied from interface: QualifiersSelectorInterface
The number of items in the list.

Specified by:
getNumberOfItems in interface com.sas.dataselectors.qualifiers.QualifiersSelectorInterface
Returns:
int
See Also:
QualifiersSelectorInterface.getNumberOfItems()

getName

public java.lang.String getName(int item)
Description copied from interface: QualifiersSelectorInterface
The display name for an item in the list.

Specified by:
getName in interface com.sas.dataselectors.qualifiers.QualifiersSelectorInterface
Parameters:
item - index of the item
Returns:
String The display name for an item in the list.
See Also:
QualifiersSelectorInterface.getName(int)

getDescription

public java.lang.String getDescription(int item)
Description copied from interface: QualifiersSelectorInterface
The description for an item in the list.

Specified by:
getDescription in interface com.sas.dataselectors.qualifiers.QualifiersSelectorInterface
Parameters:
item - index of the item
Returns:
String The description for an item in the list.
See Also:
QualifiersSelectorInterface.getDescription(int)

getValue

public java.lang.String getValue(int item)
Description copied from interface: QualifiersSelectorInterface
The value for an item in the list.

Specified by:
getValue in interface com.sas.dataselectors.qualifiers.QualifiersSelectorInterface
Parameters:
item - index of the item
Returns:
String The value for an item in the list.

getTreeModel

public javax.swing.tree.TreeModel getTreeModel(int item)
Description copied from interface: QualifiersSelectorInterface
Returns the TreeModel for an item in the list.

Specified by:
getTreeModel in interface com.sas.dataselectors.qualifiers.QualifiersSelectorInterface
Parameters:
item - index of the item
Returns:
TreeModel The TreeModel for an item in the list.

getDataItem

public com.sas.iquery.metadata.business.DataItem getDataItem(java.lang.String id)
                                                      throws com.sas.iquery.metadata.MetadataException
Throws:
com.sas.iquery.metadata.MetadataException

getTreeModel

public javax.swing.tree.TreeModel getTreeModel(com.sas.iquery.metadata.business.DataItem dataItem)

getTreeModel

public javax.swing.tree.TreeModel getTreeModel(DimensionInterface dimension)
                                        throws com.sas.iquery.metadata.MetadataException,
                                               OLAPException
Throws:
com.sas.iquery.metadata.MetadataException
OLAPException

getMetadata

public MetadataInterface getMetadata()
                              throws OLAPException,
                                     com.sas.iquery.metadata.MetadataException
Throws:
OLAPException
com.sas.iquery.metadata.MetadataException

releaseMetadata

public void releaseMetadata()

getIndexForTreeValue

public int getIndexForTreeValue(java.lang.String name)
                         throws com.sas.iquery.metadata.MetadataException,
                                OLAPException
Throws:
com.sas.iquery.metadata.MetadataException
OLAPException

getSelectedNodeFor

public java.lang.Object getSelectedNodeFor(int index,
                                           javax.swing.tree.TreeModel treemodel)
                                    throws OLAPException
Throws:
OLAPException

showEditor

public void showEditor(java.lang.Object userData)
Description copied from interface: EditorInterface
Displays the editor. For Swing editors, the userData argument should be used to supply the editor with the parent Frame.

Specified by:
showEditor in interface com.sas.swing.dataselectors.editors.EditorInterface

isEditOK

public boolean isEditOK()
Description copied from interface: EditorInterface
Returns a status code specifying whether the user OK'ed or cancelled out of editor.

Specified by:
isEditOK in interface com.sas.swing.dataselectors.editors.EditorInterface

itemLabel

public void itemLabel(java.lang.String label)
Description copied from interface: QualifiersEditorInterface
Set the label of the item which the qualifiers apply to, e.g. "Based on" or "Where" etc.

Specified by:
itemLabel in interface com.sas.swing.dataselectors.editors.QualifiersEditorInterface
Parameters:
label - - the item's label
See Also:
QualifiersEditorInterface.itemLabel(java.lang.String)

itemName

public void itemName(java.lang.String name)
Description copied from interface: QualifiersEditorInterface
Set the name of the item which the qualifiers apply to, e.g. "Sales_AVG".

Specified by:
itemName in interface com.sas.swing.dataselectors.editors.QualifiersEditorInterface
Parameters:
name - - the item's name.
See Also:
QualifiersEditorInterface.itemName(java.lang.String)

itemsLabel

public void itemsLabel(java.lang.String label)
Description copied from interface: QualifiersEditorInterface
Set the label for the list of items which the qualifiers can be set to, e.g. "For".

Specified by:
itemsLabel in interface com.sas.swing.dataselectors.editors.QualifiersEditorInterface
Parameters:
label - - the items list label
See Also:
QualifiersEditorInterface.itemsLabel(java.lang.String)

itemsNameColumnLabel

public void itemsNameColumnLabel(java.lang.String label)
Description copied from interface: QualifiersEditorInterface
Set the label of the column of the item names in the list of items, e.g. "Data Item".

Specified by:
itemsNameColumnLabel in interface com.sas.swing.dataselectors.editors.QualifiersEditorInterface
See Also:
QualifiersEditorInterface.itemsNameColumnLabel(java.lang.String)

itemsValueColumnLabel

public void itemsValueColumnLabel(java.lang.String label)
Description copied from interface: QualifiersEditorInterface
Set the label of the column that contains the values of the qualifiers set on the items, in the list of items, e.g. "Selected member".

Specified by:
itemsValueColumnLabel in interface com.sas.swing.dataselectors.editors.QualifiersEditorInterface
See Also:
QualifiersEditorInterface.itemsValueColumnLabel(java.lang.String)

clearButtonText

public void clearButtonText(java.lang.String text)
Description copied from interface: QualifiersEditorInterface
Set the text displayed by the "clear" button, e.g. "Clear selection".

Specified by:
clearButtonText in interface com.sas.swing.dataselectors.editors.QualifiersEditorInterface
See Also:
QualifiersEditorInterface.clearButtonText(java.lang.String)

skipItem

public void skipItem(java.lang.String itemID)
Description copied from interface: QualifiersEditorInterface
Set the index of the item not to be displayed in the list of items.

Specified by:
skipItem in interface com.sas.swing.dataselectors.editors.QualifiersEditorInterface
Parameters:
itemID - - The id of the item not to be displayed in the list of items
See Also:
QualifiersEditorInterface.skipItem(java.lang.String)

selectedValues

public java.util.Map selectedValues()
Description copied from interface: QualifiersEditorInterface
Returns the values that have been selected in the editor. In the returned Map there will be an element for each selected item, the element's key will be the unique id of the selected item while the element's value will be the unique id of the selected value.

Specified by:
selectedValues in interface com.sas.swing.dataselectors.editors.QualifiersEditorInterface
Returns:
java.util.Map
See Also:
QualifiersEditorInterface.selectedValues()

initialValues

public void initialValues(java.util.Map values)
Description copied from interface: QualifiersEditorInterface
Set the initial values of the items

Specified by:
initialValues in interface com.sas.swing.dataselectors.editors.QualifiersEditorInterface
Parameters:
values - - The Map containing the initial values for the items. In the Map there is an element for each item that has an initial value, the element's key is the unique id of the item while the element's value is the unique id of the initial value.
See Also:
QualifiersEditorInterface.initialValues(java.util.Map)

size

public void size(int width,
                 int height)
Description copied from interface: QualifiersEditorInterface
Set the size of the dialog being displayed, only for Swing

Specified by:
size in interface com.sas.swing.dataselectors.editors.QualifiersEditorInterface
See Also:
QualifiersEditorInterface.size(int, int)

itemsListHeight

public void itemsListHeight(int height)
Description copied from interface: QualifiersEditorInterface
Sets the height of the list that displays the items, for Swing only, to be used together with preferredSize().

Specified by:
itemsListHeight in interface com.sas.swing.dataselectors.editors.QualifiersEditorInterface
See Also:
QualifiersEditorInterface.itemsListHeight(int)

getInitialValues

public java.util.Map getInitialValues()
Description copied from interface: QualifiersSelectorInterface
Get a map containing the initial values for each item.

Specified by:
getInitialValues in interface com.sas.dataselectors.qualifiers.QualifiersSelectorInterface
Returns:
A map of initial values.

getItemName

public java.lang.String getItemName()
Description copied from interface: QualifiersSelectorInterface
Get the name of the item which the qualifiers apply to, e.g. "Sales_AVG".

Specified by:
getItemName in interface com.sas.dataselectors.qualifiers.QualifiersSelectorInterface
Returns:
the name of the item which the qualifiers apply to, e.g. "Sales_AVG".

getSkipItem

public java.lang.String getSkipItem()
Description copied from interface: QualifiersSelectorInterface
Get the name of the item to skip in the list of items.

Specified by:
getSkipItem in interface com.sas.dataselectors.qualifiers.QualifiersSelectorInterface
Returns:
the name of the item to skip in the list of items.

setInitialValues

public void setInitialValues(java.util.Map map)
Parameters:
map -

setItemName

public void setItemName(java.lang.String string)
Parameters:
string -

setSkipItem

public void setSkipItem(java.lang.String string)
Parameters:
string -

setSelectedValues

public void setSelectedValues(java.util.List newValues)
Specified by:
setSelectedValues in interface com.sas.dataselectors.qualifiers.QualifiersSelectorInterface

getTreePath

public javax.swing.tree.TreePath getTreePath(int item)
Specified by:
getTreePath in interface com.sas.dataselectors.qualifiers.QualifiersSelectorInterface

getSelectedValue

public java.lang.String getSelectedValue(int item)
Specified by:
getSelectedValue in interface com.sas.dataselectors.qualifiers.QualifiersSelectorInterface



Copyright © 2009 SAS Institute Inc. All Rights Reserved.