|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.util.AbstractMap<K,V> java.util.HashMap<String,Object> org.tinyjee.maven.dim.extensions.SvgLoader
public class SvgLoader
SvgLoader is a 'source-class' compatible helper class that can load and transform SVG content and include it either directly or rendered as PNG.
The loader is an extension of XmlLoader and supports remote URLs (e.g. services) and local paths to get the SVG source content. Usage:
%{include|source=template.vm|source-class=org.tinyjee.maven.dim.extensions.SvgLoader|svg=file.svg}
%{include|source=template.vm|source-svg=file.svg}
%{include|source-svg=file.xml|xsl=transform-to-svg.xsl}
Nested Class Summary | |
---|---|
static class |
SvgLoader.AliasHandler
Implements the " PARAM_ALIAS " alias functionality. |
Nested classes/interfaces inherited from class java.util.AbstractMap |
---|
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V> |
Field Summary | |
---|---|
static String |
OUT_PARAM_DOCUMENT
Is set with the parsed document object ( Document ) and can be accessed from velocity templates. |
static String |
OUT_PARAM_XPATH
Is set with an XPath evaluator, see XmlLoader for details. |
static String |
PARAM_ALIAS
Defines a shortcut for the request properties 'source-class' and 'svg'. |
static String |
PARAM_ATTACH
Specifies whether the SVG is attached to the page (instead of copied straight to the document). |
static String |
PARAM_HEIGHT
Optional Parameter, sets the height in pixel. |
static String |
PARAM_RENDER
Specifies whether the SVG is rendered to an image and included. |
static String |
PARAM_RENDER_BACKGROUND
Specifies a background color to use when rendering an SVG to an image. |
static String |
PARAM_RENDER_MEDIA
Specifies the CSS media when rendering an SVG containing CSS stylesheets with alternating media styles. |
static String |
PARAM_SVG
Sets the URL or local path to the SVG file to load inside the request parameters. |
static String |
PARAM_WIDTH
Optional Parameter, sets the width in pixel. |
static String |
PARAM_XSL
Optional Parameter, transform the given input (e.g. |
Constructor Summary | |
---|---|
SvgLoader(File baseDir,
Map<String,Object> requestParams)
|
Method Summary |
---|
Methods inherited from class java.util.HashMap |
---|
clear, clone, containsKey, containsValue, entrySet, get, isEmpty, keySet, put, putAll, remove, size, values |
Methods inherited from class java.util.AbstractMap |
---|
equals, hashCode, toString |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.util.Map |
---|
equals, hashCode |
Field Detail |
---|
public static final String PARAM_ALIAS
public static final String PARAM_SVG
source
"
(see Macro reference).
Note: When no further source is specified, the svg loader uses a built-in template to add the SVG to
the output as image using Apache Batik to render it.
public static final String PARAM_XSL
XmlLoader
for details.
public static final String PARAM_WIDTH
public static final String PARAM_HEIGHT
public static final String PARAM_RENDER
public static final String PARAM_RENDER_BACKGROUND
public static final String PARAM_RENDER_MEDIA
public static final String PARAM_ATTACH
source-is-template=true
".
public static final String OUT_PARAM_DOCUMENT
Document
) and can be accessed from velocity templates.
public static final String OUT_PARAM_XPATH
XmlLoader
for details.
Constructor Detail |
---|
public SvgLoader(File baseDir, Map<String,Object> requestParams) throws Exception
Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |