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

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

@ALDDataIOProvider
public class ALDCollectionDataIOXmlbeans
extends ALDStandardizedDataIOXmlbeans

DataIO provider for collections xml using xmlbeans. As this provider extends ALDStandardizedDataIOCmdline it implements the Alida syntax conventions.

Author:
posch

Constructor Summary
ALDCollectionDataIOXmlbeans()
           
 
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)
          Returns a collection instantiated from valueString.
 de.unihalle.informatik.Alida_xml.ALDXMLObjectType writeData(java.lang.Object obj)
          Returns the string representations of collection.
 
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

ALDCollectionDataIOXmlbeans

public ALDCollectionDataIOXmlbeans()
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,
                                 ALDDataIOManagerException
Returns a collection instantiated from valueString. valueString is assume to contain a comma separated list of nested valueString for each element of the collection enclosed in matching square brackets, e.g. [1.2 , 2.2 , 3.1]. The class of the elements of the collection is determined using ALDCollectionDataIOHelper.lookupType(java.lang.reflect.Field).

Specified by:
readData in class ALDStandardizedDataIOXmlbeans
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:
Collection read from valueString.
Throws:
ALDDataIOProviderException
ALDDataIOManagerException
See Also:
ALDDataIOManagerXmlbeans

writeData

public de.unihalle.informatik.Alida_xml.ALDXMLObjectType writeData(java.lang.Object obj)
                                                            throws ALDDataIOManagerException,
                                                                   ALDDataIOProviderException
Returns the string representations of collection. The format is a specified for parsing.

Parameters:
obj - object to format
Returns:
string representations of the object
Throws:
ALDDataIOManagerException
ALDDataIOProviderException
See Also:
ALDCollectionDataIOXmlbeans#parse(Field,Class,String)


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