Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## net.sf.jasperreports.engine.export
Class JRXmlExporter

    java.lang.Object
      net.sf.jasperreports.engine.JRAbstractExporter
          net.sf.jasperreports.engine.export.JRXmlExporter

All Implemented Interfaces:
  JRExporter

Direct Known Subclasses:
  JRXml4SwfExporter

    public class JRXmlExporter

extends JRAbstractExporter

Exports a JasperReports document to an XML file that contains the same data as a `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 DTD file called jasperprint.dtd

Version:
  $Id: JRXmlExporter.java 3940 2010-08-20 10:35:15Z teodord $
Author:
  Teodor Danciu (teodord@users.sourceforge.net)

Nested Class Summary
`protected class` | `JRXmlExporter.ExporterContext`

Nested classes/interfaces inherited from class net.sf.jasperreports.engine.JRAbstractExporter
`JRAbstractExporter.BaseExporterContext, JRAbstractExporter.ParameterOverriddenResolver, JRAbstractExporter.ParameterOverrideResolver, JRAbstractExporter.ParameterResolver`

Field Summary
`protected static java.lang.String` | `DEFAULT_OBJECT_TYPE`
`protected static java.lang.String` | `DEFAULT_XML_ENCODING`
`protected java.io.File` | `destFile`
`protected java.lang.String` | `dtdLocation`
`protected java.lang.String` | `encoding`
`protected JRXmlExporterContext` | `exporterContext`
`protected java.util.Map` | `fontsMap`
`protected static java.lang.String` | `IMAGE_PREFIX`
`protected java.util.Map` | `imageNameToImageDataMap`
`protected java.io.File` | `imagesDir`
`protected boolean` | `isEmbeddingImages`
`protected JRExportProgressMonitor` | `progressMonitor`
`protected java.util.Map` | `rendererToImagePathMap`
`protected java.util.Map` | `stylesMap`
`static java.lang.String` | `XML_EXPORTER_KEY` The exporter key, as used in `GenericElementHandlerEnviroment.getHandler(net.sf.jasperreports.engine.JRGenericElementType, String)`.
`protected static java.lang.String` | `XML_FILES_SUFFIX`
`protected JRXmlWriteHelper` | `xmlWriter`

Fields inherited from class net.sf.jasperreports.engine.JRAbstractExporter
`classLoader, classLoaderSet, dateFormatCache, endPageIndex, fileResolver, fileResolverSet, filter, globalOffsetX, globalOffsetY, hyperlinkProducerFactory, isModeBatch, jasperPrint, jasperPrintList, numberFormatCache, parameters, PROPERTY_CELL_FORMULA, PROPERTY_DEFAULT_FILTER_FACTORY, PROPERTY_SUFFIX_DEFAULT_FILTER_FACTORY, startPageIndex, urlHandlerFactory, urlHandlerFactorySet`

Constructor Summary
`JRXmlExporter()`

Method Summary
`void` | `exportElement(JRPrintElement element)`
`protected void` | `exportElements(java.util.Collection elements)`
`protected void` | `exportEllipse(JRPrintEllipse ellipse)`
`protected void` | `exportFont(JRFont font)`
`protected void` | `exportFrame(JRPrintFrame frame)`
`protected void` | `exportGenericElement(JRGenericPrintElement element)`
`protected void` | `exportGraphicElement(JRPrintGraphicElement element)`
`protected void` | `exportHyperlinkParameter(JRPrintHyperlinkParameter parameter)`
`protected void` | `exportHyperlinkParameters(JRPrintHyperlink hyperlink)`
`protected void` | `exportImage(JRPrintImage image)`
`protected void` | `exportLine(JRPrintLine line)`
`protected void` | `exportOrigin(JROrigin origin)`
`protected void` | `exportPage(JRPrintPage page)`
`protected void` | `exportPen(JRPen pen)`
`protected void` | `exportPen(java.lang.String element, JRPen pen)`
`protected void` | `exportProperties(JRPropertiesHolder propertiesHolder)`
`protected void` | `exportRectangle(JRPrintRectangle rectangle)`
`void` | `exportReport()` Actually starts the export process.
`protected void` | `exportReportElement(JRPrintElement element)`
`protected void` | `exportReportFont(JRReportFont font)`
`protected java.lang.StringBuffer` | `exportReportToBuffer()`
`protected void` | `exportReportToFile()`
`protected void` | `exportReportToStream(java.io.Writer writer)`
`protected void` | `exportStyle(JRStyle style)`
`void` | `exportText(JRPrintText text)`
`protected java.lang.StringBuffer` | `formatTextLineBreakOffsets(short[] lineBreakOffsets)`
`protected java.lang.String` | `getExporterKey()`
`protected java.lang.String` | `getExporterPropertiesPrefix()`
`protected void` | `setHyperlinkProducerFactory()`

Methods inherited from class net.sf.jasperreports.engine.JRAbstractExporter
`createFilter, defaultParseNumber, getBooleanCellValue, getBooleanParameter, getCharacterParameter, getCustomHandler, getDateCellValue, getDateFormat, getFloatParameter, getHyperlinkProducer, getIntegerParameter, getLocale, getNumberCellValue, getNumberFormat, getOffsetX, getOffsetY, getParameter, getParameterResolver, getParameters, getStringArrayParameter, getStringParameter, getStringParameterOrDefault, getStyledText, getStyledText, getTextFormatFactoryClass, getTextLocale, getTextTimeZone, getTextValue, getTextValueString, reset, resetClassLoader, resetExportContext, restoreElementOffsets, setClassLoader, setExportContext, setFrameElementsOffset, setInput, setJasperPrint, setOffset, setOffset, setOutput, setPageRange, setParameter, setParameters`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### XML_EXPORTER_KEY

    public static final java.lang.String XML_EXPORTER_KEY

  The exporter key, as used in `GenericElementHandlerEnviroment.getHandler(net.sf.jasperreports.engine.JRGenericElementType, String)`.

  See Also:
    Constant Field Values

### DEFAULT_XML_ENCODING

    protected static final java.lang.String DEFAULT_XML_ENCODING

See Also:
  Constant Field Values

### DEFAULT_OBJECT_TYPE

    protected static final java.lang.String DEFAULT_OBJECT_TYPE

See Also:
  Constant Field Values

### XML_FILES_SUFFIX

    protected static final java.lang.String XML_FILES_SUFFIX

See Also:
  Constant Field Values

### IMAGE_PREFIX

    protected static final java.lang.String IMAGE_PREFIX

See Also:
  Constant Field Values

### xmlWriter

    protected JRXmlWriteHelper xmlWriter

### encoding

    protected java.lang.String encoding

### progressMonitor

    protected JRExportProgressMonitor progressMonitor

### rendererToImagePathMap

    protected java.util.Map rendererToImagePathMap

### imageNameToImageDataMap

    protected java.util.Map imageNameToImageDataMap

### fontsMap

    protected java.util.Map fontsMap

### stylesMap

    protected java.util.Map stylesMap

### dtdLocation

    protected java.lang.String dtdLocation

### isEmbeddingImages

    protected boolean isEmbeddingImages

### destFile

    protected java.io.File destFile

### imagesDir

    protected java.io.File imagesDir

### exporterContext

    protected JRXmlExporterContext exporterContext

Constructor Detail

### JRXmlExporter

    public JRXmlExporter()

Method Detail

### exportReport

    public void exportReport()
                      throws JRException

  Description copied from interface: `JRExporter`
  Actually starts the export process.

  Specified by:
    `exportReport` in interface `JRExporter`
  Specified by:
    `exportReport` in class `JRAbstractExporter`
  Throws:
    `JRException`

### setHyperlinkProducerFactory

    protected void setHyperlinkProducerFactory()

  Overrides:
    `setHyperlinkProducerFactory` in class `JRAbstractExporter`

### exportReportToFile

    protected void exportReportToFile()
                               throws JRException

  Throws:
    `JRException`

### exportReportToBuffer

    protected java.lang.StringBuffer exportReportToBuffer()
                                                   throws JRException

  Throws:
    `JRException`

### exportReportToStream

    protected void exportReportToStream(java.io.Writer writer)
                                 throws JRException,
                                        java.io.IOException

  Throws:
    `JRException`
    `java.io.IOException`

### exportProperties

    protected void exportProperties(JRPropertiesHolder propertiesHolder)
                             throws java.io.IOException

  Throws:
    `java.io.IOException`

### exportReportFont

    protected void exportReportFont(JRReportFont font)
                             throws java.io.IOException

  Throws:
    `java.io.IOException`

### exportStyle

    protected void exportStyle(JRStyle style)
                        throws java.io.IOException

  Throws:
    `java.io.IOException`

### exportOrigin

    protected void exportOrigin(JROrigin origin)
                         throws java.io.IOException

  Throws:
    `java.io.IOException`

### exportPage

    protected void exportPage(JRPrintPage page)
                       throws JRException,
                              java.io.IOException

  Throws:
    `java.io.IOException`
    `JRException`

### exportElements

    protected void exportElements(java.util.Collection elements)
                           throws java.io.IOException,
                                  JRException

  Throws:
    `java.io.IOException`
    `JRException`

### exportElement

    public void exportElement(JRPrintElement element)
                       throws java.io.IOException,
                              JRException

  Throws:
    `java.io.IOException`
    `JRException`

### exportLine

    protected void exportLine(JRPrintLine line)
                       throws java.io.IOException

  Throws:
    `java.io.IOException`

### exportReportElement

    protected void exportReportElement(JRPrintElement element)
                                throws java.io.IOException

  Throws:
    `java.io.IOException`

### exportGraphicElement

    protected void exportGraphicElement(JRPrintGraphicElement element)
                                 throws java.io.IOException

  Throws:
    `java.io.IOException`

### exportPen

    protected void exportPen(JRPen pen)
                      throws java.io.IOException

  Throws:
    `java.io.IOException`

### exportPen

    protected void exportPen(java.lang.String element,
                             JRPen pen)
                      throws java.io.IOException

  Throws:
    `java.io.IOException`

### exportRectangle

    protected void exportRectangle(JRPrintRectangle rectangle)
                            throws java.io.IOException

  Throws:
    `java.io.IOException`

### exportEllipse

    protected void exportEllipse(JRPrintEllipse ellipse)
                          throws java.io.IOException

  Throws:
    `java.io.IOException`

### exportImage

    protected void exportImage(JRPrintImage image)
                        throws JRException,
                               java.io.IOException

  Throws:
    `JRException`
    `java.io.IOException`

### exportText

    public void exportText(JRPrintText text)
                    throws java.io.IOException

  Throws:
    `java.io.IOException`

### formatTextLineBreakOffsets

    protected java.lang.StringBuffer formatTextLineBreakOffsets(short[] lineBreakOffsets)

### exportFont

    protected void exportFont(JRFont font)
                       throws java.io.IOException

  Throws:
    `java.io.IOException`

### exportFrame

    protected void exportFrame(JRPrintFrame frame)
                        throws java.io.IOException,
                               JRException

  Throws:
    `java.io.IOException`
    `JRException`

### exportHyperlinkParameters

    protected void exportHyperlinkParameters(JRPrintHyperlink hyperlink)
                                      throws java.io.IOException

  Throws:
    `java.io.IOException`

### exportHyperlinkParameter

    protected void exportHyperlinkParameter(JRPrintHyperlinkParameter parameter)
                                     throws java.io.IOException

  Throws:
    `java.io.IOException`

### exportGenericElement

    protected void exportGenericElement(JRGenericPrintElement element)
                                 throws java.io.IOException

  Throws:
    `java.io.IOException`

### getExporterPropertiesPrefix

    protected java.lang.String getExporterPropertiesPrefix()

### getExporterKey

    protected java.lang.String getExporterKey()

  Specified by:
    `getExporterKey` in class `JRAbstractExporter`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

© 2001-2010 Jaspersoft Corporation www.jaspersoft.com