Package org.apache.wiki.htmltowiki
Interface SyntaxDecorator
-
- All Known Implementing Classes:
JSPWikiSyntaxDecorator
public interface SyntaxDecorator
Decorates Xhtml elements with wiki syntax
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voida(org.jdom2.Element e)Decorates anaelement.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.voidimage(java.lang.String src, java.util.Map<java.lang.String,java.lang.Object> imageAttrs)Decorates an image element.voidimg(org.jdom2.Element e)Decorates an image element.voidinit(java.io.PrintWriter out, java.util.Stack<java.lang.String> liStack, java.util.Stack<java.lang.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.voidparagraph(XHtmlElementToWikiTranslator.ElementDecoratorData dto)Decorates 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.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.voidtr(org.jdom2.Element e)Decorates atrelement.voidul(org.jdom2.Element e)Decorates anulelement.voidunderline(org.jdom2.Element e)Decorates anunderlineelement.
-
-
-
Method Detail
-
init
void init(java.io.PrintWriter out, java.util.Stack<java.lang.String> liStack, java.util.Stack<java.lang.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 responsabilities pattern) that is expected to be called by the different xhtml decorations.
-
a
void a(org.jdom2.Element e) throws org.jdom2.JDOMException
Decorates anaelement.- Parameters:
e- XHTML element being translated.- Throws:
org.jdom2.JDOMException- if an error has ocurred parsing the xhtml chain.
-
br
void br(org.jdom2.Element base, org.jdom2.Element e) throws org.jdom2.JDOMException
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
void code(org.jdom2.Element e) throws org.jdom2.JDOMException
Decorates acodeotttelement.- Parameters:
e- XHTML element being translated.- Throws:
org.jdom2.JDOMException- if an error has ocurred parsing the xhtml chain.
-
dd
void dd(org.jdom2.Element e) throws org.jdom2.JDOMException
Decorates addelement.- Parameters:
e- XHTML element being translated.- Throws:
org.jdom2.JDOMException- if an error has ocurred parsing the xhtml chain.
-
dl
void dl(org.jdom2.Element e) throws org.jdom2.JDOMException
Decorates adlelement.- Parameters:
e- XHTML element being translated.- Throws:
org.jdom2.JDOMException- if an error has ocurred parsing the xhtml chain.
-
dt
void dt(org.jdom2.Element e) throws org.jdom2.JDOMException
Decorates adtelement.- Parameters:
e- XHTML element being translated.- Throws:
org.jdom2.JDOMException- if an error has ocurred parsing the xhtml chain.
-
em
void em(org.jdom2.Element e) throws org.jdom2.JDOMException
Decorates anem,ioraddresselement.- Parameters:
e- XHTML element being translated.- Throws:
org.jdom2.JDOMException- if an error has ocurred parsing the xhtml chain.
-
form
void form(org.jdom2.Element e) throws org.jdom2.JDOMException
Decorates aformelement.- Parameters:
e- XHTML element being translated.- Throws:
org.jdom2.JDOMException- if an error has ocurred parsing the xhtml chain.
-
hr
void hr(org.jdom2.Element e) throws org.jdom2.JDOMException
Decorates anhrelement.- Parameters:
e- XHTML element being translated.- Throws:
org.jdom2.JDOMException- if an error has ocurred parsing the xhtml chain.
-
h1
void h1(org.jdom2.Element e) throws org.jdom2.JDOMException
Decorates anh1element.- Parameters:
e- XHTML element being translated.- Throws:
org.jdom2.JDOMException- if an error has ocurred parsing the xhtml chain.
-
h2
void h2(org.jdom2.Element e) throws org.jdom2.JDOMException
Decorates anh2element.- Parameters:
e- XHTML element being translated.- Throws:
org.jdom2.JDOMException- if an error has ocurred parsing the xhtml chain.
-
h3
void h3(org.jdom2.Element e) throws org.jdom2.JDOMException
Decorates anh3element.- Parameters:
e- XHTML element being translated.- Throws:
org.jdom2.JDOMException- if an error has ocurred parsing the xhtml chain.
-
h4
void h4(org.jdom2.Element e) throws org.jdom2.JDOMException
Decorates anh4element.- Parameters:
e- XHTML element being translated.- Throws:
org.jdom2.JDOMException- if an error has ocurred parsing the xhtml chain.
-
image
void image(java.lang.String src, java.util.Map<java.lang.String,java.lang.Object> imageAttrs)
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
void img(org.jdom2.Element e)
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
void input(org.jdom2.Element e) throws org.jdom2.JDOMException
Decorates aninputelement.- Parameters:
e- XHTML element being translated.- Throws:
org.jdom2.JDOMException- if an error has ocurred parsing the xhtml chain.
-
li
void li(org.jdom2.Element base, org.jdom2.Element e) throws org.jdom2.JDOMException
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
void ol(org.jdom2.Element e) throws org.jdom2.JDOMException
Decorates anolelement.- Parameters:
e- XHTML element being translated.- Throws:
org.jdom2.JDOMException- if an error has ocurred parsing the xhtml chain.
-
option
void option(org.jdom2.Element base, org.jdom2.Element e) throws org.jdom2.JDOMException
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
void p(org.jdom2.Element e) throws org.jdom2.JDOMException
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
void pre(org.jdom2.Element e) throws org.jdom2.JDOMException
Decorates apreelement.- Parameters:
e- XHTML element being translated.- Throws:
org.jdom2.JDOMException- if an error has ocurred parsing the xhtml chain.
-
strong
void strong(org.jdom2.Element e) throws org.jdom2.JDOMException
Decorates astrongorbelement.- Parameters:
e- XHTML element being translated.- Throws:
org.jdom2.JDOMException- if an error has ocurred parsing the xhtml chain.
-
table
void table(org.jdom2.Element e) throws org.jdom2.JDOMException
Decorates atableelement.- Parameters:
e- XHTML element being translated.- Throws:
org.jdom2.JDOMException- if an error has ocurred parsing the xhtml chain.
-
td
void td(org.jdom2.Element e) throws org.jdom2.JDOMException
Decorates antdelement.- Parameters:
e- XHTML element being translated.- Throws:
org.jdom2.JDOMException- if an error has ocurred parsing the xhtml chain.
-
text
void text(org.jdom2.Text e)
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
void textarea(org.jdom2.Element e) throws org.jdom2.JDOMException
Decorates atextareaelement.- Parameters:
e- XHTML element being translated.- Throws:
org.jdom2.JDOMException- if an error has ocurred parsing the xhtml chain.
-
th
void th(org.jdom2.Element e) throws org.jdom2.JDOMException
Decorates athelement.- Parameters:
e- XHTML element being translated.- Throws:
org.jdom2.JDOMException- if an error has ocurred parsing the xhtml chain.
-
tr
void tr(org.jdom2.Element e) throws org.jdom2.JDOMException
Decorates atrelement.- Parameters:
e- XHTML element being translated.- Throws:
org.jdom2.JDOMException- if an error has ocurred parsing the xhtml chain.
-
select
void select(org.jdom2.Element e) throws org.jdom2.JDOMException
Decorates aselectelement.- Parameters:
e- XHTML element being translated.- Throws:
org.jdom2.JDOMException- if an error has ocurred parsing the xhtml chain.
-
strike
void strike(org.jdom2.Element e) throws org.jdom2.JDOMException
Decorates astrikeelement.- Parameters:
e- XHTML element being translated.- Throws:
org.jdom2.JDOMException- if an error has ocurred parsing the xhtml chain.
-
sub
void sub(org.jdom2.Element e) throws org.jdom2.JDOMException
Decorates asubelement.- Parameters:
e- XHTML element being translated.- Throws:
org.jdom2.JDOMException- if an error has ocurred parsing the xhtml chain.
-
sup
void sup(org.jdom2.Element e) throws org.jdom2.JDOMException
Decorates ansupelement.- Parameters:
e- XHTML element being translated.- Throws:
org.jdom2.JDOMException- if an error has ocurred parsing the xhtml chain.
-
ul
void ul(org.jdom2.Element e) throws org.jdom2.JDOMException
Decorates anulelement.- Parameters:
e- XHTML element being translated.- Throws:
org.jdom2.JDOMException- if an error has ocurred parsing the xhtml chain.
-
underline
void underline(org.jdom2.Element e) throws org.jdom2.JDOMException
Decorates anunderlineelement.- Parameters:
e- XHTML element being translated.- Throws:
org.jdom2.JDOMException- if an error has ocurred parsing the xhtml chain.
-
-