2 GeoMTGM
37

....



t1

t2


.........

tn

tn+1





......

....

[t1', t2') U ... U [ti', ti+1')>
[t1,t2) U ... U [tn, tn+1)>
[t1'', t2'') U ... U [tj'', tj+1'')>
(a)
(b)
Fig. 2.12. (a) Two geographical complex nodes, their composed-by edge; (b) their translation
into XML
The business operations provided by this application deal with the insertion and
deletion of nodes and edges, the change of VT, atomic value or geographical coordinates, the visualization of graph representation, the translation from and into XML
document, and finally the communication with the database.
In general, a GeoMTGM action deals with the retrieval of the data inserted into
an HTML form, the population of a particular JavaBean, and the invocation of several service methods. In particular, the GeoService class represents the service that
really performs the operation on the model, while the DatabaseService class provides some methods to load or store XML documents into the eXist [11] XML
database.
The GeoMTGM graph is maintained in the current session and every operation
on it is performed and stored in the session itself. The database is used only to load
a previously saved database or to save the graph permanently.
The HTML form is defined with the use of the Struts html taglib and the data
here inserted are retrieved via some ActionForm objects that transfer them to the
Action class. In particular, we have defined a custom ActionForm object for every
needed HTML form.
2.4.2 Representation of the GeoMTGM Graph
For the representation of a GeoMTGM graph we have used the JGraphT
[17] library. In particular, we have defined some specialized node, edge,
and graph objects that are contained into the it.univr.geomtgm.model.node, it.univr.geomtgm.model.edge and it.univr.geomtgm.model.graph
Précédent

- 35/317

Suivant