public class ALDDataIOManagerXmlbeans extends ALDDataIOManager
It does its work in collaboration with ALDDataIOXmlbeans.
debug, mapTable| Modifier and Type | Method and Description |
|---|---|
static ALDDataIOManagerXmlbeans |
getInstance()
Return the single instance of this class
|
boolean |
isAllowAdditionalFields() |
boolean |
isDoHistory() |
Object |
readData(Field field,
Class<?> cl,
de.unihalle.informatik.Alida_xml.ALDXMLObjectType xmlObject)
Reads data of given class from a specified source.
|
static Object |
readXml(File file,
Class<?> clazz)
Read Object from a file using xmlbeans providers
|
static Object |
readXml(String filename,
Class<?> clazz)
Read Object from a file using xmlbeans providers
|
void |
setAllowAdditionalFields(boolean allowAdditionalFields) |
void |
setDoHistory(boolean doHistory) |
de.unihalle.informatik.Alida_xml.ALDXMLObjectType |
writeData(Object obj)
Writes data to the specified location.
|
static void |
writeXml(File file,
Object obj)
Write to object to a file using xmlbeans providers
|
static void |
writeXml(String filename,
Object obj)
Write to object to a file using xmlbeans providers
|
getProvider, getProviderMap, initMapTablepublic static ALDDataIOManagerXmlbeans getInstance()
public Object readData(Field field, Class<?> cl, de.unihalle.informatik.Alida_xml.ALDXMLObjectType xmlObject) 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 xmlObject is used to actually read the data. The interpretation is
specific to the class to be read and defined by the corresponding provider class.
field - field of object to be returned.cl - Class of data to be read.xmlObject - xml object to read data from.ALDDataIOManagerExceptionALDDataIOProviderExceptionpublic de.unihalle.informatik.Alida_xml.ALDXMLObjectType writeData(Object obj) throws ALDDataIOManagerException, ALDDataIOProviderException
obj - Object to write.ALDDataIOManagerExceptionALDDataIOProviderExceptionpublic boolean isDoHistory()
public void setDoHistory(boolean doHistory)
writeHistory - the writeHistory to setpublic boolean isAllowAdditionalFields()
public void setAllowAdditionalFields(boolean allowAdditionalFields)
allowAdditionalFields - the allowAdditionalFields to setpublic static void writeXml(String filename, Object obj) throws ALDDataIOProviderException, ALDDataIOManagerException
filename - obj - ALDDataIOProviderExceptionALDDataIOManagerExceptionpublic static void writeXml(File file, Object obj) throws ALDDataIOProviderException, ALDDataIOManagerException
file - obj - ALDDataIOProviderExceptionALDDataIOManagerExceptionpublic static Object readXml(String filename, Class<?> clazz) throws org.apache.xmlbeans.XmlException, ALDDataIOManagerException, ALDDataIOProviderException
filename - clazz - org.apache.xmlbeans.XmlExceptionIOExceptionALDDataIOManagerExceptionALDDataIOProviderExceptionpublic static Object readXml(File file, Class<?> clazz) throws org.apache.xmlbeans.XmlException, ALDDataIOManagerException, ALDDataIOProviderException
filename - clazz - org.apache.xmlbeans.XmlExceptionIOExceptionALDDataIOManagerExceptionALDDataIOProviderExceptionCopyright © 2010–2015 Martin Luther University Halle-Wittenberg. All rights reserved.