***  This class is subject to change.  ***

com.sas.iquery.metadata.expr
Class OLAPStringExpressionUtil

com.sas.iquery.metadata.expr.OLAPStringExpressionUtil

public class OLAPStringExpressionUtil

This class provides helper methods for generating string representations of OLAP ExpressionInterface items.


Constructor Summary
OLAPStringExpressionUtil()
           
 
Method Summary
static java.lang.String getReadableText(ExpressionInterface expr)
          Get the String for this expression to be used in an OLAP query, for example, <<DEALERS.DEALERS.DEALER>>.MEMBERS or <<Measures.SALES_SUM>> The output is the same as getText().
static java.lang.String getReadableText(ExpressionInterface expr, java.lang.String startingLevelName)
          Get the String for this expression to be used in an OLAP query, for example, <<DEALERS.DEALERS.DEALER>>.MEMBERS or <<Measures.SALES_SUM>> The output is the same as getText().
 

Constructor Detail

OLAPStringExpressionUtil

public OLAPStringExpressionUtil()
Method Detail

getReadableText

public static java.lang.String getReadableText(ExpressionInterface expr)
                                        throws MetadataException
Get the String for this expression to be used in an OLAP query, for example, <<DEALERS.DEALERS.DEALER>>.MEMBERS or <<Measures.SALES_SUM>> The output is the same as getText().

Parameters:
expr - the expression for which a String representation is returned
Returns:
a String representation for this Expression (If a null expr is passed in null will be returned)
Throws:
MetadataException - on metadata errors

getReadableText

public static java.lang.String getReadableText(ExpressionInterface expr,
                                               java.lang.String startingLevelName)
                                        throws MetadataException
Get the String for this expression to be used in an OLAP query, for example, <<DEALERS.DEALERS.DEALER>>.MEMBERS or <<Measures.SALES_SUM>> The output is the same as getText().

Parameters:
expr - the expression for which a String representation is returned
startingLevelName - specifies an optional level within the hierarchy for returning data
Returns:
a String representation for this Expression (If a null expr is passed in null will be returned)
Throws:
MetadataException - on metadata errors

***  This class is subject to change.  ***




Copyright © 2009 SAS Institute Inc. All Rights Reserved.