[Zoo-discuss] Doubts about java services
andrea antonello
andrea.antonello at gmail.com
Tue Oct 28 17:12:37 PDT 2014
Hi everyone,
I am trying to understand how to expose java modules as WPS service
and need some pointers to get started.
In the docs related to java, I find a class and a config file, but no
real documentation about them.
Given the class from the documentation:
public class HelloJava {
29 public static int HelloWorldJava(HashMap conf,HashMap inputs,
HashMap outputs) {
30 HashMap hm1 = new HashMap();
31 hm1.put("dataType","string");
32 HashMap tmp=(HashMap)(inputs.get("S"));
33 String v=tmp.get("value").toString();
34 hm1.put("value","Hello "+v+" from JAVA World !!");
35 outputs.put("Result",hm1);
36 return 3;
37 }
38}
I find in the config:
1[HelloWorldJava]
2 Title = Display a string
3 Abstract = Display a string which contains an hello message
4 processVersion = 1
5 storeSupported = true
6 statusSupported = true
7 serviceProvider = HelloJava
8 serviceType = Java
So line 1 seems to represent the method to execute, right? -> [HelloWorldJava]
While line 7 seems to represent the class name? -> serviceProvider = HelloJava
Does this mean that it is on line 7 that the fully qualified name goes
and that the example has been made without a package?
Ex: org.jgrasstoools.modules.whatevergisdoit
Also I figured there should be the possibility to pass the processing
progress on to the client. Can this be done from java, I do not see
any way in the class?
Last question. If I for example am simply reading a raster and
producing a new raster as output, then basically I will have no
output, right. There will be two string inputs defining the input and
output map (I am using geotools for IO, not gdal). Is that right?
Last last question.
storeSupported = true
statusSupported = true
what do these two mean. I have some idea, but would love to hear the truth. :-)
Thanks,
Andrea
PS: on the page: http://zoo-project.org/docs/services/zcfg-reference.html
The link "ZOO-Project SVN source tree" is broken.
More information about the Zoo-discuss
mailing list