org.activemath.webapp.report
Class ReportUtils.CSVEscaper

java.lang.Object
  extended by org.activemath.webapp.report.ReportUtils.CSVEscaper
Enclosing class:
ReportUtils

public static class ReportUtils.CSVEscaper
extends Object

This class provides methods supporting CSV exporting of report data. It is meant to be instantianted and put into the model.


Constructor Summary
ReportUtils.CSVEscaper()
           
 
Method Summary
 String escQuote(String str)
          Escapes quotes in "standard" format (e.g.
 String escQuoteExcel(Collection c)
          Converts a value list to a CSV string with properly escaped quotes
 String escQuoteExcel(String str)
          Escapes quotes in MS Excel-compatible format (e.g.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReportUtils.CSVEscaper

public ReportUtils.CSVEscaper()
Method Detail

escQuote

public String escQuote(String str)
Escapes quotes in "standard" format (e.g. "Foo Bar \" Baz")


escQuoteExcel

public String escQuoteExcel(String str)
Escapes quotes in MS Excel-compatible format (e.g. "Foo Bar "" Baz")


escQuoteExcel

public String escQuoteExcel(Collection c)
Converts a value list to a CSV string with properly escaped quotes