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 TypeMethodDescriptionvoid
Decorates ana
element.void
Decorates ana
element, pointing to a footnote.void
aUndefined
(org.jdom2.Element e) Decorates ana
element to an undefined page.void
br
(org.jdom2.Element base, org.jdom2.Element e) Decorates abr
element.void
code
(org.jdom2.Element e) Decorates acode
ottt
element.void
dd
(org.jdom2.Element e) Decorates add
element.void
dl
(org.jdom2.Element e) Decorates adl
element.void
dt
(org.jdom2.Element e) Decorates adt
element.void
em
(org.jdom2.Element e) Decorates anem
,i
oraddress
element.void
form
(org.jdom2.Element e) Decorates aform
element.void
h1
(org.jdom2.Element e) Decorates anh1
element.void
h2
(org.jdom2.Element e) Decorates anh2
element.void
h3
(org.jdom2.Element e) Decorates anh3
element.void
h4
(org.jdom2.Element e) Decorates anh4
element.void
hr
(org.jdom2.Element e) Decorates anhr
element.void
Decorates an image element.void
img
(org.jdom2.Element e) Decorates an image element.void
init
(PrintWriter out, Deque<String> liStack, Deque<String> preStack, WhitespaceTrimWriter outTrimmer, XHtmlToWikiConfig config, XHtmlElementToWikiTranslator chain) Prepares the syntax decorator.void
input
(org.jdom2.Element e) Decorates aninput
element.void
li
(org.jdom2.Element base, org.jdom2.Element e) Decorates ali
element.void
ol
(org.jdom2.Element e) Decorates anol
element.void
option
(org.jdom2.Element base, org.jdom2.Element e) Decorates anoption
element.void
p
(org.jdom2.Element e) Decorates ap
element.void
Decorates a text paragraph.void
pre
(org.jdom2.Element e) Decorates apre
element.void
select
(org.jdom2.Element e) Decorates aselect
element.void
strike
(org.jdom2.Element e) Decorates astrike
element.void
strong
(org.jdom2.Element e) Decorates astrong
orb
element.void
sub
(org.jdom2.Element e) Decorates asub
element.void
sup
(org.jdom2.Element e) Decorates ansup
element.void
table
(org.jdom2.Element e) Decorates atable
element.void
tbody
(org.jdom2.Element e) Decorates atbody
element.void
td
(org.jdom2.Element e) Decorates antd
element.void
text
(org.jdom2.Text e) Decorates a text element.void
textarea
(org.jdom2.Element e) Decorates atextarea
element.void
th
(org.jdom2.Element e) Decorates ath
element.void
thead
(org.jdom2.Element e) Decorates athead
element.void
tr
(org.jdom2.Element e) Decorates atr
element.void
ul
(org.jdom2.Element e) Decorates anul
element.void
underline
(org.jdom2.Element e) Decorates anunderline
element.
-
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 nestedli
s.preStack
- stack containing the amount of nestedpre
s.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 ana
element.- Parameters:
e
- XHTML element being translated.ref
- actual link.- Throws:
org.jdom2.JDOMException
- if an error has ocurred parsing the xhtml chain.
-
aFootnote
Decorates ana
element, pointing to a footnote.- Parameters:
text
- text link of the footnote.ref
- link to footnote.
-
aUndefined
Decorates ana
element 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 abr
element.- 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 acode
ottt
element.- Parameters:
e
- XHTML element being translated.- Throws:
org.jdom2.JDOMException
- if an error has ocurred parsing the xhtml chain.
-
dd
Decorates add
element.- Parameters:
e
- XHTML element being translated.- Throws:
org.jdom2.JDOMException
- if an error has ocurred parsing the xhtml chain.
-
dl
Decorates adl
element.- Parameters:
e
- XHTML element being translated.- Throws:
org.jdom2.JDOMException
- if an error has ocurred parsing the xhtml chain.
-
dt
Decorates adt
element.- Parameters:
e
- XHTML element being translated.- Throws:
org.jdom2.JDOMException
- if an error has ocurred parsing the xhtml chain.
-
em
Decorates anem
,i
oraddress
element.- Parameters:
e
- XHTML element being translated.- Throws:
org.jdom2.JDOMException
- if an error has ocurred parsing the xhtml chain.
-
form
Decorates aform
element.- Parameters:
e
- XHTML element being translated.- Throws:
org.jdom2.JDOMException
- if an error has ocurred parsing the xhtml chain.
-
hr
Decorates anhr
element.- Parameters:
e
- XHTML element being translated.- Throws:
org.jdom2.JDOMException
- if an error has ocurred parsing the xhtml chain.
-
h1
Decorates anh1
element.- Parameters:
e
- XHTML element being translated.- Throws:
org.jdom2.JDOMException
- if an error has ocurred parsing the xhtml chain.
-
h2
Decorates anh2
element.- Parameters:
e
- XHTML element being translated.- Throws:
org.jdom2.JDOMException
- if an error has ocurred parsing the xhtml chain.
-
h3
Decorates anh3
element.- Parameters:
e
- XHTML element being translated.- Throws:
org.jdom2.JDOMException
- if an error has ocurred parsing the xhtml chain.
-
h4
Decorates anh4
element.- 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 aninput
element.- Parameters:
e
- XHTML element being translated.- Throws:
org.jdom2.JDOMException
- if an error has ocurred parsing the xhtml chain.
-
li
Decorates ali
element.- 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 anol
element.- Parameters:
e
- XHTML element being translated.- Throws:
org.jdom2.JDOMException
- if an error has ocurred parsing the xhtml chain.
-
option
Decorates anoption
element.- 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 ap
element.- 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 apre
element.- Parameters:
e
- XHTML element being translated.- Throws:
org.jdom2.JDOMException
- if an error has ocurred parsing the xhtml chain.
-
strong
Decorates astrong
orb
element.- Parameters:
e
- XHTML element being translated.- Throws:
org.jdom2.JDOMException
- if an error has ocurred parsing the xhtml chain.
-
table
Decorates atable
element.- Parameters:
e
- XHTML element being translated.- Throws:
org.jdom2.JDOMException
- if an error has ocurred parsing the xhtml chain.
-
tbody
Decorates atbody
element.- Parameters:
e
- XHTML element being translated.- Throws:
org.jdom2.JDOMException
- if an error has ocurred parsing the xhtml chain.
-
td
Decorates antd
element.- 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 atextarea
element.- Parameters:
e
- XHTML element being translated.- Throws:
org.jdom2.JDOMException
- if an error has ocurred parsing the xhtml chain.
-
th
Decorates ath
element.- Parameters:
e
- XHTML element being translated.- Throws:
org.jdom2.JDOMException
- if an error has ocurred parsing the xhtml chain.
-
thead
Decorates athead
element.- Parameters:
e
- XHTML element being translated.- Throws:
org.jdom2.JDOMException
- if an error has ocurred parsing the xhtml chain.
-
tr
Decorates atr
element.- Parameters:
e
- XHTML element being translated.- Throws:
org.jdom2.JDOMException
- if an error has ocurred parsing the xhtml chain.
-
select
Decorates aselect
element.- Parameters:
e
- XHTML element being translated.- Throws:
org.jdom2.JDOMException
- if an error has ocurred parsing the xhtml chain.
-
strike
Decorates astrike
element.- Parameters:
e
- XHTML element being translated.- Throws:
org.jdom2.JDOMException
- if an error has ocurred parsing the xhtml chain.
-
sub
Decorates asub
element.- Parameters:
e
- XHTML element being translated.- Throws:
org.jdom2.JDOMException
- if an error has ocurred parsing the xhtml chain.
-
sup
Decorates ansup
element.- Parameters:
e
- XHTML element being translated.- Throws:
org.jdom2.JDOMException
- if an error has ocurred parsing the xhtml chain.
-
ul
Decorates anul
element.- Parameters:
e
- XHTML element being translated.- Throws:
org.jdom2.JDOMException
- if an error has ocurred parsing the xhtml chain.
-
underline
Decorates anunderline
element.- Parameters:
e
- XHTML element being translated.- Throws:
org.jdom2.JDOMException
- if an error has ocurred parsing the xhtml chain.
-