52North / WPS

**DEPRECATED** The 52°North Web Processing Service enables the deployment of geo-processes on the web in a standardized way.
GNU General Public License v2.0
63 stars 55 forks source link

Example process extensions 52N 4.0.0 Beta and WPS2.0 #281

Open gabrilator opened 4 years ago

gabrilator commented 4 years ago

Hi! I would like to add custom process extensions to the 52N 4.0.0 Beta but I can't find any example on the source code and the guides on the website are made for WPS 1.0.0. Are there any examples out there, or something I could base myself on in order to write my own extensions?

Thank you!

bpross-52n commented 4 years ago

Hi, you could use this as an example for a custom process extension:

https://github.com/bpross-52n/wps-process-repository-skeleton

gabrilator commented 4 years ago

Thanks bpross, and good job! One more thing, I see that the project description is taken from GenericExampleAlgorithm.xml, which seems to be in wps 1.0.0. Is there any example of an xml with all the new fields of wps 2.0, such as ProcessOferings, ResponseForm... and an algorithm that reads from these ?

Thank you!

bpross-52n commented 4 years ago

Hey, sorry, I was travelling. The short answer is: No, there is no example using a WPS 2.0 process description. The reason behind is that there are several ways to implement an algorithm in the 52n WPS. One way is to create a process description XML alongside to the Java class. This can be useful if you want to have more fine grained control over the process description, e.g. limit the data formats. The algorithm will be also available using the WPS 2.0 interface. The concepts behind WPS 1.0 and 2.0 are very similar.

Other ways to implement algorithms are extending certain other classes, e.g. AbstractAnnotatedAlgorithm or AbstractSelfDescribingAlgorithm, that in turn extend AbstractAlgorithm but offer more functionalities. The process description in version 1.0 and 2.0 will be created automatically using these classes.

Hope this helps!