Class JSPWikiSyntaxDecorator
- java.lang.Object
-
- org.apache.wiki.htmltowiki.syntax.jspwiki.JSPWikiSyntaxDecorator
-
- All Implemented Interfaces:
SyntaxDecorator
public class JSPWikiSyntaxDecorator extends java.lang.Object implements SyntaxDecorator
Syntax decorator which translates to JSPWiki syntax. Delegates each kind of XHTML element to its specific decorator.
-
-
Constructor Summary
Constructors Constructor Description JSPWikiSyntaxDecorator()
-
Method Summary
All Methods Instance Methods Concrete 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 element)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.
-
-
-
Constructor Detail
-
JSPWikiSyntaxDecorator
public JSPWikiSyntaxDecorator()
-
-
Method Detail
-
init
public 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.- Specified by:
initin interfaceSyntaxDecorator- 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
public void a(org.jdom2.Element e) throws org.jdom2.JDOMException
Decorates anaelement.- Specified by:
ain interfaceSyntaxDecorator- Parameters:
e- XHTML element being translated.- Throws:
org.jdom2.JDOMException- if an error has ocurred parsing the xhtml chain.
-
br
public void br(org.jdom2.Element base, org.jdom2.Element e) throws org.jdom2.JDOMException
Decorates abrelement.- Specified by:
brin interfaceSyntaxDecorator- 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
public void code(org.jdom2.Element e) throws org.jdom2.JDOMException
Decorates acodeotttelement.- Specified by:
codein interfaceSyntaxDecorator- Parameters:
e- XHTML element being translated.- Throws:
org.jdom2.JDOMException- if an error has ocurred parsing the xhtml chain.
-
dd
public void dd(org.jdom2.Element e) throws org.jdom2.JDOMException
Decorates addelement.- Specified by:
ddin interfaceSyntaxDecorator- Parameters:
e- XHTML element being translated.- Throws:
org.jdom2.JDOMException- if an error has ocurred parsing the xhtml chain.
-
dl
public void dl(org.jdom2.Element e) throws org.jdom2.JDOMException
Decorates adlelement.- Specified by:
dlin interfaceSyntaxDecorator- Parameters:
e- XHTML element being translated.- Throws:
org.jdom2.JDOMException- if an error has ocurred parsing the xhtml chain.
-
dt
public void dt(org.jdom2.Element e) throws org.jdom2.JDOMException
Decorates adtelement.- Specified by:
dtin interfaceSyntaxDecorator- Parameters:
e- XHTML element being translated.- Throws:
org.jdom2.JDOMException- if an error has ocurred parsing the xhtml chain.
-
em
public void em(org.jdom2.Element e) throws org.jdom2.JDOMException
Decorates anem,ioraddresselement.- Specified by:
emin interfaceSyntaxDecorator- Parameters:
e- XHTML element being translated.- Throws:
org.jdom2.JDOMException- if an error has ocurred parsing the xhtml chain.
-
form
public void form(org.jdom2.Element e) throws org.jdom2.JDOMException
Decorates aformelement.- Specified by:
formin interfaceSyntaxDecorator- Parameters:
e- XHTML element being translated.- Throws:
org.jdom2.JDOMException- if an error has ocurred parsing the xhtml chain.
-
hr
public void hr(org.jdom2.Element e) throws org.jdom2.JDOMException
Decorates anhrelement.- Specified by:
hrin interfaceSyntaxDecorator- Parameters:
e- XHTML element being translated.- Throws:
org.jdom2.JDOMException- if an error has ocurred parsing the xhtml chain.
-
h1
public void h1(org.jdom2.Element e) throws org.jdom2.JDOMException
Decorates anh1element.- Specified by:
h1in interfaceSyntaxDecorator- Parameters:
e- XHTML element being translated.- Throws:
org.jdom2.JDOMException- if an error has ocurred parsing the xhtml chain.
-
h2
public void h2(org.jdom2.Element e) throws org.jdom2.JDOMException
Decorates anh2element.- Specified by:
h2in interfaceSyntaxDecorator- Parameters:
e- XHTML element being translated.- Throws:
org.jdom2.JDOMException- if an error has ocurred parsing the xhtml chain.
-
h3
public void h3(org.jdom2.Element e) throws org.jdom2.JDOMException
Decorates anh3element.- Specified by:
h3in interfaceSyntaxDecorator- Parameters:
e- XHTML element being translated.- Throws:
org.jdom2.JDOMException- if an error has ocurred parsing the xhtml chain.
-
h4
public void h4(org.jdom2.Element e) throws org.jdom2.JDOMException
Decorates anh4element.- Specified by:
h4in interfaceSyntaxDecorator- Parameters:
e- XHTML element being translated.- Throws:
org.jdom2.JDOMException- if an error has ocurred parsing the xhtml chain.
-
image
public 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.- Specified by:
imagein interfaceSyntaxDecorator- Parameters:
src- image sourceimageAttrs- image attributes
-
img
public 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.- Specified by:
imgin interfaceSyntaxDecorator- Parameters:
e- XHTML element being translated.
-
input
public void input(org.jdom2.Element e) throws org.jdom2.JDOMException
Decorates aninputelement.- Specified by:
inputin interfaceSyntaxDecorator- Parameters:
e- XHTML element being translated.- Throws:
org.jdom2.JDOMException- if an error has ocurred parsing the xhtml chain.
-
li
public void li(org.jdom2.Element base, org.jdom2.Element e) throws org.jdom2.JDOMException
Decorates alielement.- Specified by:
liin interfaceSyntaxDecorator- 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
public void ol(org.jdom2.Element e) throws org.jdom2.JDOMException
Decorates anolelement.- Specified by:
olin interfaceSyntaxDecorator- Parameters:
e- XHTML element being translated.- Throws:
org.jdom2.JDOMException- if an error has ocurred parsing the xhtml chain.
-
option
public void option(org.jdom2.Element base, org.jdom2.Element e) throws org.jdom2.JDOMException
Decorates anoptionelement.- Specified by:
optionin interfaceSyntaxDecorator- 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
public void p(org.jdom2.Element e) throws org.jdom2.JDOMException
Decorates apelement.- Specified by:
pin interfaceSyntaxDecorator- Parameters:
e- XHTML element being translated.- Throws:
org.jdom2.JDOMException- if an error has ocurred parsing the xhtml chain.
-
paragraph
public void paragraph(XHtmlElementToWikiTranslator.ElementDecoratorData dto) throws org.jdom2.JDOMException
Decorates a text paragraph.- Specified by:
paragraphin interfaceSyntaxDecorator- Parameters:
dto- XHTML element being translated.- Throws:
org.jdom2.JDOMException- if an error has ocurred parsing the xhtml chain.
-
pre
public void pre(org.jdom2.Element e) throws org.jdom2.JDOMException
Decorates apreelement.- Specified by:
prein interfaceSyntaxDecorator- Parameters:
e- XHTML element being translated.- Throws:
org.jdom2.JDOMException- if an error has ocurred parsing the xhtml chain.
-
strong
public void strong(org.jdom2.Element e) throws org.jdom2.JDOMException
Decorates astrongorbelement.- Specified by:
strongin interfaceSyntaxDecorator- Parameters:
e- XHTML element being translated.- Throws:
org.jdom2.JDOMException- if an error has ocurred parsing the xhtml chain.
-
table
public void table(org.jdom2.Element e) throws org.jdom2.JDOMException
Decorates atableelement.- Specified by:
tablein interfaceSyntaxDecorator- Parameters:
e- XHTML element being translated.- Throws:
org.jdom2.JDOMException- if an error has ocurred parsing the xhtml chain.
-
td
public void td(org.jdom2.Element e) throws org.jdom2.JDOMException
Decorates antdelement.- Specified by:
tdin interfaceSyntaxDecorator- Parameters:
e- XHTML element being translated.- Throws:
org.jdom2.JDOMException- if an error has ocurred parsing the xhtml chain.
-
text
public void text(org.jdom2.Text element)
Decorates a text element. This is a terminal operation, that is, chain is not expected to be called by this method.- Specified by:
textin interfaceSyntaxDecorator- Parameters:
element- XHTML element being translated.
-
textarea
public void textarea(org.jdom2.Element e) throws org.jdom2.JDOMException
Decorates atextareaelement.- Specified by:
textareain interfaceSyntaxDecorator- Parameters:
e- XHTML element being translated.- Throws:
org.jdom2.JDOMException- if an error has ocurred parsing the xhtml chain.
-
th
public void th(org.jdom2.Element e) throws org.jdom2.JDOMException
Decorates athelement.- Specified by:
thin interfaceSyntaxDecorator- Parameters:
e- XHTML element being translated.- Throws:
org.jdom2.JDOMException- if an error has ocurred parsing the xhtml chain.
-
tr
public void tr(org.jdom2.Element e) throws org.jdom2.JDOMException
Decorates atrelement.- Specified by:
trin interfaceSyntaxDecorator- Parameters:
e- XHTML element being translated.- Throws:
org.jdom2.JDOMException- if an error has ocurred parsing the xhtml chain.
-
select
public void select(org.jdom2.Element e) throws org.jdom2.JDOMException
Decorates aselectelement.- Specified by:
selectin interfaceSyntaxDecorator- Parameters:
e- XHTML element being translated.- Throws:
org.jdom2.JDOMException- if an error has ocurred parsing the xhtml chain.
-
strike
public void strike(org.jdom2.Element e) throws org.jdom2.JDOMException
Decorates astrikeelement.- Specified by:
strikein interfaceSyntaxDecorator- Parameters:
e- XHTML element being translated.- Throws:
org.jdom2.JDOMException- if an error has ocurred parsing the xhtml chain.
-
sub
public void sub(org.jdom2.Element e) throws org.jdom2.JDOMException
Decorates asubelement.- Specified by:
subin interfaceSyntaxDecorator- Parameters:
e- XHTML element being translated.- Throws:
org.jdom2.JDOMException- if an error has ocurred parsing the xhtml chain.
-
sup
public void sup(org.jdom2.Element e) throws org.jdom2.JDOMException
Decorates ansupelement.- Specified by:
supin interfaceSyntaxDecorator- Parameters:
e- XHTML element being translated.- Throws:
org.jdom2.JDOMException- if an error has ocurred parsing the xhtml chain.
-
ul
public void ul(org.jdom2.Element e) throws org.jdom2.JDOMException
Decorates anulelement.- Specified by:
ulin interfaceSyntaxDecorator- Parameters:
e- XHTML element being translated.- Throws:
org.jdom2.JDOMException- if an error has ocurred parsing the xhtml chain.
-
underline
public void underline(org.jdom2.Element e) throws org.jdom2.JDOMException
Decorates anunderlineelement.- Specified by:
underlinein interfaceSyntaxDecorator- Parameters:
e- XHTML element being translated.- Throws:
org.jdom2.JDOMException- if an error has ocurred parsing the xhtml chain.
-
-