|
|
@@ -109,39 +109,39 @@ class Api_WpsHelper {
|
|
|
]);
|
|
|
}
|
|
|
|
|
|
- // { // Relations (ref's)
|
|
|
- // $wpsArgTypeName = [
|
|
|
- // 'minOccurs' => "1", 'maxOccurs' => "1", // 1 arg is required
|
|
|
- // 'identifier' => 'typeName',
|
|
|
- // 'title' => "Feature typeName",
|
|
|
- // 'description' => "Feature typeName eg.: 'default_db/PROBLEMS'",
|
|
|
- // 'dataType' => 'literal',
|
|
|
- // 'xsdType' => 'p5:typeName',
|
|
|
- // ];
|
|
|
- //
|
|
|
- // $relationsBase = [
|
|
|
- // 'dataInputs' => [
|
|
|
- // $wpsArgTypeName,
|
|
|
- // array_merge($wpsArgPrimaryKey, [ 'maxOccurs' => 1 ]),
|
|
|
- // $wpsArgRemoteTypeName,
|
|
|
- // $wpsArgRemotePrimaryKey,
|
|
|
- // ],
|
|
|
- // // 'MimeType' => text/xml, 'Encoding' => base64, 'Schema' => http://foo.bar/gml/3.1.0/polygon.xsd
|
|
|
- // 'defaultOutput' => [ 'MimeType' => "application/json" ],
|
|
|
- // 'supportedOutput' => [
|
|
|
- // [ 'MimeType' => "application/json" ],
|
|
|
- // ]
|
|
|
- // ];
|
|
|
- // $defaultWpsProcessList['p5:getRelations'] = array_merge([ 'title' => "Fetch relations between features" ], $relationsBase, [
|
|
|
- // 'dataInputs' => [
|
|
|
- // $wpsArgTypeName,
|
|
|
- // array_merge($wpsArgPrimaryKey, [ 'maxOccurs' => 1 ]),
|
|
|
- // $wpsArgRemoteTypeName,
|
|
|
- // ],
|
|
|
- // ]);
|
|
|
- // $defaultWpsProcessList['p5:createRelation'] = array_merge([ 'title' => "Create relation between features" ], $relationsBase);
|
|
|
- // $defaultWpsProcessList['p5:deleteRelation'] = array_merge([ 'title' => "Delete relation between features" ], $relationsBase);
|
|
|
- // }
|
|
|
+ { // Relations (ref's)
|
|
|
+ $wpsArgTypeName = [
|
|
|
+ 'minOccurs' => "1", 'maxOccurs' => "1", // 1 arg is required
|
|
|
+ 'identifier' => 'typeName',
|
|
|
+ 'title' => "Feature typeName",
|
|
|
+ 'description' => "Feature typeName eg.: 'default_db/PROBLEMS'",
|
|
|
+ 'dataType' => 'literal',
|
|
|
+ 'xsdType' => 'p5:typeName',
|
|
|
+ ];
|
|
|
+
|
|
|
+ $relationsBase = [
|
|
|
+ 'dataInputs' => [
|
|
|
+ $wpsArgTypeName,
|
|
|
+ array_merge($wpsArgPrimaryKey, [ 'maxOccurs' => 1 ]),
|
|
|
+ $wpsArgRemoteTypeName,
|
|
|
+ $wpsArgRemotePrimaryKey,
|
|
|
+ ],
|
|
|
+ // 'MimeType' => text/xml, 'Encoding' => base64, 'Schema' => http://foo.bar/gml/3.1.0/polygon.xsd
|
|
|
+ 'defaultOutput' => [ 'MimeType' => "application/json" ],
|
|
|
+ 'supportedOutput' => [
|
|
|
+ [ 'MimeType' => "application/json" ],
|
|
|
+ ]
|
|
|
+ ];
|
|
|
+ $defaultWpsProcessList['p5:getRelations'] = array_merge([ 'title' => "Fetch relations between features" ], $relationsBase, [
|
|
|
+ 'dataInputs' => [
|
|
|
+ $wpsArgTypeName,
|
|
|
+ array_merge($wpsArgPrimaryKey, [ 'maxOccurs' => 1 ]),
|
|
|
+ $wpsArgRemoteTypeName,
|
|
|
+ ],
|
|
|
+ ]);
|
|
|
+ $defaultWpsProcessList['p5:createRelation'] = array_merge([ 'title' => "Create relation between features" ], $relationsBase);
|
|
|
+ $defaultWpsProcessList['p5:deleteRelation'] = array_merge([ 'title' => "Delete relation between features" ], $relationsBase);
|
|
|
+ }
|
|
|
|
|
|
array_walk($defaultWpsProcessList, function (&$wpsFunction, $identifier) {
|
|
|
$wpsFunction['identifier'] = $identifier;
|