Package org.apache.wiki.htmltowiki.syntax

# Class ImageDecorator

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

public abstract class ImageDecorator extends Object
Translates to wiki syntax from an XHTML Image.

## Field Summary

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

## Constructor Summary

Constructors
Modifier
Constructor
Description
`protected`
`ImageDecorator(PrintWriter out, XHtmlToWikiConfig config)`

## Method Summary

Modifier and Type
Method
Description
`void`
`decorate(String src, Map<String,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 String`
`markupImageSimpleClose()`
Closing wiki markup for a simple (no image attributes) link image.
`protected abstract String`
`markupImageSimpleOpen()`
Opening wiki markup for a simple (no image attributes) link image.
`protected abstract void`
`markupImageWithAttributes(String src, Map<String,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 Details

### out

protected final PrintWriter out

### config

protected final XHtmlToWikiConfig config

## Constructor Details

### ImageDecorator

protected ImageDecorator(PrintWriter out, XHtmlToWikiConfig config)

## Method Details

### decorate

public void decorate(String src, Map<String,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 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 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(String src, Map<String,Object> imageAttrs)
Wiki markup for a link image with image attributes.

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