changeset 4651:83a42e6a562d

Added view for selecting ranges in wsts.
author Sascha L. Teichmann <teichmann@intevation.de>
date Thu, 06 Dec 2012 17:30:09 +0100
parents 31327b3b2455
children cf5ac1097d6a
files contrib/make_flys_release/make_release.sh flys-backend/doc/schema/oracle.sql flys-backend/doc/schema/postgresql.sql flys-client/pom.xml flys-client/src/main/java/de/intevation/flys/client/server/filter/GGInAFilter.java
diffstat 5 files changed, 38 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/contrib/make_flys_release/make_release.sh	Thu Dec 06 13:10:27 2012 +0100
+++ b/contrib/make_flys_release/make_release.sh	Thu Dec 06 17:30:09 2012 +0100
@@ -88,22 +88,22 @@
 #rm $DIRECTORY/server/bin/lib/hibernate-spatial-postgis*
 
 echo "INFO: remove Oralce libraries"
-rm $DIRECTORY/server/bin/lib/hibernate-spatial-oracle-1.1.jar
-rm $DIRECTORY/server/bin/lib/ojdbc*
+rm -f $DIRECTORY/server/bin/lib/hibernate-spatial-oracle-1.1.jar
+rm -f $DIRECTORY/server/bin/lib/ojdbc*
 
 # fetch the configuration stuff
 echo "INFO: copy default configuration to target destination"
 cp -R $FLYS_HG/flys-artifacts/doc/conf $DIRECTORY/server/
 
 #cp confs/* $DIRECTORY/server/conf/
-mkdir -o $DIRECTORY/server/conf
+mkdir -p $DIRECTORY/server/conf
 
 sed "s/8999/$ARTIFACT_PORT/g" \
     confs/rest-server.xml \
     > $DIRECTORY/server/conf/rest-server.xml
 
-sed "s@http://czech-republic.intevation.de/@http://${MAPSERVER_URL}/@g" \
-    "s@flys-default@flys-$RELEASE@g" \
+sed -e "s@http://czech-republic.intevation.de/@http://${MAPSERVER_URL}/@g" \
+    -e "s@flys-default@flys-${RELEASE}@g" \
     confs/floodmap.xml \
     > $DIRECTORY/server/conf/floodmap.xml
 
--- a/flys-backend/doc/schema/oracle.sql	Thu Dec 06 13:10:27 2012 +0100
+++ b/flys-backend/doc/schema/oracle.sql	Thu Dec 06 17:30:09 2012 +0100
@@ -473,3 +473,15 @@
          JOIN q_main_values qmv
            ON ol.river_id = qmv.river_id
               AND ol.name = qmv.name;
+
+CREATE VIEW wst_ranges
+AS
+  SELECT wc.id             AS wst_column_id,
+         wc.wst_id         AS wst_id,
+         Min(wcv.position) AS a,
+         Max(wcv.position) AS b
+  FROM   wst_columns wc
+         JOIN wst_column_values wcv
+           ON wc.id = wcv.wst_column_id
+  GROUP  BY wc.id,
+            wc.wst_id;
--- a/flys-backend/doc/schema/postgresql.sql	Thu Dec 06 13:10:27 2012 +0100
+++ b/flys-backend/doc/schema/postgresql.sql	Thu Dec 06 17:30:09 2012 +0100
@@ -413,4 +413,16 @@
            ON ol.river_id = qmv.river_id
               AND ol.name = qmv.name;
 
+CREATE VIEW wst_ranges
+AS
+  SELECT wc.id             AS wst_column_id,
+         wc.wst_id         AS wst_id,
+         Min(wcv.position) AS a,
+         Max(wcv.position) AS b
+  FROM   wst_columns wc
+         JOIN wst_column_values wcv
+           ON wc.id = wcv.wst_column_id
+  GROUP  BY wc.id,
+            wc.wst_id;
+
 COMMIT;
--- a/flys-client/pom.xml	Thu Dec 06 13:10:27 2012 +0100
+++ b/flys-client/pom.xml	Thu Dec 06 17:30:09 2012 +0100
@@ -40,7 +40,7 @@
     <dependency>
       <groupId>com.smartgwt</groupId>
       <artifactId>smartgwt</artifactId>
-      <version>3.0</version>
+      <version>3.1</version>
     </dependency>
     <dependency>
       <groupId>de.intevation.artifacts.common</groupId>
--- a/flys-client/src/main/java/de/intevation/flys/client/server/filter/GGInAFilter.java	Thu Dec 06 13:10:27 2012 +0100
+++ b/flys-client/src/main/java/de/intevation/flys/client/server/filter/GGInAFilter.java	Thu Dec 06 17:30:09 2012 +0100
@@ -81,8 +81,10 @@
         HttpServletRequest sreq = (HttpServletRequest) req;
 
         String requesturi = sreq.getRequestURI();
-        for (Enumeration e = req.getAttributeNames() ; e.hasMoreElements() ;) {
-            logger.debug(e.nextElement());
+        if (logger.isDebugEnabled()) {
+            for (Enumeration e = req.getAttributeNames() ; e.hasMoreElements() ;) {
+                logger.debug(e.nextElement());
+            }
         }
 
         logger.debug("Request for: " + requesturi);
@@ -115,8 +117,10 @@
             redirect = true;
         }
 
-        if (sreq.getQueryString() != null) {
-            uri = uri + "?" + sreq.getQueryString();
+        String queryString = sreq.getQueryString();
+
+        if (queryString != null) {
+            uri += "?" + queryString;
         }
         session.setAttribute("requesturi", uri);
 

http://dive4elements.wald.intevation.org