Class JRAbstractTextDataSource

java.lang.Object
net.sf.jasperreports.engine.data.JRAbstractTextDataSource
All Implemented Interfaces:
JRDataSource
Direct Known Subclasses:
AbstractXlsDataSource, AbstractXmlDataSource, JRCsvDataSource, JsonDataSource, JsonQLDataSource

public abstract class JRAbstractTextDataSource extends Object implements JRDataSource
Abstract text data source, containing methods used to parse text data into numerical or date values.
Author:
Lucian Chirita (lucianc@users.sourceforge.net)
  • Field Details

    • EXCEPTION_MESSAGE_KEY_CANNOT_CONVERT_FIELD_TYPE

      public static final String EXCEPTION_MESSAGE_KEY_CANNOT_CONVERT_FIELD_TYPE
      See Also:
    • EXCEPTION_MESSAGE_KEY_CANNOT_MODIFY_PROPERTIES_AFTER_START

      public static final String EXCEPTION_MESSAGE_KEY_CANNOT_MODIFY_PROPERTIES_AFTER_START
      See Also:
    • EXCEPTION_MESSAGE_KEY_NODE_NOT_AVAILABLE

      public static final String EXCEPTION_MESSAGE_KEY_NODE_NOT_AVAILABLE
      See Also:
    • EXCEPTION_MESSAGE_KEY_NULL_DOCUMENT

      public static final String EXCEPTION_MESSAGE_KEY_NULL_DOCUMENT
      See Also:
    • EXCEPTION_MESSAGE_KEY_NULL_SELECT_EXPRESSION

      public static final String EXCEPTION_MESSAGE_KEY_NULL_SELECT_EXPRESSION
      See Also:
    • EXCEPTION_MESSAGE_KEY_UNKNOWN_COLUMN_NAME

      public static final String EXCEPTION_MESSAGE_KEY_UNKNOWN_COLUMN_NAME
      See Also:
    • EXCEPTION_MESSAGE_KEY_UNKNOWN_NUMBER_TYPE

      public static final String EXCEPTION_MESSAGE_KEY_UNKNOWN_NUMBER_TYPE
      See Also:
  • Constructor Details

    • JRAbstractTextDataSource

      protected JRAbstractTextDataSource()
  • Method Details

    • convertStringValue

      protected Object convertStringValue(String text, Class<?> valueClass)
    • convertNumber

      protected Object convertNumber(Number number, Class<?> valueClass) throws JRException
      Throws:
      JRException
    • getConvertBean

      protected org.apache.commons.beanutils.locale.LocaleConvertUtilsBean getConvertBean()
    • setTextAttributes

      public void setTextAttributes(JRAbstractTextDataSource textDataSource)
      Copy the text parsing attributes for another object.
      Parameters:
      textDataSource - the object to copy the attributes from
    • getTextAttributes

      public TextDataSourceAttributes getTextAttributes()
    • setTextAttributes

      public void setTextAttributes(TextDataSourceAttributes attributes)
    • getLocale

      public Locale getLocale()
    • setLocale

      public void setLocale(Locale locale)
    • setLocale

      public void setLocale(String locale)
    • getDatePattern

      public String getDatePattern()
    • setDatePattern

      public void setDatePattern(String datePattern)
    • getNumberPattern

      public String getNumberPattern()
    • setNumberPattern

      public void setNumberPattern(String numberPattern)
    • getTimeZone

      public TimeZone getTimeZone()
    • setTimeZone

      public void setTimeZone(TimeZone timeZone)
    • setTimeZone

      public void setTimeZone(String timeZoneId)