comparison doc/config-manual/model_of_transitions.tex @ 947:9a28846dfb9c

Final QS for V1.0 doc/trunk@1091 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Hans Plum <hans.plum@intevation.de>
date Wed, 12 May 2010 11:35:25 +0000
parents 491b8d6cd291
children 975bb59bb136
comparison
equal deleted inserted replaced
946:dd6102eae823 947:9a28846dfb9c
15 \item FIS and their according products (Metainformation) 15 \item FIS and their according products (Metainformation)
16 \item Products with their states, transitions, outputs and SQL-statements 16 \item Products with their states, transitions, outputs and SQL-statements
17 (Implementation) 17 (Implementation)
18 \end{enumerate} 18 \end{enumerate}
19 19
20 %% TODO: Add a Screenshot of the GNV WebClient marking GUI elements for FIS, 20 %% TODO to improve: Add a Screenshot of the GNV WebClient marking GUI elements for FIS,
21 %% product, states and transitions 21 %% product, states and transitions
22 22
23 Main entry point for the configuration also is the file {\tt conf/conf.xml } 23 Main entry point for the configuration also is the file {\tt conf/conf.xml }
24 defining the list of FIS and the according products based on the different 24 defining the list of FIS and the according products based on the different
25 datamodels in the datawarehouse. 25 datamodels in the datawarehouse.
78 (c.f. \ref{ref:config-a-product}). The definition of states, transitions and 78 (c.f. \ref{ref:config-a-product}). The definition of states, transitions and
79 outputs reference the actual SQL-statements via an identifier. The SQL-statements 79 outputs reference the actual SQL-statements via an identifier. The SQL-statements
80 are gathered in the file {\tt conf/queries.properties}. 80 are gathered in the file {\tt conf/queries.properties}.
81 81
82 82
83 \subsection{Explaining the background of the XML configuration} 83 \subsection{Background information of the XML configuration}
84 84
85 It is possible to configure the GNV in many ways. 85 It is possible to configure the GNV in many ways.
86 It is possible to add or remove FIS, add or remove products from a FIS or 86 It is possible to add or remove FIS, add or remove products from a FIS or
87 to manipulate the steps which must be gone until a product can be create 87 to manipulate the steps which must be prepared until products like
88 a diagram or generate an CSV-export. 88 a diagram or CSV-export can be generated.
89 89
90 The configuration of the provided FIS are divided in three main parts. 90 The configuration of the provided FIS are divided in three main parts.
91 91
92 \begin{itemize} 92 \begin{itemize}
93 \item Configuration of the list of FIS via {\tt artifact-factories} 93 \item Configuration of the list of FIS via {\tt artifact-factories}
97 served by the FIS. 97 served by the FIS.
98 \end{itemize} 98 \end{itemize}
99 99
100 \subsubsection{Configuration of a FIS} 100 \subsubsection{Configuration of a FIS}
101 The point of entry into the system is to configure an {\tt artifact-factory}. 101 The point of entry into the system is to configure an {\tt artifact-factory}.
102 Each {\tt artifact-factory} represents one FIS. 102 Each artifact-factory represents one FIS.
103 It is possible to configure several {\tt artifact-factories}. 103 It is possible to configure several {\tt artifact-factories}, which
104 represent the list of FIS in GUI.
104 The {\tt artifact-factories} will be configured in the section 105 The {\tt artifact-factories} will be configured in the section
105 {\tt /artifact-database/artifact-factories} of the configurationfile. 106 {\tt /artifact-database/artifact-factories} of the configuration-file.
106 107
107 \begin{lstlisting} 108 \begin{lstlisting}
108 <artifact-factory name='fis_NEWFISNAME' 109 <artifact-factory name='fis_NEWFISNAME'
109 description='Factory to create an artifact to be used with the FIS NEWFISNAME' 110 description='Factory to create an artifact to be used with the FIS NEWFISNAME'
110 ttl='3600000' 111 ttl='3600000'
111 artifact='de.intevation.artifactdatabase.ProxyArtifact'> 112 artifact='de.intevation.artifactdatabase.ProxyArtifact'>
112 de.intevation.gnv.artifacts.GNVProductArtifactFactory 113 de.intevation.gnv.artifacts.GNVProductArtifactFactory
113 </artifact-factory> 114 </artifact-factory>
114 \end{lstlisting} 115 \end{lstlisting}
115 116
116 At this moment the following attributes of an {\tt artifact-factory} are configurable. 117 At this moment the following attributes of an {\tt artifact-factory} are
118 configurable:
117 \begin{itemize} 119 \begin{itemize}
118 \item {\tt name}: The name of the {\tt artifact}. Must be unique in one {\tt artifact-server} 120 \item {\tt name}: The name of the {\tt artifact}. Must be unique in one {\tt artifact-server}
119 \item {\tt description}: Short description which job the {\tt artifact-factory} has to do. 121 \item {\tt description}: Short description which job the {\tt artifact-factory} has to do.
120 \item {\tt ttl}: The time to live: The time using milliseconds an {\tt artifact}, created using this 122 \item {\tt ttl}: The time to live: The time using milliseconds an
121 factory, can live without any user-interaction. 123 {\tt artifact}, created using this factory, can live without any
124 user-interaction.
122 \item {\tt artifact}: The name of the class of the {\tt artifact} which should be created. 125 \item {\tt artifact}: The name of the class of the {\tt artifact} which should be created.
123 \end{itemize} 126 \end{itemize}
124 127
125 The next listing shows the dependencies between the FIS and the name 128 The next listing shows the dependencies between the FIS and the name
126 of the {\tt artifact-factory} which belongs to it. 129 of the {\tt artifact-factory} which belongs to it.
167 The key is to use the same name for the {\tt artifact} as used for the {\tt artifact-factory}. 170 The key is to use the same name for the {\tt artifact} as used for the {\tt artifact-factory}.
168 The name has to be unique. 171 The name has to be unique.
169 In the section {\tt /artifact/products} it is possible to define several products as 172 In the section {\tt /artifact/products} it is possible to define several products as
170 explained in the next section. 173 explained in the next section.
171 174
172 \paragraph{Products to an FIS} 175 \subsection{Products to an FIS}
173 One FIS can provide several products. 176 One FIS can provide several products.
174 To do this it is required to configure them as shown below in the section 177 To do this it is required to configure them as shown below in the section
175 {\tt /artifact/products} 178 {\tt /artifact/products}
176 179
177 \begin{lstlisting} 180 \begin{lstlisting}
189 value="fis\_marnet"/> 192 value="fis\_marnet"/>
190 </parameters> 193 </parameters>
191 </product> 194 </product>
192 \end{lstlisting} 195 \end{lstlisting}
193 196
194 Each {\tt product} is also represented by an {\tt artifact}. To create this {\tt artifact} we have to 197 Each {\tt product} is also represented by an {\tt artifact}. In order to
195 use an {\tt artifact-factory} which is configured in each product 198 create this {\tt artifact}, the {\tt artifact-factory} has to be used.
199 It is configured in each product
196 ({\tt /product/artifact-factory}). 200 ({\tt /product/artifact-factory}).
197 201
198 Each product can have several parameters ({\tt /product/parameters/parameters}). 202 Each product can have several parameters ({\tt
199 The {\tt parameter} named {\tt sourceid} and {\tt fisname} are required parameters. 203 /product/parameters/parameters}). The {\tt parameter} named {\tt
200 204 sourceid} and {\tt fisname} are required parameters.
201 The parameter {\tt fisname} contains the key to the name of the FIS. The key must be 205
202 unique. 206 The parameter {\tt fisname} contains the key to the name of the FIS. The
203 The parameter {\tt sourceid} contains the key to identify the FIS in the 207 key must be unique. The parameter {\tt sourceid} contains the key to
204 datawarehouse. ({\tt MEDIAN.SOURCEINFO}) 208 identify the FIS in the datawarehouse. ({\tt MEDIAN.SOURCEINFO})
205 209
206 210
207 \subsubsection{Configuration of an Product} 211 \subsubsection{Configuration of an Product}
208 \label{ref:config-a-product} 212 \label{ref:config-a-product}
209 The {\tt products} of the different FIS are also modeled as artifact-objects. 213 The {\tt products} of the different FIS are also modeled as artifact-objects.
210 The different products which are currently available are stored in separate 214 The different products which are currently available are stored in separate
211 files in the folder {\tt project}. 215 files in the folder {\tt project}.
212 216
213 In those files the workflow of each product is configured. Each step which is 217 In those files the workflow of each product is configured. Each step which is
214 required to model a new diagram is represented using a {\tt state} in the 218 required to model a new diagram is represented using a {\tt state} in the
215 configurationfile. 219 configuration-file.
216 220
221 %% FIXME: fix wording
217 To move between those {\tt states} it is required to model {\tt transitions} which define 222 To move between those {\tt states} it is required to model {\tt transitions} which define
218 between which states it is possible to move and which conditions must be 223 between which states it is possible to move and which conditions must be
219 fulfilled. 224 fulfilled.
220 225
221 The last step is called {\tt output-state}. This state is responsible to generate the 226 The last step is called {\tt output-state}. This state is responsible to generate the
267 (Each entry replace one ore more "?" ) 272 (Each entry replace one ore more "?" )
268 \item They were used to validate the inputdata which is "feed" to 273 \item They were used to validate the inputdata which is "feed" to
269 the FIS in the current state. 274 the FIS in the current state.
270 \end{itemize} 275 \end{itemize}
271 276
272 WARNING: The order of the inputvalues is significant at which position the value will 277 {\bf WARNING: The order of the input-values is significant at which position the value will
273 be put into the SQL-statement. 278 be put into the SQL-statement!}
274 279
275 It is possible to add one inputvalue twice or more often to put its value at 280 It is possible to add one inputvalue twice or more often to put its value at
276 different positions of the SQL-statement. 281 different positions of the SQL-statement.
277 282
278 \begin{lstlisting} 283 \begin{lstlisting}
330 P.PARAMETERID = TS.PARAMETERID AND 335 P.PARAMETERID = TS.PARAMETERID AND
331 TSP.FEATUREID = ? 336 TSP.FEATUREID = ?
332 ORDER BY P.GERMANNAME 337 ORDER BY P.GERMANNAME
333 \end{lstlisting} 338 \end{lstlisting}
334 339
335 If there are put the inputvalues in it it will look like this 340 Including inputvalues, the example for choosing the FIS ({\tt fisname})
336 if we assume that the inputvalues has got the following values 341 and the Station 342 ({\tt featureid}: Arkona Basin Buoy) will look like
337 which where feed by choosing this FIS ({\tt fisname}) and the Station 342 this:
338 ({\tt featureid}: Arkona Basin Buoy ): 343 \begin{itemize}
339 \begin{itemize} 344 \item {\tt featureid}: 100011 (Marnet $\rightarrow$ Arkona Basin Buoy)
340 \item {\tt featureid}: 100011 (Marnet ==> Arkona Basin Buoy)
341 \item {\tt fisname}: fis\_marnet 345 \item {\tt fisname}: fis\_marnet
342 \item {\tt parameterid}: not set because it's the value that should be 346 \item {\tt parameterid}: not set because it's the value that should be
343 chosen in this state. 347 chosen in this state.
344 \end{itemize} 348 \end{itemize}
345 349
410 <inputvalue name="measurementid" type="Integer" multiselect="true" usedinquery="0"/> 414 <inputvalue name="measurementid" type="Integer" multiselect="true" usedinquery="0"/>
411 </inputvalues> 415 </inputvalues>
412 \end{lstlisting} 416 \end{lstlisting}
413 417
414 \begin{itemize} 418 \begin{itemize}
415 \item {\tt featureid}: 100011 (Marnet ==> Arkona Basin Buoy) 419 \item {\tt featureid}: 100011 (Marnet $\rightarrow$ Arkona Basin Buoy)
416 \item {\tt fisname}: fis\_marnet 420 \item {\tt fisname}: fis\_marnet
417 \item {\tt parameterid}: 2 (Salzgehalt [pSal]) 421 \item {\tt parameterid}: 2 (Salzgehalt [pSal])
418 \item {\tt measurementid}: not set because it's the value that should be 422 \item {\tt measurementid}: not set because it's the value that should be
419 chosen in this state. 423 chosen in this state.
420 \end{itemize} 424 \end{itemize}
456 P.PARAMETERID IN (2) 460 P.PARAMETERID IN (2)
457 ORDER BY m.ZLOCATION DESC 461 ORDER BY m.ZLOCATION DESC
458 \end{lstlisting} 462 \end{lstlisting}
459 463
460 The queries which are shown above are configurable. 464 The queries which are shown above are configurable.
461 You can do this in the file {\tt queries.properties } which will 465 Configuring takes place in the file \texttt{queries.properties } which will
462 be explained in the next paragraph. 466 be explained in the next paragraph.
463 467
464 \paragraph{Query-configuration (queries.properties)} 468 \paragraph{Query-configuration (queries.properties)}
469 \label{ref:queries.properties}
465 470
466 This file contains key-value-pairs to define SQL-statements. 471 This file contains key-value-pairs to define SQL-statements.
467 All queries will be handle using the prepared-statement-syntax using "?" 472 All queries will be handle using the prepared-statement-syntax using "?"
468 to define a place where an dynamic value should be placed into the statement. 473 to define a place where an dynamic value should be placed into the statement.
469 474
470 There is one special implementation to support spatial access to the 475 There is one special implementation to support spatial access to the
471 {\tt ArcSDE}, because the {\tt ArcSDE} does not support the access to 476 {\tt ESRI ArcSDE}-database. This mechanism is used to realize the access to spatial-
472 spatial objects using the definition of the Simple Feature Specification for
473 SQL of the OGC.
474
475 It was necessary to implement this mechanism to realize the access to spatial-
476 objects. 477 objects.
477 478
478 All queries which contains the following literals will be handle separate 479 All queries containing the following literals will be handled separatly
479 using the {\tt ArcSDE-API}. 480 using the ESRI ArcSDE-API.
480 481
481 \begin{itemize} 482 \begin{itemize}
482 \item {\tt ST\_ASTEXT(SHAPE)}: Will return the geometry as an WellKnowText (WKT) 483 \item {\tt ST\_ASTEXT(SHAPE)}: Will return the geometry as an WellKnowText (WKT)
483 \item {\tt ST\_ASTEXT(RASTER)}: Will return the raster in an readable way. 484 \item {\tt ST\_ASTEXT(RASTER)}: Will return the raster in an readable way.
484 \item {\tt INTERSECTS(SHAPE,"?")}: Will only return the elements which geometry 485 \item {\tt INTERSECTS(SHAPE,"?")}: Will only return the elements which geometry
487 \end{itemize} 488 \end{itemize}
488 489
489 490
490 \paragraph{Transitions} 491 \paragraph{Transitions}
491 492
492 To move between two states it is necessary to configure dependencies between 493 To move between two states it is necessary to configure dependencies
493 the different states. 494 between the different states. This dependencies are called {\tt
494 This dependencies are called {\tt transitions}. 495 transitions}.
495 496
496 There are different kinds of {\tt transitions} which can be used. 497 There are different kinds of {\tt transitions} which can be used.
497 \begin{itemize} 498 \begin{itemize}
498 \item Transitions which only link two states 499 \item Transitions which only link two states
499 \item Transition which link two states with a additional condition. 500 \item Transition which link two states with a additional condition.
518 At this moment only {\tt EQUAL} and {\tt NOTEQUAL} are supported as 519 At this moment only {\tt EQUAL} and {\tt NOTEQUAL} are supported as
519 {\tt condition} for an {\tt ValueCompare\-Transition}. 520 {\tt condition} for an {\tt ValueCompare\-Transition}.
520 521
521 \paragraph{Outputstate} 522 \paragraph{Outputstate}
522 523
523 The {\tt outputstate} is an special {\tt state} which was created to define 524 The {\tt outputstate} is a special {\tt state} which was created to define
524 the different possibilities of outputs for each product. 525 the different possibilities of outputs for each product.
525 An {\tt outputstate} is handled as an {\tt state} which is described above. 526 An {\tt outputstate} is handled as a {\tt state} which is described above.
526 Additionally you are able to configure which kind of outputs should 527 Additionally you are able to configure which kind of outputs should
527 be provided. 528 be provided.
528 529
529 There are several {\tt outputstates}. Each one is designed to create 530 There are several {\tt outputstates}. Each one is designed to create
530 the output for one special product. 531 the output for one special product.
540 \end{itemize} 541 \end{itemize}
541 542
542 All these outputstates are implemented in {\tt package de.intevation.gnv.state} 543 All these outputstates are implemented in {\tt package de.intevation.gnv.state}
543 and its {\tt sub\-packages}. 544 and its {\tt sub\-packages}.
544 545
545 You have to put the fullqualified name of the {\tt outputstate} to the attribute 546 The fullqualified name of the {\tt outputstate} to the attribute
546 {\tt state} as shown below. 547 {\tt state} is shown below.
547 548
548 You can configure an {\tt outputstate} as shown below: 549 An example for an {\tt outputstate}:
549 550
550 \begin{lstlisting} 551 \begin{lstlisting}
551 <state id="timeseries_calculate_results" description="timeseries_interval" state="de.intevation.gnv.state.timeseries.TimeSeriesOutputState"> 552 <state id="timeseries_calculate_results" description="timeseries_interval" state="de.intevation.gnv.state.timeseries.TimeSeriesOutputState">
552 <queryID>timeseries_chart_data</queryID> 553 <queryID>timeseries_chart_data</queryID>
553 ... 554 ...
563 {\tt outputmodes} to one state as shown in the next paragraph. 564 {\tt outputmodes} to one state as shown in the next paragraph.
564 565
565 \paragraph{OutputModes} 566 \paragraph{OutputModes}
566 567
567 It is possible to configure several {\tt outputmodes} in one {\tt outputstate}. 568 It is possible to configure several {\tt outputmodes} in one {\tt outputstate}.
568 Inserting or deleting the configuration of an special 569 Inserting or deleting the configuration of a special
569 {\tt outputmode} will cause that the pending item will be shown or hidden 570 {\tt outputmode} will control if an item in the GUI will be displayed.
570 in the {\tt GUI}. 571
571 572 {\bf
572 WARNING: IT MIGHT BE POSSIBLE THAT ONE OR MORE OUTPUTMODES ARE NOT 573 WARNING: IT MIGHT BE POSSIBLE THAT ONE OR MORE OUTPUTMODES ARE NOT
573 SUPPORTED BY AN PRODUCT. IN THAT CASE IT IS NECESSARY TO 574 SUPPORTED BY AN PRODUCT. IN THAT CASE IT IS NECESSARY TO
574 IMPLEMENT THE REQUIRED FUNCTIONALITY BEFORE IT IS POSSIBLE 575 IMPLEMENT THE REQUIRED FUNCTIONALITY BEFORE IT IS POSSIBLE
575 TO OFFER THIS OUTPUTMODE. 576 TO OFFER THIS OUTPUTMODE.
577 }
576 578
577 Currently the following {\tt outputmodes} are supported: 579 Currently the following {\tt outputmodes} are supported:
578 580
579 \begin{itemize} 581 \begin{itemize}
580 \item {\tt chart} 582 \item {\tt chart}
601 <export name="svg" description="SVG-Export der Daten" mime-type="image/svg+xml" /> 603 <export name="svg" description="SVG-Export der Daten" mime-type="image/svg+xml" />
602 </exportModes> 604 </exportModes>
603 </outputsMode> 605 </outputsMode>
604 \end{lstlisting} 606 \end{lstlisting}
605 607
606 // TODO add simple OutputMode e.g. for CSV??
607 608
608 \begin{itemize} 609 \begin{itemize}
609 \item {\tt name}: The name of the mode. This must not be changed because it 610 \item {\tt name}: The name of the mode. This must not be changed because it
610 is used by the program. 611 is used by the program.
611 \item {\tt description}: a short description of this outputmode. 612 \item {\tt description}: a short description of this outputmode.
613 GUI e.g. for changing the size of an chart. 614 GUI e.g. for changing the size of an chart.
614 \item {\tt exportModes} : one or more formats which can be served. 615 \item {\tt exportModes} : one or more formats which can be served.
615 \end{itemize} 616 \end{itemize}
616 617
617 618
618 \subsection{Adding a new FIS} 619 \section{Adding a new FIS}
619 In this section it will be explained which steps has to be done to integrate a 620 In this section it will be explained which steps have to be done to integrate a
620 new FIS into the {\tt artifact-server}. This will be done using the configuration for 621 new FIS into the {\tt artifact-server}. This will be done using the configuration for
621 an FIS which use data from {\tt MEDIAN.TIMESERIES} section of the datawarehouse e.g. 622 a FIS which uses data from the table {\tt MEDIAN.TIMESERIES} section of
622 MARNET or STAUN 623 the datawarehouse (e.g. MARNET or STAUN).
623 624
624 Pay attention that for publishing the changes to the {\tt artifact-server} you will 625 For publishing the changes to the {\tt artifact-server}, it needs to be
625 have to restart it. 626 restarted.
626 627
627 \subsubsection{Adding a new Artifact-factory} 628 \subsection{Adding a new Artifact-factory}
628 First step is to add a new {\tt artifact-factory} to the configuration conf/conf.xml 629 First step is to add a new {\tt artifact-factory} to the configuration conf/conf.xml
629 To do this you have to add a new XML-fragment into the section 630 To do this you have to add a new XML-fragment into the section
630 /factories/artifact-factories which look like that: 631 /factories/artifact-factories which look like that:
631 632
632 \begin{lstlisting} 633 \begin{lstlisting}
633 <artifact-factory name='fis\_NEWFISNAME' 634 <artifact-factory name='fis_NEWFISNAME'
634 description='Factory to create an artifact to be used with the FIS NEWFISNAME' 635 description='Factory to create an artifact to be used with the FIS NEWFISNAME'
635 ttl='3600000' 636 ttl='3600000'
636 artifact='de.intevation.artifactdatabase.ProxyArtifact'> 637 artifact='de.intevation.artifactdatabase.ProxyArtifact'>
637 de.intevation.gnv.artifacts.GNVProductArtifactFactory 638 de.intevation.gnv.artifacts.GNVProductArtifactFactory
638 </artifact-factory> 639 </artifact-factory>
639 \end{lstlisting} 640 \end{lstlisting}
640 641
641 In this XML-fragment you only have to replace the placeholder {\tt NEWFISNAME} 642 In this XML-fragment you only have to replace the placeholder {\tt NEWFISNAME}
642 with a unique short name for the new FIS. 643 with a unique short name for the new FIS.
643 644
644 \paragraph{Example} 645 \paragraph*{Example}
645 This example shows how to add an FIS and which effects it took to the 646 This example shows how to add a FIS and illustrates the effect on the
646 REST-Server. 647 artifact-server's output.
647 648
648 At first we add the following {\tt artifact-factory} into the file 649 First , the following {\tt artifact-factory} has to be added into the file
649 {\tt conf/conf.xml} in section {\tt /artifact-database/artifact-factories} 650 {\tt conf/conf.xml} in section {\tt /artifact-database/artifact-factories}
650 which add a new FIS called {\tt justanewfis} to the server: 651 adding a new FIS called {\tt justanewfis} to the server:
651 652
652 \begin{lstlisting} 653 \begin{lstlisting}
653 <artifact-factory name='fis\_justanewfis' 654 <artifact-factory name='fis_justanewfis'
654 description='Factory to create an artifact to be used with the FIS NEWFISNAME' 655 description='Factory to create an artifact to be used with the FIS NEWFISNAME'
655 ttl='3600000' 656 ttl='3600000'
656 artifact='de.intevation.artifactdatabase.ProxyArtifact'> 657 artifact='de.intevation.artifactdatabase.ProxyArtifact'>
657 de.intevation.gnv.artifacts.GNVProductArtifactFactory 658 de.intevation.gnv.artifacts.GNVProductArtifactFactory
658 </artifact-factory> 659 </artifact-factory>
659 \end{lstlisting} 660 \end{lstlisting}
660 661
661 Then we restart the {\tt artifact-database} executing the following command: 662 Restart the {\tt artifact-database} executing:
662 663
663 \begin{lstlisting} 664 \begin{lstlisting}
664 /etc/init.d/artifactdb restart 665 /etc/init.d/artifact-server restart
665 \end{lstlisting} 666 \end{lstlisting}
666 667
667 Then we check if the new FIS is served by the REST-Server 668 Checking if the new FIS is served by the REST-Server
668 calling the following command: 669 calling the following command:
669 670
670 \begin{lstlisting} 671 \begin{lstlisting}
671 curl http://localhost:8181/factories | xmllint --format - | grep fis\_justanewfis 672 curl http://localhost:8181/factories | xmllint --format - | grep fis_justanewfis
672 \end{lstlisting} 673 \end{lstlisting}
673 674
674 If the FIS was added the new {\tt artifact-factory} will be found in the generated 675 If the FIS was added, the new {\tt artifact-factory} will be found in the generated
675 XML-output and it will be shown. 676 XML-output. Otherwise no XML-output will be shown.
676 Otherwise no XML-output will be shown. 677
677 678 \subsection{Adding a new Artifact for Artifact-factory}
678 \subsubsection{Adding a new Artifact for Artifact-factory}
679 The next step is to define the artifact itself. 679 The next step is to define the artifact itself.
680 For this it is necessary to add an XML-fragment into the section 680 For this it is necessary to add an XML-fragment into the section
681 {\tt /artifacts} of the main configurationfile {\tt /conf/conf.xml}. 681 {\tt /artifacts} of the main configurationfile {\tt /conf/conf.xml}.
682 682
683 \begin{lstlisting} 683 \begin{lstlisting}
684 <artifact name='fis\_NEWFISNAME'> 684 <artifact name='fis_NEWFISNAME'>
685 <products> 685 <products>
686 ... 686 ...
687 </products> 687 </products>
688 </artifact> 688 </artifact>
689 \end{lstlisting} 689 \end{lstlisting}
691 In this XML-fragment it is also required to replace the placeholder {\tt NEWFISNAME} 691 In this XML-fragment it is also required to replace the placeholder {\tt NEWFISNAME}
692 with the name which was used to configure the {\tt artifact-factory}. 692 with the name which was used to configure the {\tt artifact-factory}.
693 693
694 Now the {\tt artifact-server} can handle an additional FIS without any products yet. 694 Now the {\tt artifact-server} can handle an additional FIS without any products yet.
695 695
696 To prevent needless configuration-work it is useful way to clone an artifact 696 To prevent needless configuration-work, it is a useful way to clone an
697 which handle the same kind of work as the new FIS. 697 existing artifact handling the same kind of work.
698 698
699 699
700 \paragraph{Example} 700 \paragraph*{Example}
701 Now we will configure an artifact to the FIS justanewfis. 701 Now will an artifact to the FIS {\tt fis\_justanewfis}, will be configured.
702 702
703 For this we have to add the following XML-fragment to the file 703 The following XML-fragment has to be added to the file
704 {\tt conf/conf.xml} in section {\tt /artifact-database/artifacts}: 704 {\tt conf/conf.xml} in section {\tt /artifact-database/artifacts}:
705 705
706 \begin{lstlisting} 706 \begin{lstlisting}
707 <artifact name='fis\_justanewfis'> 707 <artifact name='fis_justanewfis'>
708 <products> 708 <products>
709 </products> 709 </products>
710 </artifact> 710 </artifact>
711 \end{lstlisting} 711 \end{lstlisting}
712 712
713 Restart the artifact-database: 713 Restart the artifact-server
714 714
715 \begin{lstlisting} 715 \begin{lstlisting}
716 /etc/init.d/artifactdb restart 716 /etc/init.d/artifact-server restart
717 \end{lstlisting} 717 \end{lstlisting}
718 718
719 Now we should be able to choose the artifact. 719 Now it should be possible to choose the artifact.
720 720
721 The Listbox with products will be empty. 721 The listbox in the GUI would be empty.
722 \begin{lstlisting} 722 \begin{lstlisting}
723 curl -d "@sample-documents/create-artifact.xml" http://localhost:8181/create | xmllint --format - 723 curl -d "@sample-documents/create-artifact.xml" http://localhost:8181/create | xmllint --format -
724 \end{lstlisting} 724 \end{lstlisting}
725 725
726 \subsubsection{Adding removing Products to the specific Artifact} 726 \subsection{Adding/Removing Products to the Specific Artifact}
727 Now it is time to configure the different products which the FIS should be able 727 Next step is, to configure the different products which the FIS should
728 to provide. 728 be able to provide. To do this it is necessary to copy the
729 To do this it is necessary to copy the XML-fragments of the products into the 729 XML-fragments of the products into the XML-element {\tt products} of the
730 XML-element {\tt products} of the previously integrated artifact. 730 previously integrated artifact.
731 \begin{lstlisting} 731
732 <artifact name='fis\_NEWFISNAME'> 732 \begin{lstlisting}
733 <artifact name='fis_NEWFISNAME'>
733 <products> 734 <products>
734 <product name= "timeSeries"> 735 <product name= "timeSeries">
735 <artifact-factory name="timeSeries" 736 <artifact-factory name="timeSeries"
736 description="Artifactfactory for instantiating the artifact for TimeSeries on TimeSeriesPoints" 737 description="Artifactfactory for instantiating the artifact for TimeSeries on TimeSeriesPoints"
737 ttl="300000" 738 ttl="300000"
761 </product> 762 </product>
762 </products> 763 </products>
763 </artifact> 764 </artifact>
764 \end{lstlisting} 765 \end{lstlisting}
765 766
766 In this XML-fragment you have to replace the placeholders {\tt NEWFISNAME} 767 In this XML-fragment the placeholders {\tt NEWFISNAME} have to be
767 as before and {\tt VALUEOFSOURCEID} with the value for the new FIS as defined 768 replaced. The source-id {\tt VALUEOFSOURCEID} with the value for the new
768 in the table {\tt MEDIAN.SOURCEINFO}. 769 FIS as defined in the table {\tt MEDIAN.SOURCEINFO} needs to be added.
769 770
770 \paragraph{Example} 771 \paragraph*{Example}
771 Now we will add a product to the new FIS. 772 Adding a product to the new FIS, choosing sourceid of an existing FIS
772 To let the products work we will choose a product which 773 (e.g 4 $\rightarrow$ Marnet).
773 will contain the sourceid of an existing FIS (e.g 4 Marnet). 774
774 775 Add the following XML-fragment to the new artifact.
775 At first add the following XML-fragment to the new artifact.
776 \begin{lstlisting} 776 \begin{lstlisting}
777 <product name= "timeSeries"> 777 <product name= "timeSeries">
778 <artifact-factory name="timeSeries" 778 <artifact-factory name="timeSeries"
779 description="Artifactfactory for instantiating the artifact for TimeSeries on TimeSeriesPoints" 779 description="Artifactfactory for instantiating the artifact for TimeSeries on TimeSeriesPoints"
780 ttl="300000" 780 ttl="300000"
788 value="fis\_justanewfis"/> 788 value="fis\_justanewfis"/>
789 </parameters> 789 </parameters>
790 </product> 790 </product>
791 \end{lstlisting} 791 \end{lstlisting}
792 792
793 Restart the artifact-database: 793 Restart the artifact-server
794 794
795 \begin{lstlisting} 795 \begin{lstlisting}
796 /etc/init.d/artifactdb restart 796 /etc/init.d/artifact-server restart
797 \end{lstlisting} 797 \end{lstlisting}
798 798
799 If we call 799 If
800 \begin{lstlisting} 800 \begin{lstlisting}
801 curl -d "@sample-documents/create-artifact.xml" http://localhost:8181/create | xmllint --format - 801 curl -d "@sample-documents/create-artifact.xml" http://localhost:8181/create | xmllint --format -
802 \end{lstlisting} 802 \end{lstlisting}
803 803
804 the product {\tt timeSeries} should be available for the FIS {\tt justanewfis}. 804 is called, the product {\tt timeSeries} should be available for the FIS {\tt justanewfis}.
805 805
806 Now we should be able to choose the product. 806 Now, it should be able to choose the product.
807 This product should work and you should be able to generate even the defined 807 This product including the definied outputformats should be available in
808 outputformats. 808 the GUI.
809 809
810 \subsection{Adding a new Product} 810 \subsection{Adding a new Product}
811 To add a new product to the system it is necessary that the required 811 To add a new product to the system it is necessary that the required
812 artifact representation is implemented in the {\tt sourcecode}. 812 artifact representation is implemented in the {\tt sourcecode}.
813 Without doing that step it is not possible to create a new product. 813 Without doing that step it is not possible to create a new product.
814 814
815 All products are configured in separate files that will be included into the 815 All products are configured in separated files that will be included into the
816 main configuration using Xlink-references. 816 main configuration using Xlink-references.
817 817
818 First step is to create a new file in the folder {\tt products} and there in the 818 First step is to create a new file in the folder {\tt products} and in the
819 sub-folder where the product belongs to ({\tt timeseries,verticalprofile, 819 sub-folder where the product belongs to ({\tt timeseries,verticalprofile,
820 horizontalprofile,horizontal\-crosssection,layer,...}) 820 horizontalprofile,horizontal\-crosssection,layer,...})
821 821
822 Then you have tor reference this file in the file {\tt /conf/conf.xml} in the 822 Then the new product can be referenced in the file {\tt /conf/conf.xml} in the
823 section {\tt/artifacts} using the following XML-fragment. 823 section {\tt/artifacts} using the following XML-fragment.
824 824
825 \begin{lstlisting} 825 \begin{lstlisting}
826 <artifact name="timeSeries" 826 <artifact name="timeSeries"
827 xmlns:xlink="http://www.w3.org/1999/xlink" 827 xmlns:xlink="http://www.w3.org/1999/xlink"
833 833
834 Then it is possible to add the product to a FIS as explained in the next section. 834 Then it is possible to add the product to a FIS as explained in the next section.
835 Please note that the defined name of the {\tt artifact-factory} has to match to the 835 Please note that the defined name of the {\tt artifact-factory} has to match to the
836 name of the added products which is also designed as an artifact. 836 name of the added products which is also designed as an artifact.
837 837
838 \subsection{Adding a additional Product to a FIS} 838 \subsection{Adding an additional Product to a FIS}
839 To add a additional product to a FIS you only have to add the XML-fragment which 839 To add an additional product to a FIS the XML-fragment which
840 represents the product to the artifact-configuration of the FIS in section 840 represents the product to the artifact-configuration of the FIS in section
841 {\tt /artifacts/artifact/products}. 841 {\tt /artifacts/artifact/products} needs to be added.
842 842
843 \begin{lstlisting} 843 \begin{lstlisting}
844 <product name= "timeSeries"> 844 <product name= "timeSeries">
845 <artifact-factory name="timeSeries" 845 <artifact-factory name="timeSeries"
846 description="Artifactfactory for instantiating the artifact for TimeSeries on TimeSeriesPoints" 846 description="Artifactfactory for instantiating the artifact for TimeSeries on TimeSeriesPoints"
855 value="fis\_NEWFISNAME"/> 855 value="fis\_NEWFISNAME"/>
856 </parameters> 856 </parameters>
857 </product> 857 </product>
858 \end{lstlisting} 858 \end{lstlisting}
859 859
860 Please note that you have to replace the Placeholders as explained above. 860 Please note that the placeholders have to be explained above.
861

http://dive4elements.wald.intevation.org