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

java.lang.Object
  extended by de.unihalle.informatik.Alida.dataio.provider.xmlbeans.ALDStandardizedDataIOXmlbeans
      extended by de.unihalle.informatik.Alida.dataio.provider.xmlbeans.ALDNativeDataIOXmlbeans
All Implemented Interfaces:
ALDDataIO, ALDDataIOXmlbeans

@ALDDataIOProvider
public class ALDNativeDataIOXmlbeans
extends ALDStandardizedDataIOXmlbeans

DataIO provider for primitive datatypes, Java wrapper types, and arrays (1D and 2D) xml using xmlbeans. As this provider extends ALDStandardizedDataIOXmlbeans it implements the Alida syntax conventions.

Author:
moeller

Constructor Summary
ALDNativeDataIOXmlbeans()
           
 
Method Summary
 java.util.Collection<java.lang.Class<?>> providedClasses()
          Interface method to announce all classes handled by this provider.
 java.lang.Object readData(java.lang.reflect.Field field, java.lang.Class<?> cl, de.unihalle.informatik.Alida_xml.ALDXMLObjectType aldXmlObject, java.lang.Object obj)
          Method to parse native data from a string.
 de.unihalle.informatik.Alida_xml.ALDXMLObjectType writeData(java.lang.Object obj)
          Interface for writing the object data to the target location.
 
Methods inherited from class de.unihalle.informatik.Alida.dataio.provider.xmlbeans.ALDStandardizedDataIOXmlbeans
readData
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ALDNativeDataIOXmlbeans

public ALDNativeDataIOXmlbeans()
Method Detail

providedClasses

public java.util.Collection<java.lang.Class<?>> providedClasses()
Description copied from interface: ALDDataIO
Interface method to announce all classes handled by this provider.

Returns:
Collection of classes provided

readData

public java.lang.Object readData(java.lang.reflect.Field field,
                                 java.lang.Class<?> cl,
                                 de.unihalle.informatik.Alida_xml.ALDXMLObjectType aldXmlObject,
                                 java.lang.Object obj)
                          throws ALDDataIOProviderException
Method to parse native data from a string.

Note that the field argument is ignored here.

The clpassed to the method should contain the class which is to be returned. If it is null, null is returned. Likewise if something else goes wrong, the return value is null.

Note that 1D arrays have to be encoded in one of the following ways, i.e. with or without enclosing brackets:

For arrays containing only a single element using brackets is obligatory.

2D arrays have to be encoded as follows:

Specified by:
readData in class ALDStandardizedDataIOXmlbeans
Parameters:
field - Field of object to be returned
cl - Class of object to be returned.
aldXmlObject - Source from where to read data.
obj - Object instantiated from xmlObject with the default constructor
Returns:
Object with member fields set from xmlObject
Throws:
ALDDataIOProviderException
See Also:
ALDDataIOManagerXmlbeans

writeData

public de.unihalle.informatik.Alida_xml.ALDXMLObjectType writeData(java.lang.Object obj)
                                                            throws ALDDataIOProviderException,
                                                                   ALDDataIOManagerException
Description copied from interface: ALDDataIOXmlbeans
Interface for writing the object data to the target location. This interface work in conjunction with ALDDataIOManagerXmlbeans where the method is documented in more detail.

Parameters:
obj - Object to be saved.
Returns:
obj as an ALDXMLObjectType
Throws:
ALDDataIOProviderException
ALDDataIOManagerException


Copyright © 2010-2014 Martin Luther University Halle-Wittenberg. All Rights Reserved.