public final class CreateMapProcessor extends AbstractProcessor<CreateMapProcessor.Input,CreateMapProcessor.Output>
A processor to render a map that can be embedded as a sub-report into a JasperReports template.
See also: !map attribute
[[examples=verboseExample]]| Modifier and Type | Class and Description |
|---|---|
static class |
CreateMapProcessor.Input
The Input object for processor.
|
static class |
CreateMapProcessor.Output
Output for the processor.
|
AbstractProcessor.ContextProcessor.ExecutionContext| Modifier | Constructor and Description |
|---|---|
protected |
CreateMapProcessor()
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
static MapBounds |
adjustBoundsToScaleAndMapSize(GenericMapAttribute.GenericMapAttributeValues mapValues,
java.awt.Rectangle paintArea,
MapBounds bounds,
double dpi)
If requested, adjust the bounds to the nearest scale and the map size.
|
CreateMapProcessor.Input |
createInputParameter()
Returns a new/clean instance of a parameter object.
|
static MapfishMapContext |
createMapContext(MapAttribute.MapAttributeValues mapValues) |
CreateMapProcessor.Output |
execute(CreateMapProcessor.Input param,
Processor.ExecutionContext context)
Perform the process on the input attributes.
|
protected void |
extraValidation(java.util.List<java.lang.Throwable> validationErrors,
Configuration configuration)
Perform any extra validation a subclass may need to perform.
|
static org.apache.batik.svggen.SVGGraphics2D |
getSvgGraphics(java.awt.Dimension size)
Create a SVG graphic with the give dimensions.
|
static void |
saveSvgFile(org.apache.batik.svggen.SVGGraphics2D graphics2d,
java.io.File path)
Save a SVG graphic to the given path.
|
checkCancelState, getInputMapperBiMap, getInputPrefix, getOutputMapperBiMap, getOutputPrefix, getOutputType, setInputMapper, setInputPrefix, setOutputMapper, setOutputPrefix, setPrefix, toString, validatepublic CreateMapProcessor.Input createInputParameter()
ProcessorValues object.
The way the properties will be looked up is to
Values object using the mapped property name
HasDefaultValue annotation is on the field for the property.
public CreateMapProcessor.Output execute(CreateMapProcessor.Input param, Processor.ExecutionContext context) throws java.lang.Exception
Processorparam - A Java object whose public fields are populated from the Values object
(which is used for transferring properties between processors).context - The execution context for a print task.Values object. The
key in the Values object is the name of the field or if there is a mapping in the
Processor.getOutputMapperBiMap() map, the mapped name. The key is determined in a similar way as for the input object.java.lang.Exceptionprotected void extraValidation(java.util.List<java.lang.Throwable> validationErrors,
Configuration configuration)
AbstractProcessorextraValidation in class AbstractProcessor<CreateMapProcessor.Input,CreateMapProcessor.Output>validationErrors - a list to add errors to so that all validation errors are reported as one.configuration - the containing configurationpublic static MapfishMapContext createMapContext(MapAttribute.MapAttributeValues mapValues)
mapValues - The map parameters.public static MapBounds adjustBoundsToScaleAndMapSize(GenericMapAttribute.GenericMapAttributeValues mapValues, java.awt.Rectangle paintArea, MapBounds bounds, double dpi)
mapValues - Map parameters.paintArea - The size of the painting area.bounds - The map bounds.dpi - the DPI.public static org.apache.batik.svggen.SVGGraphics2D getSvgGraphics(java.awt.Dimension size)
throws javax.xml.parsers.ParserConfigurationException
size - The size of the SVG graphic.javax.xml.parsers.ParserConfigurationExceptionpublic static void saveSvgFile(org.apache.batik.svggen.SVGGraphics2D graphics2d,
java.io.File path)
throws java.io.IOException
graphics2d - The SVG graphic to save.path - The file.java.io.IOException