de.unihalle.informatik.Alida.dataio.provider.xmlbeans
Class ALDStandardizedDataIOXmlbeans

java.lang.Object
  extended by de.unihalle.informatik.Alida.dataio.provider.xmlbeans.ALDStandardizedDataIOXmlbeans
All Implemented Interfaces:
ALDDataIO, ALDDataIOXmlbeans
Direct Known Subclasses:
ALDCollectionDataIOXmlbeans, ALDEnumDataIOXmlbeans, ALDNativeDataIOXmlbeans, ALDParametrizedClassDataIOXmlbeans, ALDWorkflowDataIOXmlbeans

public abstract class ALDStandardizedDataIOXmlbeans
extends java.lang.Object
implements ALDDataIOXmlbeans

Abstract class providing basic methods for xml DataIO using xmlbeans according to Alida conventions.

These conventions are detailed in the documentation if the methods readData and writeData in this class below. They handle IO from/to file and reading derived classes of the class handled by an dataIO provider.

Classes extending this class are expected to override the methods parse and formatAsString which do the actual reading/parsing or writing/formating subsequent to generic handling of Alida convention with respect to derived classes and IO form/to file.

Author:
posch

Field Summary
private  boolean debug
          debugging output
 
Constructor Summary
ALDStandardizedDataIOXmlbeans()
           
 
Method Summary
 java.lang.Object readData(java.lang.reflect.Field field, java.lang.Class<?> cl, de.unihalle.informatik.Alida_xml.ALDXMLObjectType xmlObject)
          Read an object using valueString.
abstract  java.lang.Object readData(java.lang.reflect.Field field, java.lang.Class<?> cl, de.unihalle.informatik.Alida_xml.ALDXMLObjectType xmlObject, java.lang.Object object)
          Returns an object instantiated from xmlObject.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface de.unihalle.informatik.Alida.dataio.provider.ALDDataIOXmlbeans
writeData
 
Methods inherited from interface de.unihalle.informatik.Alida.dataio.provider.ALDDataIO
providedClasses
 

Field Detail

debug

private boolean debug
debugging output

Constructor Detail

ALDStandardizedDataIOXmlbeans

public ALDStandardizedDataIOXmlbeans()
Method Detail

readData

public java.lang.Object readData(java.lang.reflect.Field field,
                                 java.lang.Class<?> cl,
                                 de.unihalle.informatik.Alida_xml.ALDXMLObjectType xmlObject)
                          throws ALDDataIOProviderException,
                                 ALDDataIOManagerException
Read an object using valueString. For the class of the object to be read see ALDDataIOXmlbeans.

Specified by:
readData in interface ALDDataIOXmlbeans
Parameters:
field - Field of object to be returned.
cl - Class of object to be returned.
valueString - Source from where to read data (e.g. a filename).
Returns:
Object read from source.
Throws:
ALDDataIOProviderException
ALDDataIOManagerException

readData

public abstract java.lang.Object readData(java.lang.reflect.Field field,
                                          java.lang.Class<?> cl,
                                          de.unihalle.informatik.Alida_xml.ALDXMLObjectType xmlObject,
                                          java.lang.Object object)
                                   throws ALDDataIOProviderException,
                                          ALDDataIOManagerException
Returns an object instantiated from xmlObject. For the class of the object to be read see ALDDataIOManagerXmlbeans.readData(Field,Class,ALDXMLObjectType). This method is assumed to directly parse the xmlObject and make no prior interpretation regarding a file to use or derived class to return.

Parameters:
field - Field of object to be returned
cl - Class of object to be returned.
xmlObject - Source from where to read data.
object - Object instantiated from xmlObject with the default constructor
Returns:
Object with member fields set from xmlObject
Throws:
ALDDataIOProviderException
ALDDataIOManagerException
See Also:
ALDDataIOManagerXmlbeans