Mercurial > dive4elements > river
view contrib/make_flys_release/bin/make-importer-package.sh @ 5509:627584bc0586
Datacage: Added <dc:filter> element. This allows cleaner way to narrow the datasets.
Example:
<dc:context>
<dc:statement>
SELECT DISTINCT
name AS hws_name,
official AS hws_official,
kind_id AS hws_kind
FROM hws_lines
WHERE river_id = ${river_id}
</dc:statement>
<dc:if test="dc:has-result()">
<lines>
<dc:macro name="hws-lines">
<dc:elements>
<hws factory="hwsfactory" name="{$hws_name}"/>
</dc:elements>
</dc:macro>
<dc:filter expr="$hws_official=1">
<dc:if test="dc:has-result()">
<official>
<dc:filter expr="$hws_kind=1">
<dc:if test="dc:has-result()">
<Durchlass><dc:call-macro name="hws-lines"></Durchlass>
</dc:if>
</dc:filter>
<dc:filter expr="$hws_kind=2">
<dc:if test="dc:has-result()">
<Damm><dc:call-macro name="hws-lines"></Damm>
</dc:if>
</dc:filter>
<dc:filter expr="$hws_kind=3">
<dc:if test="dc:has-result()">
<Graben><dc:call-macro name="hws-lines"></Graben>
</dc:if>
</dc:filter>
</official>
</dc:if>
</dc:filter>
</lines>
</dc:if>
</dc:context>
author | Sascha L. Teichmann <teichmann@intevation.de> |
---|---|
date | Thu, 28 Mar 2013 16:51:15 +0100 |
parents | d3eb662d66db |
children | d5e1e4d9559e |
line wrap: on
line source
#!/bin/bash set -e # See README for more information # The working directory. Resulting tarball will be placed in the directory above. PKG_DIR=/tmp/flys-importer # Path to the flys checkout FLYS_DIR=/path/to/flys/root # Tarball that will be extracted into flys-imprter/opt EXTRAS=$1 rm -fr $PKG_DIR mkdir -p $PKG_DIR/hydr_morph mkdir -p $PKG_DIR/geodaesie mkdir -p $PKG_DIR/opt/lib64 mkdir -p $PKG_DIR/schema mkdir -p $PKG_DIR/conf cat > "$PKG_DIR/conf/log4j.properties" << "EOF" log4j.rootLogger=DEBUG, IMPORTER log4j.appender.IMPORTER.layout=org.apache.log4j.PatternLayout log4j.appender.IMPORTER.layout.ConversionPattern=%d [%t] %-5p %c - %m%n log4j.appender.IMPORTER=org.apache.log4j.RollingFileAppender log4j.appender.IMPORTER.File=./import.log log4j.appender.IMPORTER.MaxFileSize=100000KB log4j.appender.IMPORTER.MaxBackupIndex=10 EOF cd ${FLYS_DIR}/flys-backend mvn -f pom-oracle.xml clean compile assembly:single cp target/flys-backend-1.0-SNAPSHOT-jar-with-dependencies.jar \ $PKG_DIR/hydr_morph/importer.jar mvn -f pom.xml clean compile assembly:single cp target/flys-backend-1.0-SNAPSHOT-jar-with-dependencies.jar \ $PKG_DIR/hydr_morph/importer_psql.jar cp ${FLYS_DIR}/flys-backend/contrib/shpimporter/*.py $PKG_DIR/geodaesie cp ${FLYS_DIR}/flys-backend/contrib/run_geo.sh \ ${FLYS_DIR}/flys-backend/contrib/run_hydr_morph.sh \ ${FLYS_DIR}/flys-backend/contrib/import_river.sh \ $PKG_DIR cp ${FLYS_DIR}/flys-backend/doc/annotation-types.xml $PKG_DIR/conf if [ -f "$EXTRAS" ]; then cd $PKG_DIR tar -xzf "$EXTRAS" fi cp ${FLYS_DIR}/flys-backend/doc/schema/*.sql $PKG_DIR/schema cp ${FLYS_DIR}/flys-backend/doc/documentation/de/importer-manual.pdf $PKG_DIR sed -i 's/shpimporter\/shp/geodaesie\/shp/' $PKG_DIR/run_geo.sh cd $PKG_DIR/.. DATE=$(date +%Y%m%d%H%M) tar -czf flys-importer_${DATE}.tar.gz flys-importer sha1sum flys-importer_${DATE}.tar.gz > flys-importer_${DATE}.tar.gz.sha1 echo Package is at: `readlink -f flys-importer_${DATE}.tar.gz`