Class ExpressionPlainTextTransform
- java.lang.Object
-
- com.microstrategy.web.transform.AbstractTransform
-
- com.microstrategy.web.app.transforms.AbstractExpressionTransform
-
- com.microstrategy.web.app.transforms.ExpressionPlainTextTransform
-
- All Implemented Interfaces:
ExpressionMessages
,Transform
public class ExpressionPlainTextTransform extends AbstractExpressionTransform
Creates consistent text for expressions- Since:
- MicroStrategy Web 7.3.1 or earlier
-
-
Field Summary
Fields Modifier and Type Field Description static int
FLAT
Flag indicating render mode value for flat output.static int
INDENTED
Flag indicating render mode value for indented output.-
Fields inherited from class com.microstrategy.web.app.transforms.AbstractExpressionTransform
exprOb
-
Fields inherited from interface com.microstrategy.web.app.transforms.ExpressionMessages
DM_DEFAULT_LVL, DM_PREF_BREAKBY, DM_PREF_EVALSET, DM_PREF_SETOF, DM_RPT_BASE_LVL, DM_RPT_LVL, DM_UNKNOWN_LVL, DM_WHERE, FN_APPLY_AGGREGATION, FN_APPLY_COMPARISON, FN_APPLY_LOGIC, FN_APPLY_RELATIVE, FN_APPLY_SYMPLE, MRP_BETWEEN, MRP_EQUAL, MRP_EXCL_HIGHEST, MRP_EXCL_LOWEST, MRP_HIGHEST, MRP_LOWEST, MRP_NOT_BETWEEN, MRP_NOT_EQUAL, MRP_PERCENT, MRP_PERCENT_TEMPLATE, MRP_RANK, MRP_RANK_TEMPLATE, OP_AND, OP_BEGINS_WITH, OP_BETWEEN, OP_CONTAINS, OP_DIVIDE, OP_ENDS_WITH, OP_EQUAL, OP_GREATER, OP_GREATER_EQUAL, OP_IN, OP_IN_LIST, OP_IS_NOT_NULL, OP_IS_NULL, OP_LESS, OP_LESS_EQUAL, OP_LIKE, OP_MINUS, OP_NOT, OP_NOT_BEGINS_WITH, OP_NOT_BETWEEN, OP_NOT_CONTAINS, OP_NOT_ENDS_WITH, OP_NOT_EQUAL, OP_NOT_IN, OP_NOT_IN_LIST, OP_NOT_LIKE, OP_OR, OP_PLUS, OP_TIMES
-
-
Constructor Summary
Constructors Constructor Description ExpressionPlainTextTransform()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
doTransform(MarkupOutput transOut)
this function checks transform type and triggers corresponding function, either render a flat or indented expression.protected void
doTransform(WebNode node, MarkupOutput transOut)
this function checks transform type and triggers corresponding function, either render a flat or indented expression.java.lang.String
getDescription()
this function returns class description only.Messages
getMessages()
this function returns an instance of Messages object to be used for getting localized descriptors.protected java.lang.String
getOperatorText(WebNode node)
function to retrieve localized text for given operator node.protected boolean
isRootNodeANotOp()
Indicates whether or not given Root node has only one operator node and it's either a 'Is Null' or 'Is Not Null' op.void
renderFlatString(MarkupOutput transOut, WebNode node)
this function is in charge or rendering a flat expression text.protected void
renderFlatString(MarkupOutput transOut, WebNode node, int deepLevel)
void
renderIndentedString(MarkupOutput transOut, WebNode node, int deepLevel)
this function will render an indented expression text.void
renderOperatorDesc(MarkupOutput transOut, java.lang.String nodeOpTxt, java.lang.String tabSeparator, java.lang.String postSeparator)
Renders description for given operator node.void
renderTupleNodeString(MarkupOutput transOut, WebNode node)
This method renders the children of the Tuple Node using the Including and Excluding text.void
setBreakSeparator(java.lang.String breakStr)
this function is intended to set break separator.void
setEncodeText(boolean value)
This function sets the property to encode characters in the text.void
setExpandEmbeddedFilter(boolean value)
This function sets the property to expand embedded filters in expression.void
setExpressionObj(ExpressionObject expObj)
this function is intended to set Expression object needed for rendering expression texts.void
setMessages(Messages mssgs)
function for setting messages object used for getting localized messages or text.void
setTabSeparator(java.lang.String tabStr)
this function is intended to set tab separator.void
setTransformType(int type)
this function is intended to set transform style, either flat or indented.-
Methods inherited from class com.microstrategy.web.app.transforms.AbstractExpressionTransform
getExpressionParts, getExpressionStr, getSupportedBeanType, newExpressionParts, setShowDynamicDatesAsStatic, setUseMathOperators, showDynamicDatesAsStatic, transform, useMathOperators
-
Methods inherited from class com.microstrategy.web.transform.AbstractTransform
addFormalParam, canTransform, getEvents, getFormalParams, getID, getPreview, isPreviewAvailable, isResolved, removeFormalParam, setAnnotation, setDeprecated, supports, supports
-
-
-
-
Field Detail
-
FLAT
public static final int FLAT
Flag indicating render mode value for flat output.- See Also:
- Constant Field Values
-
INDENTED
public static final int INDENTED
Flag indicating render mode value for indented output.- See Also:
- Constant Field Values
-
-
Method Detail
-
doTransform
protected void doTransform(WebNode node, MarkupOutput transOut)
this function checks transform type and triggers corresponding function, either render a flat or indented expression.- Parameters:
node
- node where transform will be applied to.transOut
-MarkupOutput
instance that will be the output by this transform
-
doTransform
protected void doTransform(MarkupOutput transOut)
this function checks transform type and triggers corresponding function, either render a flat or indented expression. This function takes current active node and from there transform takes place- Specified by:
doTransform
in classAbstractExpressionTransform
- Parameters:
transOut
-MarkupOutput
instance that will be the output by this transform
-
renderTupleNodeString
public void renderTupleNodeString(MarkupOutput transOut, WebNode node)
This method renders the children of the Tuple Node using the Including and Excluding text. It uses parent class getExpressionStr method for transforming node expression into flat text.- Parameters:
transOut
-MarkupOutput
instance that will be the output by this transformnode
- node where transform will be applied to.- Since:
- MicroStrategy Web 8.0.1
-
renderFlatString
public void renderFlatString(MarkupOutput transOut, WebNode node)
this function is in charge or rendering a flat expression text. It uses parent class getExpressionStr method for transforming node expression into flat text.- Parameters:
transOut
-MarkupOutput
instance that will be the output by this transformnode
- node where transform will be applied to.
-
renderFlatString
protected void renderFlatString(MarkupOutput transOut, WebNode node, int deepLevel)
- Since:
- MicroStrategy Web 8.0.0
-
isRootNodeANotOp
protected boolean isRootNodeANotOp()
Indicates whether or not given Root node has only one operator node and it's either a 'Is Null' or 'Is Not Null' op.- Returns:
- boolean true if root node is 'Not null' or 'Null'
- Since:
- MicroStrategy Web 7.5.4
-
renderIndentedString
public void renderIndentedString(MarkupOutput transOut, WebNode node, int deepLevel)
this function will render an indented expression text. It'll use formal parameters for separators characters.- Parameters:
transOut
-MarkupOutput
instance that will be the output by this transformnode
- parent node that defines the given sub expression.deepLevel
- level where to start parsing sub expression
-
renderOperatorDesc
public void renderOperatorDesc(MarkupOutput transOut, java.lang.String nodeOpTxt, java.lang.String tabSeparator, java.lang.String postSeparator)
Renders description for given operator node.- Parameters:
transOut
- MarkupOutputnodeOpTxt
- String descriptor corresponding to given op Id.tabSeparator
- StringpostSeparator
- String- Since:
- MicroStrategy Web 7.5.4
-
setExpressionObj
public void setExpressionObj(ExpressionObject expObj) throws WebException
this function is intended to set Expression object needed for rendering expression texts. This transform property needs to be set previous to any transform call.- Parameters:
expObj
- instance of ExpressionObject needed for transforming node expression text- Throws:
WebException
-
setExpandEmbeddedFilter
public void setExpandEmbeddedFilter(boolean value)
This function sets the property to expand embedded filters in expression.- Parameters:
value
- boolean determines whether or not to expand an embedded filter.
-
setEncodeText
public void setEncodeText(boolean value)
This function sets the property to encode characters in the text. If not set, text will not be encoded.- Parameters:
value
- boolean determines whether or not to encoed text in the expression.- Since:
- MicroStrategy Web 8.0.2
-
setBreakSeparator
public void setBreakSeparator(java.lang.String breakStr)
this function is intended to set break separator. If not set, default character will be used.- Parameters:
breakStr
- string to be used as separator.
-
setTabSeparator
public void setTabSeparator(java.lang.String tabStr)
this function is intended to set tab separator. If not set, default character will be used.- Parameters:
tabStr
- string to be used as separator.
-
setTransformType
public void setTransformType(int type)
this function is intended to set transform style, either flat or indented. If not set, default flat value will be used.- Parameters:
type
- transform style to be used.
-
getDescription
public java.lang.String getDescription()
this function returns class description only.- Returns:
- String class description.
-
getMessages
public Messages getMessages()
this function returns an instance of Messages object to be used for getting localized descriptors.- Returns:
- Messages class for getting localized descriptors.
-
setMessages
public void setMessages(Messages mssgs)
function for setting messages object used for getting localized messages or text.- Parameters:
mssgs
- localized instance of Messages
-
getOperatorText
protected java.lang.String getOperatorText(WebNode node)
function to retrieve localized text for given operator node.- Parameters:
node
- operator node where to get operator text- Returns:
- String operator text
-
-