Class XMLSerializationContext
- java.lang.Object
-
- com.inductiveautomation.ignition.common.xmlserialization.serialization.XMLSerializationContext
-
public class XMLSerializationContext extends java.lang.ObjectUsed while serializing to keep track of references and indentation.
-
-
Field Summary
Fields Modifier and Type Field Description protected XMLSerializerserializer
-
Constructor Summary
Constructors Constructor Description XMLSerializationContext(XMLSerializer serializer)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ClassNameResolvergetClassNameMap()java.lang.ObjectgetCleanCopy(java.lang.Class type)intgetRefForElement(Element elm)Looks up the reference ID for the object within the Element, as long as the element doesn't have reference tracking turned off.Elementserialize(java.lang.Object obj)Uses the SerializationDelegate registered for this type of object to serialize the object into an Element.
-
-
-
Field Detail
-
serializer
protected XMLSerializer serializer
-
-
Constructor Detail
-
XMLSerializationContext
public XMLSerializationContext(XMLSerializer serializer)
-
-
Method Detail
-
serialize
public Element serialize(java.lang.Object obj) throws SerializationException
Uses the SerializationDelegate registered for this type of object to serialize the object into an Element. If the delegate is flagged for reference tracking and this object is equal to one already serialized earlier, a <ref> object will be returned instead.- Throws:
SerializationException
-
getRefForElement
public int getRefForElement(Element elm)
Looks up the reference ID for the object within the Element, as long as the element doesn't have reference tracking turned off.
-
getCleanCopy
public java.lang.Object getCleanCopy(java.lang.Class type) throws SerializationException- Throws:
SerializationException
-
getClassNameMap
public ClassNameResolver getClassNameMap()
-
-