com.sas.dataselectors.filters.timebased.olap
Class OLAPTimeFilterUtil

com.sas.dataselectors.filters.timebased.olap.OLAPTimeFilterUtil

public class OLAPTimeFilterUtil


Field Summary
static java.lang.String OLAP_RELATIVE_TIME_CONDITION_CLASS_NAME
           
static java.lang.String RB_KEY
           
 
Constructor Summary
OLAPTimeFilterUtil()
           
 
Method Summary
static java.lang.String capitalize(java.lang.String s)
          Capitalizes the first letter of a string
static LevelInterface getLevel(java.lang.Object model, MetadataInterface metadata, java.lang.String cubeName, java.lang.String uniqueLevelName, java.lang.String uniqueMemberName)
          Returns a LevelInterface object given either a uniqueLevelName or a uniqueMemberName.
static java.util.List getReadableTextForTimeLevel(java.lang.Object model, MetadataInterface metadata, java.lang.String cubeName, java.lang.String uniqueLevelName, java.lang.String uniqueMemberName)
           
static java.util.List getReadableTextForTimeLevel(java.lang.Object model, MetadataInterface metadata, java.lang.String cubeName, java.lang.String uniqueLevelName, java.lang.String uniqueMemberName, java.util.Locale locale)
          Returns a List containing the singular and plural readable text for a time level (e.g.
static java.lang.Object getTestNodeValueObject(FilterLogicTestNodeInterface filterLogicTestNode)
          Returns the 'data' property of the first value found in the given test node.
static boolean isOLAPRelativeTimeCondition(boolean isFullSearch, AdvancedFilterModelInterface validModel, java.lang.String selectedCondition)
          Returns true if the condition is an OLAP relative time condition, false otherwise.
static boolean isOLAPRelativeTimeCondition(FilterLogicTestNodeInterface filterLogicTestNode)
           
static boolean isOLAPRelativeTimeFilterToApply(FilterableListModelInterface aModel)
          Returns true if any of the data items has an associated OLAP Relative Time Filter to apply, false otherwise.
static boolean isOLAPRetiveTimeFilterNewDefinition(AdvancedFilterModelInterface advancedFilterModel)
          Returns true if we are defining an OLAP relative time filter for the first time on the current dataitem, flase otherwise.
 

Field Detail

RB_KEY

public static final java.lang.String RB_KEY
See Also:
Constant Field Values

OLAP_RELATIVE_TIME_CONDITION_CLASS_NAME

public static java.lang.String OLAP_RELATIVE_TIME_CONDITION_CLASS_NAME
Constructor Detail

OLAPTimeFilterUtil

public OLAPTimeFilterUtil()
Method Detail

getReadableTextForTimeLevel

public static java.util.List getReadableTextForTimeLevel(java.lang.Object model,
                                                         MetadataInterface metadata,
                                                         java.lang.String cubeName,
                                                         java.lang.String uniqueLevelName,
                                                         java.lang.String uniqueMemberName)

getReadableTextForTimeLevel

public static java.util.List getReadableTextForTimeLevel(java.lang.Object model,
                                                         MetadataInterface metadata,
                                                         java.lang.String cubeName,
                                                         java.lang.String uniqueLevelName,
                                                         java.lang.String uniqueMemberName,
                                                         java.util.Locale locale)
Returns a List containing the singular and plural readable text for a time level (e.g. (year, years) or (minute, minutes) Either the uniqueLevelName or the uniqueMemberName must be provided, but both are not required.


getLevel

public static LevelInterface getLevel(java.lang.Object model,
                                      MetadataInterface metadata,
                                      java.lang.String cubeName,
                                      java.lang.String uniqueLevelName,
                                      java.lang.String uniqueMemberName)
Returns a LevelInterface object given either a uniqueLevelName or a uniqueMemberName. Either the uniqueLevelName or the uniqueMemberName must be provided, but both are not required.


capitalize

public static java.lang.String capitalize(java.lang.String s)
Capitalizes the first letter of a string


isOLAPRelativeTimeCondition

public static boolean isOLAPRelativeTimeCondition(boolean isFullSearch,
                                                  AdvancedFilterModelInterface validModel,
                                                  java.lang.String selectedCondition)
Returns true if the condition is an OLAP relative time condition, false otherwise.

Parameters:
isFullSearch - true to check first the currently selected condition and then, if it's not an OLAP relative time condition, check the condition associated to the currently active dataitem, false to check only the currently selected condition.
validModel - the AdvancedFilterModelInterface used to get the condition to check, it null, false is returned.
selectedCondition - the currently selected condition, if null and isFullSearch only checks the the currently selected condition, if null and not isFullSearch checks nothing and returns false.
Returns:
true if the current selected condition for the current selected item is an OLAP relative time condition, false otherwise.

isOLAPRelativeTimeCondition

public static boolean isOLAPRelativeTimeCondition(FilterLogicTestNodeInterface filterLogicTestNode)

isOLAPRelativeTimeFilterToApply

public static boolean isOLAPRelativeTimeFilterToApply(FilterableListModelInterface aModel)
Returns true if any of the data items has an associated OLAP Relative Time Filter to apply, false otherwise.

Parameters:
aModel - the FilterableListModelInterface used to get the list of the filterable data tiems to check.
Returns:
true if any of the data items has an associated OLAP Relative Time Filter to apply, false otherwise.

getTestNodeValueObject

public static java.lang.Object getTestNodeValueObject(FilterLogicTestNodeInterface filterLogicTestNode)
Returns the 'data' property of the first value found in the given test node. This method returns null if the test node is null or its value list:

Parameters:
filterLogicTestNode - the test node to examine
Returns:
the 'values' Object associated with the given test node
See Also:
FilterValueInterface

isOLAPRetiveTimeFilterNewDefinition

public static boolean isOLAPRetiveTimeFilterNewDefinition(AdvancedFilterModelInterface advancedFilterModel)
Returns true if we are defining an OLAP relative time filter for the first time on the current dataitem, flase otherwise.

Parameters:
advancedFilterModel - the AdvancedFilterModelInterface used to get the current data item and its current condition.
Returns:
true if we are defining an OLAP relative time filter for the first time on the current dataitem, flase otherwise.



Copyright © 2009 SAS Institute Inc. All Rights Reserved.