[Zoo-discuss] mimeType output

truongxuan quang truongxuanquang at yahoo.com
Sat Jan 18 09:23:21 PST 2014


Dear Gerald
Sorry for unclear question, I could say yes...I need to do something like that, and I got stuck.
Bellow is example what I would like to do, they were implemented some WPS in 52North (please see text bellow) 
Describle process
localhost:8080/wps/WebProcessingService?Request=DescribeProcess&service=WPS&Version=1.0.0&Language=en&Identifier=server.algorithm.EarthquakeQuery
for more detail : https://docs.google.com/document/d/1AOfxDuzWyFQiHiOwXpi-Aeq1IPPDBwQTd0spNmdBktQ/edit?usp=sharing
............
<ProcessOutputs>
<Default>
<Format>
<MimeType>application/vnd.agard.xml</MimeType>
</Format>
</Default>
<Supported>
<Format>
<MimeType>application/vnd.agard.xml</MimeType>
</Format>
</Supported>
</ComplexOutput>
</Output>
</ProcessOutputs>
</ProcessDescription>
</ns:ProcessDescriptions>
==================     
Execute Process
localhost:8080/wps/WebProcessingService?Service=WPS&Version=1.0.0&Request=Execute&Identifier=server.algorithm.EarthquakeQuery&DataInputs=...............
more detail https://docs.google.com/document/d/1b24T81zpjhZcx-H6xhTFyZjTzx7y8RK2EPkrl-7X5NY/edit?pli=1
============= 
Refer to above DescribeProcess if I try to Execute process I get
full detail in big file xml of Execute request as  abstract of xml bellow:
(2) 
<episode>
<episode-id>EQ1_1389871457374</episode-id>
</event-id>
<datums alias="Input Parameters" id="IP" source="Input Parameters">
...
<datums alias="Alert Parameters" id="AP" source="Alert Parameters">
..
<datums alias="Alert Parameters" id="AP" source="Alert Parameters">
...
<datums alias="CITY" id="w_city" source="Alert Parameters">
...
<datums alias="AIRPORT" id="w_airport" source="Alert Parameters">
..
<datums alias="LOGISTIC" id="w_logistic" source="Alert Parameters">
..
<datums alias="nurclear-cite" id="ras1" source="Alert Parameters">
...
<datums alias="POP INFO" id="ras0" source="Raster Analysis">
...
<datums alias="ELEV INFO" id="ras1" source="Raster Analysis">
....
<datums alias="SLOPE  INFO" id="ras2" source="Raster Analysis">
......

as you can see Execute of Process was transformed to .agard.xml
FROM Original of WPS standard and Execute result (2) they are totally different.
My question is there is the way to configure transform xml as above example by automatic way OR I have to write specific code in python (eg: If in case I write ZOO service in python).
If I understand not wrong, I have to write the code in ZOO-Service.py to transform xml, I would like to make sure that it can fine (no bug or error) if I transform xml using ZOO-Project. Anyway Gerald if you have already some example or ideas please help 

I hope these example is clear for my question 

Many thanks

Quang   



On Thursday, January 16, 2014 5:22 PM, Fenoy Gerald <gerald.fenoy at geolabs.fr> wrote:
 
Dear Quang,
I’m not sure to understand exactly what you are searching for.

ZOO-Kernel should be able to handle any kind of mimeType « as-is ». In some cases, for instance when you are asking for the ZOO-Kernel to store your result, the name of the stored file won’t have any relation with the mimeType you specified. You can see here how it works : [1] and how mimeType are used to define extension in the filename stored. 
To simplify we may add an array or a map in service.h storing couples of (mimeType,extension)  or we may also use extension defined in zcfg file.

Anyway, first I would like to make I am on the right way for your question about integrating a new mimeType support.

Best regards,


[1] http://zoo-project.org/trac/browser/trunk/zoo-project/zoo-kernel/service_internal.c#L1937


Le 16 janv. 2014 à 11:52, truongxuan quang <truongxuanquang at yahoo.com> a écrit :

> If I use xsd or xslt in this case it is fine with ZOO-kernel? 
> 
> 
> On Thursday, January 16, 2014 11:48 AM, truongxuan quang <truongxuanquang at yahoo.com> wrote:
> Dear list
> 
> 
> It is possible if I would like to define my mineType for ComplexOutput in ZOO-Project, If yes how can I config for a new mineType.
> 
> Many thanks,
> 
> T.Xuan Quang
> 
> 
> _______________________________________________
> Zoo-discuss mailing list
> Zoo-discuss at lists.osgeo.org
> http://lists.osgeo.org/cgi-bin/mailman/listinfo/zoo-discuss



Gérald Fenoy
gerald.fenoy at geolabs.fr
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/zoo-discuss/attachments/20140118/f4764502/attachment.html>


More information about the Zoo-discuss mailing list