net.sf.jasperreports.engine.export.xmlss
Class JRXmlssExporter

java.lang.Object
  extended by net.sf.jasperreports.engine.JRAbstractExporter
      extended by net.sf.jasperreports.engine.export.xmlss.JRXmlssExporter
All Implemented Interfaces:
JRExporter

public class JRXmlssExporter
extends JRAbstractExporter

Exports a JasperReports document to XML Spreadsheet format. It has character output type and exports the document to a grid-based layout.

Version:
$Id: JRXmlssExporter.java 3124 2009-10-12 20:49:43Z lucianc $
Author:
sanda zaharia (shertage@users.sourceforge.net)

Nested Class Summary
 
Nested classes/interfaces inherited from class net.sf.jasperreports.engine.JRAbstractExporter
JRAbstractExporter.BaseExporterContext, JRAbstractExporter.ParameterOverriddenResolver, JRAbstractExporter.ParameterOverrideResolver, JRAbstractExporter.ParameterResolver
 
Field Summary
protected  java.lang.String currentSheetName
           
protected  JRFont defaultFont
           
protected  java.io.File destFile
           
protected  java.lang.String encoding
           
protected  java.util.Map fontMap
          Deprecated.  
protected  java.util.Map formatPatternsMap
           
protected static java.lang.String HORIZONTAL_ALIGN_CENTER
           
protected static java.lang.String HORIZONTAL_ALIGN_JUSTIFY
           
protected static java.lang.String HORIZONTAL_ALIGN_LEFT
           
protected static java.lang.String HORIZONTAL_ALIGN_RIGHT
           
static java.lang.String IMAGE_NAME_PREFIX
           
protected static int IMAGE_NAME_PREFIX_LEGTH
           
protected  java.util.Map imageMaps
           
protected  java.util.List imagesToProcess
           
protected  boolean isAutoDetectCellType
           
protected  boolean isCollapseRowSpan
           
protected  boolean isDetectCellType
           
protected  boolean isFontSizeFixEnabled
           
protected  boolean isIgnoreCellBorder
           
protected  boolean isIgnoreGraphics
           
protected  boolean isIgnorePageMargins
           
protected  boolean isOnePagePerSheet
           
protected  boolean isRemoveEmptySpaceBetweenColumns
           
protected  boolean isRemoveEmptySpaceBetweenRows
           
protected  boolean isWhitePageBackground
           
protected  boolean isWrapBreakWord
           
protected static java.lang.String JR_PAGE_ANCHOR_PREFIX
           
protected  int maxRowsPerSheet
           
protected  ExporterNature nature
           
protected static java.lang.String[] PAGE_LAYOUT
           
protected  int pageIndex
           
protected  byte pageOrientation
           
protected  JRExportProgressMonitor progressMonitor
           
protected  java.util.Map rendererToImagePathMap
           
protected  int reportIndex
           
protected  int sheetIndex
          used for counting the total number of sheets
protected  java.lang.String[] sheetNames
           
protected  java.util.Map sheetNamesMap
          used when indexing the identical sheet generated names with ordering numbers; contains sheet names as keys and the number of occurences of each sheet name as values
protected  boolean startPage
           
protected  int tableIndex
           
protected  java.io.Writer tempBodyWriter
           
protected  java.io.Writer tempStyleWriter
           
protected static java.lang.String VERTICAL_ALIGN_BOTTOM
           
protected static java.lang.String VERTICAL_ALIGN_MIDDLE
           
protected static java.lang.String VERTICAL_ALIGN_TOP
           
static java.lang.String XMLSS_EXPORTER_KEY
          The exporter key, as used in GenericElementHandlerEnviroment.getHandler(net.sf.jasperreports.engine.JRGenericElementType, String).
 
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
JRXmlssExporter()
           
 
Method Summary
protected  void buildColumns(CutsInfo xCuts, XmlssTableBuilder tableBuilder)
           
protected  void endFontTag()
           
protected  void exportFrame(XmlssTableBuilder tableBuilder, JRPrintFrame frame, JRExporterGridCell gridCell)
           
protected  int exportPage(JRPrintPage page, CutsInfo xCuts, int startRow, JRPrintElementIndex frameIndex, boolean isNewSheet)
           
 void exportReport()
          Actually starts the export process.
protected  java.lang.StringBuffer exportReportToBuffer()
           
protected  void exportReportToFile()
           
protected  void exportReportToStream(java.io.Writer writer)
           
protected  void exportStyledText(JRStyledText styledText)
           
protected  void exportStyledTextRun(java.util.Map attributes, java.lang.String text)
           
protected  void exportText(XmlssTableBuilder tableBuilder, JRPrintText text, JRExporterGridCell gridCell)
           
protected  JRPrintElementIndex getElementIndex(JRExporterGridCell gridCell)
           
protected  java.lang.String getExporterKey()
           
protected  java.lang.String getHyperlinkURL(JRPrintHyperlink link)
           
static JRPrintElementIndex getPrintElementIndex(java.lang.String imageName)
           
protected  void restoreBackcolor()
           
protected  void setBackcolor(java.awt.Color color)
           
protected  void setParameters()
           
protected  void startFontTag()
           
protected  void writeHyperlink(JRPrintHyperlink link)
           
 
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, getParameters, getStringParameter, getStringParameterOrDefault, getStyledText, getStyledText, getTextFormatFactoryClass, getTextLocale, getTextTimeZone, getTextValue, getTextValueString, reset, resetClassLoader, resetExportContext, restoreElementOffsets, setClassLoader, setExportContext, setFrameElementsOffset, setHyperlinkProducerFactory, 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

XMLSS_EXPORTER_KEY

public static final java.lang.String XMLSS_EXPORTER_KEY
The exporter key, as used in GenericElementHandlerEnviroment.getHandler(net.sf.jasperreports.engine.JRGenericElementType, String).

See Also:
Constant Field Values

JR_PAGE_ANCHOR_PREFIX

protected static final java.lang.String JR_PAGE_ANCHOR_PREFIX
See Also:
Constant Field Values

HORIZONTAL_ALIGN_LEFT

protected static final java.lang.String HORIZONTAL_ALIGN_LEFT
See Also:
Constant Field Values

HORIZONTAL_ALIGN_RIGHT

protected static final java.lang.String HORIZONTAL_ALIGN_RIGHT
See Also:
Constant Field Values

HORIZONTAL_ALIGN_CENTER

protected static final java.lang.String HORIZONTAL_ALIGN_CENTER
See Also:
Constant Field Values

HORIZONTAL_ALIGN_JUSTIFY

protected static final java.lang.String HORIZONTAL_ALIGN_JUSTIFY
See Also:
Constant Field Values

VERTICAL_ALIGN_TOP

protected static final java.lang.String VERTICAL_ALIGN_TOP
See Also:
Constant Field Values

VERTICAL_ALIGN_MIDDLE

protected static final java.lang.String VERTICAL_ALIGN_MIDDLE
See Also:
Constant Field Values

VERTICAL_ALIGN_BOTTOM

protected static final java.lang.String VERTICAL_ALIGN_BOTTOM
See Also:
Constant Field Values

IMAGE_NAME_PREFIX

public static final java.lang.String IMAGE_NAME_PREFIX
See Also:
Constant Field Values

IMAGE_NAME_PREFIX_LEGTH

protected static final int IMAGE_NAME_PREFIX_LEGTH

PAGE_LAYOUT

protected static final java.lang.String[] PAGE_LAYOUT

tempBodyWriter

protected java.io.Writer tempBodyWriter

tempStyleWriter

protected java.io.Writer tempStyleWriter

progressMonitor

protected JRExportProgressMonitor progressMonitor

rendererToImagePathMap

protected java.util.Map rendererToImagePathMap

imageMaps

protected java.util.Map imageMaps

imagesToProcess

protected java.util.List imagesToProcess

reportIndex

protected int reportIndex

pageIndex

protected int pageIndex

tableIndex

protected int tableIndex

startPage

protected boolean startPage

encoding

protected java.lang.String encoding

isWrapBreakWord

protected boolean isWrapBreakWord

fontMap

protected java.util.Map fontMap
Deprecated. 

nature

protected ExporterNature nature

destFile

protected java.io.File destFile

isOnePagePerSheet

protected boolean isOnePagePerSheet

isRemoveEmptySpaceBetweenRows

protected boolean isRemoveEmptySpaceBetweenRows

isRemoveEmptySpaceBetweenColumns

protected boolean isRemoveEmptySpaceBetweenColumns

isWhitePageBackground

protected boolean isWhitePageBackground

isAutoDetectCellType

protected boolean isAutoDetectCellType

isDetectCellType

protected boolean isDetectCellType

isFontSizeFixEnabled

protected boolean isFontSizeFixEnabled

isIgnoreGraphics

protected boolean isIgnoreGraphics

isCollapseRowSpan

protected boolean isCollapseRowSpan

isIgnoreCellBorder

protected boolean isIgnoreCellBorder

isIgnorePageMargins

protected boolean isIgnorePageMargins

maxRowsPerSheet

protected int maxRowsPerSheet

sheetNames

protected java.lang.String[] sheetNames

sheetIndex

protected int sheetIndex
used for counting the total number of sheets


sheetNamesMap

protected java.util.Map sheetNamesMap
used when indexing the identical sheet generated names with ordering numbers; contains sheet names as keys and the number of occurences of each sheet name as values


currentSheetName

protected java.lang.String currentSheetName

defaultFont

protected JRFont defaultFont

formatPatternsMap

protected java.util.Map formatPatternsMap

pageOrientation

protected byte pageOrientation
Constructor Detail

JRXmlssExporter

public JRXmlssExporter()
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(java.io.Writer writer)
                             throws JRException,
                                    java.io.IOException
Throws:
JRException
java.io.IOException

exportPage

protected int exportPage(JRPrintPage page,
                         CutsInfo xCuts,
                         int startRow,
                         JRPrintElementIndex frameIndex,
                         boolean isNewSheet)
                  throws JRException
Returns:
the number of rows added.
Throws:
JRException

exportText

protected void exportText(XmlssTableBuilder tableBuilder,
                          JRPrintText text,
                          JRExporterGridCell gridCell)
                   throws java.io.IOException
Throws:
java.io.IOException

exportStyledText

protected void exportStyledText(JRStyledText styledText)
                         throws java.io.IOException
Throws:
java.io.IOException

exportStyledTextRun

protected void exportStyledTextRun(java.util.Map attributes,
                                   java.lang.String text)
                            throws java.io.IOException
Throws:
java.io.IOException

getElementIndex

protected JRPrintElementIndex getElementIndex(JRExporterGridCell gridCell)

getPrintElementIndex

public static JRPrintElementIndex getPrintElementIndex(java.lang.String imageName)

exportFrame

protected void exportFrame(XmlssTableBuilder tableBuilder,
                           JRPrintFrame frame,
                           JRExporterGridCell gridCell)
                    throws java.io.IOException,
                           JRException
Throws:
java.io.IOException
JRException

setBackcolor

protected void setBackcolor(java.awt.Color color)

restoreBackcolor

protected void restoreBackcolor()

writeHyperlink

protected void writeHyperlink(JRPrintHyperlink link)
                       throws java.io.IOException
Throws:
java.io.IOException

getHyperlinkURL

protected java.lang.String getHyperlinkURL(JRPrintHyperlink link)

setParameters

protected void setParameters()

startFontTag

protected void startFontTag()
                     throws java.io.IOException
Throws:
java.io.IOException

endFontTag

protected void endFontTag()
                   throws java.io.IOException
Throws:
java.io.IOException

buildColumns

protected void buildColumns(CutsInfo xCuts,
                            XmlssTableBuilder tableBuilder)

getExporterKey

protected java.lang.String getExporterKey()
Specified by:
getExporterKey in class JRAbstractExporter


© 2001-2009 Jaspersoft Corporation www.jaspersoft.com