olg.csv.base.ods
Class ODSReader.ODSCellFormatter

Package class diagram package ODSReader.ODSCellFormatter
java.lang.Object
  extended by olg.csv.bean.formatter.Formatter<org.odftoolkit.odfdom.doc.table.OdfTableCell>
      extended by olg.csv.base.ods.ODSReader.ODSCellFormatter
Enclosing class:
ODSReader

public static final class ODSReader.ODSCellFormatter
extends Formatter<org.odftoolkit.odfdom.doc.table.OdfTableCell>

Define a default cell format strategy. ODS Cell can use different ways to represent content on several lines : a Cell could be composed with several paragraphs elements and each paragraph could be composed with line-break elements. To format a cell as a string, the default strategy is to extract paragraph content and use a breakline string to separate them and replace in each paragraph element, the line-break found element by a breakline. The breakline string used must be defined at ODSCellFormatter instanciation.


Field Summary
private  String breakline
          the breakline to use.
 
Constructor Summary
ODSReader.ODSCellFormatter(String breakline)
           
 
Method Summary
 String toString(org.odftoolkit.odfdom.doc.table.OdfTableCell cell)
          Default implementation based on toString Method of the given t.
 
Methods inherited from class olg.csv.bean.formatter.Formatter
getDateFormatter
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

breakline

private final String breakline
the breakline to use.

Constructor Detail

ODSReader.ODSCellFormatter

public ODSReader.ODSCellFormatter(String breakline)
Parameters:
breakline - to use
Method Detail

toString

public String toString(org.odftoolkit.odfdom.doc.table.OdfTableCell cell)
Description copied from class: Formatter
Default implementation based on toString Method of the given t.

Overrides:
toString in class Formatter<org.odftoolkit.odfdom.doc.table.OdfTableCell>
Parameters:
cell - the value to format.
Returns:
the formatted value.


Copyright © 2014. All Rights Reserved.