public class

ExpressionPlainTextTransform

extends AbstractExpressionTransform
java.lang.Object
   ↳ com.microstrategy.web.transform.AbstractTransform
     ↳ com.microstrategy.web.app.transforms.AbstractExpressionTransform
       ↳ com.microstrategy.web.app.transforms.ExpressionPlainTextTransform

Class Overview

Creates consistent text for expressions

Summary

Constants
int FLAT Flag indicating render mode value for flat output.
int INDENTED Flag indicating render mode value for indented output.
[Expand]
Inherited Constants
From interface com.microstrategy.web.app.transforms.ExpressionMessages
[Expand]
Inherited Fields
From class com.microstrategy.web.app.transforms.AbstractExpressionTransform
Public Constructors
ExpressionPlainTextTransform()
Public Methods
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.
void renderFlatString(MarkupOutput transOut, WebNode node)
this function is in charge or rendering a flat expression text.
void renderIndentedString(MarkupOutput transOut, WebNode node, int deepLevel)
this function will render an indented expression text.
void renderOperatorDesc(MarkupOutput transOut, String nodeOpTxt, String tabSeparator, 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(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(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.
Protected Methods
void doTransform(MarkupOutput transOut)
this function checks transform type and triggers corresponding function, either render a flat or indented expression.
void doTransform(WebNode node, MarkupOutput transOut)
this function checks transform type and triggers corresponding function, either render a flat or indented expression.
String getOperatorText(WebNode node)
function to retrieve localized text for given operator node.
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, int deepLevel)
[Expand]
Inherited Methods
From class com.microstrategy.web.app.transforms.AbstractExpressionTransform
From class com.microstrategy.web.transform.AbstractTransform
From class java.lang.Object
From interface com.microstrategy.web.transform.Transform

Constants

public static final int FLAT

Flag indicating render mode value for flat output.

Constant Value: 1 (0x00000001)

public static final int INDENTED

Flag indicating render mode value for indented output.

Constant Value: 2 (0x00000002)

Public Constructors

public ExpressionPlainTextTransform ()

Public Methods

public String getDescription ()

this function returns class description only.

Returns
  • String class description.

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.

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 transform
node node where transform will be applied to.

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 transform
node parent node that defines the given sub expression.
deepLevel level where to start parsing sub expression

public void renderOperatorDesc (MarkupOutput transOut, String nodeOpTxt, String tabSeparator, String postSeparator)

Renders description for given operator node.

Parameters
transOut MarkupOutput
nodeOpTxt String descriptor corresponding to given op Id.
tabSeparator String
postSeparator String

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 transform
node node where transform will be applied to.

public void setBreakSeparator (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.

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.

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.

public void setExpressionObj (ExpressionObject expObj)

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

public void setMessages (Messages mssgs)

function for setting messages object used for getting localized messages or text.

Parameters
mssgs localized instance of Messages

public void setTabSeparator (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.

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.

Protected Methods

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

Parameters
transOut MarkupOutput instance that will be the output by this transform

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

protected 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

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'

protected void renderFlatString (MarkupOutput transOut, WebNode node, int deepLevel)