net.sf.jasperreports.engine.export
Class JRXmlExporter

java.lang.Object
  extended bynet.sf.jasperreports.engine.JRAbstractExporter
      extended bynet.sf.jasperreports.engine.export.JRXmlExporter
All Implemented Interfaces:
JRExporter

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,v 1.37 2005/08/25 14:33:59 ionutned Exp $
Author:
Teodor Danciu (teodord@users.sourceforge.net)

Field Summary
protected static int colorMask
           
protected  java.io.File destFile
           
protected  java.lang.String dtdLocation
           
protected  java.lang.String encoding
           
protected  java.util.Map fontsMap
           
protected  java.util.Map imageNameToImageDataMap
           
protected  java.io.File imagesDir
           
protected  boolean isEmbeddingImages
           
protected  JRExportProgressMonitor progressMonitor
           
protected  java.util.Map rendererToImagePathMap
           
protected  java.io.Writer writer
           
 
Fields inherited from class net.sf.jasperreports.engine.JRAbstractExporter
defaultFont, endPageIndex, globalOffsetX, globalOffsetY, isModeBatch, jasperPrint, jasperPrintList, parameters, startPageIndex, styledTextParser
 
Constructor Summary
JRXmlExporter()
           
 
Method Summary
protected  void exportEllipse(JRPrintEllipse ellipse)
           
protected  java.lang.String exportFont(JRFont font)
           
protected  void exportGraphicElement(JRPrintGraphicElement element)
           
protected  void exportImage(JRPrintImage image)
           
protected  void exportLine(JRPrintLine line)
           
protected  void exportPage(JRPrintPage page)
           
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()
           
protected  void exportText(JRPrintText text)
           
 
Methods inherited from class net.sf.jasperreports.engine.JRAbstractExporter
getDefaultFont, getParameter, getParameters, getStyledText, setInput, 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

writer

protected java.io.Writer writer

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

dtdLocation

protected java.lang.String dtdLocation

isEmbeddingImages

protected boolean isEmbeddingImages

destFile

protected java.io.File destFile

imagesDir

protected java.io.File imagesDir

colorMask

protected static final int colorMask
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

exportReportToFile

protected void exportReportToFile()
                           throws JRException
Throws:
JRException

exportReportToBuffer

protected java.lang.StringBuffer exportReportToBuffer()
                                               throws JRException
Throws:
JRException

exportReportToStream

protected void exportReportToStream()
                             throws JRException,
                                    java.io.IOException
Throws:
JRException
java.io.IOException

exportReportFont

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

exportPage

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

exportLine

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

exportReportElement

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

exportGraphicElement

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

exportRectangle

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

exportEllipse

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

exportImage

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

exportText

protected void exportText(JRPrintText text)
                   throws java.io.IOException
Throws:
java.io.IOException
java.io.IOException

exportFont

protected java.lang.String exportFont(JRFont font)


© 2001-2005 JasperSoft Corporation www.jaspersoft.com