Skip to main content

Ens.Rule.Model.expression

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

model class for an expression

Property Inventory

Method Inventory

Properties

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(), operatorSet()
property type as %String (%JSONINCLUDE = "NONE");
Property methods: typeDisplayToLogical(), 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

classmethod IsInterpretationChanged(pExpression, pInterpretationOld, pInterpretationNew) as %Boolean
This method returns 1 if the expression's intepretation is changed under the new operator precedence order
classmethod addTokenList(tokenList, tokenString, tokenOffset)
classmethod addTokenTree(tokenTree, tokenIndex, tokenString, tokenOffset, tokenType)
classmethod canAppendToken(currentToken, newToken) as %Boolean
method constructAssign(pExpression, variables) as %Status
variables(name) contains the list of declared variables
method constructCOS(pExpression, variables) as %Status
variables(name) contains the list of declared variables
method constructExpression(pParentOperator="", pLogicalOnly=1) as %String
classmethod convertToCOS(pExpression, pExpressionCOS, variables, isAssignProp As %Boolean = 0) as %Status
classmethod dumpData(tokenData, description)
classmethod getToken(tokenList, tokenCount, tokenString, tokenOffset) as %Boolean
classmethod isBinaryOperator(token) as %Boolean
classmethod isMultiaryOperator(token) as %Boolean
method isSimpleValue() as %Boolean
classmethod isUnaryOperator(token) as %Boolean
classmethod isValidCollectionsMethod(token) as %Boolean
classmethod isValidFunction(token) as %Boolean
method makeLogical() as %Status
classmethod operatorPrecedence(pOperator) as %String
classmethod operatorPrecedenceLegacy(pOperator) as %String
classmethod parse(pExpression As %String, pObject As Ens.Rule.Model.expression, pLogicalOnly As %Boolean) as %Status
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
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
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 precedence 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
classmethod tokenize(pExpression, tokenList) as %Status
method typeGet() as %String

Inherited Members

Inherited Methods

FeedbackOpens in a new tab