public abstract class IDAREDatasetReader extends Object implements IDAREService
IDAREDatasetReader must be able to read a Datafile into a| Modifier and Type | Field and Description |
|---|---|
static String |
IS_READY |
static String |
IS_SET_UP |
| Constructor and Description |
|---|
IDAREDatasetReader() |
| Modifier and Type | Method and Description |
|---|---|
abstract boolean |
fileTypeAccepted(File inputfile)
Test, whether the file can potentially be read by this reader.
|
abstract IDAREReaderSetupTask |
getSetupTask(File inputfile,
boolean twocolumn)
The Reader should provide a Task that can be used to set up the reader for
future use on the given inputFile.
|
String |
getStatusMessage()
Informs about the status of the reader.
|
abstract IDAREWorkbook |
readData(File inputfile)
Read an input File and create an IDARE compatible Workbook structure.
|
void |
reset()
Resets the reader.
|
abstract void |
resetReader()
Reset the reader, clearing any temporary fields.
|
void |
setStatusMessage(String Message)
This function allows setting the Status Message if an exception is thrown during reading.
|
public abstract IDAREWorkbook readData(File inputfile) throws WrongFormat, IOException
inputfile - the file to read.WrongFormat - If the format cannot be read by this Reader, or if the file provided is not the file the reader was set up for.IOException - If there are problems with the IO of the filepublic abstract boolean fileTypeAccepted(File inputfile)
inputfile - The file to checkpublic abstract IDAREReaderSetupTask getSetupTask(File inputfile, boolean twocolumn) throws Exception
inputfile - the input file to generate the setup task. This file can be read to extract information for options.twocolumn - whether a IDAREWorkbook with label and id or a set with only an id is requested.Tunables, or null if no setup information is necessaryException - Multiple Exceptions from IO to other issues.public final String getStatusMessage()
IDAREDatasetReader.IS_READY.
If the reader is set up (i.e. getSetupTask completed successfully) it should return IDAREDatasetReader.IS_SET_UPIS_READYpublic final void setStatusMessage(String Message)
Message - the Message that will be set (comonly the errormessage received during one of the calls.public final void reset()
public abstract void resetReader()
Copyright © 2018. All rights reserved.