Public Member Functions | Static Public Member Functions

alma.acs.entityutil.EntityDeserializer Class Reference

List of all members.

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)

Detailed Description

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.

Author:
hsommer May 6, 2003 5:31:57 PM

Member Function Documentation

Object alma.acs.entityutil.EntityDeserializer.deserializeEntity ( String  xmlString,
Class  entityClass 
) throws EntityException

Deserializes (parses) an entity xml and instantiates the binding objects.

Parameters:
xmlString the stringified xml.
entityClass the binding class of which we want an instance filled with the xml data.
Returns:
the binding class instance (should be casted by the caller).
Deprecated:
use deserializeEntity(XmlEntityStruct, Class) instead. With the addition of timestamp to 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.

Parameters:
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.
Returns:
the binding class instance (should be cast to entityClass by the caller).
Exceptions:
EntityException 

References alma.acs.entityutil.EntityDeserializer.deserializeEntity().

static EntityDeserializer alma.acs.entityutil.EntityDeserializer.getEntityDeserializer ( Logger  logger  )  [static]

Singleton accessor.

Parameters:
logger Logger to be used (may be null in subsequent invocations since only one instance of EntityDeserializer is constructed and then reused)
Returns:
single instance

The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Enumerations Properties