tim@906: \section{Model of transitions}
tim@906: \subsection{General principle of model of transitions}
tim@906: - FIS -> product -> transitions in data model
tim@907:
tim@908: It is possible to configure the GNV in many ways.
tim@908: It is possible to add or remove FIS, add or remove Products from a FIS or
tim@908: to manipulate the steps which must be gone until a product can be create
tim@908: a diagramm or generate an CSV-Export.
tim@908:
tim@908: The configuration of the provided FIS are devided in three main parts.
tim@908:
tim@908: \begin{itemize}
tim@908: \item Configuration of the Artifactfactories which represents the FIS.
tim@908: \item Configuration of main Artifacts which will be instantiated if an
tim@907: Artifactfactory was called.
tim@908: \item Configuration of the different Artifacts which provides Products which can be
tim@907: served by the FIS.
tim@908: \end{itemize}
tim@907:
tim@907: \subsubsection{Configuration of ArtifactFactories}
tim@907: The Point of Enty into the system is to configure an Artifactfactory.
tim@907: Each Artifactfactory represents one FIS.
tim@907: It is possible to configure several Artifactfactories.
tim@908: The Artifactfactories will be configured in the Section
tim@907: /artifact-database/artifact-factories of the Configurationfile.
tim@907:
tim@907: \begin{lstlisting}
tim@907:
tim@907: de.intevation.gnv.artifacts.GNVProductArtifactFactory
tim@907:
tim@907: \end{lstlisting}
tim@907:
tim@907: At this moment the following Attributes of an Artifact-Factory are configurabel.
tim@908: \begin{itemize}
tim@908: \item name: The Name of the Artifact. Must be unique in one Artifact-Server
tim@908: \item description: Short description which Job the Artifactfactory has to do.
tim@908: \item ttl: The Time to Live: The Time using Milliseconds an Artifact, created using this
tim@908: factory, can live without any Userinteraction.
tim@908: \item artifact: The Name of the Class of the Artifact which should be created.
tim@908: \end{itemize}
tim@907:
tim@907: // TODO: List of Artifacts which currently used in this Configuration?
tim@907:
tim@907: \subsubsection{Configuration of main Artifact}
tim@908: For each Artifact-Factory it is necessary to configure one Artifact which will be
tim@908: created using the Factory.
tim@907: This Artifact is the representation of the specific FIS.
tim@908: It contains the Configuration which products will be serverd for ths FIS.
tim@907:
tim@907: The Artifacts are configured in the Section /artifact-database/artifacts of
tim@907: the Configurationfile.
tim@907:
tim@907: \begin{lstlisting}
tim@907:
tim@907:
tim@907: ...
tim@907:
tim@907:
tim@907: \end{lstlisting}
tim@907:
tim@907: The Key is to use the same Name for the Artifact as used for the Artifactfactory.
tim@907: The Name has to be unique.
tim@907: In the Section /artifact/products it is possible to define several Products as
tim@907: explained in the next Section.
tim@907:
tim@907: \paragraph{Products to an Artifact}
tim@907: One Artifact can provide several Products.
tim@907: To do this it is required to configure them as shown below in the Section
tim@907: /artifact/products
tim@907:
tim@907: \begin{lstlisting}
tim@907:
tim@907:
tim@907: de.intevation.gnv.artifacts.GNVArtifactFactory
tim@907:
tim@907:
tim@907:
tim@907:
tim@907:
tim@907:
tim@907: \end{lstlisting}
tim@907:
tim@908: Each Product is also represented by an Artifact. To create this Artifact we have to
tim@907: use an Artifact-Factory which is configured in each product
tim@907: (/product/artifact-factory).
tim@907:
tim@907: Each Product can have several parameters /product/parameters/parameters.
tim@907: The Parameter named sourceid and fisname are required Parameters.
tim@907:
tim@907: The Parameter fisname contains the key to the Name of the FIS. The Key must be
tim@907: unique.
tim@907: The Parameter sourceid contains the key to identify the FIS in the
tim@907: DataWareHouse. (MEDIAN.SOURCEINFO)
tim@907:
tim@907:
tim@907: \subsubsection{Configuration of the Product-Artifacts}
tim@908: The Products of the different FIS are also modeled as Artifact-Objects.
tim@908: The different Products which are currently avaliable are stored in separate
tim@908: Files in the Folder project.
tim@908:
tim@908: In those Files the Workflow of each product is configured. Each step which is
tim@908: required to model a new Diagramm is represented using a state in the
tim@908: Configuration-File.
tim@908:
tim@908: To move between those States it is required to model Transitions which define
tim@908: between which States it is possible to move and which conditions must be
tim@908: fulfilled.
tim@908:
tim@908: The Last step is called OutputState. This State is responsible to generate the
tim@908: output for the different Formats which can be served from the Product (Diagramm,
tim@908: CSV, ODV, WMS,...).
tim@908:
tim@907: \paragraph{States}
tim@908: A state is one Step which is required to fetch the Data for generating e.g. an
tim@908: Diagramm.
tim@908:
tim@908: For example in each Product it is Possible to choose one or more Parameters.
tim@908:
tim@908: To configure a State you have to use a XML-Fragment as shown below:
tim@908:
tim@908: \begin{lstlisting}
tim@908:
tim@908: timeseries_parameter
tim@908: parameterid
tim@908: true
tim@908:
tim@908:
tim@908:
tim@908:
tim@908:
tim@908:
tim@908: \end{lstlisting}
tim@908:
tim@908: At this moment the following Attributes of an Artifact-Factory are configurabel.
tim@908: \begin{itemize}
tim@908: \item id: The Name of the Artifact. Must be unique in one Artifact-Server
tim@908: \item description: Short description which Job the Artifactfactory has to do.
tim@908: \item queryID: The ID of the Query which should be used to fetch the Data
tim@908: displayed in this state. //TODO: Reference to queries.properties
tim@908: \item dataname: The ID of the Data which will be displaied in this State.
tim@908: The ID will be use to localize the description of the Data.
tim@908: \item data-multiselect: true it is possible to select 1 or more Items.
tim@908: false ist is possible to select only one Item.
tim@908: \item inputvalues: The Values which can be "feed" //TODO: How to explain this
tim@908: to this State.
tim@908: \end{itemize}
tim@908:
tim@908:
tim@907: \paragraph{Transitions}
tim@908:
tim@908: To move between two States it is necessary to configure dependencies between
tim@908: the different States.
tim@908: This dependencies are called. Transitions.
tim@908:
tim@908: There are different Kind of Transitions which can be used.
tim@908: \begin{itemize}
tim@908: \item Transitions which only link two States
tim@908: \item Transition which link two States with a aditional Condition.
tim@908: (e.g. If a region was selected in the Regionfilter or not )
tim@908: \end{itemize}
tim@908:
tim@908: The listing below shows a Transition with an additional Condition.
tim@908: \begin{lstlisting}
tim@908:
tim@908:
tim@908:
tim@908:
tim@908:
tim@908: \end{lstlisting}
tim@908:
tim@908: \begin{itemize}
tim@908: \item from: The ID of the State which you have to come from
tim@908: \item to: The ID of the State which can be reached.
tim@908: \item condition: The Condition which have to be fulfilled.
tim@908: \end{itemize}
tim@908:
tim@907: \paragraph{Outputstate}
tim@907:
tim@907:
tim@906: \subsection{Adding a new FIS}
tim@908: In this Section it will be explained which steps has to be done to integrate a
tim@908: new FIS into the Artifact-Server. This will be done using the Configuration for
tim@908: an FIS which use data from MEDIAN.TIMESERIES Section of the DataWareHouse e.g.
tim@908: MARNET or STAUN
tim@906:
tim@906: Pay attention that for publishing the Changes to the Artifact-Server you will
tim@906: have to restart it.
tim@906:
tim@906: \subsubsection{Adding a new Artifactfactory}
tim@906: First step is to add a new Artifactfactory to the Configuration conf/conf.xml
tim@906: To do this you have to add a new XML-Fragment into the Section
tim@906: /factories/artifact-factories which look like that:
tim@906:
tim@906: \begin{lstlisting}
tim@906:
tim@906: de.intevation.gnv.artifacts.GNVProductArtifactFactory
tim@906:
tim@906: \end{lstlisting}
tim@906:
tim@906: In this XML-Fragment you only have to replace the placeholder NEWFISNAME with a
tim@906: unique short Name for the new FIS.
tim@906:
tim@906: \subsubsection{Adding a new Artifact for Artifactfactory}
tim@906: The next Step is to define the Artifact itself.
tim@906: For this it is necessary to add an XML-Fragment into the Section /artifacts of
tim@906: the main Configuration-File /conf/conf.xml
tim@906: \begin{lstlisting}
tim@906:
tim@906:
tim@906: ...
tim@906:
tim@906:
tim@906: \end{lstlisting}
tim@906:
tim@906: In this XML- Fragment it is also required to replave the placeholder NEWFISNAME
tim@906: with the name which was used to configure the Artifact-Factory.
tim@906:
tim@906: Now the ArtifactServer can serv an additional FIS without any Products yet.
tim@906:
tim@906: To prevent needless Configuration-Work it is useful way to clone an Artifact
tim@906: which handle the same Kind of work as the new FIS.
tim@906:
tim@906: \subsubsection{Adding removing Products to the specific Artifact}
tim@906: Now it is Time to configure the different Products which the FIS should be able
tim@906: to provide.
tim@906: To do this it is necessary to Copy the XML-Fragments of the products into the
tim@906: XML-Element of the previously integrated Artifact.
tim@906: \begin{lstlisting}
tim@906:
tim@906:
tim@906:
tim@906:
tim@906: de.intevation.gnv.artifacts.GNVArtifactFactory
tim@906:
tim@906:
tim@906:
tim@906:
tim@906:
tim@906:
tim@906:
tim@906:
tim@906: de.intevation.gnv.artifacts.GNVArtifactFactory
tim@906:
tim@906:
tim@906:
tim@906:
tim@906:
tim@906:
tim@906:
tim@906:
tim@906: \end{lstlisting}
tim@906:
tim@908: In this XML-Fragment you have to replace the placeholders NEWFISNAME as before
tim@906: and VALUEOFSOURCEID with the value for the new FIS as defined in the Table
tim@906: MEDIAN.SOURCEINFO.
tim@906:
tim@906: \subsubsection{Putting SourceID to specific Artifact}
tim@906: \subsection{Adding a new Product}
tim@906: To add a new Product to the System it is necessary that the required
tim@906: Artifactrepresentation is Implemented in the SourceCode.
tim@906: Without doing that step it is not possible to create a new Product.
tim@906:
tim@906: All Products are configured in separate Files that will be included into the
tim@908: Mainconfiguration using Xlink-References.
tim@906:
tim@906: First Step is to create a new File in the Folder products and there in the
tim@906: subfolder where the Product belongs to (timeseries,verticalprofile,
tim@906: horizontalprofile,horizontalcrosssection,layer,...)
tim@906:
tim@906: Then you have tor reference this File in the File /conf/conf.xml in the Section
tim@906: /artifacts using the following XML-Fragment.
tim@906:
tim@906: \begin{lstlisting}
tim@906:
tim@906: \end{lstlisting}
tim@906:
tim@906: The placeholder PATHTOFILE has to be replaced with the relative Path and the
tim@906: Name of the File starting in the Folder products.
tim@906:
tim@906: Then it is possible to add the product to a FIS as explained in the next section.
tim@906: Please note that the defined Name of the ArtifactFactory has to match to the
tim@906: Name of the added Products which is also designed as an Artifact.
tim@906:
tim@906: \subsection{Adding a additional Product to a FIS}
tim@906: To add a additional Product to a FIS you only have to add the XML-Fragment which
tim@906: represents the product to the Artifact-configuration of the FIS in Section
tim@906: /artifacts/artifact/products.
tim@906:
tim@906: \begin{lstlisting}
tim@906:
tim@906:
tim@906: de.intevation.gnv.artifacts.GNVArtifactFactory
tim@906:
tim@906:
tim@906:
tim@906:
tim@906:
tim@906:
tim@906: \end{lstlisting}
tim@906:
tim@906: Please note that you have to replace the Placeholders as explained above.
tim@906: