Public Member Functions | |
Object | deserializeEntity (String xmlString, Class entityClass) throws EntityException |
Object | deserializeEntity (XmlEntityStruct xes, Class entityClass) throws EntityException |
Static Public Member Functions | |
static EntityDeserializer | getEntityDeserializer (Logger logger) |
Helper class to convert serialized XML entities from the ALMA project data model (APDM) to their Java binding class representations.
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
.
Object alma.acs.entityutil.EntityDeserializer.deserializeEntity | ( | String | xmlString, | |
Class | entityClass | |||
) | throws EntityException |
Deserializes (parses) an entity xml and instantiates the binding objects.
xmlString | the stringified xml. | |
entityClass | the binding class of which we want an instance filled with the xml data. |
EntityT
, this method will produce binding classes whose XML data can't be stored in the archive. Referenced by alma.acs.entityutil.EntityDeserializer.deserializeEntity().
Object alma.acs.entityutil.EntityDeserializer.deserializeEntity | ( | XmlEntityStruct | xes, | |
Class | entityClass | |||
) | throws EntityException |
Deserializes (parses) the entity xml contained in 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 |
References alma.acs.entityutil.EntityDeserializer.deserializeEntity().
static EntityDeserializer alma.acs.entityutil.EntityDeserializer.getEntityDeserializer | ( | Logger | logger | ) | [static] |
Singleton accessor.
logger | Logger to be used (may be null in subsequent invocations since only one instance of EntityDeserializer is constructed and then reused) |