|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.unihalle.informatik.Alida.dataio.ALDDataIOManager
public abstract class ALDDataIOManager
Class to manage data input and output in Alida.
This is used, e.g., in Alida's mechanism to automaticaly generate user interfaces for
Alida operators.
This abstract class provides means to find a DataIO provider object for a given class.
DataIO provider classes need to be annotated with ALDDataIOProvider
and are expected to
implement an interface which is derived from the interface ALDDataIO
.
Each non-abstract class extending ALDDataIOManager will typically come in pair with an interface which extends ALDDataIO. The class extending ALDDataIOManager defines methods to read and write data which are delegated to the corresponding corresponding classes defined in the pairing interface and thus have to be defined there.
ALDDataIO
Field Summary | |
---|---|
protected static boolean |
debug
For internal debugging purposes |
protected java.util.HashMap<java.lang.Class,java.lang.String> |
mapTable
Hashtable containing mappings of datatypes to DataIO provider classes. |
private static java.lang.String |
providedClassesMethodName
Name of the method which returns all classes supported by a DataIO provider class. |
Constructor Summary | |
---|---|
protected |
ALDDataIOManager()
Default constructor. |
Method Summary | |
---|---|
ALDDataIO |
getProvider(java.lang.Class cl,
java.lang.Class interfaceRequired)
Method to return an instance of the DataIO provider class for the class cl
which implements the requested interface interfaceRequired
(which has itself to implement ALDDataIO). |
java.util.HashMap<java.lang.Class,java.lang.String> |
getProviderMap()
Method to return a clone of the mapping of classes to dataIO providers. |
protected static java.util.HashMap<java.lang.Class,java.lang.String> |
initMapTable(java.lang.Class interfaceRequired)
Method to initialize the hashmap which registers DataIO providers. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static boolean debug
protected java.util.HashMap<java.lang.Class,java.lang.String> mapTable
initMapTable()
.
The dataIO provider is specified with its full class name.
private static java.lang.String providedClassesMethodName
ALDDataIO
and thus to be implemented
by each DataIO provider class.
Constructor Detail |
---|
protected ALDDataIOManager()
Method Detail |
---|
public ALDDataIO getProvider(java.lang.Class cl, java.lang.Class interfaceRequired) throws ALDDataIOManagerException
cl
which implements the requested interface interfaceRequired
(which has itself to implement ALDDataIO).
There are the following extensions if no DataIO provider for class cl
is found.
If cl
is an enumeration class, a provider for Enum.class is returned (if found).
If cl
is an ALDOperator class, a provider for ALDOperator.class is returned (if found).
If cl
is a Collection, a provider for Collection.class is returned (if found).
If cl
is annotated as a parametrized class via ALDParametrizedClass
,
a provider for ALDParametrizedClassDummy
is returned (if found).
cl
- class to get an provider forinterfaceRequired
- interface needed to be implemented by the provider
ALDDataIOManagerException
public java.util.HashMap<java.lang.Class,java.lang.String> getProviderMap()
protected static java.util.HashMap<java.lang.Class,java.lang.String> initMapTable(java.lang.Class interfaceRequired)
ALDDataIO
, i.e.
a DataIO provider will only be found and registerd, if it is annotated with @ALDDataIO.
In addition it has to implement the interface interfaceRequired
.
interfaceRequired
- Interface which all providers registered are to implement.
Is has to be derived from ALDDataIO
.
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |