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>
dynamicSegments
protected static String
LINE_SEP
protected static Log
log
protected WikiWriter
parent
protected StringBuilder
sb
protected 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 StringBuilder
getBuffer()
WikiWriter
getParent()
void
print(String str)
void
println()
void
println(String str)
void
writeText(WikiText text)
void
writeTo(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:
print
in interfaceorg.wikimodel.wem.IWikiPrinter
-
println
public void println()
-
println
public void println(String str)
- Specified by:
println
in 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:
writeTo
in interfaceWikiText
- Throws:
IOException
-
-