Class ADecorator
- java.lang.Object
-
- org.apache.wiki.htmltowiki.syntax.ADecorator
-
public abstract class ADecorator extends java.lang.Object
Translates to wiki syntax from anA
element.
-
-
Field Summary
Fields Modifier and Type Field Description protected XHtmlElementToWikiTranslator
chain
protected XHtmlToWikiConfig
config
protected java.io.PrintWriter
out
-
Constructor Summary
Constructors Modifier Constructor Description protected
ADecorator(java.io.PrintWriter out, XHtmlToWikiConfig config, XHtmlElementToWikiTranslator chain)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
decorate(org.jdom2.Element e, java.lang.String ref)
Translates the given XHTML element into wiki markup.void
decorateFootnote(java.lang.String text, java.lang.String href)
Translate a link to a footnote to wiki syntax.void
decorateUndefinedLink(org.jdom2.Element e)
Translate an undefined link to wiki syntax.protected abstract void
linkMarkup(java.lang.String text, java.lang.String ref)
Provide wiki markup for the XHTML element being translated.protected abstract void
linkMarkup(org.jdom2.Element e)
Provide wiki markup for the XHTML element being translated.protected abstract void
linkMarkup(org.jdom2.Element e, java.lang.String ref)
Provide wiki markup for the XHTML element being translated.protected abstract void
linkMarkup(org.jdom2.Element e, java.lang.String ref, java.lang.String additionalAttrs)
Provide wiki markup for the XHTML element being translated.
-
-
-
Field Detail
-
out
protected final java.io.PrintWriter out
-
config
protected final XHtmlToWikiConfig config
-
chain
protected final XHtmlElementToWikiTranslator chain
-
-
Constructor Detail
-
ADecorator
protected ADecorator(java.io.PrintWriter out, XHtmlToWikiConfig config, XHtmlElementToWikiTranslator chain)
-
-
Method Detail
-
decorate
public void decorate(org.jdom2.Element e, java.lang.String ref) throws org.jdom2.JDOMException
Translates the given XHTML element into wiki markup.- Parameters:
e
- XHTML element being translated.- Throws:
org.jdom2.JDOMException
-
decorateFootnote
public void decorateFootnote(java.lang.String text, java.lang.String href)
Translate a link to a footnote to wiki syntax.- Parameters:
text
- link's texthref
- link's href
-
decorateUndefinedLink
public void decorateUndefinedLink(org.jdom2.Element e) throws org.jdom2.JDOMException
Translate an undefined link to wiki syntax.- Parameters:
e
- element being translated.- Throws:
org.jdom2.JDOMException
-
linkMarkup
protected abstract void linkMarkup(org.jdom2.Element e) throws org.jdom2.JDOMException
Provide wiki markup for the XHTML element being translated.- Parameters:
e
- element being translated.- Throws:
org.jdom2.JDOMException
- error parsing the element being translated.
-
linkMarkup
protected abstract void linkMarkup(org.jdom2.Element e, java.lang.String ref) throws org.jdom2.JDOMException
Provide wiki markup for the XHTML element being translated.- Parameters:
e
- element being translated.ref
- link's href.- Throws:
org.jdom2.JDOMException
- error parsing the element being translated.
-
linkMarkup
protected abstract void linkMarkup(org.jdom2.Element e, java.lang.String ref, java.lang.String additionalAttrs) throws org.jdom2.JDOMException
Provide wiki markup for the XHTML element being translated.- Parameters:
e
- element being translated.ref
- link's href.additionalAttrs
- link's additional attributes.- Throws:
org.jdom2.JDOMException
- error parsing the element being translated.
-
linkMarkup
protected abstract void linkMarkup(java.lang.String text, java.lang.String ref)
Provide wiki markup for the XHTML element being translated.- Parameters:
text
- link's textref
- link's href - might be equals totext
!
-
-