Class XStreamUtil
java.lang.Object
de.uni_trier.wi2.procake.utils.io.xstream.XStreamUtil
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
static <T> T
static <T> T
static com.thoughtworks.xstream.XStream
static com.thoughtworks.xstream.XStream
static boolean
static void
static void
static void
setDataClassNamesForIdRepresentation
(Set<String> classNames) static void
setUseDataObjectIdRepresentation
(boolean flag) static String
static String
-
Constructor Details
-
XStreamUtil
public XStreamUtil()
-
-
Method Details
-
getDataClassNamesForIdRepresentation
-
setDataClassNamesForIdRepresentation
- Parameters:
classNames
- custom and system data class names of the data objects for which only the objectId should be serialized (if one exists)
-
clearDataClassNamesForIdRepresentation
public static void clearDataClassNamesForIdRepresentation() -
isUseDataObjectIdRepresentation
public static boolean isUseDataObjectIdRepresentation() -
setUseDataObjectIdRepresentation
public static void setUseDataObjectIdRepresentation(boolean flag) -
getXStreamInstanceXml
public static com.thoughtworks.xstream.XStream getXStreamInstanceXml() -
resetXStreamInstanceXml
public static void resetXStreamInstanceXml() -
getXStreamInstanceJson
public static com.thoughtworks.xstream.XStream getXStreamInstanceJson() -
resetXStreamInstanceJson
public static void resetXStreamInstanceJson() -
toXML
- Parameters:
o
- object to be serialized- Returns:
- Serialized String. Only the objectId of a data object is serialized (if one exists) if the corresponding data object class is registered with XStreamUtil.setDataClassNamesForIdRepresentation()
-
toJSON
- Parameters:
o
- object to be serialized- Returns:
- Serialized String. Only the objectId of a data object is serialized (if one exists) if the corresponding data object class is registered with XStreamUtil.setDataClassNamesForIdRepresentation()
-
fromXML
- Parameters:
xml
- string to be deserialized- Returns:
- object
-
fromJSON
- Parameters:
json
- string to be deserialized- Returns:
- object
-