Difference between revisions of "Rifidi:loading"

From RifidiWiki

Jump to: navigation, search
(New page: =Problem=)
 
(Problem)
Line 1: Line 1:
 
=Problem=
 
=Problem=
 +
Right now each part of Rifidi (Emulator, Designer, TagStreamer) load and initialize their objects individually.<br/>
 +
If one of the parts of Rifidi reuses classes from other parts of Rifidi we currently replicate the functionality for loading and initializing.<br/>
 +
=Aims of this proposal=
 +
* move loading code into a separate bundle
 +
* allow the bundle to initialize classes by delegating the initialization to the appropriate parts of Rifidi
 +
* Use JAXB without adding custom extensions
 +
* Each part of Rifidi still needs to be able to run separately
 +
=Prerequisites=
 +
* JAXB is capable of loading XML files with unresolvable tags.
 +
** verified: JAXB will skip tags that it doesn't know (Note: @XmlAnyElement annotations might still trip it over)
 +
=Approach=
 +
==Create a base container classes==
 +
We need to create a basic Rifidi-container-class that works as the root of our XML file.<br/>
 +
This containerclass contains all tags that a re shared between all parts of rifidi (so far this would be readers and tags).<br/>
 +
It also contains a list of RifidiAppContainers.<br/>
 +
==Application specific containers==
 +
RifidiAppContainer is an abstract class that is used by the different parts of Rifidi to store their specific elements (entities in the case of designer, traveltimes in the case of tagstreamer).<br/>

Revision as of 13:51, 1 May 2008

Problem

Right now each part of Rifidi (Emulator, Designer, TagStreamer) load and initialize their objects individually.
If one of the parts of Rifidi reuses classes from other parts of Rifidi we currently replicate the functionality for loading and initializing.

Aims of this proposal

  • move loading code into a separate bundle
  • allow the bundle to initialize classes by delegating the initialization to the appropriate parts of Rifidi
  • Use JAXB without adding custom extensions
  • Each part of Rifidi still needs to be able to run separately

Prerequisites

  • JAXB is capable of loading XML files with unresolvable tags.
    • verified: JAXB will skip tags that it doesn't know (Note: @XmlAnyElement annotations might still trip it over)

Approach

Create a base container classes

We need to create a basic Rifidi-container-class that works as the root of our XML file.
This containerclass contains all tags that a re shared between all parts of rifidi (so far this would be readers and tags).
It also contains a list of RifidiAppContainers.

Application specific containers

RifidiAppContainer is an abstract class that is used by the different parts of Rifidi to store their specific elements (entities in the case of designer, traveltimes in the case of tagstreamer).

Personal tools