JFCTransformer

Description

JFCTransformer acts as a maker of business charts whose description is provided using XML. The output of such a transformation is SVG, which could later be serialized as PNG or JPEG. In addition, ChartTransformer can generate a bitmap image (PNG, JPEG) and save it to a file for later re-use.

Sitemap component configuration

<map:transformer name="chart" src="it.ipzs.charts.JFCTransformer"/>

Sample sitemap pipeline

<map:match name="wildcard" pattern="chart-minimal.svg"> <map:generate type="file" src="minmal.xml"/> <map:transform type="chart"/> <map:serialize type="xml"/> </map:match >

Warning This pipeline generates SVG, hence a plug-in must be installed in your browser to see it properly

Configurable parameters

The transformation stage can take either 0 or three parameters:

  1. path: the directory, expressed as an absolute path, holding the generated image
  2. file: the name of the generated image
  3. type: the file format of the generated image, it could assume the values "jpg" or "png" To sum it up: if you want the image to be shown on the browser only, don't include any parameter, if you, in addition to showing the image on the browser, want the image to be stored in the file system, fill the three parameters

JFCSerializer

Description

JFCSerializer acts as a maker of business charts whose description is provided using XML. The output of such a transformation is PNG or JPEG.

Sitemap component configuration

<map:serializer name="chart-jpeg" src="it.ipzs.charts.JFCSerializer" mime-type="image/jpeg"/>

Sample sitemap pipeline

<map:match name="wildcard" pattern="chart-minimal.jpg"> <map:generate type="file" src="minimal.xml"/> <map:serialize type="chart-jpeg"/> </map:match >