[Zoo-discuss] Handling output files

rakesh prithiviraj rakeshuk at outlook.com
Tue May 3 15:22:09 PDT 2016


Hi,
I have a legacy Java code that processes several input files (images, text files together) and generates  multiple output files in different formats. The output files are stored in a particular directory (configuration parameter of the processor). I am planning to create a wrapper processor for this legacy code so that I can use it based on WPS standards. 
The wrapper WPS processor will receive 3 parameters (conf, inputs, outputs) and I will pass the inputs to the legacy code which will process the input and will create output files. I will have a list of Java File objects as a result. To handle this scenario, in the zcfg file, I can write something as follows for each of the output. But this is clearly not sufficient to make the output files URLs appear in GetResult response.
 <DataOutputs>  [Result1]   Title = This is result 1   Abstract = A image file .   <ComplexData>    <Default>     mimeType = image/tiff     extension = tif    </Default>   </ComplexData> </DataOutputs>  
In the WPS wrapper code, how do I push the output files to the "outputs" parameter (passed to wrapper processor). In the hello-java example, string is pushed to the "outputs" as follows: 
 HashMap hm1 = (HashMap)(outputs.get("Result"));  hm1.put("value",ZOO._("Hello "+v+" from JAVA World !!"));
Similarly if I push file java object to the "value" key, will the GetResult response contain URL of the output file on the server?Also who is responsible for making the output files (generated in some directory) on the server as a web accessible resource (via URL)?
Thanks in advance.Rakesh








 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/zoo-discuss/attachments/20160503/b7218989/attachment.html>


More information about the Zoo-discuss mailing list