|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectuk.ac.ebi.adfconverter.common.data.tabulardata.DataTable
Object representing collection of dataRow
| Field Summary | |
static int |
HORIZONTALTABLE
Horizontal table orientation |
static int |
TEXTFILE
TEXT file type |
static int |
UNKNOWNFILE
UNKNOWN File type |
static int |
VERTICALTABLE
Vertical table orientation |
static int |
WORKBOOKFILE
WORKBOOK File type |
| Constructor Summary | |
DataTable()
Creates a new DataTable instance.
|
|
DataTable(java.io.File file)
Creates a new DataTable instance.
|
|
DataTable(java.lang.String enc,
java.io.File file)
Creates a new DataTable instance. |
|
| Method Summary | |
boolean |
addRow(DataRow row)
Adds a datarow in the table |
void |
clear()
cleans memory used when the header is not needed anymore |
boolean |
contains(DataRow _row)
retrieves if a row is already contained in the table |
boolean |
containsHeader()
Checks if header indicator has been turned on using containsHeader(boolean). . |
void |
containsHeader(boolean _header)
Sets the indicator for header row. |
java.lang.String |
getEnc()
Retrieves characters encoding |
java.io.File |
getFile()
Gets the data file. |
static int |
getFileFormat(java.lang.String formatName)
retrieves file format from strong |
java.lang.String |
getFileName()
Gets the fileName. |
java.lang.String |
getFilePath()
Gets the filepath. |
int |
getFileType()
Retrieves the file type but DataTable is correct. do not depend of this orientation For convience |
TextLineConverter |
getFormat()
Gets the file format. |
DataTableHeader |
getHeader()
Retrieves table header |
static int |
getHorizontalOrientation()
retrieves Horizontal table orientation format |
int |
getOrientation()
Retrieves the orientation of data in file but DataTable is correct. do not depend of this orientation For convience |
DataRow |
getRow(int index)
gets a datarow in the table |
java.util.Enumeration |
getRows()
Retrieves the list of rows found in the data file. |
static int |
getTableOrientationFormat(java.lang.String OrientationName)
retrieves file format from string |
static int |
getTextFile()
retrieves text file format |
static int |
getUnknownFileFormat()
retrieves unknown file format |
static int |
getVerticalOrientation()
retrieves vertical table orientation format |
static int |
getWorkBookFile()
retrieves workbook file format |
boolean |
hasNext()
retrieves if there a next row after the current one |
void |
InitNextRow()
initialised the parsing of row list Starts at the begin of the list |
boolean |
isEmpty()
Retrieves if the table is empty |
DataRow |
nextRow()
Retrieves the next Row in the list |
void |
removeRow(DataRow row)
removes a datarow in the table at a given position |
void |
removeRow(int index)
removes a datarow in the table at a given position |
void |
setFile(java.io.File file)
Sets file attribut |
void |
setFileName(java.lang.String pathname)
Sets the file name. |
void |
setFileType(int type)
set the type of the file where was the data use when saving dataTable for convenience |
void |
setFormat(TextLineConverter format)
Sets the file format. |
void |
setHeader(DataTableHeader header)
sets the header of the table |
void |
setOrientation(int orient)
Indicates the orientation of data but DataTable is correct. do not depend of this orientation For convience |
int |
size()
Retrieves the table size |
java.lang.String |
toString()
represents the table as String |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final int HORIZONTALTABLE
public static final int TEXTFILE
public static final int UNKNOWNFILE
public static final int VERTICALTABLE
public static final int WORKBOOKFILE
| Constructor Detail |
public DataTable()
DataTable instance.
with a default character encoding, without associated file.
Must be associated by setFile method (mandattory)
public DataTable(java.io.File file)
DataTable instance.
with a default character encoding
file - an File value: the file containing this data
public DataTable(java.lang.String enc,
java.io.File file)
DataTable instance.
enc - a String value: Java character encoding in which the data
strings are written.file - an File value: the file containing this data| Method Detail |
public boolean addRow(DataRow row)
row - a datarow to add
public void clear()
public boolean contains(DataRow _row)
_row - the row search in the talbe
public boolean containsHeader()
containsHeader(boolean). .
true. False, otherwise.public void containsHeader(boolean _header)
_header - True if the table contains a header row. False, otherwise.public java.lang.String getEnc()
public java.io.File getFile()
public static final int getFileFormat(java.lang.String formatName)
formatName - a string representing the file format
public java.lang.String getFileName()
public java.lang.String getFilePath()
public int getFileType()
public TextLineConverter getFormat()
TextLineConverterpublic DataTableHeader getHeader()
public static final int getHorizontalOrientation()
public int getOrientation()
public DataRow getRow(int index)
index - the position of the wanted row
public java.util.Enumeration getRows()
public static final int getTableOrientationFormat(java.lang.String OrientationName)
OrientationName - the name of the the table orientation
public static final int getTextFile()
public static final int getUnknownFileFormat()
public static final int getVerticalOrientation()
public static final int getWorkBookFile()
public boolean hasNext()
public void InitNextRow()
public boolean isEmpty()
public DataRow nextRow()
public void removeRow(DataRow row)
public void removeRow(int index)
index - the position of the rowpublic void setFile(java.io.File file)
file - The file to set.
public void setFileName(java.lang.String pathname)
throws java.io.IOException
pathname - the path and the name of the file which contains the data
java.io.IOException - exception, if the table associated file has already been setpublic void setFileType(int type)
type - the file type WORKBOOK or TEXT (can be retrieve with getFileFormat method with
a String representing the type)public void setFormat(TextLineConverter format)
format - an instance of a class that
implements TextLineConverter interface.TextLineConverterpublic void setHeader(DataTableHeader header)
header - the header tablepublic void setOrientation(int orient)
orient - the orientation of the table:public int size()
public java.lang.String toString()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||