Package org.apache.wiki.htmltowiki
Interface SyntaxDecorator
- All Known Implementing Classes:
JSPWikiSyntaxDecorator,MarkdownSyntaxDecorator,WikiSyntaxDecorator
public interface SyntaxDecorator
Decorates Xhtml elements with wiki syntax
-
Method Summary
Modifier and TypeMethodDescriptionvoidDecorates anaelement.voidDecorates anaelement, pointing to a footnote.voidaUndefined(org.jdom2.Element e) Decorates anaelement to an undefined page.voidbr(org.jdom2.Element base, org.jdom2.Element e) Decorates abrelement.voidcode(org.jdom2.Element e) Decorates acodeotttelement.voiddd(org.jdom2.Element e) Decorates addelement.voiddl(org.jdom2.Element e) Decorates adlelement.voiddt(org.jdom2.Element e) Decorates adtelement.voidem(org.jdom2.Element e) Decorates anem,ioraddresselement.voidform(org.jdom2.Element e) Decorates aformelement.voidh1(org.jdom2.Element e) Decorates anh1element.voidh2(org.jdom2.Element e) Decorates anh2element.voidh3(org.jdom2.Element e) Decorates anh3element.voidh4(org.jdom2.Element e) Decorates anh4element.voidhr(org.jdom2.Element e) Decorates anhrelement.voidDecorates an image element.voidimg(org.jdom2.Element e) Decorates an image element.voidinit(PrintWriter out, Deque<String> liStack, Deque<String> preStack, WhitespaceTrimWriter outTrimmer, XHtmlToWikiConfig config, XHtmlElementToWikiTranslator chain) Prepares the syntax decorator.voidinput(org.jdom2.Element e) Decorates aninputelement.voidli(org.jdom2.Element base, org.jdom2.Element e) Decorates alielement.voidol(org.jdom2.Element e) Decorates anolelement.voidoption(org.jdom2.Element base, org.jdom2.Element e) Decorates anoptionelement.voidp(org.jdom2.Element e) Decorates apelement.voidDecorates a text paragraph.voidpre(org.jdom2.Element e) Decorates apreelement.voidselect(org.jdom2.Element e) Decorates aselectelement.voidstrike(org.jdom2.Element e) Decorates astrikeelement.voidstrong(org.jdom2.Element e) Decorates astrongorbelement.voidsub(org.jdom2.Element e) Decorates asubelement.voidsup(org.jdom2.Element e) Decorates ansupelement.voidtable(org.jdom2.Element e) Decorates atableelement.voidtbody(org.jdom2.Element e) Decorates atbodyelement.voidtd(org.jdom2.Element e) Decorates antdelement.voidtext(org.jdom2.Text e) Decorates a text element.voidtextarea(org.jdom2.Element e) Decorates atextareaelement.voidth(org.jdom2.Element e) Decorates athelement.voidthead(org.jdom2.Element e) Decorates atheadelement.voidtr(org.jdom2.Element e) Decorates atrelement.voidul(org.jdom2.Element e) Decorates anulelement.voidunderline(org.jdom2.Element e) Decorates anunderlineelement.
-
Method Details
-
init
void init(PrintWriter out, Deque<String> liStack, Deque<String> preStack, WhitespaceTrimWriter outTrimmer, XHtmlToWikiConfig config, XHtmlElementToWikiTranslator chain) Prepares the syntax decorator.- Parameters:
out- writer that will hold the resulting wiki markup.liStack- stack containing the amount of nestedlis.preStack- stack containing the amount of nestedpres.outTrimmer- writer capable of trimming whitespaces and of checking if it's currently writing a line start.config- xhtml to wiki configuration object.chain- chain (in the chain of responsibilities patterns) that is expected to be called by the different xhtml decorations.
-
a
Decorates anaelement.- Parameters:
e- XHTML element being translated.ref- actual link.- Throws:
org.jdom2.JDOMException- if an error has ocurred parsing the xhtml chain.
-
aFootnote
Decorates anaelement, pointing to a footnote.- Parameters:
text- text link of the footnote.ref- link to footnote.
-
aUndefined
Decorates anaelement to an undefined page.- Parameters:
e- XHTML element being translated.- Throws:
org.jdom2.JDOMException- if an error has ocurred parsing the xhtml chain.
-
br
Decorates abrelement.- Parameters:
base- parent of the XHTML element being translated.e- XHTML element being translated.- Throws:
org.jdom2.JDOMException- if an error has ocurred parsing the xhtml chain.
-
code
Decorates acodeotttelement.- Parameters:
e- XHTML element being translated.- Throws:
org.jdom2.JDOMException- if an error has ocurred parsing the xhtml chain.
-
dd
Decorates addelement.- Parameters:
e- XHTML element being translated.- Throws:
org.jdom2.JDOMException- if an error has ocurred parsing the xhtml chain.
-
dl
Decorates adlelement.- Parameters:
e- XHTML element being translated.- Throws:
org.jdom2.JDOMException- if an error has ocurred parsing the xhtml chain.
-
dt
Decorates adtelement.- Parameters:
e- XHTML element being translated.- Throws:
org.jdom2.JDOMException- if an error has ocurred parsing the xhtml chain.
-
em
Decorates anem,ioraddresselement.- Parameters:
e- XHTML element being translated.- Throws:
org.jdom2.JDOMException- if an error has ocurred parsing the xhtml chain.
-
form
Decorates aformelement.- Parameters:
e- XHTML element being translated.- Throws:
org.jdom2.JDOMException- if an error has ocurred parsing the xhtml chain.
-
hr
Decorates anhrelement.- Parameters:
e- XHTML element being translated.- Throws:
org.jdom2.JDOMException- if an error has ocurred parsing the xhtml chain.
-
h1
Decorates anh1element.- Parameters:
e- XHTML element being translated.- Throws:
org.jdom2.JDOMException- if an error has ocurred parsing the xhtml chain.
-
h2
Decorates anh2element.- Parameters:
e- XHTML element being translated.- Throws:
org.jdom2.JDOMException- if an error has ocurred parsing the xhtml chain.
-
h3
Decorates anh3element.- Parameters:
e- XHTML element being translated.- Throws:
org.jdom2.JDOMException- if an error has ocurred parsing the xhtml chain.
-
h4
Decorates anh4element.- Parameters:
e- XHTML element being translated.- Throws:
org.jdom2.JDOMException- if an error has ocurred parsing the xhtml chain.
-
image
Decorates an image element. This is a terminal operation, that is, chain is not expected to be called by this method.- Parameters:
src- image sourceimageAttrs- image attributes
-
img
Decorates an image element. This is a terminal operation, that is, chain is not expected to be called by this method.- Parameters:
e- XHTML element being translated.
-
input
Decorates aninputelement.- Parameters:
e- XHTML element being translated.- Throws:
org.jdom2.JDOMException- if an error has ocurred parsing the xhtml chain.
-
li
Decorates alielement.- Parameters:
base- parent of the XHTML element being translated.e- XHTML element being translated.- Throws:
org.jdom2.JDOMException- if an error has ocurred parsing the xhtml chain.
-
ol
Decorates anolelement.- Parameters:
e- XHTML element being translated.- Throws:
org.jdom2.JDOMException- if an error has ocurred parsing the xhtml chain.
-
option
Decorates anoptionelement.- Parameters:
base- parent of the XHTML element being translated.e- XHTML element being translated.- Throws:
org.jdom2.JDOMException- if an error has ocurred parsing the xhtml chain.
-
p
Decorates apelement.- Parameters:
e- XHTML element being translated.- Throws:
org.jdom2.JDOMException- if an error has ocurred parsing the xhtml chain.
-
paragraph
void paragraph(XHtmlElementToWikiTranslator.ElementDecoratorData dto) throws org.jdom2.JDOMException Decorates a text paragraph.- Parameters:
dto- XHTML element being translated.- Throws:
org.jdom2.JDOMException- if an error has ocurred parsing the xhtml chain.
-
pre
Decorates apreelement.- Parameters:
e- XHTML element being translated.- Throws:
org.jdom2.JDOMException- if an error has ocurred parsing the xhtml chain.
-
strong
Decorates astrongorbelement.- Parameters:
e- XHTML element being translated.- Throws:
org.jdom2.JDOMException- if an error has ocurred parsing the xhtml chain.
-
table
Decorates atableelement.- Parameters:
e- XHTML element being translated.- Throws:
org.jdom2.JDOMException- if an error has ocurred parsing the xhtml chain.
-
tbody
Decorates atbodyelement.- Parameters:
e- XHTML element being translated.- Throws:
org.jdom2.JDOMException- if an error has ocurred parsing the xhtml chain.
-
td
Decorates antdelement.- Parameters:
e- XHTML element being translated.- Throws:
org.jdom2.JDOMException- if an error has ocurred parsing the xhtml chain.
-
text
Decorates a text element. This is a terminal operation, that is, chain is not expected to be called by this method.- Parameters:
e- XHTML element being translated.
-
textarea
Decorates atextareaelement.- Parameters:
e- XHTML element being translated.- Throws:
org.jdom2.JDOMException- if an error has ocurred parsing the xhtml chain.
-
th
Decorates athelement.- Parameters:
e- XHTML element being translated.- Throws:
org.jdom2.JDOMException- if an error has ocurred parsing the xhtml chain.
-
thead
Decorates atheadelement.- Parameters:
e- XHTML element being translated.- Throws:
org.jdom2.JDOMException- if an error has ocurred parsing the xhtml chain.
-
tr
Decorates atrelement.- Parameters:
e- XHTML element being translated.- Throws:
org.jdom2.JDOMException- if an error has ocurred parsing the xhtml chain.
-
select
Decorates aselectelement.- Parameters:
e- XHTML element being translated.- Throws:
org.jdom2.JDOMException- if an error has ocurred parsing the xhtml chain.
-
strike
Decorates astrikeelement.- Parameters:
e- XHTML element being translated.- Throws:
org.jdom2.JDOMException- if an error has ocurred parsing the xhtml chain.
-
sub
Decorates asubelement.- Parameters:
e- XHTML element being translated.- Throws:
org.jdom2.JDOMException- if an error has ocurred parsing the xhtml chain.
-
sup
Decorates ansupelement.- Parameters:
e- XHTML element being translated.- Throws:
org.jdom2.JDOMException- if an error has ocurred parsing the xhtml chain.
-
ul
Decorates anulelement.- Parameters:
e- XHTML element being translated.- Throws:
org.jdom2.JDOMException- if an error has ocurred parsing the xhtml chain.
-
underline
Decorates anunderlineelement.- Parameters:
e- XHTML element being translated.- Throws:
org.jdom2.JDOMException- if an error has ocurred parsing the xhtml chain.
-