Mercurial > dive4elements > river
annotate flys-artifacts/doc/datacage.txt @ 3040:79d1db7797e6
Added accidentally ommitted Changes to CollisionFreeXYTextAnnotationEntity class.
flys-artifacts/trunk@4609 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Felix Wolfsteller <felix.wolfsteller@intevation.de> |
---|---|
date | Wed, 06 Jun 2012 12:18:44 +0000 |
parents | 6a37a0134409 |
children | eabecbdd5ade |
rev | line source |
---|---|
3038
6a37a0134409
Added accidentally ommitted changed to datacage conf doc.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
3033
diff
changeset
|
1 This document describes how the datacage configuration works, from a user |
6a37a0134409
Added accidentally ommitted changed to datacage conf doc.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
3033
diff
changeset
|
2 perspective. Some rather technical details are omitted and mechanisms |
6a37a0134409
Added accidentally ommitted changed to datacage conf doc.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
3033
diff
changeset
|
3 simplified. |
6a37a0134409
Added accidentally ommitted changed to datacage conf doc.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
3033
diff
changeset
|
4 |
3033
aba4104f41c9
Added stub for datacage configuration documentation.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
5 The datacages behaviour is defined in the file conf/meta-data.xml . |
aba4104f41c9
Added stub for datacage configuration documentation.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
6 |
aba4104f41c9
Added stub for datacage configuration documentation.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
7 The datacage serves two purposes. |
aba4104f41c9
Added stub for datacage configuration documentation.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
8 It handles automatic 'recommendations', which are instructions |
aba4104f41c9
Added stub for datacage configuration documentation.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
9 sent by the client to add newly created artifacts to the collection. |
aba4104f41c9
Added stub for datacage configuration documentation.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
10 From a user perspective, these artifacts mainly represent curves or data |
aba4104f41c9
Added stub for datacage configuration documentation.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
11 points in the resulting diagrams. |
aba4104f41c9
Added stub for datacage configuration documentation.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
12 The second task is to let the user add already existing artifacts (i.e. |
aba4104f41c9
Added stub for datacage configuration documentation.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
13 previous calculations) or new artifacts with access to related data. |
aba4104f41c9
Added stub for datacage configuration documentation.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
14 |
aba4104f41c9
Added stub for datacage configuration documentation.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
15 Irrelevant of the type of elements (recommendations or user picked data) the |
aba4104f41c9
Added stub for datacage configuration documentation.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
16 datacage can iterate over possible artifacts by accessing its own database. |
aba4104f41c9
Added stub for datacage configuration documentation.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
17 Thus, to create a list of matching entries, database queries are used. |
aba4104f41c9
Added stub for datacage configuration documentation.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
18 |
aba4104f41c9
Added stub for datacage configuration documentation.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
19 In meta-data.xml, database queries are defined as <dc:statement> elements, |
aba4104f41c9
Added stub for datacage configuration documentation.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
20 for example |
aba4104f41c9
Added stub for datacage configuration documentation.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
21 <dc:statement> |
aba4104f41c9
Added stub for datacage configuration documentation.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
22 SELECT id AS prot_id, |
aba4104f41c9
Added stub for datacage configuration documentation.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
23 description AS prot_description |
aba4104f41c9
Added stub for datacage configuration documentation.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
24 FROM wsts WHERE kind = 1 AND river_id = ${river_id} |
aba4104f41c9
Added stub for datacage configuration documentation.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
25 </dc:statement> |
aba4104f41c9
Added stub for datacage configuration documentation.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
26 |
aba4104f41c9
Added stub for datacage configuration documentation.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
27 As can be seen from the example, the datacage configuration file can maintain |
aba4104f41c9
Added stub for datacage configuration documentation.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
28 its own stack of variables (${river_id} in above example). |
3038
6a37a0134409
Added accidentally ommitted changed to datacage conf doc.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
3033
diff
changeset
|
29 |
6a37a0134409
Added accidentally ommitted changed to datacage conf doc.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
3033
diff
changeset
|
30 The database query will usually deliver one or many results, over which is |
6a37a0134409
Added accidentally ommitted changed to datacage conf doc.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
3033
diff
changeset
|
31 iterated using the <dc:elements> elements. |
6a37a0134409
Added accidentally ommitted changed to datacage conf doc.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
3033
diff
changeset
|
32 |
6a37a0134409
Added accidentally ommitted changed to datacage conf doc.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
3033
diff
changeset
|
33 Information from this results can be used for two goals. |
6a37a0134409
Added accidentally ommitted changed to datacage conf doc.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
3033
diff
changeset
|
34 It can be taken as output, in which |
6a37a0134409
Added accidentally ommitted changed to datacage conf doc.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
3033
diff
changeset
|
35 case the client will either request the creation of these artifacts (considering |
6a37a0134409
Added accidentally ommitted changed to datacage conf doc.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
3033
diff
changeset
|
36 recommendations), or shown by the client in a the 'datacage widget', |
6a37a0134409
Added accidentally ommitted changed to datacage conf doc.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
3033
diff
changeset
|
37 the graphical representation of data which can be added in the current |
6a37a0134409
Added accidentally ommitted changed to datacage conf doc.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
3033
diff
changeset
|
38 context. The later is seen when the user clicks on the Datacage button in |
6a37a0134409
Added accidentally ommitted changed to datacage conf doc.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
3033
diff
changeset
|
39 a diagram. |
6a37a0134409
Added accidentally ommitted changed to datacage conf doc.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
3033
diff
changeset
|
40 Or information can be used to feed a second (or third...) database query. |
6a37a0134409
Added accidentally ommitted changed to datacage conf doc.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
3033
diff
changeset
|
41 Following above example: |
6a37a0134409
Added accidentally ommitted changed to datacage conf doc.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
3033
diff
changeset
|
42 |
6a37a0134409
Added accidentally ommitted changed to datacage conf doc.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
3033
diff
changeset
|
43 <dc:statement> |
6a37a0134409
Added accidentally ommitted changed to datacage conf doc.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
3033
diff
changeset
|
44 SELECT id AS prot_id, |
6a37a0134409
Added accidentally ommitted changed to datacage conf doc.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
3033
diff
changeset
|
45 description AS prot_description |
6a37a0134409
Added accidentally ommitted changed to datacage conf doc.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
3033
diff
changeset
|
46 FROM wsts WHERE kind = 1 AND river_id = ${river_id} |
6a37a0134409
Added accidentally ommitted changed to datacage conf doc.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
3033
diff
changeset
|
47 </dc:statement> |
6a37a0134409
Added accidentally ommitted changed to datacage conf doc.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
3033
diff
changeset
|
48 <dc:elements> |
6a37a0134409
Added accidentally ommitted changed to datacage conf doc.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
3033
diff
changeset
|
49 <additional> |
6a37a0134409
Added accidentally ommitted changed to datacage conf doc.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
3033
diff
changeset
|
50 <dc:attribute name="name" value="${prot_description}"/> |
6a37a0134409
Added accidentally ommitted changed to datacage conf doc.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
3033
diff
changeset
|
51 <dc:context> |
6a37a0134409
Added accidentally ommitted changed to datacage conf doc.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
3033
diff
changeset
|
52 <dc:statement> |
6a37a0134409
Added accidentally ommitted changed to datacage conf doc.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
3033
diff
changeset
|
53 SELECT id AS prot_column_id, |
6a37a0134409
Added accidentally ommitted changed to datacage conf doc.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
3033
diff
changeset
|
54 name AS prot_column_name, |
6a37a0134409
Added accidentally ommitted changed to datacage conf doc.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
3033
diff
changeset
|
55 position AS prot_rel_pos |
6a37a0134409
Added accidentally ommitted changed to datacage conf doc.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
3033
diff
changeset
|
56 FROM wst_columns WHERE wst_id = ${prot_id} |
6a37a0134409
Added accidentally ommitted changed to datacage conf doc.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
3033
diff
changeset
|
57 ORDER by position |
6a37a0134409
Added accidentally ommitted changed to datacage conf doc.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
3033
diff
changeset
|
58 </dc:statement> |
6a37a0134409
Added accidentally ommitted changed to datacage conf doc.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
3033
diff
changeset
|
59 <!-- ... --> |
6a37a0134409
Added accidentally ommitted changed to datacage conf doc.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
3033
diff
changeset
|
60 |
6a37a0134409
Added accidentally ommitted changed to datacage conf doc.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
3033
diff
changeset
|
61 In both cases, an <dc:elements> element makes database queries available. |
6a37a0134409
Added accidentally ommitted changed to datacage conf doc.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
3033
diff
changeset
|
62 Also |
6a37a0134409
Added accidentally ommitted changed to datacage conf doc.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
3033
diff
changeset
|
63 note how the variables are defined in the first query and reused in the second |
6a37a0134409
Added accidentally ommitted changed to datacage conf doc.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
3033
diff
changeset
|
64 query (${prot_it}). |
6a37a0134409
Added accidentally ommitted changed to datacage conf doc.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
3033
diff
changeset
|
65 |
6a37a0134409
Added accidentally ommitted changed to datacage conf doc.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
3033
diff
changeset
|
66 Any alement not prefixed with "dc" represents a (sub-) node in the resulting |
6a37a0134409
Added accidentally ommitted changed to datacage conf doc.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
3033
diff
changeset
|
67 tree. The client will display these nodes and maybe subnodes in the datacage |
6a37a0134409
Added accidentally ommitted changed to datacage conf doc.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
3033
diff
changeset
|
68 widget - <additional> in above example. The elements name is translated by |
6a37a0134409
Added accidentally ommitted changed to datacage conf doc.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
3033
diff
changeset
|
69 the client. |
6a37a0134409
Added accidentally ommitted changed to datacage conf doc.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
3033
diff
changeset
|
70 |
6a37a0134409
Added accidentally ommitted changed to datacage conf doc.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
3033
diff
changeset
|
71 While iterating the final results, <dc:attributes> have to be specified |
6a37a0134409
Added accidentally ommitted changed to datacage conf doc.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
3033
diff
changeset
|
72 to define how the artifact is to be created. |
6a37a0134409
Added accidentally ommitted changed to datacage conf doc.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
3033
diff
changeset
|
73 |
6a37a0134409
Added accidentally ommitted changed to datacage conf doc.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
3033
diff
changeset
|
74 <dc:elements> |
6a37a0134409
Added accidentally ommitted changed to datacage conf doc.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
3033
diff
changeset
|
75 <column> |
6a37a0134409
Added accidentally ommitted changed to datacage conf doc.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
3033
diff
changeset
|
76 <dc:attribute name="name" value="${prot_column_name}"/> |
6a37a0134409
Added accidentally ommitted changed to datacage conf doc.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
3033
diff
changeset
|
77 <dc:attribute name="ids" value="additionals-wstv-${prot_rel_pos}-${prot_id}"/> |
6a37a0134409
Added accidentally ommitted changed to datacage conf doc.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
3033
diff
changeset
|
78 <dc:attribute name="factory" value="staticwkms"/> |
6a37a0134409
Added accidentally ommitted changed to datacage conf doc.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
3033
diff
changeset
|
79 </column> |
6a37a0134409
Added accidentally ommitted changed to datacage conf doc.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
3033
diff
changeset
|
80 </dc:elements> |
6a37a0134409
Added accidentally ommitted changed to datacage conf doc.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
3033
diff
changeset
|
81 |
6a37a0134409
Added accidentally ommitted changed to datacage conf doc.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
3033
diff
changeset
|
82 The "name" attribute is what is to be displayed in the client, the "ids" are given |
6a37a0134409
Added accidentally ommitted changed to datacage conf doc.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
3033
diff
changeset
|
83 to the server and pass important information about the chosen data. |
6a37a0134409
Added accidentally ommitted changed to datacage conf doc.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
3033
diff
changeset
|
84 The "factory" is chosen according to the type of data displayed. |