Class DefaultSaxWriter

java.lang.Object
mondrian.xmla.impl.DefaultSaxWriter
All Implemented Interfaces:
SaxWriter

public class DefaultSaxWriter extends Object implements SaxWriter
Default implementation of SaxWriter.
Since:
27 April, 2003
Author:
jhyde, Gang Chen
  • Constructor Details

  • Method Details

    • characters

      public void characters(String s)
      Specified by:
      characters in interface SaxWriter
    • startSequence

      public void startSequence(String name, String subName)
      Description copied from interface: SaxWriter
      Informs the writer that a sequence of elements of the same name is starting.

      For XML, is equivalent to startElement(name).

      For JSON, initiates the array construct:

      "name" : [
        { ... },
        { ... }
      ]
      Specified by:
      startSequence in interface SaxWriter
      Parameters:
      name - Element name
      subName - Child element name
    • endSequence

      public void endSequence()
      Description copied from interface: SaxWriter
      Informs the writer that a sequence of elements of the same name has ended.
      Specified by:
      endSequence in interface SaxWriter
    • textElement

      public final void textElement(String name, Object data)
      Description copied from interface: SaxWriter
      Generates a text-only element, <name>data</name>.

      For XML, this is equivalent to

      startElement(name);
      characters(data);
      endElement();
      but for JSON, generates "name": "data".
      Specified by:
      textElement in interface SaxWriter
      Parameters:
      name - Name of element
      data - Text content of element
    • element

      public void element(String tagName, Object... attributes)
      Specified by:
      element in interface SaxWriter
    • startElement

      public void startElement(String tagName)
      Specified by:
      startElement in interface SaxWriter
    • startElement

      public void startElement(String tagName, Object... attributes)
      Specified by:
      startElement in interface SaxWriter
    • endElement

      public void endElement()
      Specified by:
      endElement in interface SaxWriter
    • startDocument

      public void startDocument()
      Specified by:
      startDocument in interface SaxWriter
    • endDocument

      public void endDocument()
      Specified by:
      endDocument in interface SaxWriter
    • completeBeforeElement

      public void completeBeforeElement(String tagName)
      Specified by:
      completeBeforeElement in interface SaxWriter
    • verbatim

      public void verbatim(String text)
      Description copied from interface: SaxWriter
      Sends a piece of text verbatim through the writer. It must be a piece of well-formed XML.
      Specified by:
      verbatim in interface SaxWriter
    • flush

      public void flush()
      Description copied from interface: SaxWriter
      Flushes any unwritten output.
      Specified by:
      flush in interface SaxWriter