Displaying differences for changeset
 
display as  

nbproject/project.properties

@@ -1,122 +1,122 @@
-annotation.processing.enabled=true
-annotation.processing.enabled.in.editor=true
-annotation.processing.processors.list=
-annotation.processing.run.all.processors=true
-annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output
-build.classes.dir=${build.web.dir}/WEB-INF/classes
-build.classes.excludes=**/*.java,**/*.form
-build.dir=build
-build.generated.dir=${build.dir}/generated
-build.generated.sources.dir=${build.dir}/generated-sources
-build.test.classes.dir=${build.dir}/test/classes
-build.test.results.dir=${build.dir}/test/results
-build.web.dir=${build.dir}/web
-build.web.excludes=${build.classes.excludes}
-client.urlPart=
-compile.jsps=false
-conf.dir=${source.root}/conf
-debug.classpath=${build.classes.dir}:${javac.classpath}
-debug.test.classpath=\
-    ${run.test.classpath}
-display.browser=false
-dist.dir=dist
-dist.ear.war=${dist.dir}/${war.ear.name}
-dist.javadoc.dir=${dist.dir}/javadoc
-dist.war=${dist.dir}/${war.name}
-endorsed.classpath=\
-    ${libs.javaee-endorsed-api-6.0.classpath}
-excludes=
-file.reference.commons-compress-1.3.jar=../csip-core/lib/commons-compress-1.3.jar
-file.reference.commons-io-2.3.jar=../csip-core/lib/commons-io-2.3.jar
-file.reference.commons-logging-1.1.1.jar=../csip-core/lib/commons-logging-1.1.1.jar
-file.reference.commons-math-2.0.jar=lib/commons-math-2.0.jar
-file.reference.commons-pool-1.6.jar=../csip-core/lib/commons-pool-1.6.jar
-file.reference.htmlunit-2.8.jar=lib/htmlunit-2.8.jar
-file.reference.htmlunit-core-js-2.8.jar=lib/htmlunit-core-js-2.8.jar
-file.reference.httpclient-4.1.3.jar=../csip-core/lib/httpclient-4.1.3.jar
-file.reference.httpcore-4.1.4.jar=../csip-core/lib/httpcore-4.1.4.jar
-file.reference.httpmime-4.2.5.jar=../csip-core/lib/httpmime-4.2.5.jar
-file.reference.Jama-1.0.2.jar=lib/Jama-1.0.2.jar
-file.reference.java-uuid-generator-3.1.3.jar=../csip-core/lib/java-uuid-generator-3.1.3.jar
-file.reference.jcommon-1.0.16.jar=lib/jcommon-1.0.16.jar
-file.reference.jedis-2.1.0.jar=../csip-core/lib/jedis-2.1.0.jar
-file.reference.jfreechart-1.0.13.jar=lib/jfreechart-1.0.13.jar
-file.reference.json-org.jar=../csip-core/lib/json-org.jar
-file.reference.oms-all.jar=../csip-core/lib/oms-all.jar
-includes=**
-j2ee.compile.on.save=true
-j2ee.copy.static.files.on.save=true
-j2ee.deploy.on.save=true
-j2ee.platform=1.6-web
-j2ee.platform.classpath=${j2ee.server.home}/lib/annotations-api.jar:${j2ee.server.home}/lib/catalina-ant.jar:${j2ee.server.home}/lib/catalina-ha.jar:${j2ee.server.home}/lib/catalina-tribes.jar:${j2ee.server.home}/lib/catalina.jar:${j2ee.server.home}/lib/ecj-4.2.1.jar:${j2ee.server.home}/lib/el-api.jar:${j2ee.server.home}/lib/jasper-el.jar:${j2ee.server.home}/lib/jasper.jar:${j2ee.server.home}/lib/jsp-api.jar:${j2ee.server.home}/lib/servlet-api.jar:${j2ee.server.home}/lib/tomcat-api.jar:${j2ee.server.home}/lib/tomcat-coyote.jar:${j2ee.server.home}/lib/tomcat-dbcp.jar:${j2ee.server.home}/lib/tomcat-i18n-es.jar:${j2ee.server.home}/lib/tomcat-i18n-fr.jar:${j2ee.server.home}/lib/tomcat-i18n-ja.jar:${j2ee.server.home}/lib/tomcat-jdbc.jar:${j2ee.server.home}/lib/tomcat-util.jar
-j2ee.server.type=Tomcat
-jar.compress=false
-javac.classpath=\
-    ${libs.restapi.classpath}:\
-    ${libs.jaxws21.classpath}:\
-    ${libs.restlib.classpath}:\
-    ${reference.csip-core.jar}:\
-    ${file.reference.commons-compress-1.3.jar}:\
-    ${file.reference.commons-io-2.3.jar}:\
-    ${file.reference.commons-logging-1.1.1.jar}:\
-    ${file.reference.commons-pool-1.6.jar}:\
-    ${file.reference.httpclient-4.1.3.jar}:\
-    ${file.reference.httpcore-4.1.4.jar}:\
-    ${file.reference.httpmime-4.2.5.jar}:\
-    ${file.reference.java-uuid-generator-3.1.3.jar}:\
-    ${file.reference.jedis-2.1.0.jar}:\
-    ${file.reference.json-org.jar}:\
-    ${file.reference.oms-all.jar}:\
-    ${file.reference.Jama-1.0.2.jar}:\
-    ${file.reference.jcommon-1.0.16.jar}:\
-    ${file.reference.jfreechart-1.0.13.jar}:\
-    ${file.reference.commons-math-2.0.jar}:\
-    ${file.reference.htmlunit-2.8.jar}:\
-    ${file.reference.htmlunit-core-js-2.8.jar}
-# Space-separated list of extra javac options
-javac.compilerargs=
-javac.debug=true
-javac.deprecation=false
-javac.processorpath=\
-    ${javac.classpath}
-javac.source=1.7
-javac.target=1.7
-javac.test.classpath=\
-    ${javac.classpath}:\
-    ${build.classes.dir}
-javac.test.processorpath=\
-    ${javac.test.classpath}
-javadoc.additionalparam=
-javadoc.author=false
-javadoc.encoding=${source.encoding}
-javadoc.noindex=false
-javadoc.nonavbar=false
-javadoc.notree=false
-javadoc.preview=true
-javadoc.private=false
-javadoc.splitindex=true
-javadoc.use=true
-javadoc.version=false
-javadoc.windowtitle=
-lib.dir=${web.docbase.dir}/WEB-INF/lib
-persistence.xml.dir=${conf.dir}
-platform.active=default_platform
-project.csip-core=../csip-core
-reference.csip-core.jar=${project.csip-core}/dist/csip-core.jar
-resource.dir=setup
-rest.config.type=ide
-run.test.classpath=\
-    ${javac.test.classpath}:\
-    ${build.test.classes.dir}
-# Space-separated list of JVM arguments used when running a class with a main method or a unit test
-# (you may also define separate properties like run-sys-prop.name=value instead of -Dname=value):
-runmain.jvmargs=
-source.encoding=UTF-8
-source.root=src
-src.dir=${source.root}/java
-test.src.dir=test
-war.content.additional=
-war.ear.name=${war.name}
-war.name=csip-cfa.war
-web.docbase.dir=web
-webinf.dir=web/WEB-INF
+annotation.processing.enabled=true
+annotation.processing.enabled.in.editor=true
+annotation.processing.processors.list=
+annotation.processing.run.all.processors=true
+annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output
+build.classes.dir=${build.web.dir}/WEB-INF/classes
+build.classes.excludes=**/*.java,**/*.form
+build.dir=build
+build.generated.dir=${build.dir}/generated
+build.generated.sources.dir=${build.dir}/generated-sources
+build.test.classes.dir=${build.dir}/test/classes
+build.test.results.dir=${build.dir}/test/results
+build.web.dir=${build.dir}/web
+build.web.excludes=${build.classes.excludes}
+client.urlPart=
+compile.jsps=false
+conf.dir=${source.root}/conf
+debug.classpath=${build.classes.dir}:${javac.classpath}
+debug.test.classpath=\
+    ${run.test.classpath}
+display.browser=false
+dist.dir=dist
+dist.ear.war=${dist.dir}/${war.ear.name}
+dist.javadoc.dir=${dist.dir}/javadoc
+dist.war=${dist.dir}/${war.name}
+endorsed.classpath=\
+    ${libs.javaee-endorsed-api-6.0.classpath}
+excludes=
+file.reference.commons-compress-1.3.jar=../csip-core/lib/commons-compress-1.3.jar
+file.reference.commons-io-2.3.jar=../csip-core/lib/commons-io-2.3.jar
+file.reference.commons-logging-1.1.1.jar=../csip-core/lib/commons-logging-1.1.1.jar
+file.reference.commons-math-2.0.jar=lib/commons-math-2.0.jar
+file.reference.commons-pool-1.6.jar=../csip-core/lib/commons-pool-1.6.jar
+file.reference.htmlunit-2.8.jar=lib/htmlunit-2.8.jar
+file.reference.htmlunit-core-js-2.8.jar=lib/htmlunit-core-js-2.8.jar
+file.reference.httpclient-4.1.3.jar=../csip-core/lib/httpclient-4.1.3.jar
+file.reference.httpcore-4.1.4.jar=../csip-core/lib/httpcore-4.1.4.jar
+file.reference.httpmime-4.2.5.jar=../csip-core/lib/httpmime-4.2.5.jar
+file.reference.Jama-1.0.2.jar=lib/Jama-1.0.2.jar
+file.reference.java-uuid-generator-3.1.3.jar=../csip-core/lib/java-uuid-generator-3.1.3.jar
+file.reference.jcommon-1.0.16.jar=lib/jcommon-1.0.16.jar
+file.reference.jedis-2.1.0.jar=../csip-core/lib/jedis-2.1.0.jar
+file.reference.jfreechart-1.0.13.jar=lib/jfreechart-1.0.13.jar
+file.reference.json-org.jar=../csip-core/lib/json-org.jar
+file.reference.oms-all.jar=../csip-core/lib/oms-all.jar
+includes=**
+j2ee.compile.on.save=true
+j2ee.copy.static.files.on.save=true
+j2ee.deploy.on.save=true
+j2ee.platform=1.6-web
+j2ee.platform.classpath=${j2ee.server.home}/lib/annotations-api.jar:${j2ee.server.home}/lib/catalina-ant.jar:${j2ee.server.home}/lib/catalina-ha.jar:${j2ee.server.home}/lib/catalina-tribes.jar:${j2ee.server.home}/lib/catalina.jar:${j2ee.server.home}/lib/ecj-4.2.1.jar:${j2ee.server.home}/lib/el-api.jar:${j2ee.server.home}/lib/jasper-el.jar:${j2ee.server.home}/lib/jasper.jar:${j2ee.server.home}/lib/jsp-api.jar:${j2ee.server.home}/lib/servlet-api.jar:${j2ee.server.home}/lib/tomcat-api.jar:${j2ee.server.home}/lib/tomcat-coyote.jar:${j2ee.server.home}/lib/tomcat-dbcp.jar:${j2ee.server.home}/lib/tomcat-i18n-es.jar:${j2ee.server.home}/lib/tomcat-i18n-fr.jar:${j2ee.server.home}/lib/tomcat-i18n-ja.jar:${j2ee.server.home}/lib/tomcat-jdbc.jar:${j2ee.server.home}/lib/tomcat-util.jar
+j2ee.server.type=Tomcat
+jar.compress=false
+javac.classpath=\
+    ${libs.restapi.classpath}:\
+    ${libs.jaxws21.classpath}:\
+    ${libs.restlib.classpath}:\
+    ${reference.csip-core.jar}:\
+    ${file.reference.commons-compress-1.3.jar}:\
+    ${file.reference.commons-io-2.3.jar}:\
+    ${file.reference.commons-logging-1.1.1.jar}:\
+    ${file.reference.commons-pool-1.6.jar}:\
+    ${file.reference.httpclient-4.1.3.jar}:\
+    ${file.reference.httpcore-4.1.4.jar}:\
+    ${file.reference.httpmime-4.2.5.jar}:\
+    ${file.reference.java-uuid-generator-3.1.3.jar}:\
+    ${file.reference.jedis-2.1.0.jar}:\
+    ${file.reference.json-org.jar}:\
+    ${file.reference.oms-all.jar}:\
+    ${file.reference.Jama-1.0.2.jar}:\
+    ${file.reference.jcommon-1.0.16.jar}:\
+    ${file.reference.jfreechart-1.0.13.jar}:\
+    ${file.reference.commons-math-2.0.jar}:\
+    ${file.reference.htmlunit-2.8.jar}:\
+    ${file.reference.htmlunit-core-js-2.8.jar}
+# Space-separated list of extra javac options
+javac.compilerargs=
+javac.debug=true
+javac.deprecation=false
+javac.processorpath=\
+    ${javac.classpath}
+javac.source=1.7
+javac.target=1.7
+javac.test.classpath=\
+    ${javac.classpath}:\
+    ${build.classes.dir}
+javac.test.processorpath=\
+    ${javac.test.classpath}
+javadoc.additionalparam=
+javadoc.author=false
+javadoc.encoding=${source.encoding}
+javadoc.noindex=false
+javadoc.nonavbar=false
+javadoc.notree=false
+javadoc.preview=true
+javadoc.private=false
+javadoc.splitindex=true
+javadoc.use=true
+javadoc.version=false
+javadoc.windowtitle=
+lib.dir=${web.docbase.dir}/WEB-INF/lib
+persistence.xml.dir=${conf.dir}
+platform.active=default_platform
+project.csip-core=../csip-core
+reference.csip-core.jar=${project.csip-core}/dist/csip-core.jar
+resource.dir=setup
+rest.config.type=ide
+run.test.classpath=\
+    ${javac.test.classpath}:\
+    ${build.test.classes.dir}
+# Space-separated list of JVM arguments used when running a class with a main method or a unit test
+# (you may also define separate properties like run-sys-prop.name=value instead of -Dname=value):
+runmain.jvmargs=
+source.encoding=UTF-8
+source.root=src
+src.dir=${source.root}/java
+test.src.dir=test
+war.content.additional=
+war.ear.name=${war.name}
+war.name=csip-cfa.war
+web.docbase.dir=web
+webinf.dir=web/WEB-INF

src/java/cfa/guiBaseflow_Model.java

@@ -25,7 +25,7 @@
 import org.jfree.chart.title.LegendTitle;
 import org.jfree.data.time.Day;
 import org.jfree.data.time.TimeSeries;
-import csip.utils.BinUtils;
+import csip.utils.Binaries;
 
 /**
  * Last Updated: 5-February-2014
@@ -914,7 +914,7 @@
             //Call BFLOW model
             //Expected Input: "baseflow.txt" and "file.lst"
             String binDir = Config.getString("m.bin.dir", "/tmp/csip/bin");
-            File bflow = BinUtils.unpackResource("/bin/win-x86/bflow.exe", new File(binDir));
+            File bflow = Binaries.unpackResource("/bin/win-x86/bflow.exe", new File(binDir));
             ProcessComponent pc = new ProcessComponent();
 
             if (File.pathSeparatorChar == ':') {

src/java/cfa/guiLOADEST_Model.java

@@ -13,7 +13,7 @@
 import java.util.Calendar;
 import java.util.Date;
 import oms3.util.ProcessComponent;
-import csip.utils.BinUtils;
+import csip.utils.Binaries;
 
 /**
 * Last Updated: 5-February-2014
@@ -1045,7 +1045,7 @@
         //Expected Input: "CONTROL.INP", "HEADER.INP", "CALIB.INP", and "EST.INP"
         System.out.println("Calling LOADEST.exe");
         String binDir = Config.getString("m.bin.dir", "/tmp/csip/bin");
-        File loadest = BinUtils.unpackResource("/bin/win-x86/loadest.exe", new File(binDir));
+        File loadest = Binaries.unpackResource("/bin/win-x86/loadest.exe", new File(binDir));
         ProcessComponent pc = new ProcessComponent();
 
         if (File.pathSeparatorChar == ':') {

src/java/m/cfa/Baseflow_V1_0.java

@@ -15,7 +15,6 @@
 import org.apache.commons.io.FileUtils;
 import org.codehaus.jettison.json.*;
 import csip.utils.JSONUtils;
-import csip.ServiceConst;
 import java.io.File;
 
 @Name("baseflow")
@@ -34,21 +33,21 @@
                 Map<String, JSONObject> m = getParamMap();
 
                 model.setMainFolder(getWorkspaceDir().toString());
-                model.setOrganizationName(m.get("org").getString(ServiceConst.VALUE));
-                model.setStationID(m.get("station_id").getString(ServiceConst.VALUE));
-                model.setStationName(m.get("station_name").getString(ServiceConst.VALUE));
-                model.setDrainageArea(m.get("drainage_area").getDouble(ServiceConst.VALUE));
-                model.setModelType(m.get("model_type").getString(ServiceConst.VALUE));
-                model.setBeginDate(m.get("begin_date").getString(ServiceConst.VALUE));
-                model.setEndDate(m.get("end_date").getString(ServiceConst.VALUE));
-                model.setNDMIN(m.get("ndmin").getInt(ServiceConst.VALUE));
-                model.setNDMAX(m.get("ndmax").getInt(ServiceConst.VALUE));
-                model.setUserData(m.get("user_data").getString(ServiceConst.VALUE));
-                model.setMergeDatasets(m.get("merge_datasets").getBoolean(ServiceConst.VALUE));
-                model.setMergeMethod(m.get("merge_method").getString(ServiceConst.VALUE));
+                model.setOrganizationName(m.get("org").getString(VALUE));
+                model.setStationID(m.get("station_id").getString(VALUE));
+                model.setStationName(m.get("station_name").getString(VALUE));
+                model.setDrainageArea(m.get("drainage_area").getDouble(VALUE));
+                model.setModelType(m.get("model_type").getString(VALUE));
+                model.setBeginDate(m.get("begin_date").getString(VALUE));
+                model.setEndDate(m.get("end_date").getString(VALUE));
+                model.setNDMIN(m.get("ndmin").getInt(VALUE));
+                model.setNDMAX(m.get("ndmax").getInt(VALUE));
+                model.setUserData(m.get("user_data").getString(VALUE));
+                model.setMergeDatasets(m.get("merge_datasets").getBoolean(VALUE));
+                model.setMergeMethod(m.get("merge_method").getString(VALUE));
                 
                 model.run();
-                return ServiceConst.EXEC_OK;
+                return EXEC_OK;
             }
         };
     }

src/java/m/cfa/Download_V1_0.java

@@ -14,7 +14,6 @@
 import oms3.annotations.VersionInfo;
 import org.codehaus.jettison.json.*;
 import csip.utils.JSONUtils;
-import csip.ServiceConst;
 import java.io.File;
 
 @Name("download")
@@ -33,14 +32,14 @@
                 Map<String, JSONObject> m = getParamMap();
 
                 model.setMainFolder(getWorkspaceDir().toString());
-                model.setOrganizationName(m.get("org").getString(ServiceConst.VALUE));
-                model.setStationID(m.get("station_id").getString(ServiceConst.VALUE));
-                model.setWaterQualityTest(m.get("wq_test").getString(ServiceConst.VALUE));
-                model.setBeginDate(m.get("begin_date").getString(ServiceConst.VALUE));
-                model.setEndDate(m.get("end_date").getString(ServiceConst.VALUE));
+                model.setOrganizationName(m.get("org").getString(VALUE));
+                model.setStationID(m.get("station_id").getString(VALUE));
+                model.setWaterQualityTest(m.get("wq_test").getString(VALUE));
+                model.setBeginDate(m.get("begin_date").getString(VALUE));
+                model.setEndDate(m.get("end_date").getString(VALUE));
 
                 model.run();
-                return ServiceConst.EXEC_OK;
+                return EXEC_OK;
             }
         };
     }

src/java/m/cfa/Drought_V1_0.java

@@ -15,8 +15,7 @@
 import org.apache.commons.io.FileUtils;
 import org.codehaus.jettison.json.*;
 import csip.utils.JSONUtils;
-import csip.ServiceConst;
-import csip.ServiceUtils;
+import csip.utils.Services;
 import java.io.File;
 
 @Name("drought")
@@ -35,22 +34,22 @@
                 Map<String, JSONObject> m = getParamMap();
 
                 model.setMainFolder(getWorkspaceDir().toString());
-                model.setOrganizationName(m.get("org").getString(ServiceConst.VALUE));
-                model.setStationID(m.get("station_id").getString(ServiceConst.VALUE));
-                model.setStationName(m.get("station_name").getString(ServiceConst.VALUE));
-                model.setBeginDate(m.get("begin_date").getString(ServiceConst.VALUE));
-                model.setEndDate(m.get("end_date").getString(ServiceConst.VALUE));
-                model.setLambdaString(m.get("lambda_string").getString(ServiceConst.VALUE));
-                model.setAction(m.get("action").getString(ServiceConst.VALUE));
-                model.setPhiValues(m.get("phi_values").getString(ServiceConst.VALUE));
-                model.setThetaValues(m.get("theta_values").getString(ServiceConst.VALUE));
-                model.setDroughtLimit(m.get("drought_limit").getDouble(ServiceConst.VALUE));
-                model.setUserData(m.get("user_data").getString(ServiceConst.VALUE));
-                model.setMergeDatasets(m.get("merge_datasets").getBoolean(ServiceConst.VALUE));
-                model.setMergeMethod(m.get("merge_method").getString(ServiceConst.VALUE));
+                model.setOrganizationName(m.get("org").getString(VALUE));
+                model.setStationID(m.get("station_id").getString(VALUE));
+                model.setStationName(m.get("station_name").getString(VALUE));
+                model.setBeginDate(m.get("begin_date").getString(VALUE));
+                model.setEndDate(m.get("end_date").getString(VALUE));
+                model.setLambdaString(m.get("lambda_string").getString(VALUE));
+                model.setAction(m.get("action").getString(VALUE));
+                model.setPhiValues(m.get("phi_values").getString(VALUE));
+                model.setThetaValues(m.get("theta_values").getString(VALUE));
+                model.setDroughtLimit(m.get("drought_limit").getDouble(VALUE));
+                model.setUserData(m.get("user_data").getString(VALUE));
+                model.setMergeDatasets(m.get("merge_datasets").getBoolean(VALUE));
+                model.setMergeMethod(m.get("merge_method").getString(VALUE));
 
                 model.run();
-                return ServiceConst.EXEC_OK;
+                return EXEC_OK;
             }
         };
     }
@@ -61,13 +60,13 @@
 
         if (model.getAction().equalsIgnoreCase("all")) {
 
-            return ServiceUtils.toFiles(model.get_all_output());
+            return Services.toFiles(model.get_all_output());
 
         } else if (model.getAction().equalsIgnoreCase("optimizeModel")) {
-            return ServiceUtils.toFiles(model.get_optimizeModel_output());
+            return Services.toFiles(model.get_optimizeModel_output());
 
         } else {
-            return ServiceUtils.toFiles(model.get_parameter_output());
+            return Services.toFiles(model.get_parameter_output());
         }
     }
 

src/java/m/cfa/DurationCurve_V1_0.java

@@ -15,8 +15,7 @@
 import org.apache.commons.io.FileUtils;
 import org.codehaus.jettison.json.*;
 import csip.utils.JSONUtils;
-import csip.ServiceConst;
-import csip.ServiceUtils;
+import csip.utils.Services;
 import java.io.File;
 
 @Name("durationcurve")
@@ -35,30 +34,30 @@
                 Map<String, JSONObject> m = getParamMap();
 
                 model.setMainFolder(getWorkspaceDir().toString());
-                model.setOrganizationName(m.get("org").getString(ServiceConst.VALUE));
-                model.setStationID(m.get("station_id").getString(ServiceConst.VALUE));
-                model.setStationName(m.get("station_name").getString(ServiceConst.VALUE));
-                model.setModelType(m.get("model_type").getString(ServiceConst.VALUE));
-                model.setWaterQualityTest(m.get("wq_test").getString(ServiceConst.VALUE));
-                model.setWaterQualityTarget(m.get("wq_target").getDouble(ServiceConst.VALUE));
-                model.setBeginDate(m.get("begin_date").getString(ServiceConst.VALUE));
-                model.setEndDate(m.get("end_date").getString(ServiceConst.VALUE));
-                model.setSeasonBegin(m.get("season_begin").getString(ServiceConst.VALUE));
-                model.setSeasonEnd(m.get("season_end").getString(ServiceConst.VALUE));
-                model.setMQNperiod(m.get("mqn_period").getString(ServiceConst.VALUE));
-                model.setUserData(m.get("user_data").getString(ServiceConst.VALUE));
-                model.setMergeDatasets(m.get("merge_datasets").getBoolean(ServiceConst.VALUE));
-                model.setMergeMethod(m.get("merge_method").getString(ServiceConst.VALUE));
+                model.setOrganizationName(m.get("org").getString(VALUE));
+                model.setStationID(m.get("station_id").getString(VALUE));
+                model.setStationName(m.get("station_name").getString(VALUE));
+                model.setModelType(m.get("model_type").getString(VALUE));
+                model.setWaterQualityTest(m.get("wq_test").getString(VALUE));
+                model.setWaterQualityTarget(m.get("wq_target").getDouble(VALUE));
+                model.setBeginDate(m.get("begin_date").getString(VALUE));
+                model.setEndDate(m.get("end_date").getString(VALUE));
+                model.setSeasonBegin(m.get("season_begin").getString(VALUE));
+                model.setSeasonEnd(m.get("season_end").getString(VALUE));
+                model.setMQNperiod(m.get("mqn_period").getString(VALUE));
+                model.setUserData(m.get("user_data").getString(VALUE));
+                model.setMergeDatasets(m.get("merge_datasets").getBoolean(VALUE));
+                model.setMergeMethod(m.get("merge_method").getString(VALUE));
                 
                 model.run();
-                return ServiceConst.EXEC_OK;
+                return EXEC_OK;
             }
         };
     }
 
     @Override
     public File[] postprocess() throws Exception {
-        return ServiceUtils.toFiles(model.getGraph(), model.getDurationCurve_results().getName());
+        return Services.toFiles(model.getGraph(), model.getDurationCurve_results().getName());
     }
 
     @Override

src/java/m/cfa/Flood_V1_0.java

@@ -15,8 +15,7 @@
 import org.apache.commons.io.FileUtils;
 import org.codehaus.jettison.json.*;
 import csip.utils.JSONUtils;
-import csip.ServiceConst;
-import csip.ServiceUtils;
+import csip.utils.Services;
 import java.io.File;
 
 @Name("flood")
@@ -35,30 +34,30 @@
                 Map<String, JSONObject> m = getParamMap();
 
                 model.setMainFolder(getWorkspaceDir().toString());
-                model.setOrganizationName(m.get("org").getString(ServiceConst.VALUE));
-                model.setStationID(m.get("station_id").getString(ServiceConst.VALUE));
-                model.setStationName(m.get("station_name").getString(ServiceConst.VALUE));
-                model.setAnalysisType(m.get("analysis_type").getString(ServiceConst.VALUE));
-                model.setBeginDate(m.get("begin_date").getString(ServiceConst.VALUE));
-                model.setEndDate(m.get("end_date").getString(ServiceConst.VALUE));
-                model.setSkewness(m.get("skewness").getDouble(ServiceConst.VALUE));
-                model.setMeanSquareError(m.get("mean_square_error").getDouble(ServiceConst.VALUE));
-                model.setShowLargeFloods(m.get("show_large_floods").getBoolean(ServiceConst.VALUE));
-                model.setPlotType(m.get("plot_type").getBoolean(ServiceConst.VALUE));
-                model.setPlotReference(m.get("plot_ref").getBoolean(ServiceConst.VALUE));
-                model.setUserData(m.get("user_data").getString(ServiceConst.VALUE));
-                model.setMergeDatasets(m.get("merge_datasets").getBoolean(ServiceConst.VALUE));
-                model.setMergeMethod(m.get("merge_method").getString(ServiceConst.VALUE));
+                model.setOrganizationName(m.get("org").getString(VALUE));
+                model.setStationID(m.get("station_id").getString(VALUE));
+                model.setStationName(m.get("station_name").getString(VALUE));
+                model.setAnalysisType(m.get("analysis_type").getString(VALUE));
+                model.setBeginDate(m.get("begin_date").getString(VALUE));
+                model.setEndDate(m.get("end_date").getString(VALUE));
+                model.setSkewness(m.get("skewness").getDouble(VALUE));
+                model.setMeanSquareError(m.get("mean_square_error").getDouble(VALUE));
+                model.setShowLargeFloods(m.get("show_large_floods").getBoolean(VALUE));
+                model.setPlotType(m.get("plot_type").getBoolean(VALUE));
+                model.setPlotReference(m.get("plot_ref").getBoolean(VALUE));
+                model.setUserData(m.get("user_data").getString(VALUE));
+                model.setMergeDatasets(m.get("merge_datasets").getBoolean(VALUE));
+                model.setMergeMethod(m.get("merge_method").getString(VALUE));
 
                 model.run();
-                return ServiceConst.EXEC_OK;
+                return EXEC_OK;
             }
         };
     }
 
     @Override
     public File[] postprocess() throws Exception {
-        return ServiceUtils.toFiles(model.getGraph());
+        return Services.toFiles(model.getGraph());
     }
 
     @Override

src/java/m/cfa/LOADEST_V1_0.java

@@ -1,7 +1,6 @@
 package m.cfa;
 
 import cfa.guiLOADEST_Model;
-import java.io.IOException;
 import java.util.Map;
 import java.util.concurrent.Callable;
 import javax.ws.rs.Path;
@@ -9,10 +8,8 @@
 import oms3.annotations.Description;
 import oms3.annotations.Name;
 import oms3.annotations.VersionInfo;
-import org.apache.commons.io.IOUtils;
 import org.codehaus.jettison.json.*;
 import csip.utils.JSONUtils;
-import csip.ServiceConst;
 import java.io.File;
 
 @Name("loadest")
@@ -31,24 +28,24 @@
                 Map<String, JSONObject> m = getParamMap();
 
                 model.setMainFolder(getWorkspaceDir().toString());
-                model.setOrganizationName(m.get("org").getString(ServiceConst.VALUE));
-                model.setStationName(m.get("station_name").getString(ServiceConst.VALUE));
-                model.setStationID(m.get("station_id").getString(ServiceConst.VALUE));
-                model.setWQtest(m.get("wq_test").getString(ServiceConst.VALUE));
-                model.setPTOPT(m.get("ptopt").getInt(ServiceConst.VALUE));
-                model.setSEOPT(m.get("seopt").getInt(ServiceConst.VALUE));
-                model.setLDOPT(m.get("ldopt").getInt(ServiceConst.VALUE));
-                model.setmodelNumber(m.get("modelnumber").getInt(ServiceConst.VALUE));
-                model.setPBMON(m.get("pbmon").getInt(ServiceConst.VALUE));
-                model.setPEMON(m.get("pemon").getInt(ServiceConst.VALUE));
-                model.setULFLAG(m.get("ulflag").getInt(ServiceConst.VALUE));
-                model.setBeginDate(m.get("begin_date").getString(ServiceConst.VALUE));
-                model.setEndDate(m.get("end_date").getString(ServiceConst.VALUE));
-                model.setUserData(m.get("user_data").getString(ServiceConst.VALUE));
-                model.setMergeDatasets(m.get("merge_datasets").getBoolean(ServiceConst.VALUE));
-                model.setMergeMethod(m.get("merge_method").getString(ServiceConst.VALUE));
+                model.setOrganizationName(m.get("org").getString(VALUE));
+                model.setStationName(m.get("station_name").getString(VALUE));
+                model.setStationID(m.get("station_id").getString(VALUE));
+                model.setWQtest(m.get("wq_test").getString(VALUE));
+                model.setPTOPT(m.get("ptopt").getInt(VALUE));
+                model.setSEOPT(m.get("seopt").getInt(VALUE));
+                model.setLDOPT(m.get("ldopt").getInt(VALUE));
+                model.setmodelNumber(m.get("modelnumber").getInt(VALUE));
+                model.setPBMON(m.get("pbmon").getInt(VALUE));
+                model.setPEMON(m.get("pemon").getInt(VALUE));
+                model.setULFLAG(m.get("ulflag").getInt(VALUE));
+                model.setBeginDate(m.get("begin_date").getString(VALUE));
+                model.setEndDate(m.get("end_date").getString(VALUE));
+                model.setUserData(m.get("user_data").getString(VALUE));
+                model.setMergeDatasets(m.get("merge_datasets").getBoolean(VALUE));
+                model.setMergeMethod(m.get("merge_method").getString(VALUE));
                 model.run();
-                return ServiceConst.EXEC_OK;
+                return EXEC_OK;
             }
         };
     }

src/java/m/cfa/Timeseries_V1_0.java

@@ -10,9 +10,8 @@
 import org.apache.commons.io.FileUtils;
 import org.codehaus.jettison.json.*;
 import csip.utils.JSONUtils;
-import csip.ServiceConst;
 import csip.AbstractModelService;
-import csip.ServiceUtils;
+import csip.utils.Services;
 import java.io.File;
 
 @Name("timeseries")
@@ -31,28 +30,27 @@
                 Map<String, JSONObject> m = getParamMap();
 
                 model.setMainFolder(getWorkspaceDir().toString());
-                model.setOrganizationName(m.get("org").getString(ServiceConst.VALUE));
-                model.setStationID(m.get("station_id").getString(ServiceConst.VALUE));
-                model.setStationName(m.get("station_name").getString(ServiceConst.VALUE));
-                model.setWQtest(m.get("wq_test").getString(ServiceConst.VALUE));
-                model.setBeginDate(m.get("begin_date").getString(ServiceConst.VALUE));
-                model.setEndDate(m.get("end_date").getString(ServiceConst.VALUE));
-                model.setTimeStep(m.get("time_step").getString(ServiceConst.VALUE));
-                model.setMethod(m.get("method").getString(ServiceConst.VALUE));
-                model.setUserData(m.get("user_data").getString(ServiceConst.VALUE));
-                model.setMergeDatasets(m.get("merge_datasets").getBoolean(ServiceConst.VALUE));
-                model.setMergeMethod(m.get("merge_method").getString(ServiceConst.VALUE));
+                model.setOrganizationName(m.get("org").getString(VALUE));
+                model.setStationID(m.get("station_id").getString(VALUE));
+                model.setStationName(m.get("station_name").getString(VALUE));
+                model.setWQtest(m.get("wq_test").getString(VALUE));
+                model.setBeginDate(m.get("begin_date").getString(VALUE));
+                model.setEndDate(m.get("end_date").getString(VALUE));
+                model.setTimeStep(m.get("time_step").getString(VALUE));
+                model.setMethod(m.get("method").getString(VALUE));
+                model.setUserData(m.get("user_data").getString(VALUE));
+                model.setMergeDatasets(m.get("merge_datasets").getBoolean(VALUE));
+                model.setMergeMethod(m.get("merge_method").getString(VALUE));
                 
                 model.run();
-                return ServiceConst.EXEC_OK;
+                return EXEC_OK;
             }
         };
     }
-
     
     @Override
     public File[] postprocess() throws Exception {
-        return ServiceUtils.toFiles(model.getGraph(), model.getBoxplot());
+        return Services.toFiles(model.getGraph(), model.getBoxplot());
     }
      
     @Override