public class JRXmlExporter extends JRAbstractExporter
JasperPrint
object, but in XML format, instead of a serialized class. Such XML files can be parsed back into JasperPrint
object using the JRPrintXmlLoader utility class. Their structure is validated
against an internal XSD file called jasperprint.xsd.| Modifier and Type | Class and Description |
|---|---|
protected class |
JRXmlExporter.ExporterContext |
JRAbstractExporter.BaseExporterContext, JRAbstractExporter.ParameterOverriddenResolver, JRAbstractExporter.ParameterOverrideResolver, JRAbstractExporter.ParameterResolver| Modifier and Type | Field and Description |
|---|---|
protected static String |
DEFAULT_OBJECT_TYPE |
protected static String |
DEFAULT_XML_ENCODING |
protected File |
destFile |
protected String |
encoding |
protected JRXmlExporterContext |
exporterContext |
protected static String |
IMAGE_PREFIX |
protected Map<String,byte[]> |
imageNameToImageDataMap |
protected File |
imagesDir |
protected boolean |
isEmbeddingImages |
static XmlNamespace |
JASPERPRINT_NAMESPACE |
protected JRExportProgressMonitor |
progressMonitor |
static String |
PROPERTY_REPLACE_INVALID_CHARS
Stores the text sequence used to replace invalid XML characters
|
protected Map<Renderable,String> |
rendererToImagePathMap |
protected Map<String,JRStyle> |
stylesMap |
protected String |
version |
protected VersionComparator |
versionComparator |
static String |
XML_EXPORTER_KEY
The exporter key, as used in
GenericElementHandlerEnviroment.getHandler(net.sf.jasperreports.engine.JRGenericElementType, String). |
protected static String |
XML_FILES_SUFFIX |
protected JRXmlWriteHelper |
xmlWriter |
allSelector, dateFormatCache, endPageIndex, filter, fontMap, globalOffsetX, globalOffsetY, hyperlinkProducerFactory, isModeBatch, jasperPrint, jasperPrintList, jasperReportsContext, noBackcolorSelector, noneSelector, numberFormatCache, parameters, propertiesUtil, PROPERTY_DEFAULT_FILTER_FACTORY, PROPERTY_SUFFIX_DEFAULT_FILTER_FACTORY, startPageIndex, styledTextUtil| Constructor and Description |
|---|
JRXmlExporter() |
JRXmlExporter(JasperReportsContext jasperReportsContext) |
createFilter, defaultParseNumber, getBooleanCellValue, getBooleanParameter, getCharacterParameter, getCustomHandler, getDateCellValue, getDateFormat, getFloatParameter, getHyperlinkProducer, getIntegerParameter, getJasperReportsContext, getLocale, getNumberCellValue, getNumberFormat, getOffsetX, getOffsetY, getParameter, getParameterResolver, getParameters, getPropertiesUtil, getReportContext, getStringArrayParameter, getStringParameter, getStringParameterOrDefault, getStyledText, getStyledText, getTextFormatFactoryClass, getTextLocale, getTextTimeZone, getTextValue, getTextValueString, reset, resetClassLoader, resetExportContext, restoreElementOffsets, setClassLoader, setExportContext, setFontMap, setFrameElementsOffset, setInput, setJasperPrint, setJasperReportsContext, setOffset, setOffset, setOutput, setPageRange, setParameter, setParameters, setReportContextpublic static final String XML_EXPORTER_KEY
GenericElementHandlerEnviroment.getHandler(net.sf.jasperreports.engine.JRGenericElementType, String).public static final String PROPERTY_REPLACE_INVALID_CHARS
protected static final String DEFAULT_XML_ENCODING
protected static final String DEFAULT_OBJECT_TYPE
protected static final String XML_FILES_SUFFIX
protected static final String IMAGE_PREFIX
public static final XmlNamespace JASPERPRINT_NAMESPACE
protected JRXmlWriteHelper xmlWriter
protected String encoding
protected String version
protected VersionComparator versionComparator
protected JRExportProgressMonitor progressMonitor
protected Map<Renderable,String> rendererToImagePathMap
protected boolean isEmbeddingImages
protected File destFile
protected File imagesDir
protected JRXmlExporterContext exporterContext
public JRXmlExporter()
JRXmlExporter(JasperReportsContext)public JRXmlExporter(JasperReportsContext jasperReportsContext)
public void exportReport()
throws JRException
JRExporterexportReport in interface JRExporterexportReport in class JRAbstractExporterJRExceptionprotected void setHyperlinkProducerFactory()
setHyperlinkProducerFactory in class JRAbstractExporterprotected void exportReportToFile()
throws JRException
JRExceptionprotected StringBuffer exportReportToBuffer() throws JRException
JRExceptionprotected XmlNamespace getNamespace()
protected void exportReportToStream(Writer writer) throws JRException, IOException
JRExceptionIOExceptionprotected void exportProperties(JRPropertiesHolder propertiesHolder) throws IOException
IOExceptionprotected void exportStyle(JRStyle style) throws IOException
IOExceptionprotected void exportOrigin(JROrigin origin) throws IOException
IOExceptionprotected void exportPage(JRPrintPage page) throws JRException, IOException
IOExceptionJRExceptionprotected void exportElements(Collection<JRPrintElement> elements) throws IOException, JRException
IOExceptionJRExceptionpublic void exportElement(JRPrintElement element) throws IOException, JRException
IOExceptionJRExceptionprotected void exportLine(JRPrintLine line) throws IOException
IOExceptionprotected void exportReportElement(JRPrintElement element) throws IOException
IOExceptionprotected void exportGraphicElement(JRPrintGraphicElement element) throws IOException
IOExceptionprotected void exportPen(JRPen pen) throws IOException
IOExceptionprotected void exportPen(String element, JRPen pen) throws IOException
IOExceptionprotected void exportRectangle(JRPrintRectangle rectangle) throws IOException
IOExceptionprotected void exportEllipse(JRPrintEllipse ellipse) throws IOException
IOExceptionpublic void exportImage(JRPrintImage image) throws JRException, IOException
JRExceptionIOExceptionpublic void exportText(JRPrintText text) throws IOException
IOExceptionprotected StringBuffer formatTextLineBreakOffsets(short[] lineBreakOffsets)
public void exportTabStop(TabStop tabStop) throws IOException
IOExceptionprotected void exportFont(JRFont font) throws IOException
IOExceptionprotected void exportFrame(JRPrintFrame frame) throws IOException, JRException
IOExceptionJRExceptionprotected void exportHyperlinkParameters(JRPrintHyperlink hyperlink) throws IOException
IOExceptionprotected void exportHyperlinkParameter(JRPrintHyperlinkParameter parameter) throws IOException
IOExceptionprotected void exportGenericElement(JRGenericPrintElement element) throws IOException
IOExceptionprotected String getExporterPropertiesPrefix()
protected String getExporterKey()
getExporterKey in class JRAbstractExporterpublic JRXmlWriteHelper getXmlWriteHelper()
protected boolean isNewerVersionOrEqual(String oldVersion)
Copyright © 2012. All Rights Reserved.