|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectuk.ac.ebi.adfconverter.common.tools.file.reader.DataFileReaderIntf
This class converts data from a file in a DataTable in Java, for manipulation
DataTable| Constructor Summary | |
DataFileReaderIntf(java.io.File aFile)
constructor for converting a data file in data table in memory |
|
DataFileReaderIntf(java.io.File aFile,
boolean hasHeader)
constructor for converting a data file in data table in memory |
|
| Method Summary | |
abstract void |
close()
Closes file access/ reading |
boolean |
containsHeader()
Checks if header indicator has been turned on using containsHeader(boolean). . |
void |
containsHeader(boolean _header)
Sets the indicator for header row. |
abstract DataTable |
getData()
Retrieves data from file |
abstract DataTable |
getData(int fileFormat)
Retrieves data from file in a given file format, specifying file format type |
abstract DataTable |
getData(java.lang.String enc,
java.lang.String delimiter,
java.lang.String escape,
int orientation,
int type)
Retrieves data from file with a specific character encoding |
java.io.File |
getFile()
Retrieves the file associated/red by the reader |
abstract DataRow |
getHorizontalDataRow()
Retrieves the next datarow in the horizontal datable. |
abstract DataTable |
getHorizontalDataTable(java.lang.String enc,
java.lang.String delimiter,
java.lang.String escape)
Retrieves data from file with a specific character encoding in a vertical orientation of data |
abstract DataTable |
getHorizontalDataTable(java.lang.String enc,
java.lang.String delimiter,
java.lang.String escape,
int type)
Retrieves data from file with a specific character encoding in a horizontal orientation of data |
abstract DataTableHeader |
getHorizontalHeader()
Retrieves the header of a horizontal data table contained in a file |
abstract DataTable |
getVerticalDataTable(java.lang.String enc,
java.lang.String delimiter,
java.lang.String escape)
Retrieves data from file with a specific character encoding in a vertical orientation of data |
abstract DataTable |
getVerticalDataTable(java.lang.String enc,
java.lang.String delimiter,
java.lang.String escape,
int type)
Retrieves data from file with a specific character encoding in a vertical orientation of data |
abstract boolean |
open(java.lang.String enc,
java.lang.String delimiter,
java.lang.String escape,
int type)
Open a data file with a given character encoding , delimiter and escape strings , file orientation and file type |
void |
setSheet(int sheetNumber)
For Microsoft excel workbook, set the sheet to read |
void |
setSheet(java.lang.String sheetName)
For Microsoft excel workbook, set the sheet to read |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public DataFileReaderIntf(java.io.File aFile)
aFile - a file object of a file containing data
public DataFileReaderIntf(java.io.File aFile,
boolean hasHeader)
aFile - a file object of a file containing datahasHeader - a boolean indicating if the first row is considered
as the table header| Method Detail |
public abstract void close()
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 abstract DataTable getData()
throws java.io.IOException,
IncorrectFile,
IncorrectDataFile
java.io.IOException - if an error occurs during file access
IncorrectFile - if the opened file is incorrect (not as expected)
IncorrectDataFile - if the opened data file is incorrect.(incorrect data type,
incorrect file structure)
public abstract DataTable getData(int fileFormat)
throws java.io.IOException,
IncorrectFile,
IncorrectDataFile
fileFormat - the file format
java.io.IOException - if an error occurs during file access
IncorrectFile - if the opened file is incorrect (not as expected)
IncorrectDataFile - if the opened data file is incorrect.(incorrect data type,
incorrect file structure)
public abstract DataTable getData(java.lang.String enc,
java.lang.String delimiter,
java.lang.String escape,
int orientation,
int type)
throws java.io.IOException,
IncorrectFile,
IncorrectDataFile
enc - a character encodingdelimiter - the delimiter string in a row (line)escape - the escape string of a row in the filetype - the type of the data file
java.io.IOException
IncorrectFile
IncorrectDataFile
authorizes file format
Description of Data Content Typical Filename Extensions
MIME type/subtype
Text and Text-Related Types
HTML text data (RFC 1866) html htm text/html
Plain text: documents; program listings txt c c++ pl cc h text/plain
Excel spreadsheet (Microsoft) xls, xlc, xll, xlm, xlw application/vnd.ms-excel
application/x-msexcel
application/ms-excel
application/msexcel
application/x-excel
*
public java.io.File getFile()
public abstract DataRow getHorizontalDataRow()
throws java.io.IOException,
IncorrectDataFile
java.io.IOException
IncorrectDataFile
public abstract DataTable getHorizontalDataTable(java.lang.String enc,
java.lang.String delimiter,
java.lang.String escape)
throws java.io.IOException,
IncorrectFile,
IncorrectDataFile
enc - a character encodingdelimiter - the delimiter string in a row (line)escape - the escape string of a row in the file
java.io.IOException - if an error occurs during file access
IncorrectFile - if the opened file is incorrect (not as expected)
IncorrectDataFile - if the opened data file is incorrect.(incorrect data type,
public abstract DataTable getHorizontalDataTable(java.lang.String enc,
java.lang.String delimiter,
java.lang.String escape,
int type)
throws java.io.IOException,
IncorrectFile,
IncorrectDataFile
enc - a character encodingdelimiter - the delimiter string in a row (line)escape - the escape string of a row in the filetype - the type of the data file
java.io.IOException - if an error occurs during file access
IncorrectFile - if the opened file is incorrect (not as expected)
IncorrectDataFile - if the opened data file is incorrect.(incorrect data type,DataTable
public abstract DataTableHeader getHorizontalHeader()
throws java.io.IOException,
IncorrectDataFile
java.io.IOException
IncorrectDataFile
public abstract DataTable getVerticalDataTable(java.lang.String enc,
java.lang.String delimiter,
java.lang.String escape)
throws java.io.IOException,
IncorrectFile,
IncorrectDataFile
enc - a character encodingdelimiter - the delimiter string in a row (line)escape - the escape string of a row in the file
java.io.IOException - if an error occurs during file access
IncorrectFile - if the opened file is incorrect (not as expected)
IncorrectDataFile - if the opened data file is incorrect.(incorrect data type,
public abstract DataTable getVerticalDataTable(java.lang.String enc,
java.lang.String delimiter,
java.lang.String escape,
int type)
throws java.io.IOException,
IncorrectFile,
IncorrectDataFile
enc - a character encodingdelimiter - the delimiter string in a row (line)escape - the escape string of a row in the filetype - the type of the data file
java.io.IOException - if an error occurs during file access
IncorrectFile - if the opened file is incorrect (not as expected)
IncorrectDataFile - if the opened data file is incorrect.(incorrect data type,DataTable
public abstract boolean open(java.lang.String enc,
java.lang.String delimiter,
java.lang.String escape,
int type)
enc - delimiter - escape - type -
DataTablepublic void setSheet(int sheetNumber)
sheetNumber - the sheet number to readpublic void setSheet(java.lang.String sheetName)
sheetName - the sheet name to read
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||