public class ALDDataIOManagerCmdline extends ALDDataIOManager
It does its work in collaboration with ALDDataIOCmdline
.
Modifier and Type | Field and Description |
---|---|
private boolean |
doHistory
If true writeData should try to write the history to file
if the object itself is written to a file
|
(package private) static ALDDataIOManagerCmdline |
instance
The singleton instance of this class
|
debug, mapTable
Modifier | Constructor and Description |
---|---|
private |
ALDDataIOManagerCmdline()
private constructor
|
Modifier and Type | Method and Description |
---|---|
static ALDDataIOManagerCmdline |
getInstance()
Return the single instance of this class
|
boolean |
isDoHistory() |
Object |
readData(Field field,
Class<?> cl,
String valueString)
Reads data of given class from a specified source.
|
void |
setDoHistory(boolean doHistory) |
String |
writeData(Object obj,
String locatationString)
Writes data to the specified location.
|
getProvider, getProviderMap, initMapTable
private boolean doHistory
static final ALDDataIOManagerCmdline instance
public static ALDDataIOManagerCmdline getInstance()
public Object readData(Field field, Class<?> cl, String valueString) throws ALDDataIOManagerException, ALDDataIOProviderException
field
and cl
are non-null, the class defined in field
is used
and cl
ignored.
If one of field or
cl
is null, the other non null argument will be used.
Some objects can only be read if field
is supplied, e.g. Collections.
The valueString
is used to actualy read the data. The interpretation is
specific to the class to be read and defined by the corresponding provider class.
As a convention, if valueString
starts with FILEIO_CHAR
(see ALDStandardizedDataIOCmdline
) data are to
be read from file, where the remaining value of valueString
defines the filename.
Otherwise valueString
is directly parsed for the value.
field
- field of object to be returned.cl
- Class of data to be read.valueString
- Source or value string to read data.ALDDataIOManagerException
ALDDataIOProviderException
public String writeData(Object obj, String locatationString) throws ALDDataIOManagerException, ALDDataIOProviderException
locatationString
starts with cmdlineFILEIO_CHAR
(see de.unihalle.informatik.Alida.dataio.provider.cmdline
).obj
- Object to write.locatationString
- String indicated whether to return the value of where to write the value to.ALDDataIOManagerException
ALDDataIOProviderException
public boolean isDoHistory()
public void setDoHistory(boolean doHistory)
doHistory
- the writeHistory to setCopyright © 2010–2021 Martin Luther University Halle-Wittenberg, Institute of Computer Science, Pattern Recognition and Bioinformatics. All rights reserved.