\section{Model of transitions}
\subsection{General principle of model of transitions}
        - FIS -> product -> transitions in data model
    
\subsection{Adding a new FIS}
In this Section it will explained which steps has to be done to integrate a new 
FIS into the Artifact-Server.
This will be done using the Configuration for an FIS which use data from 
MEDIAN.TIMESERIES Section of the DataWareHouse e.g. MARNET or STAUN

Pay attention that for publishing the Changes to the Artifact-Server you will 
have to restart it. 

\subsubsection{Adding a new Artifactfactory}
First step is to add a new Artifactfactory to the Configuration conf/conf.xml
To do this you have to add a new XML-Fragment into the Section 
/factories/artifact-factories  which look like that:

\begin{lstlisting}
<artifact-factory name='fis\_NEWFISNAME' 
                  description='Factory to create an artifact to be used with the FIS NEWFISNAME'  
                  ttl='3600000' 
                  artifact='de.intevation.artifactdatabase.ProxyArtifact'>
                  de.intevation.gnv.artifacts.GNVProductArtifactFactory
</artifact-factory>
\end{lstlisting}
 
In this XML-Fragment you only have to replace the placeholder NEWFISNAME with a 
unique short Name for the new FIS.

\subsubsection{Adding a new Artifact for Artifactfactory}
The next Step is to define the Artifact itself.
For this it is necessary to add an XML-Fragment into the Section /artifacts of 
the main Configuration-File /conf/conf.xml
\begin{lstlisting}
<artifact name='fis\_NEWFISNAME'>
    <products>
     ...
    </products>
</artifact>
\end{lstlisting}

In this XML- Fragment it is also required to replave the placeholder NEWFISNAME 
with the name which was used to configure the Artifact-Factory.

Now the ArtifactServer can serv an additional FIS without any Products yet.

To prevent needless Configuration-Work it is useful way to clone an Artifact 
which handle the same Kind of work as the new FIS.

\subsubsection{Adding removing Products to the specific Artifact}
Now it is Time to configure the different Products which the FIS should be able 
to provide.
To do this it is necessary to Copy the XML-Fragments of the products into the
XML-Element <products> of the previously integrated Artifact.
\begin{lstlisting}
<artifact name='fis\_NEWFISNAME'>
     <products>
         <product name= "timeSeries">
              <artifact-factory name="timeSeries" 
                                description="Artiefactfactory for Instantiating the Artifact for TimeSeries on TimeSeriesPoints"  
                                ttl="300000" 
                                artifact="de.intevation.gnv.timeseries.TimeSeriesArtifact">
                  de.intevation.gnv.artifacts.GNVArtifactFactory
              </artifact-factory>
              <parameters>
                  <parameter name="sourceid" 
                             value="VALUEOFSOURCEID"/>
                  <parameter name="fisname" 
                             value="fis\_NEWFISNAME"/>
              </parameters>
          </product>
          <product name= "verticalProfile">
              <artifact-factory name="verticalProfile" 
                                description="Artiefactfactory for Instantiating the Artifact for Verticalprofiles on TimeSeriesPoints"  
                                ttl="300000" 
                                artifact="de.intevation.gnv.profile.vertical.VerticalProfileArtifact">
                  de.intevation.gnv.artifacts.GNVArtifactFactory
              </artifact-factory>
              <parameters>
                  <parameter name="sourceid" 
                             value="VALUEOFSOURCEID"/>
                  <parameter name="fisname" 
                             value="fis\_NEWFISNAME"/>
              </parameters>
          </product>
     </products>
</artifact>
\end{lstlisting}

In this XML Fragment you have to replace the placeholders NEWFISNAME as before 
and VALUEOFSOURCEID with the value for the new FIS as defined in the Table 
MEDIAN.SOURCEINFO.

\subsubsection{Putting SourceID to specific Artifact}
\subsection{Adding a new Product}
To add a new Product to the System it is necessary that the required 
Artifactrepresentation is Implemented in the SourceCode.
Without doing that step it is not possible to create a new Product.

All Products are configured in separate Files that will be included into the 
Mainconfiguration using Xlink-references.

First Step is to create a new File in the Folder products and there in the 
subfolder where the Product belongs to (timeseries,verticalprofile,
horizontalprofile,horizontalcrosssection,layer,...)

Then you have tor reference this File in the File /conf/conf.xml in the Section 
/artifacts using the following XML-Fragment.

\begin{lstlisting}
<artifact name="timeSeries" 
          xmlns:xlink="http://www.w3.org/1999/xlink" 
          xlink:href="${artifacts.config.dir}/products/PATHTOFILE" /> 
\end{lstlisting}

The placeholder PATHTOFILE has to be replaced with the relative Path and the 
Name of the File starting in the Folder products.  

Then it is possible to add the product to a FIS as explained in the next section.
Please note that the defined Name of the ArtifactFactory has to match to the 
Name of the added Products which is also designed as an Artifact.

\subsection{Adding a additional Product to a FIS}
To add a additional Product to a FIS you only have to add the XML-Fragment which 
represents the product to the Artifact-configuration of the FIS in Section 
/artifacts/artifact/products.

\begin{lstlisting}
 <product name= "timeSeries">
     <artifact-factory name="timeSeries" 
                       description="Artiefactfactory for Instantiating the Artifact for TimeSeries on TimeSeriesPoints"  
                       ttl="300000" 
                       artifact="de.intevation.gnv.timeseries.TimeSeriesArtifact">
          de.intevation.gnv.artifacts.GNVArtifactFactory
     </artifact-factory>
     <parameters>
         <parameter name="sourceid" 
                    value="VALUEOFSOURCEID"/>
         <parameter name="fisname" 
                    value="fis\_NEWFISNAME"/>
     </parameters>
 </product>
 \end{lstlisting}

Please note that you have to replace the Placeholders as explained above.

