Class WebXMLBuilder

  • Direct Known Subclasses:
    RWDelta

    public class WebXMLBuilder
    extends XMLStateSerializer
    This class extends XMLBuilder functionality with services specific for Microstrategy XML format.
    Since:
    MicroStrategy Web 7.3.1 or earlier
    • Constructor Detail

      • WebXMLBuilder

        public WebXMLBuilder()
        Default constructor
      • WebXMLBuilder

        public WebXMLBuilder​(int _bufSize)
        Constructs the instance with specified buffer size.
        Parameters:
        _bufSize - the initial buffer size
      • WebXMLBuilder

        public WebXMLBuilder​(int _bufSize,
                             boolean _encode)
        Constructs the instance with specified buffer size and encoding flag.
        Parameters:
        _bufSize - the initial buffer size
        _encode - flag indicating that XML must be encodded
      • WebXMLBuilder

        public WebXMLBuilder​(java.lang.StringBuffer _buf)
        Constructs the instance with specified buffer. Used for building embeded objects XML
        Parameters:
        _buf - the bufer where to store XML
      • WebXMLBuilder

        public WebXMLBuilder​(java.lang.StringBuffer _buf,
                             boolean _encode)
        Constructs the instance with specified buffer. Used for building embeded objects XML
        Parameters:
        _buf - the bufer where to store XML
        _encode - flag indicating that XML must be encodded
    • Method Detail

      • reset

        public void reset()
        Description copied from class: XMLBuilder
        Cleanups the buffer and the stack so the builder can be reused for building another XML.
        Overrides:
        reset in class XMLBuilder
      • getId

        public final java.lang.String getId()
        Use this method to obtain unique IDs for objects embedded in the XML. This IDs are used in id and rfd attributes.
        Returns:
        the next ID value
      • addAttributes

        public WebXMLBuilder addAttributes​(com.microstrategy.web.objects.AttrList attrs)
                                    throws XMLBuilderException
        Adds all attributes from the attrs to the current element
        Parameters:
        attrs - attribute list
        Returns:
        this
        Throws:
        XMLBuilderException
      • addOi

        public WebXMLBuilder addOi​(java.lang.String id,
                                   com.microstrategy.web.objects.AttrList attrs)
        Adds oi child element to the current element
        Parameters:
        id - a value for the id attribute
        attrs - other attributes
        Returns:
        this
      • addOiSibling

        public WebXMLBuilder addOiSibling​(java.lang.String id,
                                          com.microstrategy.web.objects.AttrList attrs)
        Adds oi sibleng element to the current element
        Parameters:
        id - a value for the id attribute
        attrs - other attributes
        Returns:
        this
      • addMiInOi

        public WebXMLBuilder addMiInOi​(java.lang.String id,
                                       com.microstrategy.web.objects.AttrList attrs)
        Adds chain of mi, in and oi elements to the current element
        Parameters:
        id - a value for the id attribute
        attrs - other attributes
        Returns:
        this
      • addTextOptionToNode

        public void addTextOptionToNode​(java.lang.String nodeName,
                                        java.lang.String text)
        Add a text node with its parent node's name
        Parameters:
        nodeName - parent node name.
        text - The text for the text node.