Class XHtmlElementToWikiTranslator


  • public class XHtmlElementToWikiTranslator
    extends java.lang.Object
    Converting XHtml to Wiki Markup. This is the class which orchestrates all the heavy loading.
    • 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