Class WikiWriter
- java.lang.Object
-
- org.nuxeo.ecm.platform.rendering.wiki.WikiWriter
-
- All Implemented Interfaces:
WikiText,org.wikimodel.wem.IWikiPrinter
- Direct Known Subclasses:
WikiBlockWriter
public class WikiWriter extends Object implements org.wikimodel.wem.IWikiPrinter, WikiText
Special writer used to split the serialization result in dynamic or static segments. This way we can generate final output after parsing the entire file. This is needed for example to generate TOC.- Author:
- Bogdan Stefanescu
-
-
Field Summary
Fields Modifier and Type Field Description protected List<WikiText>dynamicSegmentsprotected static StringLINE_SEPprotected static Loglogprotected WikiWriterparentprotected StringBuildersbprotected List<String>segments
-
Constructor Summary
Constructors Constructor Description WikiWriter()WikiWriter(WikiWriter parent)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringBuildergetBuffer()WikiWritergetParent()voidprint(String str)voidprintln()voidprintln(String str)voidwriteText(WikiText text)voidwriteTo(WikiSerializerHandler handler, Writer writer)
-
-
-
Field Detail
-
log
protected static final Log log
-
LINE_SEP
protected static final String LINE_SEP
-
parent
protected WikiWriter parent
-
sb
protected final StringBuilder sb
-
-
Constructor Detail
-
WikiWriter
public WikiWriter()
-
WikiWriter
public WikiWriter(WikiWriter parent)
-
-
Method Detail
-
print
public void print(String str)
- Specified by:
printin interfaceorg.wikimodel.wem.IWikiPrinter
-
println
public void println()
-
println
public void println(String str)
- Specified by:
printlnin interfaceorg.wikimodel.wem.IWikiPrinter
-
writeText
public void writeText(WikiText text)
-
getParent
public WikiWriter getParent()
-
getBuffer
public StringBuilder getBuffer()
-
writeTo
public void writeTo(WikiSerializerHandler handler, Writer writer) throws IOException
- Specified by:
writeToin interfaceWikiText- Throws:
IOException
-
-