Class ExpressionPlainTextTransform

    • 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
    • Constructor Detail

      • ExpressionPlainTextTransform

        public ExpressionPlainTextTransform()
    • 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 class AbstractExpressionTransform
        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 transform
        node - 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 transform
        node - 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 transform
        node - 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 - MarkupOutput
        nodeOpTxt - String descriptor corresponding to given op Id.
        tabSeparator - String
        postSeparator - 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