net.sf.jasperreports.engine.export

## Class JRAbstractCsvExporter<RC extends CsvReportConfiguration,C extends CsvExporterConfiguration,E extends JRExporterContext>

- java.lang.Object
- - net.sf.jasperreports.engine.JRAbstractExporter<RC,C,WriterExporterOutput,E>
  - - net.sf.jasperreports.engine.export.JRAbstractCsvExporter<RC,C,E>

- All Implemented Interfaces:
    JRExporter<ExporterInput,RC,C,WriterExporterOutput>, Exporter<ExporterInput,RC,C,WriterExporterOutput>
  Direct Known Subclasses:
    JRCsvExporter, JRCsvMetadataExporter

      public abstract class JRAbstractCsvExporter<RC extends CsvReportConfiguration,C extends CsvExporterConfiguration,E extends JRExporterContext>
      extends JRAbstractExporter<RC,C,WriterExporterOutput,E>

  Exports a JasperReports document to CSV format.
  Version:
    $Id: JRAbstractCsvExporter.java 6926 2014-02-25 15:17:20Z teodord $
  Author:
    Teodor Danciu (teodord@users.sourceforge.net)

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class net.sf.jasperreports.engine.JRAbstractExporter

      `JRAbstractExporter.BaseExporterContext, JRAbstractExporter.PageRange`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static java.lang.String` | `CSV_EXPORTER_KEY` The exporter key, as used in `GenericElementHandlerEnviroment.getElementHandler(JRGenericElementType, String)`.
    `protected static java.lang.String` | `CSV_EXPORTER_PROPERTIES_PREFIX`
    `protected ExporterNature` | `nature`
    `protected java.io.Writer` | `writer`

    - ### Fields inherited from class net.sf.jasperreports.engine.JRAbstractExporter

      `allSelector, crtCompositeConfiguration, crtCompositeItemConfiguration, crtItem, dateFormatCache, EXCEPTION_MESSAGE_KEY_END_PAGE_INDEX_OUT_OF_RANGE, EXCEPTION_MESSAGE_KEY_PAGE_INDEX_OUT_OF_RANGE, EXCEPTION_MESSAGE_KEY_START_PAGE_INDEX_OUT_OF_RANGE, exporterConfiguration, exporterContext, exporterInput, exporterOutput, filter, itemConfiguration, jasperPrint, jasperReportsContext, noBackcolorSelector, noneSelector, numberFormatCache, parameters, propertiesUtil, PROPERTY_DEFAULT_FILTER_FACTORY, PROPERTY_SUFFIX_DEFAULT_FILTER_FACTORY, styledTextUtil`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `JRAbstractCsvExporter()`
    `JRAbstractCsvExporter(JasperReportsContext jasperReportsContext)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected abstract void` | `exportPage(JRPrintPage page)`
    `void` | `exportReport()` Performs the export.
    `protected void` | `exportReportToWriter()`
    `java.lang.String` | `getExporterKey()`
    `java.lang.String` | `getExporterPropertiesPrefix()` Returns the properties prefix for the current exporter.
    `JRStyledText` | `getStyledText(JRPrintText textElement)`
    `protected void` | `initExport()`
    `protected void` | `initReport()`
    `protected java.lang.String` | `prepareText(java.lang.String source)`

    - ### Methods inherited from class net.sf.jasperreports.engine.JRAbstractExporter

      `createFilter, defaultParseNumber, ensureInput, ensureJasperReportsContext, ensureOutput, getBooleanCellValue, getConfigurationInterface, getCurrentConfiguration, getCurrentItemConfiguration, getCurrentJasperPrint, getCustomHandler, getDateCellValue, getDateFormat, getExporterContext, getExporterInput, getExporterOutput, getHyperlinkProducer, getItemConfigurationInterface, getJasperReportsContext, getLocale, getNumberCellValue, getNumberFormat, getOffsetX, getOffsetY, getPageRange, getParameter, getParameters, getPropertiesUtil, getReportContext, getStyledText, getTextFormatFactoryClass, getTextLocale, getTextTimeZone, getTextValue, getTextValueString, reset, resetClassLoader, resetExportContext, restoreElementOffsets, setClassLoader, setConfiguration, setConfiguration, setCurrentExporterInputItem, setExporterInput, setExporterOutput, setFrameElementsOffset, setJasperPrint, setJasperReportsContext, setOffset, setOffset, setParameter, setParameters, setReportContext`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### CSV_EXPORTER_PROPERTIES_PREFIX

          protected static final java.lang.String CSV_EXPORTER_PROPERTIES_PREFIX

      See Also:
        Constant Field Values

    - #### CSV_EXPORTER_KEY

          public static final java.lang.String CSV_EXPORTER_KEY

      The exporter key, as used in `GenericElementHandlerEnviroment.getElementHandler(JRGenericElementType, String)`.
      See Also:
        Constant Field Values

    - #### writer

          protected java.io.Writer writer

    - #### nature

          protected ExporterNature nature

  - ### Constructor Detail

    - #### JRAbstractCsvExporter

          public JRAbstractCsvExporter()

      See Also:
        `JRAbstractCsvExporter(JasperReportsContext)`

    - #### JRAbstractCsvExporter

          public JRAbstractCsvExporter(JasperReportsContext jasperReportsContext)

  - ### Method Detail

    - #### exportReport

          public void exportReport()
                            throws JRException

      Description copied from interface: `Exporter`
      Performs the export.
      Specified by:
        `exportReport` in interface `Exporter<ExporterInput,RC extends CsvReportConfiguration,C extends CsvExporterConfiguration,WriterExporterOutput>`
      Specified by:
        `exportReport` in class `JRAbstractExporter<RC extends CsvReportConfiguration,C extends CsvExporterConfiguration,WriterExporterOutput,E extends JRExporterContext>`
      Throws:
        `JRException`

    - #### exportReportToWriter

          protected void exportReportToWriter()
                                       throws JRException,
                                              java.io.IOException

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

    - #### exportPage

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

      Throws:
        `java.io.IOException`

    - #### getStyledText

          public JRStyledText getStyledText(JRPrintText textElement)

      Overrides:
        `getStyledText` in class `JRAbstractExporter<RC extends CsvReportConfiguration,C extends CsvExporterConfiguration,WriterExporterOutput,E extends JRExporterContext>`

    - #### prepareText

          protected java.lang.String prepareText(java.lang.String source)

    - #### initExport

          protected void initExport()

      Overrides:
        `initExport` in class `JRAbstractExporter<RC extends CsvReportConfiguration,C extends CsvExporterConfiguration,WriterExporterOutput,E extends JRExporterContext>`

    - #### initReport

          protected void initReport()

      Overrides:
        `initReport` in class `JRAbstractExporter<RC extends CsvReportConfiguration,C extends CsvExporterConfiguration,WriterExporterOutput,E extends JRExporterContext>`

    - #### getExporterKey

          public java.lang.String getExporterKey()

      Specified by:
        `getExporterKey` in class `JRAbstractExporter<RC extends CsvReportConfiguration,C extends CsvExporterConfiguration,WriterExporterOutput,E extends JRExporterContext>`

    - #### getExporterPropertiesPrefix

          public java.lang.String getExporterPropertiesPrefix()

      Description copied from class: `JRAbstractExporter`
      Returns the properties prefix for the current exporter.
      Specified by:
        `getExporterPropertiesPrefix` in class `JRAbstractExporter<RC extends CsvReportConfiguration,C extends CsvExporterConfiguration,WriterExporterOutput,E extends JRExporterContext>`
      Returns:
        the properties prefix for the current exporter

© 2001-2010 Jaspersoft Corporation www.jaspersoft.com