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

com.sas.iquery.metadata.expr
Class StringExpression

com.sas.iquery.metadata.expr.StringExpression
All Implemented Interfaces:
Base, BusinessModelResourceReferencer, ModelItem, UsabilityInterface, ExpressionInterface, PropertyChangeListenee, java.beans.PropertyChangeListener, java.lang.Cloneable, java.util.EventListener
Direct Known Subclasses:
ResourceAwareStringExpression

public class StringExpression
implements ExpressionInterface, BusinessModelResourceReferencer

Models expressions that are not modeled in more detail by other classes. In this sense, it is the "catch-all" model for expressions not modeled otherwise. For example, the scalar expression A*B can be modeled either with the FunctionCall class or with this class. (Note that a similar A>B is modeled by the SimpleConditionalExpression_Comparison class.) As we add more detailed modeling of our expressions, use of this class may diminish.


Field Summary
 
Fields inherited from interface com.sas.iquery.metadata.business.ModelItem
EVENT_OBJECT_PROPERTY_CHANGED
 
Fields inherited from interface com.sas.iquery.metadata.business.Base
EVENT_OBJECT_DEFINITION_CHANGED
 
Constructor Summary
StringExpression()
           
 
Method Summary
 boolean containsAggregateFunction(ServerProperties serverProperties)
          Checks to see if the text contains one of the server's aggregate functions
 int getExpressionType()
          Returns an expression type from the values in class ExpressionTypes
 java.lang.String getText()
          Returns the text for this expression.
 boolean isCalculatedItem()
          Checks whether a StringExpression is a calculated item
 void setExpressionType(int expressionType)
          Sets the expression type with a value from class ExpressionTypes
 void setText(java.lang.String text)
          Sets the expression text to the given string
 
Methods inherited from interface com.sas.iquery.metadata.business.BusinessModelResourceReferencer
getResources
 
Methods inherited from interface com.sas.iquery.metadata.PropertyChangeListenee
addListener, getListeners, removeListener
 
Methods inherited from interface com.sas.iquery.metadata.business.UsabilityInterface
getReasonsUnusable, isUsableInQuery
 

Constructor Detail

StringExpression

public StringExpression()
Method Detail

getText

public java.lang.String getText()
                         throws MetadataException
Returns the text for this expression. The expression text is a string containing the expression which is of a specific syntax that provides for identification of resource locations within the string.

Returns:
String
Throws:
MetadataException

setText

public void setText(java.lang.String text)
Sets the expression text to the given string

Parameters:
text - the text string to set on this expression

getExpressionType

public int getExpressionType()
Returns an expression type from the values in class ExpressionTypes

Specified by:
getExpressionType in interface ExpressionInterface
Returns:
int representing the expression type

setExpressionType

public void setExpressionType(int expressionType)
Sets the expression type with a value from class ExpressionTypes

Parameters:
expressionType - the given expression type to set

containsAggregateFunction

public boolean containsAggregateFunction(ServerProperties serverProperties)
                                  throws MetadataException
Checks to see if the text contains one of the server's aggregate functions

Parameters:
serverProperties - - ServerProperties containing a server's function lists
Returns:
boolean - true if one of the server's aggregate functions was found in the text
Throws:
MetadataException

isCalculatedItem

public boolean isCalculatedItem()
Checks whether a StringExpression is a calculated item

Returns:
true if it is a calculated item, false otherwise

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




Copyright © 2009 SAS Institute Inc. All Rights Reserved.