Package org.apache.wiki.htmltowiki
Class XHtmlElementToWikiTranslator
java.lang.Object
org.apache.wiki.htmltowiki.XHtmlElementToWikiTranslator
Converting XHtml to Wiki Markup. This is the class which orchestrates all the heavy loading.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
Simple data placeholder class to move decoration state between plain text syntax translation related classes. -
Constructor Summary
ConstructorsConstructorDescriptionXHtmlElementToWikiTranslator
(Engine e, org.jdom2.Element base) Create a new translator using the default config.XHtmlElementToWikiTranslator
(Engine e, org.jdom2.Element base, XHtmlToWikiConfig config) Create a new translator using the specified config. -
Method Summary
Modifier and TypeMethodDescriptionOutputs parsed wikitext.void
translate
(org.jdom2.Content element) void
translateChildren
(org.jdom2.Element base) void
translateImage
(org.jdom2.Element base) void
translateParagraph
(org.jdom2.Element base) void
translateText
(org.jdom2.Text element)
-
Constructor Details
-
XHtmlElementToWikiTranslator
public XHtmlElementToWikiTranslator(Engine e, org.jdom2.Element base) throws org.jdom2.JDOMException, ReflectiveOperationException Create a new translator using the default config.- Parameters:
base
- The base element from which to start translating.- Throws:
org.jdom2.JDOMException
- If the DOM tree is faulty.ReflectiveOperationException
-
XHtmlElementToWikiTranslator
public XHtmlElementToWikiTranslator(Engine e, org.jdom2.Element base, XHtmlToWikiConfig config) throws org.jdom2.JDOMException, ReflectiveOperationException Create a new translator using the specified config.- Parameters:
base
- The base element from which to start translating.config
- The config to use.- Throws:
org.jdom2.JDOMException
- If the DOM tree is faulty.ReflectiveOperationException
-
-
Method Details
-
getWikiString
Outputs parsed wikitext.- Returns:
- parsed wikitext.
-
translate
- Throws:
org.jdom2.JDOMException
-
translateText
-
translateImage
-
translateChildren
- Throws:
org.jdom2.JDOMException
-
translateParagraph
- Throws:
org.jdom2.JDOMException
-