From e9021c3a912334d5cd9c114e4988cb1cd4c3d6a5 Mon Sep 17 00:00:00 2001 From: Gianpaolo Coro Date: Wed, 22 Jul 2015 14:58:56 +0000 Subject: [PATCH] git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/data-analysis/DataMiner@117429 82a268e6-3cf1-43bd-a215-b396298e98cf --- .../templates/classtemplate.properties | 21 +++++ src/main/resources/templates/setup.cfg | 3 + .../templates/wpsCapabilitiesSkeleton.xml | 80 +++++++++++++++++++ src/main/resources/wps_config.xml | 78 ++++++++++++++++++ 4 files changed, 182 insertions(+) create mode 100644 src/main/resources/templates/classtemplate.properties create mode 100644 src/main/resources/templates/setup.cfg create mode 100644 src/main/resources/templates/wpsCapabilitiesSkeleton.xml create mode 100644 src/main/resources/wps_config.xml diff --git a/src/main/resources/templates/classtemplate.properties b/src/main/resources/templates/classtemplate.properties new file mode 100644 index 0000000..398bfcb --- /dev/null +++ b/src/main/resources/templates/classtemplate.properties @@ -0,0 +1,21 @@ +package=package org.gcube.dataanalysis.wps.statisticalmanager.synchserver.mappedclasses.#PACKAGE#; +import=import java.io.File;\nimport java.net.URL;\nimport java.io.IOException;\nimport java.io.InputStream;\nimport java.util.LinkedHashMap;\nimport java.io.StringWriter;\nimport org.apache.commons.io.IOUtils;\nimport org.apache.xmlbeans.XmlObject;\nimport org.gcube.dataanalysis.wps.statisticalmanager.synchserver.bindings.*;\nimport org.n52.wps.algorithm.annotation.*;\nimport org.n52.wps.io.data.*;\nimport org.n52.wps.io.data.binding.complex.*;\nimport org.n52.wps.io.data.binding.literal.*;\nimport org.n52.wps.server.*;import org.gcube.dataanalysis.wps.statisticalmanager.synchserver.mapping.AbstractEcologicalEngineMapper;import org.n52.wps.server.*;import org.gcube.dataanalysis.wps.statisticalmanager.synchserver.mappedclasses.*; +description=@Algorithm(statusSupported=false, title="#TITLE#", abstrakt="#ABSTRACT#", identifier="org.gcube.dataanalysis.wps.statisticalmanager.synchserver.mappedclasses.#PACKAGE#.#CLASSNAME#", version = "1.1.0") +class_definition=public class #CLASSNAME# extends AbstractEcologicalEngineMapper implements #INTERFACE#{ +class_closure=@Execute public void run() throws Exception { super.run(); } } +scopeInput=@LiteralDataInput(abstrakt="The D4Science VRE scope in which the algorithm will be executed", defaultValue="/d4science.research-infrastructures.eu/gCubeApps/BiodiversityLab", title="scope", maxOccurs=1, minOccurs=1, identifier = "scope", binding = LiteralStringBinding.class) public void setScope(String data) {inputs.put(\"scope",data);} +usernameInput=@LiteralDataInput(abstrakt="An identifier of the user who executes the computation", defaultValue="wpssynch.statistical", title="User name", maxOccurs=1, minOccurs=1, identifier = "user.name", binding = LiteralStringBinding.class) public void setUserName(String data) {inputs.put(\"user.name\",data);} +stringInput=@LiteralDataInput(abstrakt="#ABSTRACT#", defaultValue="#DEFAULT#", title="#TITLE#", identifier = "#ID#", maxOccurs=1, minOccurs=1, binding = LiteralStringBinding.class) public void set#IDMETHOD#(String data) {inputs.put(\"#ID#\",data);} +enumeratedInput=@LiteralDataInput(abstrakt="#ABSTRACT#", allowedValues= {#ALLOWED#}, defaultValue="#DEFAULT#", title="#TITLE#", identifier = "#ID#", maxOccurs=1, minOccurs=1, binding = LiteralStringBinding.class) public void set#IDMETHOD#(String data) {inputs.put(\"#ID#\",data);} +doubleInput=@LiteralDataInput(abstrakt="#ABSTRACT#", defaultValue="#DEFAULT#", title="#TITLE#", identifier = "#ID#", maxOccurs=1, minOccurs=1, binding = LiteralDoubleBinding.class) public void set#IDMETHOD#(Double data) {inputs.put(\"#ID#\",""+data);} +integerInput=@LiteralDataInput(abstrakt="#ABSTRACT#", defaultValue="#DEFAULT#", title="#TITLE#", identifier = "#ID#", maxOccurs=1, minOccurs=1, binding = LiteralIntBinding.class) public void set#IDMETHOD#(Integer data) {inputs.put(\"#ID#\",""+data);} +booleanInput=@LiteralDataInput(abstrakt="#ABSTRACT#", defaultValue="#DEFAULT#", allowedValues= {"true","false"}, title="#TITLE#", identifier = "#ID#", maxOccurs=1, minOccurs=1,binding = LiteralBooleanBinding.class) public void set#IDMETHOD#(Boolean data) {inputs.put(\"#ID#\",""+data);} +csvFileInput=@ComplexDataInput(abstrakt="#ABSTRACT#", title="#TITLE#", maxOccurs=1, minOccurs=1, identifier = "#ID#", binding = GenericFileDataBinding.class) public void set#IDMETHOD#(GenericFileData file) {inputs.put(\"#ID#\",file);} +gislinkInput=@ComplexDataInput(abstrakt="#ABSTRACT#", title="#TITLE#", maxOccurs=1, minOccurs=1, identifier = "#ID#", binding = GisLinkDataInputBinding.class) public void set#IDMETHOD#(GenericFileData file) {inputs.put(\"#ID#\",file);} +d4scienceFileInput=@ComplexDataInput(abstrakt="#ABSTRACT#", title="#TITLE#", maxOccurs=1, minOccurs=1, identifier = "#ID#", binding = D4ScienceDataInputBinding.class) public void set#IDMETHOD#(GenericFileData file) {inputs.put(\"#ID#\",file);} +d4scienceFileOutput=@ComplexDataOutput(abstrakt="#ABSTRACT#", title="#TITLE#", identifier = "#ID#", binding = D4ScienceFileDataBinding.class) public GenericFileData get#IDMETHOD#() {URL url=null;try {url = new URL((String) outputs.get("#ID#")); return new GenericFileData(url.openStream(),"application/d4science");} catch (Exception e) {e.printStackTrace();return null;}} +pngFileOutput=@ComplexDataOutput(abstrakt="#ABSTRACT#", title="#TITLE#", identifier = "#ID#", binding = PngFileDataBinding.class) public GenericFileData get#IDMETHOD#() {URL url=null;try {url = new URL((String) outputs.get("#ID#")); return new GenericFileData(url.openStream(),"image/png");} catch (Exception e) {e.printStackTrace();return null;}} +csvFileOutput=@ComplexDataOutput(abstrakt="#ABSTRACT#", title="#TITLE#", identifier = "#ID#", binding = CsvFileDataBinding.class) public GenericFileData get#IDMETHOD#() {URL url=null;try {url = new URL((String) outputs.get("#ID#")); return new GenericFileData(url.openStream(),"text/csv");} catch (Exception e) {e.printStackTrace();return null;}} +gisLinkOutput=@ComplexDataOutput(abstrakt="#ABSTRACT#", title="#TITLE#", identifier = "#ID#", binding = GisLinkDataBinding.class) public GenericFileData get#IDMETHOD#() {URL url=null;try {url = new URL((String) outputs.get("#ID#")); return new GenericFileData(url.openStream(),"application/geotiff");} catch (Exception e) {e.printStackTrace();return null;}} +stringOutput=@LiteralDataOutput(abstrakt="#ABSTRACT#", title="#TITLE#", identifier = "#ID#", binding = LiteralStringBinding.class) public String get#IDMETHOD#() {return (String) outputs.get("#ID#");} +optionalOutput=@ComplexDataOutput(abstrakt="Output that is not predetermined", title="NonDeterministicOutput", identifier = "non_deterministic_output", binding = GenericXMLDataBinding.class)\n public XmlObject getNon_deterministic_output() {return (XmlObject) outputs.get("non_deterministic_output");} \ No newline at end of file diff --git a/src/main/resources/templates/setup.cfg b/src/main/resources/templates/setup.cfg new file mode 100644 index 0000000..9afbd56 --- /dev/null +++ b/src/main/resources/templates/setup.cfg @@ -0,0 +1,3 @@ +maxcomputations=4 +saveond4sstorage=true +simulationMode=true \ No newline at end of file diff --git a/src/main/resources/templates/wpsCapabilitiesSkeleton.xml b/src/main/resources/templates/wpsCapabilitiesSkeleton.xml new file mode 100644 index 0000000..6cd762b --- /dev/null +++ b/src/main/resources/templates/wpsCapabilitiesSkeleton.xml @@ -0,0 +1,80 @@ + + + + D4Science WPS Service for synchronous executions + Service based on the 52°North implementation of WPS 1.0.0 + + WPS + geospatial + geoprocessing + D4Science + + WPS + 1.0.0 + NONE + NONE + + + National Research Council of Italy + + + Gianpaolo Coro + Researcher + + + +39 050 621 2978 + + + Via Moruzzi 1 + Pisa + Istituto di Scienza e Tecnologie dell'Informazione A. Faedo + 56124 + Italy + gianpaolo.coro@isti.cnr.it + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + #PROCESSES# + + + + en-GB + + + en-GB + + + + diff --git a/src/main/resources/wps_config.xml b/src/main/resources/wps_config.xml new file mode 100644 index 0000000..abed6ec --- /dev/null +++ b/src/main/resources/wps_config.xml @@ -0,0 +1,78 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + org.gcube.dataanalysis.wps.statisticalmanager.synchserver.mappedclasses.BIONYM_LOCAL + org.gcube.dataanalysis.wps.statisticalmanager.synchserver.mappedclasses.BIOCLIMATE_HCAF + org.gcube.dataanalysis.wps.statisticalmanager.synchserver.mappedclasses.PRESENCE_CELLS_GENERATION + org.gcube.dataanalysis.wps.statisticalmanager.synchserver.mappedclasses.HCAF_INTERPOLATION + org.n52.wps.demo.GPDemoXML + org.n52.wps.demo.TestIO + org.n52.wps.server.algorithm.JTSConvexHullAlgorithm + org.n52.wps.server.algorithm.test.DummyTestClass + org.n52.wps.server.algorithm.test.EchoProcess + org.n52.wps.server.algorithm.test.LongRunningDummyTestClass + org.n52.wps.server.algorithm.test.MultiReferenceBinaryInputAlgorithm + org.n52.wps.server.algorithm.test.MultiReferenceInputAlgorithm + org.n52.wps.server.algorithm.test.MultipleComplexInAndOutputsDummyTestClass + + + + + + + + + \ No newline at end of file