org.kite9.framework.serialization
Class XMLHelper
java.lang.Object
org.kite9.framework.serialization.XMLHelper
public class XMLHelper
- extends Object
Utility methods for converting to and from XML in the expected format. This
uses XStream under the hood to do the conversion.
This copy exists here because we need it for testing.
This provides the following functionality:
- Object-reference fixing so that we can omit parent/container references
in the xml
- Use of kite9 namespace for xml generated
- use of Kite9 id field in the xml, instead of Xstream generated ones.
- Use of xsi:type to choose the subclass in the xml format (in accordance
with schema)
- Author:
- robmoffat
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
XML_SCHEMA_NAMESPACE
public static final String XML_SCHEMA_NAMESPACE
- See Also:
- Constant Field Values
KITE9_NAMESPACE
public static final String KITE9_NAMESPACE
- See Also:
- Constant Field Values
ADL_CLASSES
public static final Class<?>[] ADL_CLASSES
XMLHelper
public XMLHelper()
isSimplifyingXML
public boolean isSimplifyingXML()
- When this is set, we serialize all of the link elements as part of the Diagram element.
This makes the containment structure of the ADL elements much easier to see.
- Returns:
setSimplifyingXML
public void setSimplifyingXML(boolean simplifyingXML)
toXML
public String toXML(Diagram d)
toXML
public String toXML(WorkItem item)
fromXML
public Object fromXML(String s)
fromXML
public Object fromXML(InputStream s)
handlePostProcessing
protected void handlePostProcessing(Object out)
Copyright © 2011. All Rights Reserved.