Package org.apache.wiki.htmltowiki
Class XHtmlElementToWikiTranslator
- java.lang.Object
-
- org.apache.wiki.htmltowiki.XHtmlElementToWikiTranslator
-
public class XHtmlElementToWikiTranslator extends java.lang.Object
Converting XHtml to Wiki Markup. This is the class which orchestrates all the heavy loading.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
XHtmlElementToWikiTranslator.ElementDecoratorData
Simple data placeholder class to move decoration state between plain text syntax translation related classes.
-
Constructor Summary
Constructors Constructor Description XHtmlElementToWikiTranslator(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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getWikiString()
Outputs 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 Detail
-
XHtmlElementToWikiTranslator
public XHtmlElementToWikiTranslator(Engine e, org.jdom2.Element base) throws org.jdom2.JDOMException, java.lang.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.java.lang.ReflectiveOperationException
-
XHtmlElementToWikiTranslator
public XHtmlElementToWikiTranslator(Engine e, org.jdom2.Element base, XHtmlToWikiConfig config) throws org.jdom2.JDOMException, java.lang.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.java.lang.ReflectiveOperationException
-
-
Method Detail
-
getWikiString
public java.lang.String getWikiString()
Outputs parsed wikitext.- Returns:
- parsed wikitext.
-
translate
public void translate(org.jdom2.Content element) throws org.jdom2.JDOMException
- Throws:
org.jdom2.JDOMException
-
translateText
public void translateText(org.jdom2.Text element)
-
translateImage
public void translateImage(org.jdom2.Element base)
-
translateChildren
public void translateChildren(org.jdom2.Element base) throws org.jdom2.JDOMException
- Throws:
org.jdom2.JDOMException
-
translateParagraph
public void translateParagraph(org.jdom2.Element base) throws org.jdom2.JDOMException
- Throws:
org.jdom2.JDOMException
-
-