Interface SyntaxDecorator

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void a​(org.jdom2.Element e, java.lang.String ref)
      Decorates an a element.
      void aFootnote​(java.lang.String text, java.lang.String ref)
      Decorates an a element, pointing to a footnote.
      void aUndefined​(org.jdom2.Element e)
      Decorates an a element to an undefined page.
      void br​(org.jdom2.Element base, org.jdom2.Element e)
      Decorates a br element.
      void code​(org.jdom2.Element e)
      Decorates a code ot tt element.
      void dd​(org.jdom2.Element e)
      Decorates a dd element.
      void dl​(org.jdom2.Element e)
      Decorates a dl element.
      void dt​(org.jdom2.Element e)
      Decorates a dt element.
      void em​(org.jdom2.Element e)
      Decorates an em, i or address element.
      void form​(org.jdom2.Element e)
      Decorates a form element.
      void h1​(org.jdom2.Element e)
      Decorates an h1 element.
      void h2​(org.jdom2.Element e)
      Decorates an h2 element.
      void h3​(org.jdom2.Element e)
      Decorates an h3 element.
      void h4​(org.jdom2.Element e)
      Decorates an h4 element.
      void hr​(org.jdom2.Element e)
      Decorates an hr 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 an input element.
      void li​(org.jdom2.Element base, org.jdom2.Element e)
      Decorates a li element.
      void ol​(org.jdom2.Element e)
      Decorates an ol element.
      void option​(org.jdom2.Element base, org.jdom2.Element e)
      Decorates an option element.
      void p​(org.jdom2.Element e)
      Decorates a p element.
      void paragraph​(XHtmlElementToWikiTranslator.ElementDecoratorData dto)
      Decorates a text paragraph.
      void pre​(org.jdom2.Element e)
      Decorates a pre element.
      void select​(org.jdom2.Element e)
      Decorates a select element.
      void strike​(org.jdom2.Element e)
      Decorates a strike element.
      void strong​(org.jdom2.Element e)
      Decorates a strong or b element.
      void sub​(org.jdom2.Element e)
      Decorates a sub element.
      void sup​(org.jdom2.Element e)
      Decorates an sup element.
      void table​(org.jdom2.Element e)
      Decorates a table element.
      void tbody​(org.jdom2.Element e)
      Decorates a tbody element.
      void td​(org.jdom2.Element e)
      Decorates an td element.
      void text​(org.jdom2.Text e)
      Decorates a text element.
      void textarea​(org.jdom2.Element e)
      Decorates a textarea element.
      void th​(org.jdom2.Element e)
      Decorates a th element.
      void thead​(org.jdom2.Element e)
      Decorates a thead element.
      void tr​(org.jdom2.Element e)
      Decorates a tr element.
      void ul​(org.jdom2.Element e)
      Decorates an ul element.
      void underline​(org.jdom2.Element e)
      Decorates an underline 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 nested lis.
        preStack - stack containing the amount of nested pres.
        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 an a 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 an a 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 an a 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 a br 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 a code ot tt 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 a dd 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 a dl 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 a dt 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 an em, i or address 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 a form 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 an hr 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 an h1 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 an h2 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 an h3 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 an h4 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 source
        imageAttrs - 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 an input 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 a li 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 an ol 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 an option 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 a p element.
        Parameters:
        e - 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 a pre 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 a strong or b 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 a table 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 a tbody 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 an td 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 a textarea 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 a th 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 a thead 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 a tr 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 a select 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 a strike 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 a sub 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 an sup 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 an ul 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 an underline element.
        Parameters:
        e - XHTML element being translated.
        Throws:
        org.jdom2.JDOMException - if an error has ocurred parsing the xhtml chain.