All Libraries | This Library | Package | Class | Use | Tree | Deprecated | Index | Grand Index | Help
|  | Query |
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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

## com.sas.iquery.metadata.expr
Class StringExpressionUtil

    com.sas.iquery.metadata.expr.StringExpressionUtil

    @SASScope(value="ALL")
    @SubjectToChange
    public abstract class StringExpressionUtil

Generates the resource-aware ExpressionInterface from string text. The ExpressionInterface thus generated is intended to be used only in a resource aware expression context. This class generates resource aware string representations for various ExpressionInterface implementations. Note: a special "ResourceIdentification" syntax is used to represent Resources in expression strings. See the package.html for more details on how this feature works.

Constructor Summary
`StringExpressionUtil()`

Method Summary
`static StringExpressionUtil` | `getInstance()` Get an StringExpressionUtil instance
`abstract java.lang.String` | `getText(ExpressionInterface expr, ResourceScope scope, BusinessModel businessModel)` Get the Expression String
`abstract ExpressionInterface` | `newExpression(BusinessModel businessModel, java.lang.String expr, int expressionType, ResourceScope scope)` Create a new ExpressionInterface.

Constructor Detail

### StringExpressionUtil

    public StringExpressionUtil()

Method Detail

### getInstance

    public static StringExpressionUtil getInstance()

  Get an StringExpressionUtil instance

  Returns:
    StringExpressionUtil

### newExpression

    public abstract ExpressionInterface newExpression(BusinessModel businessModel,
                                                      java.lang.String expr,
                                                      int expressionType,
                                                      ResourceScope scope)
                                               throws MetadataException

  Create a new ExpressionInterface. If the string contains Resources, Resource Identification is performed.

  Parameters:
    `businessModel` - the BusinessModel which will be used as the context to do resource identification
    `expr` - the String expression
    `expressionType` - a valid expression type
    `scope` - the ResourceScope
  Returns:
    ExpressionInterface specific subtype ResourceAwareStringExpression
  Throws:
    `MetadataException` - on errors Note: In addition to MetadataException the thrown exception may be one of the following subtypes
  See Also:
    `ExpressionTypes`, `ResourceScope`, `ResourceIdentificationException`, `ParseExpressionException`

### getText

    public abstract java.lang.String getText(ExpressionInterface expr,
                                             ResourceScope scope,
                                             BusinessModel businessModel)
                                      throws MetadataException

  Get the Expression String

  Parameters:
    `expr` - the expression to be converted to a String
    `scope` - the ResourceScope if the scope is both business and physical, physical resources will be qualified fully if there are potential name conflicts with business items for example, physical::<<table.column>>
    `businessModel` - the BusinessModel (may be null) if BusinessModel is null and scope is both physical and business physical items will always be qualified with physical::
  Returns:
    a String representation for this Expression (If a null expr is passed in null will be returned)
  Throws:
    `MetadataException` - on metadata errors - Note: in addition to MetadataException, the thrown exception may be a ResourceIdentificationException subtype.
    `ResourceIdentificationException` - Note: if the scope is BUSINESS and a physical expression is passed or if the scope is PHYSICAL and a business expression is passed in, this exception is thrown. This exception is also thrown if an unsupported expression is passed in to this method.

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

All Libraries | This Library | Package | Class | Use | Tree | Deprecated | Index | Grand Index | Help
|  | Query |
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2009 SAS Institute Inc. All Rights Reserved.