Package org.apache.wiki.htmltowiki.syntax

## Class ADecorator

- java.lang.Object
- - org.apache.wiki.htmltowiki.syntax.ADecorator

    public abstract class ADecorator
    extends java.lang.Object

Translates to wiki syntax from an `A` element.

### Field Summary

Fields
`protected XHtmlElementToWikiTranslator` `chain`
`protected XHtmlToWikiConfig` `config`
`protected java.io.PrintWriter` `out`

### Constructor Summary

Constructors
`protected` `ADecorator​(java.io.PrintWriter out, XHtmlToWikiConfig config, XHtmlElementToWikiTranslator chain)`

### Method Summary

All Methods Instance Methods Abstract Methods Concrete Methods
`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.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### 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 text
  `href` - 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 text
  `ref` - link's href - might be equals to `text`!