net.sf.jasperreports.engine.data
Class JRAbstractTextDataSource

java.lang.Object
  extended by net.sf.jasperreports.engine.data.JRAbstractTextDataSource
All Implemented Interfaces:
JRDataSource
Direct Known Subclasses:
AbstractXmlDataSource, JRCsvDataSource, JRXlsDataSource, JRXlsxDataSource, JRXmlDataSource, JsonDataSource

public abstract class JRAbstractTextDataSource
extends java.lang.Object
implements JRDataSource

Abstract text data source, containing methods used to parse text data into numerical or date values.

Version:
$Id: JRAbstractTextDataSource.java 4709 2011-10-18 08:59:12Z narcism $
Author:
Lucian Chirita (lucianc@users.sourceforge.net)

Constructor Summary
JRAbstractTextDataSource()
           
 
Method Summary
protected  java.lang.Object convertNumber(java.lang.Number number, java.lang.Class<?> valueClass)
           
protected  java.lang.Object convertStringValue(java.lang.String text, java.lang.Class<?> valueClass)
           
protected  org.apache.commons.beanutils.locale.LocaleConvertUtilsBean getConvertBean()
           
 java.lang.String getDatePattern()
           
protected  java.util.Date getFormattedDate(java.text.DateFormat dateFormat, java.lang.String fieldValue, java.lang.Class<?> valueClass)
          Deprecated. Replaced by FormatUtils.getFormattedDate(DateFormat, String, Class)
protected  java.lang.Number getFormattedNumber(java.text.NumberFormat numberFormat, java.lang.String fieldValue, java.lang.Class<?> valueClass)
          Deprecated. Replaced by FormatUtils.getFormattedNumber(NumberFormat, String, Class)
 java.util.Locale getLocale()
           
 java.lang.String getNumberPattern()
           
 java.util.TimeZone getTimeZone()
           
 void setDatePattern(java.lang.String datePattern)
           
 void setLocale(java.util.Locale locale)
           
 void setLocale(java.lang.String locale)
           
 void setNumberPattern(java.lang.String numberPattern)
           
 void setTextAttributes(JRAbstractTextDataSource textDataSource)
          Copy the text parsing attributes for another object.
 void setTimeZone(java.lang.String timeZoneId)
           
 void setTimeZone(java.util.TimeZone timeZone)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface net.sf.jasperreports.engine.JRDataSource
getFieldValue, next
 

Constructor Detail

JRAbstractTextDataSource

public JRAbstractTextDataSource()
Method Detail

convertStringValue

protected java.lang.Object convertStringValue(java.lang.String text,
                                              java.lang.Class<?> valueClass)

convertNumber

protected java.lang.Object convertNumber(java.lang.Number number,
                                         java.lang.Class<?> valueClass)
                                  throws JRException
Throws:
JRException

getFormattedNumber

protected java.lang.Number getFormattedNumber(java.text.NumberFormat numberFormat,
                                              java.lang.String fieldValue,
                                              java.lang.Class<?> valueClass)
                                       throws java.text.ParseException
Deprecated. Replaced by FormatUtils.getFormattedNumber(NumberFormat, String, Class)

Throws:
java.text.ParseException

getFormattedDate

protected java.util.Date getFormattedDate(java.text.DateFormat dateFormat,
                                          java.lang.String fieldValue,
                                          java.lang.Class<?> valueClass)
                                   throws java.text.ParseException
Deprecated. Replaced by FormatUtils.getFormattedDate(DateFormat, String, Class)

Throws:
java.text.ParseException

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

getLocale

public java.util.Locale getLocale()

setLocale

public void setLocale(java.util.Locale locale)

setLocale

public void setLocale(java.lang.String locale)

getDatePattern

public java.lang.String getDatePattern()

setDatePattern

public void setDatePattern(java.lang.String datePattern)

getNumberPattern

public java.lang.String getNumberPattern()

setNumberPattern

public void setNumberPattern(java.lang.String numberPattern)

getTimeZone

public java.util.TimeZone getTimeZone()

setTimeZone

public void setTimeZone(java.util.TimeZone timeZone)

setTimeZone

public void setTimeZone(java.lang.String timeZoneId)


© 2001-2010 Jaspersoft Corporation www.jaspersoft.com