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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
a(org.jdom2.Element e, java.lang.String ref)
Decorates ana
element.void
aFootnote(java.lang.String text, java.lang.String ref)
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
image(java.lang.String src, java.util.Map<java.lang.String,java.lang.Object> imageAttrs)
Decorates an image element.void
img(org.jdom2.Element e)
Decorates an image element.void
init(java.io.PrintWriter out, java.util.Deque<java.lang.String> liStack, java.util.Deque<java.lang.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
paragraph(XHtmlElementToWikiTranslator.ElementDecoratorData dto)
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 Detail
-
init
void init(java.io.PrintWriter out, java.util.Deque<java.lang.String> liStack, java.util.Deque<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 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 responsabilities pattern) that is expected to be called by the different xhtml decorations.
-
a
void a(org.jdom2.Element e, java.lang.String ref) throws org.jdom2.JDOMException
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
void aFootnote(java.lang.String text, java.lang.String ref)
Decorates ana
element, pointing to a footnote.- Parameters:
text
- text link of the footnote.ref
- link to footnote.
-
aUndefined
void aUndefined(org.jdom2.Element e) throws org.jdom2.JDOMException
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
void br(org.jdom2.Element base, org.jdom2.Element e) throws org.jdom2.JDOMException
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
void code(org.jdom2.Element e) throws org.jdom2.JDOMException
Decorates acode
ottt
element.- 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 add
element.- 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 adl
element.- 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 adt
element.- 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
,i
oraddress
element.- 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 aform
element.- 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 anhr
element.- 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 anh1
element.- 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 anh2
element.- 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 anh3
element.- 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 anh4
element.- 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 aninput
element.- 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 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
void ol(org.jdom2.Element e) throws org.jdom2.JDOMException
Decorates anol
element.- 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 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
void p(org.jdom2.Element e) throws org.jdom2.JDOMException
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
void pre(org.jdom2.Element e) throws org.jdom2.JDOMException
Decorates apre
element.- 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 astrong
orb
element.- 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 atable
element.- Parameters:
e
- XHTML element being translated.- Throws:
org.jdom2.JDOMException
- if an error has ocurred parsing the xhtml chain.
-
tbody
void tbody(org.jdom2.Element e) throws org.jdom2.JDOMException
Decorates atbody
element.- 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 antd
element.- 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 atextarea
element.- 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 ath
element.- Parameters:
e
- XHTML element being translated.- Throws:
org.jdom2.JDOMException
- if an error has ocurred parsing the xhtml chain.
-
thead
void thead(org.jdom2.Element e) throws org.jdom2.JDOMException
Decorates athead
element.- 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 atr
element.- 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 aselect
element.- 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 astrike
element.- 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 asub
element.- 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 ansup
element.- 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 anul
element.- 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 anunderline
element.- Parameters:
e
- XHTML element being translated.- Throws:
org.jdom2.JDOMException
- if an error has ocurred parsing the xhtml chain.
-
-