alma::acs::entityutil::EntityDeserializer Class Reference
Collaboration diagram for alma::acs::entityutil::EntityDeserializer:
[legend]List of all members.
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
Constructor & Destructor Documentation
alma::acs::entityutil::EntityDeserializer::EntityDeserializer |
( |
Logger |
logger |
) |
[inline, private] |
|
Member Function Documentation
|
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:
-
|
Object alma::acs::entityutil::EntityDeserializer::deserializeEntity |
( |
String |
xmlString, |
|
|
Class |
entityClass, |
|
|
String |
timestamp |
|
) |
throws EntityException [inline, private] |
|
|
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. |
| timestamp | the timestamp to be stored in the entity object, for later serialization. |
- Returns:
- the binding class instance (should be casted by the caller).
- Exceptions:
-
| EntityException | if the binding class instance can't be constructed from the xml. Note that this exception is only logged at FINER level by this method, so make sure to log it appropriately. |
|
Object alma::acs::entityutil::EntityDeserializer::deserializeEntity |
( |
String |
xmlString, |
|
|
Class |
entityClass |
|
) |
throws EntityException [inline] |
|
|
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.
|
EntityDeserializer alma::acs::entityutil::EntityDeserializer::getEntityDeserializer |
( |
Logger |
logger |
) |
[inline, 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
|
Member Data Documentation
The documentation for this class was generated from the following file:
Generated on Thu Apr 30 02:52:35 2009 for ACS Java API by
1.3.8