Class WikiSyntaxDecorator
- java.lang.Object
- 
- org.apache.wiki.htmltowiki.syntax.WikiSyntaxDecorator
 
- 
- All Implemented Interfaces:
- SyntaxDecorator
 - Direct Known Subclasses:
- JSPWikiSyntaxDecorator,- MarkdownSyntaxDecorator
 
 public abstract class WikiSyntaxDecorator extends java.lang.Object implements SyntaxDecorator Base Syntax decorator which translates to JSPWiki syntax. Delegates each kind of XHTML element to its specific decorator. This class is useful when developing a new wiki syntax decorator - just extend from it and provide the implementations of all the needed Decorators on the SyntaxDecorator.init(PrintWriter, Deque, Deque, WhitespaceTrimWriter, XHtmlToWikiConfig, XHtmlElementToWikiTranslator)method
- 
- 
Field Summary
 - 
Constructor SummaryConstructors Constructor Description WikiSyntaxDecorator()
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voida(org.jdom2.Element e, java.lang.String ref)Decorates anaelement.voidaFootnote(java.lang.String text, java.lang.String ref)Decorates 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.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.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.voidtbody(org.jdom2.Element e)Decorates atbodyelement.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.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.- 
Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 - 
Methods inherited from interface org.apache.wiki.htmltowiki.SyntaxDecoratorinit
 
- 
 
- 
- 
- 
Field Detail- 
aprotected ADecorator a 
 - 
brprotected BrDecorator br 
 - 
codeprotected CodeDecorator code 
 - 
ddprotected DdDecorator dd 
 - 
dlprotected DlDecorator dl 
 - 
dtprotected DtDecorator dt 
 - 
formprotected FormDecorator form 
 - 
hrprotected HrDecorator hr 
 - 
h1protected H1Decorator h1 
 - 
h2protected H2Decorator h2 
 - 
h3protected H3Decorator h3 
 - 
h4protected H4Decorator h4 
 - 
imgprotected ImageDecorator img 
 - 
inputprotected InputDecorator input 
 - 
liprotected LiDecorator li 
 - 
olprotected OlDecorator ol 
 - 
optionprotected OptionDecorator option 
 - 
pprotected PDecorator p 
 - 
plainTextprotected PlainTextDecorator plainText 
 - 
strongprotected PlainTextBoldDecorator strong 
 - 
cssprotected PlainTextCssDecorator css 
 - 
cssStyleprotected PlainTextCssSpecialDecorator cssStyle 
 - 
emprotected PlainTextItalicDecorator em 
 - 
preprotected PlainTextMonospaceDecorator pre 
 - 
selectprotected SelectDecorator select 
 - 
strikeprotected StrikeDecorator strike 
 - 
subprotected SubDecorator sub 
 - 
supprotected SupDecorator sup 
 - 
tableprotected TableDecorator table 
 - 
tbodyprotected TbodyDecorator tbody 
 - 
tdprotected TdDecorator td 
 - 
textareaprotected TextAreaDecorator textarea 
 - 
textElementprotected TextElementDecorator textElement 
 - 
thprotected ThDecorator th 
 - 
theadprotected TheadDecorator thead 
 - 
trprotected TrDecorator tr 
 - 
ulprotected UlDecorator ul 
 - 
underlineprotected UnderlineDecorator underline 
 - 
outTrimmerprotected WhitespaceTrimWriter outTrimmer 
 - 
chainprotected XHtmlElementToWikiTranslator chain 
 - 
configprotected XHtmlToWikiConfig config 
 
- 
 - 
Constructor Detail- 
WikiSyntaxDecoratorpublic WikiSyntaxDecorator() 
 
- 
 - 
Method Detail- 
apublic void a(org.jdom2.Element e, java.lang.String ref) throws org.jdom2.JDOMException Decorates anaelement.- Specified by:
- ain interface- SyntaxDecorator
- Parameters:
- e- XHTML element being translated.
- ref- actual link.
- Throws:
- org.jdom2.JDOMException- if an error has ocurred parsing the xhtml chain.
 
 - 
aFootnotepublic void aFootnote(java.lang.String text, java.lang.String ref) Decorates anaelement, pointing to a footnote.- Specified by:
- aFootnotein interface- SyntaxDecorator
- Parameters:
- text- text link of the footnote.
- ref- link to footnote.
 
 - 
aUndefinedpublic void aUndefined(org.jdom2.Element e) throws org.jdom2.JDOMException Decorates anaelement to an undefined page.- Specified by:
- aUndefinedin interface- SyntaxDecorator
- Parameters:
- e- XHTML element being translated.
- Throws:
- org.jdom2.JDOMException- if an error has ocurred parsing the xhtml chain.
 
 - 
brpublic void br(org.jdom2.Element base, org.jdom2.Element e) throws org.jdom2.JDOMException Decorates abrelement.- Specified by:
- brin interface- SyntaxDecorator
- 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.
 
 - 
codepublic void code(org.jdom2.Element e) throws org.jdom2.JDOMException Decorates acodeotttelement.- Specified by:
- codein interface- SyntaxDecorator
- Parameters:
- e- XHTML element being translated.
- Throws:
- org.jdom2.JDOMException- if an error has ocurred parsing the xhtml chain.
 
 - 
ddpublic void dd(org.jdom2.Element e) throws org.jdom2.JDOMException Decorates addelement.- Specified by:
- ddin interface- SyntaxDecorator
- Parameters:
- e- XHTML element being translated.
- Throws:
- org.jdom2.JDOMException- if an error has ocurred parsing the xhtml chain.
 
 - 
dlpublic void dl(org.jdom2.Element e) throws org.jdom2.JDOMException Decorates adlelement.- Specified by:
- dlin interface- SyntaxDecorator
- Parameters:
- e- XHTML element being translated.
- Throws:
- org.jdom2.JDOMException- if an error has ocurred parsing the xhtml chain.
 
 - 
dtpublic void dt(org.jdom2.Element e) throws org.jdom2.JDOMException Decorates adtelement.- Specified by:
- dtin interface- SyntaxDecorator
- Parameters:
- e- XHTML element being translated.
- Throws:
- org.jdom2.JDOMException- if an error has ocurred parsing the xhtml chain.
 
 - 
empublic void em(org.jdom2.Element e) throws org.jdom2.JDOMException Decorates anem,ioraddresselement.- Specified by:
- emin interface- SyntaxDecorator
- Parameters:
- e- XHTML element being translated.
- Throws:
- org.jdom2.JDOMException- if an error has ocurred parsing the xhtml chain.
 
 - 
formpublic void form(org.jdom2.Element e) throws org.jdom2.JDOMException Decorates aformelement.- Specified by:
- formin interface- SyntaxDecorator
- Parameters:
- e- XHTML element being translated.
- Throws:
- org.jdom2.JDOMException- if an error has ocurred parsing the xhtml chain.
 
 - 
hrpublic void hr(org.jdom2.Element e) throws org.jdom2.JDOMException Decorates anhrelement.- Specified by:
- hrin interface- SyntaxDecorator
- Parameters:
- e- XHTML element being translated.
- Throws:
- org.jdom2.JDOMException- if an error has ocurred parsing the xhtml chain.
 
 - 
h1public void h1(org.jdom2.Element e) throws org.jdom2.JDOMException Decorates anh1element.- Specified by:
- h1in interface- SyntaxDecorator
- Parameters:
- e- XHTML element being translated.
- Throws:
- org.jdom2.JDOMException- if an error has ocurred parsing the xhtml chain.
 
 - 
h2public void h2(org.jdom2.Element e) throws org.jdom2.JDOMException Decorates anh2element.- Specified by:
- h2in interface- SyntaxDecorator
- Parameters:
- e- XHTML element being translated.
- Throws:
- org.jdom2.JDOMException- if an error has ocurred parsing the xhtml chain.
 
 - 
h3public void h3(org.jdom2.Element e) throws org.jdom2.JDOMException Decorates anh3element.- Specified by:
- h3in interface- SyntaxDecorator
- Parameters:
- e- XHTML element being translated.
- Throws:
- org.jdom2.JDOMException- if an error has ocurred parsing the xhtml chain.
 
 - 
h4public void h4(org.jdom2.Element e) throws org.jdom2.JDOMException Decorates anh4element.- Specified by:
- h4in interface- SyntaxDecorator
- Parameters:
- e- XHTML element being translated.
- Throws:
- org.jdom2.JDOMException- if an error has ocurred parsing the xhtml chain.
 
 - 
imagepublic 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 interface- SyntaxDecorator
- Parameters:
- src- image source
- imageAttrs- image attributes
 
 - 
imgpublic 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 interface- SyntaxDecorator
- Parameters:
- e- XHTML element being translated.
 
 - 
inputpublic void input(org.jdom2.Element e) throws org.jdom2.JDOMException Decorates aninputelement.- Specified by:
- inputin interface- SyntaxDecorator
- Parameters:
- e- XHTML element being translated.
- Throws:
- org.jdom2.JDOMException- if an error has ocurred parsing the xhtml chain.
 
 - 
lipublic void li(org.jdom2.Element base, org.jdom2.Element e) throws org.jdom2.JDOMException Decorates alielement.- Specified by:
- liin interface- SyntaxDecorator
- 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.
 
 - 
olpublic void ol(org.jdom2.Element e) throws org.jdom2.JDOMException Decorates anolelement.- Specified by:
- olin interface- SyntaxDecorator
- Parameters:
- e- XHTML element being translated.
- Throws:
- org.jdom2.JDOMException- if an error has ocurred parsing the xhtml chain.
 
 - 
optionpublic void option(org.jdom2.Element base, org.jdom2.Element e) throws org.jdom2.JDOMException Decorates anoptionelement.- Specified by:
- optionin interface- SyntaxDecorator
- 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.
 
 - 
ppublic void p(org.jdom2.Element e) throws org.jdom2.JDOMException Decorates apelement.- Specified by:
- pin interface- SyntaxDecorator
- Parameters:
- e- XHTML element being translated.
- Throws:
- org.jdom2.JDOMException- if an error has ocurred parsing the xhtml chain.
 
 - 
paragraphpublic void paragraph(XHtmlElementToWikiTranslator.ElementDecoratorData dto) throws org.jdom2.JDOMException Decorates a text paragraph.- Specified by:
- paragraphin interface- SyntaxDecorator
- Parameters:
- dto- XHTML element being translated.
- Throws:
- org.jdom2.JDOMException- if an error has ocurred parsing the xhtml chain.
 
 - 
prepublic void pre(org.jdom2.Element e) throws org.jdom2.JDOMException Decorates apreelement.- Specified by:
- prein interface- SyntaxDecorator
- Parameters:
- e- XHTML element being translated.
- Throws:
- org.jdom2.JDOMException- if an error has ocurred parsing the xhtml chain.
 
 - 
strongpublic void strong(org.jdom2.Element e) throws org.jdom2.JDOMException Decorates astrongorbelement.- Specified by:
- strongin interface- SyntaxDecorator
- Parameters:
- e- XHTML element being translated.
- Throws:
- org.jdom2.JDOMException- if an error has ocurred parsing the xhtml chain.
 
 - 
tablepublic void table(org.jdom2.Element e) throws org.jdom2.JDOMException Decorates atableelement.- Specified by:
- tablein interface- SyntaxDecorator
- Parameters:
- e- XHTML element being translated.
- Throws:
- org.jdom2.JDOMException- if an error has ocurred parsing the xhtml chain.
 
 - 
tbodypublic void tbody(org.jdom2.Element e) throws org.jdom2.JDOMException Decorates atbodyelement.- Specified by:
- tbodyin interface- SyntaxDecorator
- Parameters:
- e- XHTML element being translated.
- Throws:
- org.jdom2.JDOMException- if an error has ocurred parsing the xhtml chain.
 
 - 
tdpublic void td(org.jdom2.Element e) throws org.jdom2.JDOMException Decorates antdelement.- Specified by:
- tdin interface- SyntaxDecorator
- Parameters:
- e- XHTML element being translated.
- Throws:
- org.jdom2.JDOMException- if an error has ocurred parsing the xhtml chain.
 
 - 
textpublic 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 interface- SyntaxDecorator
- Parameters:
- element- XHTML element being translated.
 
 - 
textareapublic void textarea(org.jdom2.Element e) throws org.jdom2.JDOMException Decorates atextareaelement.- Specified by:
- textareain interface- SyntaxDecorator
- Parameters:
- e- XHTML element being translated.
- Throws:
- org.jdom2.JDOMException- if an error has ocurred parsing the xhtml chain.
 
 - 
thpublic void th(org.jdom2.Element e) throws org.jdom2.JDOMException Decorates athelement.- Specified by:
- thin interface- SyntaxDecorator
- Parameters:
- e- XHTML element being translated.
- Throws:
- org.jdom2.JDOMException- if an error has ocurred parsing the xhtml chain.
 
 - 
theadpublic void thead(org.jdom2.Element e) throws org.jdom2.JDOMException Decorates atheadelement.- Specified by:
- theadin interface- SyntaxDecorator
- Parameters:
- e- XHTML element being translated.
- Throws:
- org.jdom2.JDOMException- if an error has ocurred parsing the xhtml chain.
 
 - 
trpublic void tr(org.jdom2.Element e) throws org.jdom2.JDOMException Decorates atrelement.- Specified by:
- trin interface- SyntaxDecorator
- Parameters:
- e- XHTML element being translated.
- Throws:
- org.jdom2.JDOMException- if an error has ocurred parsing the xhtml chain.
 
 - 
selectpublic void select(org.jdom2.Element e) throws org.jdom2.JDOMException Decorates aselectelement.- Specified by:
- selectin interface- SyntaxDecorator
- Parameters:
- e- XHTML element being translated.
- Throws:
- org.jdom2.JDOMException- if an error has ocurred parsing the xhtml chain.
 
 - 
strikepublic void strike(org.jdom2.Element e) throws org.jdom2.JDOMException Decorates astrikeelement.- Specified by:
- strikein interface- SyntaxDecorator
- Parameters:
- e- XHTML element being translated.
- Throws:
- org.jdom2.JDOMException- if an error has ocurred parsing the xhtml chain.
 
 - 
subpublic void sub(org.jdom2.Element e) throws org.jdom2.JDOMException Decorates asubelement.- Specified by:
- subin interface- SyntaxDecorator
- Parameters:
- e- XHTML element being translated.
- Throws:
- org.jdom2.JDOMException- if an error has ocurred parsing the xhtml chain.
 
 - 
suppublic void sup(org.jdom2.Element e) throws org.jdom2.JDOMException Decorates ansupelement.- Specified by:
- supin interface- SyntaxDecorator
- Parameters:
- e- XHTML element being translated.
- Throws:
- org.jdom2.JDOMException- if an error has ocurred parsing the xhtml chain.
 
 - 
ulpublic void ul(org.jdom2.Element e) throws org.jdom2.JDOMException Decorates anulelement.- Specified by:
- ulin interface- SyntaxDecorator
- Parameters:
- e- XHTML element being translated.
- Throws:
- org.jdom2.JDOMException- if an error has ocurred parsing the xhtml chain.
 
 - 
underlinepublic void underline(org.jdom2.Element e) throws org.jdom2.JDOMException Decorates anunderlineelement.- Specified by:
- underlinein interface- SyntaxDecorator
- Parameters:
- e- XHTML element being translated.
- Throws:
- org.jdom2.JDOMException- if an error has ocurred parsing the xhtml chain.
 
 
- 
 
-