|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.unihalle.informatik.Alida.dataio.ALDDataIOManager
de.unihalle.informatik.Alida.dataio.ALDDataIOManagerXmlbeans
public class ALDDataIOManagerXmlbeans
This class implements a DataIO manager for reading/writing from xml using xmlbeans. For reading and writing, it essentially looks up the correct provider for xml using the method of its super class and invokes its method.
It does its work in collaboration with ALDDataIOXmlbeans
.
Field Summary |
---|
Fields inherited from class de.unihalle.informatik.Alida.dataio.ALDDataIOManager |
---|
debug, mapTable |
Method Summary | |
---|---|
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 |
Methods inherited from class de.unihalle.informatik.Alida.dataio.ALDDataIOManager |
---|
getProvider, getProviderMap, initMapTable |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public 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.
ALDDataIOManagerException
ALDDataIOProviderException
public de.unihalle.informatik.Alida_xml.ALDXMLObjectType writeData(Object obj) throws ALDDataIOManagerException, ALDDataIOProviderException
obj
- Object to write.
ALDDataIOManagerException
ALDDataIOProviderException
public boolean isDoHistory()
public void setDoHistory(boolean doHistory)
doHistory
- 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
-
ALDDataIOProviderException
ALDDataIOManagerException
public static void writeXml(File file, Object obj) throws ALDDataIOProviderException, ALDDataIOManagerException
file
- obj
-
ALDDataIOProviderException
ALDDataIOManagerException
public static Object readXml(String filename, Class<?> clazz) throws org.apache.xmlbeans.XmlException, ALDDataIOManagerException, ALDDataIOProviderException
filename
- clazz
-
org.apache.xmlbeans.XmlException
IOException
ALDDataIOManagerException
ALDDataIOProviderException
public static Object readXml(File file, Class<?> clazz) throws org.apache.xmlbeans.XmlException, ALDDataIOManagerException, ALDDataIOProviderException
file
- clazz
-
org.apache.xmlbeans.XmlException
IOException
ALDDataIOManagerException
ALDDataIOProviderException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |