|
|
@@ -34,24 +34,26 @@ class Api_WpsHelper {
|
|
|
$defaultWpsProcessList = [];
|
|
|
|
|
|
{
|
|
|
+ $selectFeatureArgTypeName = [
|
|
|
+ 'maxOccurs' => "1",
|
|
|
+ 'minOccurs' => "1",
|
|
|
+ 'identifier' => 'typeName',
|
|
|
+ 'title' => "Feature typeName",
|
|
|
+ 'description' => "Feature typeName eg. default_db/PROBLEMS",
|
|
|
+ 'type' => 'literal',
|
|
|
+ ];
|
|
|
+ $selectFeatureArgPrimaryKey = [
|
|
|
+ 'maxOccurs' => "unbounded",
|
|
|
+ 'minOccurs' => "1",
|
|
|
+ 'identifier' => 'primaryKey',
|
|
|
+ 'title' => "Feature primaryKey",
|
|
|
+ 'description' => "Feature primaryKey",
|
|
|
+ 'type' => 'literal',
|
|
|
+ ];
|
|
|
$selectFeatureBase = [
|
|
|
'dataInputs' => [
|
|
|
- [
|
|
|
- 'maxOccurs' => "1",
|
|
|
- 'minOccurs' => "1",
|
|
|
- 'identifier' => 'typeName',
|
|
|
- 'title' => "Feature typeName",
|
|
|
- 'description' => "Feature typeName eg. default_db/PROBLEMS",
|
|
|
- 'type' => 'literal',
|
|
|
- ],
|
|
|
- [
|
|
|
- 'maxOccurs' => "unbounded",
|
|
|
- 'minOccurs' => "1",
|
|
|
- 'identifier' => 'primaryKey',
|
|
|
- 'title' => "Feature primaryKey",
|
|
|
- 'description' => "Feature primaryKey",
|
|
|
- 'type' => 'literal',
|
|
|
- ],
|
|
|
+ $selectFeatureArgTypeName,
|
|
|
+ $selectFeatureArgPrimaryKey,
|
|
|
],
|
|
|
// 'MimeType' => text/xml, 'Encoding' => base64, 'Schema' => http://foo.bar/gml/3.1.0/polygon.xsd
|
|
|
'defaultOutput' => [ 'MimeType' => "application/json" ], // TODO: result type - like Insert Wfs Transaction result - list of: Success (primaryKey = 123), ...
|
|
|
@@ -66,6 +68,12 @@ class Api_WpsHelper {
|
|
|
];
|
|
|
$defaultWpsProcessList['p5:selectFeature'] = array_merge([ 'title' => "Select feature", 'descriptin' => "Select feature (set attribute @selected to true)" ], $selectFeatureBase);
|
|
|
$defaultWpsProcessList['p5:unselectFeature'] = array_merge([ 'title' => "Unselect feature", 'descriptin' => "Unselect feature (set attribute @selected to false)" ], $selectFeatureBase);
|
|
|
+ $defaultWpsProcessList['p5:getSelectedFeatures'] = array_merge([ 'title' => "Get selected features", 'descriptin' => "Get list of selected features (with attribute @selected = true)" ], $selectFeatureBase);
|
|
|
+ $defaultWpsProcessList['p5:unselectAllFeatures'] = array_merge([ 'title' => "Unselect all features", 'descriptin' => "Unselect all features (set attribute @selected to false)" ], $selectFeatureBase, [
|
|
|
+ 'dataInputs' => [
|
|
|
+ $selectFeatureArgTypeName
|
|
|
+ ]
|
|
|
+ ]);
|
|
|
}
|
|
|
|
|
|
array_walk($defaultWpsProcessList, function (&$wpsFunction, $identifier) {
|