@@ -1,42 +1,23 @@ |
<?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. |
+ Licensed to the Apache Software Foundation (ASF) under one |
+ or more contributor license agreements. See the NOTICE file |
+ distributed with this work for additional information |
+ regarding copyright ownership. The ASF licenses this file |
+ to you under the Apache License, Version 2.0 (the |
+ "License"); you may not use this file except in compliance |
+ with the License. You may obtain a copy of the License at |
|
-Oracle and Java are registered trademarks of Oracle and/or its affiliates. |
-Other names may be trademarks of their respective owners. |
+ http://www.apache.org/licenses/LICENSE-2.0 |
|
-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]" |
+ Unless required by applicable law or agreed to in writing, |
+ software distributed under the License is distributed on an |
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
+ KIND, either express or implied. See the License for the |
+ specific language governing permissions and limitations |
+ under the License. |
|
-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"> |
@@ -558,8 +558,7 @@ |
<formatter type="brief" usefile="false"/> |
<formatter type="xml"/> |
<jvmarg value="-ea"/> |
- <jvmarg line="${debug-args-line}"/> |
- <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/> |
+ <jvmarg value="-agentlib:jdwp=transport=${debug-transport},address=${jpda.address}"/> |
<customize/> |
</junit> |
</sequential> |
@@ -591,8 +590,7 @@ |
<formatter type="xml"/> |
<jvmarg value="-ea"/> |
<jvmarg line="${run.jvmargs.ide}"/> |
- <jvmarg line="${debug-args-line}"/> |
- <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/> |
+ <jvmarg value="-agentlib:jdwp=transport=${debug-transport},address=${jpda.address}"/> |
<customize/> |
</junit> |
</sequential> |
@@ -750,18 +748,6 @@ |
</macrodef> |
</target> |
<target name="-init-debug-args"> |
- <property name="version-output" value="java version "${ant.java.version}"/> |
- <condition property="have-jdk-older-than-1.4"> |
- <or> |
- <contains string="${version-output}" substring="java version "1.0"/> |
- <contains string="${version-output}" substring="java version "1.1"/> |
- <contains string="${version-output}" substring="java version "1.2"/> |
- <contains string="${version-output}" substring="java version "1.3"/> |
- </or> |
- </condition> |
- <condition else="-Xdebug" property="debug-args-line" value="-Xdebug -Xnoagent -Djava.compiler=none"> |
- <istrue value="${have-jdk-older-than-1.4}"/> |
- </condition> |
<condition else="dt_socket" property="debug-transport-by-os" value="dt_shmem"> |
<os family="windows"/> |
</condition> |
@@ -778,8 +764,7 @@ |
<sequential> |
<java classname="@{classname}" fork="true"> |
<jvmarg line="${endorsed.classpath.cmd.line.arg}"/> |
- <jvmarg line="${debug-args-line}"/> |
- <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/> |
+ <jvmarg value="-agentlib:jdwp=transport=${debug-transport},address=${jpda.address}"/> |
<jvmarg line="${runmain.jvmargs}"/> |
<classpath> |
<path path="@{classpath}"/> |
@@ -3,9 +3,9 @@ |
build.xml.stylesheet.CRC32=651128d4@1.65.1.1 |
# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. |
# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. |
-nbproject/build-impl.xml.data.CRC32=ff3b7911 |
-nbproject/build-impl.xml.script.CRC32=59440e26 |
-nbproject/build-impl.xml.stylesheet.CRC32=99ea4b56@1.77.1.1 |
+nbproject/build-impl.xml.data.CRC32=d1d1048f |
+nbproject/build-impl.xml.script.CRC32=529ce855 |
+nbproject/build-impl.xml.stylesheet.CRC32=58472a1d@1.83.0.1 |
nbproject/rest-build.xml.data.CRC32=bff4a8fe |
nbproject/rest-build.xml.script.CRC32=4734534b |
nbproject/rest-build.xml.stylesheet.CRC32=5f13befe@1.21 |
@@ -42,20 +42,13 @@ |
<file>file:/od/projects/csip-all/csip-example/web/WEB-INF/csip-defaults.json</file> |
<file>file:/od/projects/csip-all/csip-example/build.xml</file> |
</group> |
- <group name="csip-core"> |
- <file>file:/od/projects/csip-all/csip-example/src/java/m/example/simpleservice/V1_01.java</file> |
- <file>file:/od/projects/csip-all/csip-example/src/java/m/example/py/V1_0.py</file> |
- <file>file:/od/projects/csip-all/csip-example/src/java/m/example/simpleservice/V1_0.java</file> |
- <file>file:/od/projects/csip-all/csip-example/src/java/m/example/simpleservice/V2_0_1.java</file> |
- <file>file:/od/projects/csip-all/csip-example/src/java/m/example/stats/V2_0.java</file> |
- <file>file:/od/projects/csip-all/csip-example/src/java/m/example/jdbc/V1_0.java</file> |
- <file>file:/od/projects/csip-all/csip-example/src/java/m/example/simpleservice/V2_0.json</file> |
- <file>file:/od/projects/csip-all/csip-example/src/java/m/example/simpleservice/V2_0.java</file> |
- <file>file:/od/projects/csip-all/csip-example/src/java/m/example/simpleservice/V3.java</file> |
- </group> |
<group name="RTI"> |
<file>file:/od/projects/csip-all/csip-example/build.xml</file> |
<file>file:/od/projects/csip-all/csip-example/src/java/m/example/simpleservice/V2_0.java</file> |
</group> |
+ <group name="csip-core"> |
+ <file>file:/od/projects/csip-all/csip-example/src/java/m/example/simpleservice/V2_0.java</file> |
+ <file>file:/od/projects/csip-all/csip-example/src/java/m/example/ApplicationConfig.java</file> |
+ </group> |
</open-files> |
</project-private> |
@@ -6,12 +6,10 @@ |
|
import csip.Config; |
import csip.ContextConfig; |
-import java.util.HashSet; |
import java.util.Set; |
import javax.servlet.ServletContext; |
import javax.ws.rs.core.Application; |
import javax.ws.rs.core.Context; |
-import org.glassfish.jersey.media.multipart.MultiPartFeature; |
|
/** |
* |
@@ -44,6 +42,7 @@ |
resources.add(csip.CatalogService.class); |
resources.add(csip.ControlService.class); |
resources.add(csip.DynamicPyModelDataService.class); |
+ resources.add(csip.GzipWriterInterceptor.class); |
resources.add(csip.QueryService.class); |
resources.add(csip.QueueingModelDataService.class); |
resources.add(csip.ReportService.class); |
@@ -9,6 +9,7 @@ |
import javax.ws.rs.Path; |
import static csip.annotations.State.*; |
import csip.annotations.*; |
+import org.codehaus.jettison.json.JSONObject; |
|
@Name("conv #2") |
@Description("Example of an simple service") |
@@ -19,20 +20,23 @@ |
@Author(name = "od", email = "<odavid@colostate.edu>", org = "CSU") |
@Category("Examples") |
@Category("Climate") |
- |
@Path("m/simpleservice/2.0") |
+@Gzip |
public class V2_0 extends csip.ModelDataService { |
|
@Override |
protected void doProcess() throws Exception { |
- int sleep = parameter().getInt("sleep", 25); |
- boolean b = parameter().getBoolean("b", true); |
- System.out.println("Value " + sleep + " " + b); |
-// Thread.sleep(sleep); |
+ |
+ JSONObject o = new JSONObject(); |
+ for (int i = 0; i < 100; i++) { |
+ o.put(Integer.toHexString(i), i); |
+ } |
+ |
double temp = parameter().getDouble("temp"); |
String un = parameter().getUnit("temp"); |
if (un.equals("C")) { |
results().put("temp", temp * 9 / 5 + 32, "temperature", "F"); |
+ results().put("ts", o); |
return; |
} |
throw new ServiceException("missing unit."); |
@@ -1,4 +1,6 @@ |
{ |
+ "abc": "path#1:", |
+ "xyz": "${abc}---${DESKTOP_SESSION}", |
"csip111.session.backend": "sql", |
"csip111.session.sql.uri": "jdbc:postgresql://localhost:5432/od?user=od&password=od", |
"csip111.session.sql.uri": "jdbc:sqlserver://129.82.20.241:1433;databaseName=csip_logging;user=sa;password=csurams#1", |
@@ -8,6 +10,7 @@ |
"csip.response.error.httpstatus": "550", |
"csip.keepworkspace": "false", |
"csip.logging.level" : "INFO", |
+ "csip.resultstore.backend": "local", |
|
"connect.url": "jdbc:postgresql://localhost/od?user=od&password=od", |
"mssql.db": "jdbc:sqlserver:\/\/129.82.20.241:1433;databaseName=conservation_resources;user=readOnly;password=password" , |