public class SimpleXStreamSerializer extends java.lang.Object implements OpenmrsSerializer
Patient
class
will not be:
<org.openmrs.Patient ...>
<element
...
</org.openmrs.Patient>
but instead will be:
<patient ...>
<element
...
</patient>
Modifier and Type | Field and Description |
---|---|
com.thoughtworks.xstream.XStream |
xstream |
Constructor and Description |
---|
SimpleXStreamSerializer()
Default Constructor
|
SimpleXStreamSerializer(com.thoughtworks.xstream.XStream customXstream)
Constructor that takes a custom XStream object
|
Modifier and Type | Method and Description |
---|---|
<T> T |
deserialize(java.lang.String serializedObject,
java.lang.Class<? extends T> clazz)
Deserialize the given string into a full object
|
com.thoughtworks.xstream.XStream |
getXstream()
Expose the xstream object, so that module can config with xstream as need
|
java.lang.String |
serialize(java.lang.Object o)
Turn the current object into an identifying string that can be retrieved later
|
public SimpleXStreamSerializer() throws SerializationException
SerializationException
public SimpleXStreamSerializer(com.thoughtworks.xstream.XStream customXstream) throws SerializationException
customXstream
- SerializationException
public com.thoughtworks.xstream.XStream getXstream()
public java.lang.String serialize(java.lang.Object o) throws SerializationException
OpenmrsSerializer
serialize
in interface OpenmrsSerializer
o
- - the object to serializeSerializationException
OpenmrsSerializer.serialize(java.lang.Object)
public <T> T deserialize(java.lang.String serializedObject, java.lang.Class<? extends T> clazz) throws SerializationException
OpenmrsSerializer
deserialize
in interface OpenmrsSerializer
serializedObject
- - String to deserializeclazz
- - The class to deserialize the Object intoSerializationException
OpenmrsSerializer.deserialize(String, Class)
Copyright © 2018 OpenMRS Inc.. All Rights Reserved.