olg.csv.base.ods
Class ODSSettings

Package class diagram package ODSSettings
java.lang.Object
  extended by olg.csv.base.AbstractSheetSettings<ODSSettings>
      extended by olg.csv.base.ods.ODSSettings

public class ODSSettings
extends AbstractSheetSettings<ODSSettings>

Settings Class for ODS document reading and writing.

See Also:
ODSWriter, ODSReader

Field Summary
private  Formatter<org.odftoolkit.odfdom.doc.table.OdfTableCell> cellFormatter
           
static boolean DEFAULT_EMPTYINGCELL
          Default Emptying cell value.
static boolean DEFAULT_EMPTYINGROW
          Default Emptying row value.
private  boolean emptyingCell
          Emptying cell value.
private  boolean emptyingRow
          Emptying row value.
private  AbstractParser<List<String>> stringParser
           
 
Fields inherited from class olg.csv.base.AbstractSheetSettings
beginAtColumn, beginAtRow, DEFAULT_SHEETNUM, DEFAULT_WITHHEADERS, endAtColumn, endAtRow, sheetName, sheetNum, withHeaders
 
Constructor Summary
ODSSettings()
          Purpose default settings.
ODSSettings(int sheetNum, boolean withHeaders)
          Defines settings for Reading process.
ODSSettings(int sheetNum, Integer beginAtRow, Integer endAtRow, String beginAtColumn, String endAtColumn, boolean withHeaders)
          Defines settings for Reading process.
ODSSettings(String sheetName)
          Defines settings for writing process.
ODSSettings(String sheetName, Integer beginAtRow, String beginAtColumn)
          Defines settings for writing process.
 
Method Summary
 Formatter<org.odftoolkit.odfdom.doc.table.OdfTableCell> getCellFormatter()
          Returns a cell formatter.
 AbstractParser<List<String>> getStringParser()
          Returns the String parser.
 boolean isEmptyingCell()
          Returns the policy on cells rewriting.
 boolean isEmptyingRow()
          Returns the policy on rows rewriting.
 ODSSettings setCellFormatter(Formatter<org.odftoolkit.odfdom.doc.table.OdfTableCell> cellFormatter)
          Sets the cell formatter to use.
 ODSSettings setEmptyingCell(boolean emptyingCell)
          Sets the policy on cells rewriting.
 ODSSettings setEmptyingRow(boolean emptyingRow)
          Sets the policy on rows rewriting.
 ODSSettings setStringParser(AbstractParser<List<String>> stringParser)
          Set the String parser.
 
Methods inherited from class olg.csv.base.AbstractSheetSettings
getBeginAtColumn, getBeginAtRow, getEndAtColumn, getEndAtRow, getSheetName, getSheetNum, isWithHeaders, setBeginAtColumn, setBeginAtRow, setEndAtColumn, setEndAtRow, setSheetName, setSheetNum, setWithHeaders
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_EMPTYINGROW

public static final boolean DEFAULT_EMPTYINGROW
Default Emptying row value.

There's two ways to rewrite an ODS file when rows which are passed are non-consecutive :

See Also:
setEmptyingRow(boolean), Constant Field Values

DEFAULT_EMPTYINGCELL

public static final boolean DEFAULT_EMPTYINGCELL
Default Emptying cell value.

There's two ways to rewrite an ODS file when cells which are passed on a row are non-consecutive :

See Also:
setEmptyingCell(boolean), Constant Field Values

cellFormatter

private Formatter<org.odftoolkit.odfdom.doc.table.OdfTableCell> cellFormatter

stringParser

private AbstractParser<List<String>> stringParser

emptyingRow

private boolean emptyingRow
Emptying row value. If true intermediate rows will be emptied.


emptyingCell

private boolean emptyingCell
Emptying cell value. If true intermediate cells will be emptied.

Constructor Detail

ODSSettings

public ODSSettings()
Purpose default settings.

See Also:
ODSReader.ODSCellFormatter

ODSSettings

public ODSSettings(String sheetName,
                   Integer beginAtRow,
                   String beginAtColumn)
Defines settings for writing process.

Parameters:
sheetName - The name of the Spreadsheet to write on. If the file on which to write exists and contains a sheet with the specified name, the writer will write on it otherwise the writer will write on a new sheet. If the file doesn't exist, the writer create it and its specified sheet.
beginAtRow - specify the first line to begin writing. May be null
beginAtColumn - specify the first column where to begin writing. May be null
See Also:
ODS Cell Formatter for reading process which use'\n' character as line separator, String Parser used for writing process. Define how to interpret a value as a ODS Cell content. For each line returned by this parser a paragraph will be created into the cell.

ODSSettings

public ODSSettings(String sheetName)
Defines settings for writing process.

Parameters:
sheetName - The name of the Spreadsheet to write on. If the file on which to write exists and contains a sheet with the specified name, the writer will write on it otherwise the writer will write on a new sheet. If the file doesn't exist, the writer create it and its specified sheet.
See Also:
ODS Cell Formatter for reading process which use'\n' character as line separator, String Parser used for writing process. Define how to interpret a value as a ODS Cell content. For each line returned by this parser a paragraph will be created into the cell.

ODSSettings

public ODSSettings(int sheetNum,
                   Integer beginAtRow,
                   Integer endAtRow,
                   String beginAtColumn,
                   String endAtColumn,
                   boolean withHeaders)
Defines settings for Reading process.

Parameters:
sheetNum - the table name in the document.First is 0.
beginAtRow - specify the first line to begin reading. May be null
endAtRow - specify the last line to read. May be null
beginAtColumn - specify the first column where to begin reading. May be null
endAtColumn - specify the last column where to end traitment. May be null
withHeaders - indicate if the table has headers.
See Also:
ODSReader.ODSCellFormatter, ODSWriter.ODSParser

ODSSettings

public ODSSettings(int sheetNum,
                   boolean withHeaders)
Defines settings for Reading process.

Parameters:
sheetNum - the table name in the document.First is 0.
withHeaders - indicate if the table has headers.
See Also:
ODSReader.ODSCellFormatter, ODSWriter.ODSParser
Method Detail

getCellFormatter

public Formatter<org.odftoolkit.odfdom.doc.table.OdfTableCell> getCellFormatter()
Returns a cell formatter. This formatter defines how extract cell content as a string. Especially when cell is composed with paragraphs or line breaks; Only for reading.

Returns:
the cell formatter.
See Also:
ODSReader.ODSCellFormatter

setCellFormatter

public ODSSettings setCellFormatter(Formatter<org.odftoolkit.odfdom.doc.table.OdfTableCell> cellFormatter)
Sets the cell formatter to use. This formatter define how extract cell content as a string. Especially when cell is composed with paragraphs or line breaks; Only for reading.

Parameters:
cellFormatter - the formatter
Returns:
this instance

getStringParser

public AbstractParser<List<String>> getStringParser()
Returns the String parser. This parser defines how to interpret breakline characters found into a string and returns lines extracted from this string. ODSWriter uses this parser to create for each returned line a paragraph in the ODS Cell(where line breaks are not interpreted), target of the original string. Only for writing

Returns:
the string parser
See Also:
ODSWriter.ODSParser

setStringParser

public ODSSettings setStringParser(AbstractParser<List<String>> stringParser)
Set the String parser. This parser defines how to interpret breakline characters found into a string and returns lines extracted from this string. ODSWriter uses this parser to create for each returned line a paragraph in the ODS Cell target of the original string. Only for writing

Parameters:
stringParser - the parser.
Returns:
this instance
See Also:
ODSWriter.ODSParser

isEmptyingRow

public boolean isEmptyingRow()
Returns the policy on rows rewriting.

Returns:
true if intermediate lines are emptied
See Also:
setEmptyingRow(boolean)

setEmptyingRow

public ODSSettings setEmptyingRow(boolean emptyingRow)
Sets the policy on rows rewriting. There's two ways to rewrite an ODS file when rows which are passed are non-consecutive : Applied only when an existing file is overridden.

Parameters:
emptyingRow - the value to set.
Returns:
the ODSSettings instance.

isEmptyingCell

public boolean isEmptyingCell()
Returns the policy on cells rewriting.

Returns:
true if intermediate cells are emptied
See Also:
setEmptyingCell(boolean)

setEmptyingCell

public ODSSettings setEmptyingCell(boolean emptyingCell)
Sets the policy on cells rewriting. There's two ways to rewrite an ODS file when cells which are passed on a row are non-consecutive : Applied only when an existing file is overridden.

Parameters:
emptyingCell - the value to set.
Returns:
this instance


Copyright © 2014. All Rights Reserved.