view doc/config-manual/general_settings.tex @ 1132:03c404871d50

ISSUE23: Documentation how to add a language doc/trunk@1242 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Tim Englich <tim.englich@intevation.de>
date Tue, 29 Jun 2010 10:28:51 +0000
parents 975bb59bb136
children 411b09d348ca
line wrap: on
line source
\section{Configuring the GNV-Server}

The configuration of the artifact- and mapserver is been done in the
central configuration directory at {\tt artifact-server/conf/}. The
central entry point is the file {\tt conf.xml}. All components of the
configuration are linked from this document. 

{\bf Within the configuration the key 
{\verb+${artifacts.config.dir}+} can be used to reference the central
configuration directory of the artifact-server instance, e.g. 
\texttt{/opt/artifact-server/conf}.}

The following structure gives an overview of the entire structure
starting from {\tt conf/}:

%% tree /opt/artifact-server/
\begin{lstlisting}
conf/
|-- arcsdeconnectionpool.properties # database connection
|-- charttemplate.xml # general properties for chart generation
|-- conf.xml # central configuration
|-- ehcache.xml # configuration of caching system
|-- log4j.properties # logging of server
|-- maptemplates # style defintions for rendering maps
|   `-- *.vm
|-- meshwidth.xml # buffer-size for querying different FIS on
                  # meshes
|-- palette # styling for 2D charts
|   `-- *.xml
|-- products # configuration of steps in workflows
|   |-- horizontalcrosssection
|   |   `-- *.xml
|   |-- horizontalprofile
|   |   `-- *.xml
|   |-- layer
|   |   `-- *.xml
|   |-- timeseries
|   |   |-- *.xml
|   |   `-- timegap_definition.xml # definition of a gaps as defines in MEDIAN Coded Value Domains section TSIntervalTypes. The meaning of the defined gaps are detailed  explained in the file itself.
|   |-- verticalcrosssection
|   |   `-- *.xml
|   `-- verticalprofile
|       `-- *.xml
`-- queries.properties # SQL configuration according to products
\end{lstlisting}


The central config-file {\tt conf/conf.xml} is XML-based and contains the
following main elements:

\begin{lstlisting}
artifact-database
|-- geo-backend # pointing to database connection, SQL configuration
|-- rest-server # port, listen addresses
|-- database # internal database storing artifacts
|-- ehcache # pointing to cache configuration
|-- cleaner # time of cleanups FIXME
|-- export-secret # signing project files
|-- factories # list of expert information systems
|-- artifacts # list of products
|-- gnv # charts, palettes, interpolation parameters
|-- mapserver # integration of mapserver
`-- velocity # templating language used in maptemplates
\end{lstlisting}

The documentation of the configuration will be split up in 4 sections
addressing different tasks:
\begin{enumerate}
    \item "Configuring and Running Artifact-Server" covering the main elements 
    \texttt{
geo-backend, rest-server, database, ehcache, cleaner, export-secret}
    \item "Generating Charts -- Background and Configuration" covering
    the main element {\tt gnv}
    \item "Generating Maps -- Background and Configuration" covering the
    main elements {\tt mapserver, velocity}
    \item "Configuring FIS, Products, States, Transitions and
    SQL-Statements" covering the main elements {\tt factories,
    artifacts}
\end{enumerate}

\subsection{Adding new Languages}
The GNV-Server has the possibility to handle different languages.
It is necessary to configure those languages.

The configuration is divided into three steps

\begin{enumerate}
   \item Adding the required resource-file to the GNV-Server 
   {\tt /gnv-artifacts/src/main/resources/lang }
   \item Adding the required resource-file to the GNV-Web-Client 
   {\tt /gnv/src/main/resources}
   \item Publishing the new language to the GNV-Server by adding the 
   language-code to the file {\tt /gnv-artifacts/src/main/resources/lang/lang.conf}
\end{enumerate}

To generate the resource-files it might be helpful to copy an existing one and
translate the content into the desired language.

Please not that you have to do an new packaging of the modules gnv and gnv-artifacts
to publish the new languages to the system.

Also note, that the Web-Client currently only provide German an English as languages. 
If you want to provide further languages you have to change the toggle-mechanism for 
switching the language in the web-client.

http://dive4elements.wald.intevation.org