Displaying differences for changeset
 
display as  

nbproject/ant-deploy.xml

@@ -1,4 +1,43 @@
 <?xml version="1.0" encoding="UTF-8"?>
+<!--
+DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
+
+Copyright (c) 2006, 2016 Oracle and/or its affiliates. All rights reserved.
+
+Oracle and Java are registered trademarks of Oracle and/or its affiliates.
+Other names may be trademarks of their respective owners.
+
+The contents of this file are subject to the terms of either the GNU
+General Public License Version 2 only ("GPL") or the Common
+Development and Distribution License("CDDL") (collectively, the
+"License"). You may not use this file except in compliance with the
+License. You can obtain a copy of the License at
+http://www.netbeans.org/cddl-gplv2.html
+or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
+specific language governing permissions and limitations under the
+License.  When distributing the software, include this License Header
+Notice in each file and include the License file at
+nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
+particular file as subject to the "Classpath" exception as provided
+by Oracle in the GPL Version 2 section of the License file that
+accompanied this code. If applicable, add the following below the
+License Header, with the fields enclosed by brackets [] replaced by
+your own identifying information:
+"Portions Copyrighted [year] [name of copyright owner]"
+
+If you wish your version of this file to be governed by only the CDDL
+or only the GPL Version 2, indicate your decision by adding
+"[Contributor] elects to include this software in this distribution
+under the [CDDL or GPL Version 2] license." If you do not indicate a
+single choice of license, a recipient has the option to distribute
+your version of this file under either the CDDL, the GPL Version 2 or
+to extend the choice of license to its licensees as provided above.
+However, if you add GPL Version 2 code and therefore, elected the GPL
+Version 2 license, then the option applies only if the new code is
+made subject to such option by the copyright holder.
+
+Contributor(s):
+-->
 <project default="-deploy-ant" basedir=".">
     <target name="-init" if="deploy.ant.enabled">
         <property file="${deploy.ant.properties.file}"/>
@@ -16,7 +55,7 @@
                     <isset property="tomcat.password"/>
                 </not>
             </condition>
-        </fail>    
+        </fail>
     </target>
     <target name="-deploy-ant" if="deploy.ant.enabled" depends="-init,-check-credentials">
         <echo message="Deploying ${deploy.ant.archive} to ${Context(path)}"/>

nbproject/private/private.properties

@@ -1,8 +1,8 @@
-deploy.ant.properties.file=/home/pattersd/.netbeans/8.0/tomcat80.properties
+deploy.ant.properties.file=/home/pattersd/.netbeans/8.2/tomcat80.properties
 j2ee.server.domain=/home/pattersd/.netbeans/8.0/apache-tomcat-8.0.3.0_base
-j2ee.server.home=/usr/local/apache-tomcat-8.0.3
-j2ee.server.instance=tomcat80:home=/usr/local/apache-tomcat-8.0.3:base=apache-tomcat-8.0.3.0_base
+j2ee.server.home=/usr/local/apache-tomcat-8.0.27
+j2ee.server.instance=tomcat80:home=/usr/local/apache-tomcat-8.0.27:base=apache-tomcat-8.0.27.0_base
 javac.debug=true
 javadoc.preview=true
 selected.browser=default
-user.properties.file=/home/pattersd/.netbeans/8.0/build.properties
+user.properties.file=/home/pattersd/.netbeans/8.2/build.properties

nbproject/private/private.xml

@@ -23,10 +23,6 @@
             <file>file:/od/projects/csip-all/csip-example/test/service_tests/service.properties</file>
             <file>file:/od/projects/csip-all/csip-example/test/service_tests/externalexe/STest.java</file>
         </group>
-        <group>
-            <file>file:/home/pattersd/work/csip-weather/test/service_tests/PRISM_V1_0/service.properties</file>
-            <file>file:/home/pattersd/work/csip-weather/test/service_tests/PRISM_V1_0/prism-req.json</file>
-            <file>file:/home/pattersd/work/csip-weather/test/service_tests/PRISM_V1_0/prism-res.json</file>
-        </group>
+        <group/>
     </open-files>
 </project-private>

nbproject/project.properties

@@ -1,94 +1,86 @@
+#Thu Oct 27 08:37:37 MDT 2016
+javadoc.splitindex=true
+lib.dir=${web.docbase.dir}/WEB-INF/lib
+auxiliary.org-netbeans-modules-css-prep.sass_2e_mappings=/scss\:/css
+build.classes.excludes=**/*.java,**/*.form
+javadoc.author=false
+j2ee.platform=1.6-web
+dist.war=${dist.dir}/${war.name}
+javac.target=1.8
+build.generated.dir=${build.dir}/generated
+resource.dir=setup
+build.web.excludes=${build.classes.excludes}
+war.ear.name=${war.name}
+j2ee.compile.on.save=false
+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-storeconfig.jar\:${j2ee.server.home}/lib/catalina-tribes.jar\:${j2ee.server.home}/lib/catalina.jar\:${j2ee.server.home}/lib/ecj-4.4.2.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-jni.jar\:${j2ee.server.home}/lib/tomcat-util-scan.jar\:${j2ee.server.home}/lib/tomcat-util.jar\:${j2ee.server.home}/lib/tomcat-websocket.jar\:${j2ee.server.home}/lib/websocket-api.jar
+debug.test.classpath=${run.test.classpath}
+build.dir=build
+javac.deprecation=false
+persistence.xml.dir=${conf.dir}
+j2ee.copy.static.files.on.save=false
+auxiliary.org-netbeans-modules-css-prep.less_2e_mappings=/less\:/css
+test.src.dir=test
+auxiliary.org-netbeans-modules-css-prep.sass_2e_compiler_2e_options=
+junit.selected.version=4
+includes=**
+jar.compress=false
+annotation.processing.processors.list=
+javadoc.version=false
+build.classes.dir=${build.web.dir}/WEB-INF/classes
+dist.dir=dist
+project.csip-core=../csip-core
+rest.config.type=ide
+javac.source=1.8
+javac.debug=true
+javac.test.processorpath=${javac.test.classpath}
+run.test.classpath=${javac.test.classpath}\:${build.test.classes.dir}
+build.generated.sources.dir=${build.dir}/generated-sources
+auxiliary.org-netbeans-modules-css-prep.less_2e_enabled=false
+javadoc.notree=false
+source.root=src
+runmain.jvmargs=
+platform.active=default_platform
+javadoc.preview=true
+j2ee.deploy.on.save=false
 annotation.processing.enabled=true
+war.content.additional=
+dist.javadoc.dir=${dist.dir}/javadoc
+client.urlPart=
+javadoc.additionalparam=
+javac.classpath=${reference.csip-core.jar}\:${libs.CSIP-Jersey-2.16.classpath}
+javadoc.noindex=false
+webinf.dir=web/WEB-INF
 annotation.processing.enabled.in.editor=true
-annotation.processing.processors.list=
+javadoc.private=false
+javadoc.encoding=${source.encoding}
+build.test.classes.dir=${build.dir}/test/classes
+reference.csip-core.jar=${project.csip-core}/dist/csip-core.jar
+auxiliary.org-netbeans-modules-css-prep.less_2e_compiler_2e_options=
+web.docbase.dir=web
+javac.compilerargs=
+auxiliary.org-netbeans-modules-web-clientproject-api.js_2e_libs_2e_folder=js/libs
+auxiliary.org-netbeans-modules-css-prep.sass_2e_enabled=false
+source.encoding=UTF-8
+dist.ear.war=${dist.dir}/${war.ear.name}
+j2ee.server.type=Tomcat
+conf.dir=${source.root}/conf
 annotation.processing.run.all.processors=true
-annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output
-auxiliary.org-netbeans-modules-css-prep.less_2e_compiler_2e_options=
-auxiliary.org-netbeans-modules-css-prep.less_2e_enabled=false
-auxiliary.org-netbeans-modules-css-prep.less_2e_mappings=/less:/css
-auxiliary.org-netbeans-modules-css-prep.sass_2e_compiler_2e_options=
-auxiliary.org-netbeans-modules-css-prep.sass_2e_enabled=false
-auxiliary.org-netbeans-modules-css-prep.sass_2e_mappings=/scss:/css
-auxiliary.org-netbeans-modules-web-clientproject-api.js_2e_libs_2e_folder=js/libs
-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
+compile.jsps=false
+excludes=
+javac.processorpath=${javac.classpath}
 build.test.results.dir=${build.dir}/test/results
+display.browser=false
+endorsed.classpath=${libs.javaee-endorsed-api-6.0.classpath}
+javadoc.use=true
 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=
-includes=**
-j2ee.compile.on.save=false
-j2ee.copy.static.files.on.save=false
-j2ee.deploy.on.save=false
-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-storeconfig.jar:${j2ee.server.home}/lib/catalina-tribes.jar:${j2ee.server.home}/lib/catalina.jar:${j2ee.server.home}/lib/ecj-4.4.2.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-jni.jar:${j2ee.server.home}/lib/tomcat-util-scan.jar:${j2ee.server.home}/lib/tomcat-util.jar:${j2ee.server.home}/lib/tomcat-websocket.jar:${j2ee.server.home}/lib/websocket-api.jar
-j2ee.server.type=Tomcat
-jar.compress=false
-javac.classpath=\
-    ${reference.csip-core.jar}:\
-    ${libs.CSIP-Jersey-2.16.classpath}
-# Space-separated list of extra javac options
-javac.compilerargs=
-javac.debug=true
-javac.deprecation=false
-javac.processorpath=\
-    ${javac.classpath}
-javac.source=1.8
-javac.target=1.8
+javadoc.nonavbar=false
+war.name=csip-weather.war
+javadoc.windowtitle=
 javac.test.classpath=\
     ${javac.classpath}:\
     ${build.classes.dir}:\
-    ${libs.junit_4.classpath}
-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
+    ${libs.junit_4.classpath}:\
+    ${libs.hamcrest.classpath}
 src.dir=${source.root}/java
-test.src.dir=test
-war.content.additional=
-war.ear.name=${war.name}
-war.name=csip-weather.war
-web.docbase.dir=web
-webinf.dir=web/WEB-INF
+annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output
+debug.classpath=${build.classes.dir}\:${javac.classpath}

src/java/m/weather/WeatherModelDataService.java

@@ -31,6 +31,9 @@
     protected String process() throws Exception {
         // Check for selection by region or point
         String input_zone_geojson = getStringParam("input_zone_features", "");
+        // Save features to file because a large request can overflow the parameter buffer
+        String geojson_fname = getWorkspaceDir() + "/" + "input_zone_features.geojson";
+        Files.write(Paths.get(geojson_fname), input_zone_geojson.getBytes());
 
         // Check for selection by station ID list
         String station_names_json = getStringParam("station_list", null);
@@ -66,7 +69,7 @@
         args.add("python");
         args.add(f.getAbsolutePath());
         args.add(climate_type);
-        args.add(input_zone_geojson != "" ? input_zone_geojson : station_names_json);
+        args.add(input_zone_geojson != "" ? geojson_fname : station_names_json);
         if (!forecast_model.isEmpty()) {
             args.add(forecast_model);
             args.add(forecast_option);

src/java/python/weatherExtraction.py

@@ -159,14 +159,17 @@
         # key is cell name
         cell_extents = {}
         cell_defs = {}
-        
-        geojson_obj = json.loads(input_zone_file)
 
+        if os.path.isfile(input_zone_file):
+            with open(input_zone_file) as fp:
+                geojson_obj = json.load(fp)
+        else:
+            geojson_obj = json.loads(input_zone_file)
+            
         # Build tiles by looking up each gid
         if cell_table == 'prism':
             # PRISM uses cell centroids
             if input_zone_file:
-                geojson_obj = json.loads(input_zone_file)
                 for feat in geojson_obj['features']:
                     shape = asShape(feat['geometry'])
                     tile = [shape.centroid.x, shape.centroid.y]
@@ -282,7 +285,11 @@
         names = []
         tiles = []
         if input_zone_file:
-            geojson_obj = json.loads(input_zone_file)
+            if os.path.isfile(input_zone_file):
+                with open(input_zone_file) as fp:
+                    geojson_obj = json.load(fp)
+            else:
+                geojson_obj = json.loads(input_zone_file)
 
             # Build tiles by looking up each gid
             c = getConnWRAP().cursor()            
@@ -517,7 +524,11 @@
             names = map(lambda x: x[1] if isinstance(x, list) else x, stations)
         else:
             # Input zone file -- get all features in the polygon
-            geojson_obj = json.loads(input_zone_file_or_station_list)
+            if os.path.isfile(input_zone_file):
+                with open(input_zone_file) as fp:
+                    geojson_obj = json.load(fp)
+            else:
+                geojson_obj = json.loads(input_zone_file)
             c = getConnWRAP().cursor(cursor_factory=psycopg2.extras.DictCursor)
             
             # Build tiles by looking up each gid