|
||||||||||
| 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
uk.ac.ebi.adfconverter.common.tools.file.reader.DataFileReader
This class converts data from a file in a DataTable in Java, for manipulation
DataTable| Constructor Summary | |
DataFileReader(java.io.File aFile)
constructor for converting a data file in data table in memory |
|
DataFileReader(java.io.File aFile,
boolean hasHeader)
constructor for converting a data file in data table in memory |
|
| Method Summary | |
void |
close()
Closes file access/ reading |
DataTable |
getData()
Retrieves data from file |
DataTable |
getData(int fileFormat)
Retrieves data from file in a given file format, specifying file format type |
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 |
DataRow |
getHorizontalDataRow()
Retrieves the next datarow in the horizontal datable. |
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 |
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 |
DataTableHeader |
getHorizontalHeader()
Retrieves the header of a horizontal data table contained in a file |
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 |
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 |
DataTable |
horizontalToVerticalTable(DataTable table)
ConvertTable from table obtained from a file in the correct data orientation |
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 |
| Methods inherited from class uk.ac.ebi.adfconverter.common.tools.file.reader.DataFileReaderIntf |
containsHeader, containsHeader, getFile, setSheet, setSheet |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public DataFileReader(java.io.File aFile)
aFile - a file object of a file containing data
public DataFileReader(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 void close()
close in class DataFileReaderIntf
public DataTable getData()
throws java.io.IOException,
IncorrectFile,
IncorrectDataFile
getData in class DataFileReaderIntfjava.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 DataTable getData(int fileFormat)
throws java.io.IOException,
IncorrectFile,
IncorrectDataFile
getData in class DataFileReaderIntffileFormat - 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 DataTable getData(java.lang.String enc,
java.lang.String delimiter,
java.lang.String escape,
int orientation,
int type)
throws java.io.IOException,
IncorrectFile,
IncorrectDataFile
getData in class DataFileReaderIntfenc - 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 DataRow getHorizontalDataRow()
throws java.io.IOException,
IncorrectDataFile
getHorizontalDataRow in class DataFileReaderIntfjava.io.IOException
IncorrectDataFile
public DataTable getHorizontalDataTable(java.lang.String enc,
java.lang.String delimiter,
java.lang.String escape)
throws java.io.IOException,
IncorrectFile,
IncorrectDataFile
getHorizontalDataTable in class DataFileReaderIntfenc - 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 DataTable getHorizontalDataTable(java.lang.String enc,
java.lang.String delimiter,
java.lang.String escape,
int type)
throws java.io.IOException,
IncorrectFile,
IncorrectDataFile
getHorizontalDataTable in class DataFileReaderIntfenc - 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 DataTableHeader getHorizontalHeader()
throws java.io.IOException,
IncorrectDataFile
getHorizontalHeader in class DataFileReaderIntfjava.io.IOException
IncorrectDataFile
public DataTable getVerticalDataTable(java.lang.String enc,
java.lang.String delimiter,
java.lang.String escape)
throws java.io.IOException,
IncorrectFile,
IncorrectDataFile
getVerticalDataTable in class DataFileReaderIntfenc - 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 DataTable getVerticalDataTable(java.lang.String enc,
java.lang.String delimiter,
java.lang.String escape,
int type)
throws java.io.IOException,
IncorrectFile,
IncorrectDataFile
getVerticalDataTable in class DataFileReaderIntfenc - 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,DataTablepublic DataTable horizontalToVerticalTable(DataTable table)
table - the table to change orientation
public boolean open(java.lang.String enc,
java.lang.String delimiter,
java.lang.String escape,
int type)
open in class DataFileReaderIntfenc - delimiter - escape - type -
DataTable
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||