|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectmondrian.xmla.impl.DefaultSaxWriter
public class DefaultSaxWriter
Default implementation of SaxWriter.
| Nested Class Summary | |
|---|---|
static class |
DefaultSaxWriter.StringAttributes
List of SAX attributes based upon a string array. |
| Constructor Summary | |
|---|---|
DefaultSaxWriter(OutputStream stream)
Creates a DefaultSaxWriter writing to an OutputStream. |
|
DefaultSaxWriter(OutputStream stream,
String xmlEncoding)
|
|
DefaultSaxWriter(PrintWriter writer,
int initialIndent)
Creates a DefaultSaxWriter writing to a PrintWriter. |
|
DefaultSaxWriter(Writer writer)
Creates a SAXWriter writing to a Writer. |
|
| Method Summary | |
|---|---|
void |
characters(String s)
|
void |
completeBeforeElement(String tagName)
|
void |
element(String tagName,
Object... attributes)
|
void |
endDocument()
|
void |
endElement()
|
void |
endSequence()
Informs the writer that a sequence of elements of the same name has ended. |
void |
flush()
Flushes any unwritten output. |
void |
startDocument()
|
void |
startElement(String tagName)
|
void |
startElement(String tagName,
Object... attributes)
|
void |
startSequence(String name,
String subName)
Informs the writer that a sequence of elements of the same name is starting. |
void |
textElement(String name,
Object data)
Generates a text-only element, <name>data</name>. |
void |
verbatim(String text)
Sends a piece of text verbatim through the writer. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DefaultSaxWriter(OutputStream stream)
OutputStream.
public DefaultSaxWriter(OutputStream stream,
String xmlEncoding)
throws UnsupportedEncodingException
UnsupportedEncodingExceptionpublic DefaultSaxWriter(Writer writer)
SAXWriter writing to a Writer.
If writer is a PrintWriter,
DefaultSaxWriter(java.io.OutputStream) is preferred.
public DefaultSaxWriter(PrintWriter writer,
int initialIndent)
PrintWriter.
writer - initialIndent - | Method Detail |
|---|
public void characters(String s)
characters in interface SaxWriter
public void startSequence(String name,
String subName)
SaxWriterFor XML, is equivalent to startElement(name).
For JSON, initiates the array construct:
"name" : [
{ ... },
{ ... }
]
startSequence in interface SaxWritername - Element namesubName - Child element namepublic void endSequence()
SaxWriter
endSequence in interface SaxWriter
public final void textElement(String name,
Object data)
SaxWriter<name>data</name>.
For XML, this is equivalent to
startElement(name);
characters(data);
endElement();
but for JSON, generates "name": "data".
textElement in interface SaxWritername - Name of elementdata - Text content of element
public void element(String tagName,
Object... attributes)
element in interface SaxWriterpublic void startElement(String tagName)
startElement in interface SaxWriter
public void startElement(String tagName,
Object... attributes)
startElement in interface SaxWriterpublic void endElement()
endElement in interface SaxWriterpublic void startDocument()
startDocument in interface SaxWriterpublic void endDocument()
endDocument in interface SaxWriterpublic void completeBeforeElement(String tagName)
completeBeforeElement in interface SaxWriterpublic void verbatim(String text)
SaxWriter
verbatim in interface SaxWriterpublic void flush()
SaxWriter
flush in interface SaxWriter
|
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||