Home > Class Reference > ENSLIB namespace > Ens.Rule.Model.expression

Ens.Rule.Model.expression

class Ens.Rule.Model.expression extends %Library.RegisteredObject, %XML.Adaptor, %JSON.Adaptor

model class for an expression

Property Inventory (Including Private)

Method Inventory (Including Private)

Properties (Including Private)

property defaultValue as %String);
Property methods: defaultValueDisplayToLogical(), defaultValueGet(), defaultValueIsValid(), defaultValueLogicalToDisplay(), defaultValueLogicalToOdbc(), defaultValueNormalize(), defaultValueSet()
property errorOffset as %String;
Property methods: errorOffsetDisplayToLogical(), errorOffsetGet(), errorOffsetIsValid(), errorOffsetLogicalToDisplay(), errorOffsetLogicalToOdbc(), errorOffsetNormalize(), errorOffsetSet()
property errorText as %String;
Property methods: errorTextDisplayToLogical(), errorTextGet(), errorTextIsValid(), errorTextLogicalToDisplay(), errorTextLogicalToOdbc(), errorTextNormalize(), errorTextSet()
property operands as list of Ens.Rule.Model.expression;
Property methods: operandsBuildValueArray(), operandsCollectionToDisplay(), operandsCollectionToOdbc(), operandsDisplayToCollection(), operandsGet(), operandsGetObject(), operandsGetObjectId(), operandsGetSwizzled(), operandsIsValid(), operandsOdbcToCollection(), operandsSet(), operandsSetObject(), operandsSetObjectId()
property operator as %String);
Property methods: operatorDisplayToLogical(), operatorGet(), operatorIsValid(), operatorLogicalToDisplay(), operatorLogicalToOdbc(), operatorNormalize(), operatorPrecedence(), operatorPrecedenceLegacy(), operatorSet()
property type as %String);
Property methods: typeDisplayToLogical(), typeGet(), typeIsValid(), typeLogicalToDisplay(), typeLogicalToOdbc(), typeNormalize(), typeSet()
property value as %String);
Property methods: valueDisplayToLogical(), valueGet(), valueIsValid(), valueLogicalToDisplay(), valueLogicalToOdbc(), valueNormalize(), valueSet()
property warningText as %String;
Property methods: warningTextDisplayToLogical(), warningTextGet(), warningTextIsValid(), warningTextLogicalToDisplay(), warningTextLogicalToOdbc(), warningTextNormalize(), warningTextSet()

Methods (Including Private)

private method %OnNew(operator, operands...) as %Status [ Language = objectscript ]
if there is only one argument, then it is set to value property with operator being null and operands being empty if there are more than one argument, then the first one is the operator and the remaining arguments are operands, in this case, value property is empty.
classmethod IsInterpretationChanged(pExpression, pInterpretationOld, pInterpretationNew) as %Boolean [ Language = objectscript ]
This method returns 1 if the expression's intepretation is changed under the new operator precedence order
classmethod addTokenList(tokenList, tokenString, tokenOffset) [ Language = objectscript ]
classmethod addTokenTree(tokenTree, tokenIndex, tokenString, tokenOffset, tokenType) [ Language = objectscript ]
classmethod canAppendToken(currentToken, newToken) as %Boolean [ Language = objectscript ]
method constructAssign(pExpression, variables) as %Status [ Language = objectscript ]
variables(name) contains the list of declared variables
method constructCOS(pExpression, variables) as %Status [ Language = objectscript ]
variables(name) contains the list of declared variables
method constructExpression(pParentOperator="", pLogicalOnly=1) as %String [ Language = objectscript ]
classmethod convertToCOS(pExpression, pExpressionCOS, variables, isAssignProp As %Boolean = 0) as %Status [ Language = objectscript ]
classmethod dumpData(tokenData, description) [ Language = objectscript ]
classmethod getToken(tokenList, tokenCount, tokenString, tokenOffset) as %Boolean [ Language = objectscript ]
classmethod isBinaryOperator(token) as %Boolean [ Language = objectscript ]
classmethod isMultiaryOperator(token) as %Boolean [ Language = objectscript ]
method isSimpleValue() as %Boolean [ Language = objectscript ]
classmethod isUnaryOperator(token) as %Boolean [ Language = objectscript ]
classmethod isValidCollectionsMethod(token) as %Boolean [ Language = objectscript ]
classmethod isValidFunction(token) as %Boolean [ Language = objectscript ]
method makeLogical() as %Status [ Language = objectscript ]
classmethod operatorPrecedence(pOperator) as %String [ Language = objectscript ]
classmethod operatorPrecedenceLegacy(pOperator) as %String [ Language = objectscript ]
classmethod parse(pExpression As %String, pObject As Ens.Rule.Model.expression, pLogicalOnly As %Boolean) as %Status [ Language = objectscript ]
This method is called by the Portal to parse an expression string When encountering syntax error, it returns an value object with errorText and errorOffset
classmethod parseExpression(pExpression As %String, pObject As Ens.Rule.Model.expression, pAllowNullOperand=0, pUseLegacyOperatorPrecedence=0) as %Status [ Language = objectscript ]
This method parses an expressions string and outputs the model object by reference It returns a error status code if there are syntax errors If pAllowNullOperand is true, the expression will allow "()" as place holder for empty operands If pUseLegacyOperatorPrecedence is true, the parser will use legacy operator precedence
classmethod parseToken(tokenList, tokenCount, pObject, pTokenOffset, pAllowNullOperand, pUseLegacyOperatorPrecedence) as %Status [ Language = objectscript ]
parseToken accepts tokenList which is a linear list of all tokens 1) It first converts tokenList to tokenTree by resolving nested structures. 2) At each heiarchical level, tokenTree contains a flat structure of operands, binary operators, unary operators, functions and arguments 3) We resolve functions into on single model object 4) We resolve unary operators into model objects 5) At each binary operator preceence level, from high to low, we combining tokens into binary or multiary model objects
classmethod test(pExpression, variables, pLogicalOnly=0, pAllowNullOperand=0, pUseLegacyOperatorPrecedence=0) as %Status [ Language = objectscript ]
classmethod tokenize(pExpression, tokenList) as %Status [ Language = objectscript ]
method typeGet() as %String [ Language = objectscript ]

Inherited Members

Inherited Methods (Including Private)

Feedback