Class WikiSyntaxDecorator
java.lang.Object
org.apache.wiki.htmltowiki.syntax.WikiSyntaxDecorator
- All Implemented Interfaces:
SyntaxDecorator
- Direct Known Subclasses:
JSPWikiSyntaxDecorator,MarkdownSyntaxDecorator
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
FieldsModifier and TypeFieldDescriptionprotected ADecoratorprotected BrDecoratorprotected XHtmlElementToWikiTranslatorprotected CodeDecoratorprotected XHtmlToWikiConfigprotected PlainTextCssDecoratorprotected PlainTextCssSpecialDecoratorprotected DdDecoratorprotected DlDecoratorprotected DtDecoratorprotected PlainTextItalicDecoratorprotected FormDecoratorprotected H1Decoratorprotected H2Decoratorprotected H3Decoratorprotected H4Decoratorprotected HrDecoratorprotected ImageDecoratorprotected InputDecoratorprotected LiDecoratorprotected OlDecoratorprotected OptionDecoratorprotected WhitespaceTrimWriterprotected PDecoratorprotected PlainTextDecoratorprotected PlainTextMonospaceDecoratorprotected SelectDecoratorprotected StrikeDecoratorprotected PlainTextBoldDecoratorprotected SubDecoratorprotected SupDecoratorprotected TableDecoratorprotected TbodyDecoratorprotected TdDecoratorprotected TextAreaDecoratorprotected TextElementDecoratorprotected ThDecoratorprotected TheadDecoratorprotected TrDecoratorprotected UlDecoratorprotected UnderlineDecorator -
Constructor Summary
Constructors -
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.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 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.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.wiki.htmltowiki.SyntaxDecorator
init
-
Field Details
-
a
-
br
-
code
-
dd
-
dl
-
dt
-
form
-
hr
-
h1
-
h2
-
h3
-
h4
-
img
-
input
-
li
-
ol
-
option
-
p
-
plainText
-
strong
-
css
-
cssStyle
-
em
-
pre
-
select
-
strike
-
sub
-
sup
-
table
-
tbody
-
td
-
textarea
-
textElement
-
th
-
thead
-
tr
-
ul
-
underline
-
outTrimmer
-
chain
-
config
-
-
Constructor Details
-
WikiSyntaxDecorator
public WikiSyntaxDecorator()
-
-
Method Details
-
a
Decorates anaelement.- Specified by:
ain interfaceSyntaxDecorator- 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.- Specified by:
aFootnotein interfaceSyntaxDecorator- Parameters:
text- text link of the footnote.ref- link to footnote.
-
aUndefined
Decorates anaelement to an undefined page.- Specified by:
aUndefinedin interfaceSyntaxDecorator- Parameters:
e- XHTML element being translated.- Throws:
org.jdom2.JDOMException- if an error has ocurred parsing the xhtml chain.
-
br
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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.
-
tbody
Decorates atbodyelement.- Specified by:
tbodyin interfaceSyntaxDecorator- Parameters:
e- XHTML element being translated.- Throws:
org.jdom2.JDOMException- if an error has ocurred parsing the xhtml chain.
-
td
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
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
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
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.
-
thead
Decorates atheadelement.- Specified by:
theadin interfaceSyntaxDecorator- Parameters:
e- XHTML element being translated.- Throws:
org.jdom2.JDOMException- if an error has ocurred parsing the xhtml chain.
-
tr
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
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
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
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
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
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
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.
-