org.paneris.jal.model
Class CSVUtil

java.lang.Object
  extended by org.paneris.jal.model.CSVUtil

public final class CSVUtil
extends java.lang.Object

Output format (CSV) dependant formatting.

Version:
0.0.1, 06/10/1999
Author:
timp At paneris.org

Constructor Summary
CSVUtil()
           
 
Method Summary
static java.lang.String escape(java.lang.String s, ExtendedHash h)
          Do general purpose escaping
static java.lang.String escapeCSV(java.lang.String s)
          Do basic escaping of CSV text
static java.lang.String getCSVValue(DDField ddfieldParameter, java.lang.String db, java.text.SimpleDateFormat dateFormatter, java.text.SimpleDateFormat datetimeFormatter)
          Formats a DDField to CSV format
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CSVUtil

public CSVUtil()
Method Detail

escapeCSV

public static java.lang.String escapeCSV(java.lang.String s)
Do basic escaping of CSV text

Parameters:
input - a String to escape
Returns:
the escaped string

escape

public static java.lang.String escape(java.lang.String s,
                                      ExtendedHash h)
Do general purpose escaping

Parameters:
input - a String to escape
input - a hash of escapees and replacements
Returns:
the escaped string

getCSVValue

public static java.lang.String getCSVValue(DDField ddfieldParameter,
                                           java.lang.String db,
                                           java.text.SimpleDateFormat dateFormatter,
                                           java.text.SimpleDateFormat datetimeFormatter)
                                    throws java.lang.Exception
Formats a DDField to CSV format

Parameters:
ddfieldParameter - a DDField which we want to format
db - name of the database to query
dateFormatter - format for dates
dateTimeFormatter - format for date and times
Returns:
a CSV formatted field
Throws:
java.lang.Exception


Copyright © 2000-2008 PanEris. All Rights Reserved.