Package org.apache.wiki.htmltowiki.syntax

# Class ADecorator

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

public abstract class ADecorator extends Object
Translates to wiki syntax from an `A` element.

## Field Summary

Fields
Modifier and Type
Field
Description
`protected final XHtmlElementToWikiTranslator`
`chain`
`protected final XHtmlToWikiConfig`
`config`
`protected final PrintWriter`
`out`

## Constructor Summary

Constructors
Modifier
Constructor
Description
`protected`
`ADecorator(PrintWriter out, XHtmlToWikiConfig config, XHtmlElementToWikiTranslator chain)`

## Method Summary

Modifier and Type
Method
Description
`void`
`decorate(org.jdom2.Element e, String ref)`
Translates the given XHTML element into wiki markup.
`void`
`decorateFootnote(String text, 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(String text, 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, String ref)`
Provide wiki markup for the XHTML element being translated.
`protected abstract void`
`linkMarkup(org.jdom2.Element e, String ref, 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 Details

### out

protected final PrintWriter out

### config

protected final XHtmlToWikiConfig config

### chain

protected final XHtmlElementToWikiTranslator chain

## Constructor Details

### ADecorator

protected ADecorator(PrintWriter out, XHtmlToWikiConfig config, XHtmlElementToWikiTranslator chain)

## Method Details

### decorate

public void decorate(org.jdom2.Element e, 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(String text, 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, 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, String ref, 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(String text, 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`!