public class EntityDeserializer
extends java.lang.Object
Note that normally a Java component does not need to explicitly perform this conversion, since the Java container translates between the XML-string representation that goes over CORBA, and the binding class (tree) that the custom-generated component's Java interface uses as parameters or return value.
However, there is a case where a Java component should use the EntityDeserializer:
Applications receiving XML data from the ALMA archive: the archive does currently not offer a type-safe
interface for APDM entities. Use deserializeEntity(XmlEntityStruct, Class) to convert
the XmlEntityStruct you get from the archive into a Java binding object tree
whose root node is an instance of the specified Class.
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
deserializeEntity(XmlEntityStruct xes,
java.lang.Class entityClass)
Deserializes (parses) the entity xml contained in
xes
and instantiates the binding objects. |
static EntityDeserializer |
getEntityDeserializer(java.util.logging.Logger logger)
Singleton accessor.
|
public static EntityDeserializer getEntityDeserializer(java.util.logging.Logger logger)
logger - Logger to be used
(may be null in subsequent invocations since only one instance of
EntityDeserializer is constructed and then reused)public java.lang.Object deserializeEntity(XmlEntityStruct xes,
java.lang.Class entityClass)
throws EntityException
xes
and instantiates the binding objects.xes - the struct used for CORBA transport of serialized entity objects.entityClass - the binding class of which we want an instance
filled with the xml data, e.g. SchedBlock.class.entityClass by the caller).EntityException