Displaying differences for changeset
 
display as  

nbproject/ant-deploy.xml

@@ -20,18 +20,30 @@
     </target>
     <target name="-deploy-ant" if="deploy.ant.enabled" depends="-init,-check-credentials">
         <echo message="Deploying ${deploy.ant.archive} to ${Context(path)}"/>
-        <taskdef name="deploy" classname="org.apache.catalina.ant.DeployTask"
-                 classpath="${tomcat.home}/server/lib/catalina-ant.jar"/>
-        <deploy url="${tomcat.url}/manager" username="${tomcat.username}"
+        <taskdef name="deploy" classname="org.apache.catalina.ant.DeployTask">
+            <classpath>
+                <pathelement path="${tomcat.home}/lib/catalina-ant.jar"/>
+                <pathelement path="${tomcat.home}/lib/tomcat-coyote.jar"/>
+                <pathelement path="${tomcat.home}/lib/tomcat-util.jar"/>
+                <pathelement path="${tomcat.home}/bin/tomcat-juli.jar"/>
+            </classpath>
+        </taskdef>
+        <deploy url="${tomcat.url}/manager/text" username="${tomcat.username}"
                 password="${tomcat.password}" path="${Context(path)}"
                 war="${deploy.ant.archive}"/>
         <property name="deploy.ant.client.url" value="${tomcat.url}${Context(path)}"/>
     </target>
     <target name="-undeploy-ant" if="deploy.ant.enabled" depends="-init,-check-credentials">
         <echo message="Undeploying ${Context(path)}"/>
-        <taskdef name="undeploy"  classname="org.apache.catalina.ant.UndeployTask"
-                classpath="${tomcat.home}/server/lib/catalina-ant.jar"/>
-        <undeploy url="${tomcat.url}/manager" username="${tomcat.username}" 
+        <taskdef name="undeploy"  classname="org.apache.catalina.ant.UndeployTask">
+            <classpath>
+                <pathelement path="${tomcat.home}/lib/catalina-ant.jar"/>
+                <pathelement path="${tomcat.home}/lib/tomcat-coyote.jar"/>
+                <pathelement path="${tomcat.home}/lib/tomcat-util.jar"/>
+                <pathelement path="${tomcat.home}/bin/tomcat-juli.jar"/>
+            </classpath>
+        </taskdef>
+        <undeploy url="${tomcat.url}/manager/text" username="${tomcat.username}" 
                   password="${tomcat.password}" path="${Context(path)}"/>
     </target>
 </project>

src/java/m/wqm/ApplicationConfig.java

 

src/java/m/wqm/NutrientSLP/V1_0.java

@@ -93,7 +93,7 @@
         for (SoilComponent ip : soilComponentList) {
             if (ip.getTaxorder().equals("Histosols")) {
                 comp_nslp_number = 3;
-            } else if (ip.getWtbl().equals("Apparent") && ip.isHwt_lt_24()) {
+            } else if (ip.getWtbl().equals("Apparent") || ip.isHwt_lt_24()) {
                 comp_nslp_number = 3;
             } else {
                 switch (ip.getHsg()) {

src/java/m/wqm/nuttechscores/V1_0.java

@@ -37,8 +37,8 @@
             Map<String, JSONObject> group = JSONUtils.preprocess(groups.getJSONArray(i));
             aoaId = JSONUtils.getIntParam(group, "AoAid", 0);
             int plan_techn_id = JSONUtils.getIntParam(group, "plan_techn_id", 0);
-            String plan_techn_discrim_type = JSONUtils.getStringParam(group, "plan_techn_discrim_type", "err");
-            String plan_techn_discrim = JSONUtils.getStringParam(group, "plan_techn_discrim", "err");
+            String plan_techn_discrim_type = JSONUtils.getStringParam(group, "plan_techn_discrim_type", "");
+            String plan_techn_discrim = JSONUtils.getStringParam(group, "plan_techn_discrim", "");
             Input input = new Input(aoaId, plan_techn_id, plan_techn_discrim_type, plan_techn_discrim);
             components.add(input);
         }
@@ -126,6 +126,9 @@
                 }
 
                 //#Compute nutrient technique mitigation scores for Phosphorus in Surface Water concern and increment total scores            
+                if(ip.plan_techn_discrim.isEmpty())
+                query = "SELECT nut_tech_score FROM wqm_nutrient_technique_scores WHERE nutrient_technique_id ="+ ip.plan_techn_id+" AND wqm_concern = 'Phosphorus in Surface Water';";
+                else
                 query = "SELECT nut_tech_score FROM wqm_nutrient_technique_scores WHERE nutrient_technique_id ="+ ip.plan_techn_id+" AND wqm_concern = 'Phosphorus in Surface Water' AND tech_discrim_type ='"+ ip.plan_techn_discrim_type+"' AND tech_discrim ='"+ip.plan_techn_discrim+"' ;";
                 resultset = statement.executeQuery(query);
                 while (resultset.next()) {
@@ -133,21 +136,36 @@
                     psurf_techn_score += techn_score;
                 }
 
-                query = "SELECT nut_tech_score FROM wqm_nutrient_technique_scores WHERE nutrient_technique_id = " + ip.plan_techn_id+" AND wqm_concern = 'Phosphorus in Surface Water' AND mode_of_action = 'Avoid';";
+                if(ip.plan_techn_discrim.isEmpty())
+                query = "SELECT nut_tech_score FROM wqm_nutrient_technique_scores WHERE nutrient_technique_id ="+ ip.plan_techn_id+" AND wqm_concern = 'Phosphorus in Surface Water' AND mode_of_action = 'Avoid';";
+                else
+                query = "SELECT nut_tech_score FROM wqm_nutrient_technique_scores WHERE nutrient_technique_id ="+ ip.plan_techn_id+" AND wqm_concern = 'Phosphorus in Surface Water' AND tech_discrim_type ='"+ ip.plan_techn_discrim_type+"' AND tech_discrim ='"+ip.plan_techn_discrim+"' AND mode_of_action = 'Avoid';";
+               
+              //  query = "SELECT nut_tech_score FROM wqm_nutrient_technique_scores WHERE nutrient_technique_id = " + ip.plan_techn_id+" AND wqm_concern = 'Phosphorus in Surface Water' AND mode_of_action = 'Avoid';";
                 resultset = statement.executeQuery(query);
                 while (resultset.next()) {
                     int avoid_techn_score = resultset.getInt("nut_tech_score");
                     psurf_avoid_techn_score += avoid_techn_score;
                 }
 
-                query = "SELECT nut_tech_score FROM wqm_nutrient_technique_scores WHERE nutrient_technique_id ="+ ip.plan_techn_id+" AND wqm_concern ='Phosphorus in Surface Water' AND mode_of_action ='Control';";
+                if(ip.plan_techn_discrim.isEmpty())
+                query = "SELECT nut_tech_score FROM wqm_nutrient_technique_scores WHERE nutrient_technique_id ="+ ip.plan_techn_id+" AND wqm_concern = 'Phosphorus in Surface Water' AND mode_of_action = 'Control';";
+                else
+                query = "SELECT nut_tech_score FROM wqm_nutrient_technique_scores WHERE nutrient_technique_id ="+ ip.plan_techn_id+" AND wqm_concern = 'Phosphorus in Surface Water' AND tech_discrim_type ='"+ ip.plan_techn_discrim_type+"' AND tech_discrim ='"+ip.plan_techn_discrim+"' AND mode_of_action = 'Control';";
+               
+                //query = "SELECT nut_tech_score FROM wqm_nutrient_technique_scores WHERE nutrient_technique_id ="+ ip.plan_techn_id+" AND wqm_concern ='Phosphorus in Surface Water' AND mode_of_action ='Control';";
                 resultset = statement.executeQuery(query);
                 while (resultset.next()) {
                     int control_techn_score = resultset.getInt("nut_tech_score");
                     psurf_control_techn_score += control_techn_score;
                 }
 
-                query = "SELECT nut_tech_score FROM wqm_nutrient_technique_scores WHERE nutrient_technique_id =" + ip.plan_techn_id+" AND wqm_concern ='Phosphorus in Surface Water' AND mode_of_action ='Trap';";
+                if(ip.plan_techn_discrim.isEmpty())
+                query = "SELECT nut_tech_score FROM wqm_nutrient_technique_scores WHERE nutrient_technique_id ="+ ip.plan_techn_id+" AND wqm_concern = 'Phosphorus in Surface Water' AND mode_of_action = 'Trap';";
+                else
+                query = "SELECT nut_tech_score FROM wqm_nutrient_technique_scores WHERE nutrient_technique_id ="+ ip.plan_techn_id+" AND wqm_concern = 'Phosphorus in Surface Water' AND tech_discrim_type ='"+ ip.plan_techn_discrim_type+"' AND tech_discrim ='"+ip.plan_techn_discrim+"' AND mode_of_action = 'Trap';";
+               
+                // query = "SELECT nut_tech_score FROM wqm_nutrient_technique_scores WHERE nutrient_technique_id =" +ip.plan_techn_id+" AND wqm_concern ='Phosphorus in Surface Water' AND mode_of_action ='Trap';";
                 resultset = statement.executeQuery(query);
                 while (resultset.next()) {
                     int trap_techn_score = resultset.getInt("nut_tech_score");

src/java/m/wqm/scsednutsrp/V1_0.java

@@ -102,8 +102,8 @@
                     comp_srp_number = this.computeSRPHsgC(ip);
                     break;
                 case "D":
-                    if (ip.getWtbl().equals("Perched")
-                            || ip.getWtbl().equals("Apparent") && ip.isHwt_lt_24()) {
+                    if ((ip.getWtbl().equals("Perched")
+                            || ip.getWtbl().equals("Apparent")) || ip.isHwt_lt_24()) {
                         comp_srp_number = 3;
                     } else if (ip.getSlope() < 2 && ip.getKfact() < 0.28) {
                         comp_srp_number = 0;
@@ -182,8 +182,8 @@
             srp_number = 1;
         } else if (ip.getSlope() >= 2 && ip.getSlope() <= 4) {
             srp_number = 2;
-        } else if ((ip.getSlope() > 4) || (ip.getWtbl().equals("Perched")
-                || ip.getWtbl().equals("Apparent") && ip.isHwt_lt_24())) {
+        } else if ((ip.getSlope() > 4) || ((ip.getWtbl().equals("Perched")
+                || ip.getWtbl().equals("Apparent")) || ip.isHwt_lt_24())) {
             srp_number = 3;
         }
         return srp_number;

src/java/m/wqm/wqmsoilattributes/V1_0.java

@@ -36,7 +36,7 @@
 public class V1_0 extends ModelDataService {
     
     //mapunit/ssurgo polygon intersect URI
-    private final String SSURGO_INTERSECT_URI = "http://csip.engr.colostate.edu:8081/csip/d/soils/1.1";        
+    private final String SSURGO_INTERSECT_URI = "http://csip.engr.colostate.edu:8086/csip-erosion/d/soils/1.2";        
 
     //Request
     private String aoaId;

web/META-INF/csip-conf.json

@@ -6,5 +6,5 @@
   "wqm.db": "jdbc:postgresql://csip.engr.colostate.edu:5435/wqm",  
   "ssurgo.db": "jdbc:postgresql://csip.engr.colostate.edu:5435/ssurgo", 
   "r2gis.db": "jdbc:postgresql://csip.engr.colostate.edu:5435/r2gis", 
-  "wqm.version" : "$version: ${out} $"
+  "wqm.version" : "$version: 0.1.110 5fef86c018df 2015-09-23 $"
 }