org.omnaest.utils.structure.table.serializer.unmarshaller
Class TableUnmarshallerXLS<E>

java.lang.Object
  extended by org.omnaest.utils.structure.table.serializer.unmarshaller.TableUnmarshallerXLS<E>
Type Parameters:
E -
All Implemented Interfaces:
Serializable, TableUnmarshaller<E>

public class TableUnmarshallerXLS<E>
extends Object
implements TableUnmarshaller<E>

Author:
Omnaest
See Also:
TableMarshallerXLS, TableUnmarshaller, Serialized Form

Field Summary
protected  boolean hasColumnTitles
           
protected  boolean hasRowTitles
           
protected  boolean hasTableName
           
static String WORKSHEET_NAME_DEFAULT
           
protected  String workSheetName
           
 
Constructor Summary
TableUnmarshallerXLS()
           
TableUnmarshallerXLS(boolean hasTableName, boolean hasColumnTitles, boolean hasRowTitles)
           
TableUnmarshallerXLS(String workSheetName)
           
TableUnmarshallerXLS(String workSheetName, boolean hasTableName, boolean hasColumnTitles, boolean hasRowTitles)
           
 
Method Summary
protected  org.apache.poi.ss.usermodel.Sheet determineWorksheet(org.apache.poi.ss.usermodel.Workbook hssfWorkbook)
           
 void unmarshal(Table<E> table, CharSequence charSequence)
          Unmarshalls the given Table instance from a given CharSequence.
 void unmarshal(Table<E> table, InputStream inputStream)
          Unmarshals the given Table from an InputStream.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

WORKSHEET_NAME_DEFAULT

public static final String WORKSHEET_NAME_DEFAULT
See Also:
Constant Field Values

workSheetName

protected String workSheetName

hasTableName

protected boolean hasTableName

hasColumnTitles

protected boolean hasColumnTitles

hasRowTitles

protected boolean hasRowTitles
Constructor Detail

TableUnmarshallerXLS

public TableUnmarshallerXLS()

TableUnmarshallerXLS

public TableUnmarshallerXLS(String workSheetName)
Parameters:
workSheetName -

TableUnmarshallerXLS

public TableUnmarshallerXLS(boolean hasTableName,
                            boolean hasColumnTitles,
                            boolean hasRowTitles)
Parameters:
hasTableName -
hasColumnTitles -
hasRowTitles -

TableUnmarshallerXLS

public TableUnmarshallerXLS(String workSheetName,
                            boolean hasTableName,
                            boolean hasColumnTitles,
                            boolean hasRowTitles)
Parameters:
workSheetName -
hasTableName -
hasColumnTitles -
hasRowTitles -
Method Detail

determineWorksheet

protected org.apache.poi.ss.usermodel.Sheet determineWorksheet(org.apache.poi.ss.usermodel.Workbook hssfWorkbook)
Parameters:
hssfWorkbook -
Returns:

unmarshal

public void unmarshal(Table<E> table,
                      InputStream inputStream)
Description copied from interface: TableUnmarshaller
Unmarshals the given Table from an InputStream. The given Table instance is cleared before the unmarshal process.

Specified by:
unmarshal in interface TableUnmarshaller<E>

unmarshal

public void unmarshal(Table<E> table,
                      CharSequence charSequence)
Description copied from interface: TableUnmarshaller
Unmarshalls the given Table instance from a given CharSequence. This will clean the Table instance before.

Specified by:
unmarshal in interface TableUnmarshaller<E>
See Also:
#unmarshal(Table, CharSequence, String)


Copyright © 2011. All Rights Reserved.