Package org.apache.wiki.htmltowiki.syntax

## Class ImageDecorator

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

    public abstract class ImageDecorator
    extends java.lang.Object

Translates to wiki syntax from an XHTML Image.

### Field Summary

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

### Constructor Summary

Constructors
`protected` `ImageDecorator​(java.io.PrintWriter out, XHtmlToWikiConfig config)`

### Method Summary

All Methods Instance Methods Abstract Methods Concrete Methods
`void` `decorate​(java.lang.String src, java.util.Map<java.lang.String,​java.lang.Object> imageAttrs)` Translates the given XHTML element into wiki markup.
`void` `decorate​(org.jdom2.Element e)` Translates the given XHTML element into wiki markup.
`protected abstract java.lang.String` `markupImageSimpleClose()` Closing wiki markup for a simple (no image attributes) link image.
`protected abstract java.lang.String` `markupImageSimpleOpen()` Opening wiki markup for a simple (no image attributes) link image.
`protected abstract void` `markupImageWithAttributes​(java.lang.String src, java.util.Map<java.lang.String,​java.lang.Object> imageAttrs)` Wiki markup for a link image with image attributes.

### 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

### Constructor Detail

#### ImageDecorator

    protected ImageDecorator​(java.io.PrintWriter out,
                             XHtmlToWikiConfig config)

### Method Detail

#### decorate

    public void decorate​(java.lang.String src,
                         java.util.Map<java.lang.String,​java.lang.Object> imageAttrs)

Translates the given XHTML element into wiki markup.

Parameters:
  `src` - image source.
  `imageAttrs` - image attributes.

#### decorate

    public void decorate​(org.jdom2.Element e)

Translates the given XHTML element into wiki markup.

Parameters:
  `e` - XHTML element being translated.

#### markupImageSimpleOpen

    protected abstract java.lang.String markupImageSimpleOpen()

Opening wiki markup for a simple (no image attributes) link image.

Returns:
  Opening wiki markup for a simple (no image attributes) link image.

#### markupImageSimpleClose

    protected abstract java.lang.String markupImageSimpleClose()

Closing wiki markup for a simple (no image attributes) link image.

Returns:
  Closing wiki markup for a simple (no image attributes) link image.

#### markupImageWithAttributes

    protected abstract void markupImageWithAttributes​(java.lang.String src,
                                                      java.util.Map<java.lang.String,​java.lang.Object> imageAttrs)

Wiki markup for a link image with image attributes.

Parameters:
  `src` - image source.
  `imageAttrs` - image attributes.