Skip to content

Add a new operation GetDomain #489

@glegal

Description

@glegal

New optional GetDomain operation for discovering the parameters dependencies

NB : This subject has been discussed during the ninth december 2024 technical meeting.
State of fact :
In some cases, authorised values for a parameter depends on the value of another parameter,
Currently, it is only possible to trial and error on the API by using the Execute for discovering these dependencies.

New operation proposal :
A solution could be an additional GetDomain operation that delivers a description of authorized value for the remaining parameters depending the value tested for a parameter.

An example of request and reponse is provided below :

Lets say we have process that takes 4 parameters :
– A city name
– A country name
– A district number
– A bounding box

We have a data sample with 3 cities :
– Paris in France with 4 district
– Barcelone in Spain with any district
– Gognies-Chaussée a city that is on the border of France and Belgium

The initial « DescribeProcess » operation display all the possible values :
GET : http://localhost:8080/examind/WS/wps/default/processes/urn:exa:wps:examind::test.param.dependency

{
    "id": "urn:exa:wps:examind::test.param.dependency",
    "title": "Examind : Test.param.dependency",
    "version": "1.0.0",
    "jobControlOptions": [
        "sync-execute",
        "async-execute",
        "dismiss"
    ],
    "outputTransmission": [
        "reference",
        "value"
    ],
    "inputs": [
        {
            "id": "urn:exa:wps:examind::test.param.dependency:input:country",
            "title": "Country",
            "description": "Country.",
            "minOccurs": "1",
            "maxOccurs": "1",
            "input": {
                "literalDataDomains": [
                    {
                        "allowedValues": {
                            "allowedValues": [
                                "France",
                                "Espagne",
                                "Belgique"
                            ]
                        },
                        "dataType": {
                            "name": "String",
                            "reference": "http://www.w3.org/TR/xmlschema-2/#string"
                        }
                    }
                ]
            }
        },
        {
            "id": "urn:exa:wps:examind::test.param.dependency:input:city",
            "title": "City",
            "description": "City.",
            "minOccurs": "0",
            "maxOccurs": "1",
            "input": {
                "literalDataDomains": [
                    {
                        "allowedValues": {
                            "allowedValues": [
                                "Barcelone",
                                "Gognies-Chaussée",
                                "Paris"
                            ]
                        },
                        "dataType": {
                            "name": "String",
                            "reference": "http://www.w3.org/TR/xmlschema-2/#string"
                        }
                    }
                ]
            }
        },
        {
            "id": "urn:exa:wps:examind::test.param.dependency:input:district",
            "title": "District",
            "description": "District.",
            "minOccurs": "0",
            "maxOccurs": "1",
            "input": {
                "literalDataDomains": [
                    {
                        "allowedValues": {
                            "allowedValues": [
                                "1",
                                "2",
                                "3",
                                "4"
                            ]
                        },
                        "dataType": {
                            "name": "Integer",
                            "reference": "http://www.w3.org/TR/xmlschema-2/#integer"
                        }
                    }
                ]
            }
        },
        {
            "id": "urn:exa:wps:examind::test.param.dependency:input:boundary",
            "title": "Boundary",
            "description": "Boundary.",
            "minOccurs": "0",
            "maxOccurs": "1",
            "input": {
                "supportedCRS": [
                    {
                        "crs": "EPSG:4326",
                        "default": true
                    },
                    {
                        "crs": "CRS:84",
                        "default": false
                    },
                    {
                        "crs": "EPSG:3395",
                        "default": false
                    },
                    {
                        "crs": "EPSG:3857",
                        "default": false
                    },
                    {
                        "crs": "EPSG:27571",
                        "default": false
                    },
                    {
                        "crs": "EPSG:27572",
                        "default": false
                    },
                    {
                        "crs": "EPSG:27573",
                        "default": false
                    },
                    {
                        "crs": "EPSG:27574",
                        "default": false
                    }
                ]
            }
        }
    ],
    "outputs": [],
    "executeEndpoint": "http://localhost:8080/examind/WS/wps/default/processes/urn:exa:wps:examind::test.param.dependency/jobs",
    "abstract": "Param used to test parameter value dependencies."
} 

We now use the new GetDomain operation to get the possibilities by adding the parameter Country = France

POST http://localhost:8080/examind/WS/wps/default/processes/urn:exa:wps:examind::test.param.dependency/domain
Body :

{
    "inputs": [{
            "id": "urn:exa:wps:examind::test.param.dependency:input:country",
            "input": {
                "dataType": {
                    "name": "String"
                },
                "value": "France"
            }
        }]
}

The response returns only the matching parameters :

{
    "id": "urn:exa:wps:examind::test.param.dependency",
    "title": "Examind : Test.param.dependency",
    "version": "1.0.0",
    "jobControlOptions": [
        "sync-execute",
        "async-execute",
        "dismiss"
    ],
    "outputTransmission": [
        "reference",
        "value"
    ],
    "inputs": [
        {
            "id": "urn:exa:wps:examind::test.param.dependency:input:country",
            "title": "Country",
            "description": "Country.",
            "minOccurs": "1",
            "maxOccurs": "1",
            "input": {
                "literalDataDomains": [
                    {
                        "allowedValues": {
                            "allowedValues": [
                                "France"
                            ]
                        },
                        "dataType": {
                            "name": "String",
                            "reference": "http://www.w3.org/TR/xmlschema-2/#string"
                        }
                    }
                ]
            }
        },
        {
            "id": "urn:exa:wps:examind::test.param.dependency:input:city",
            "title": "City",
            "description": "City.",
            "minOccurs": "0",
            "maxOccurs": "1",
            "input": {
                "literalDataDomains": [
                    {
                        "allowedValues": {
                            "allowedValues": [
                                "Gognies-Chaussée",
                                "Paris"
                            ]
                        },
                        "dataType": {
                            "name": "String",
                            "reference": "http://www.w3.org/TR/xmlschema-2/#string"
                        }
                    }
                ]
            }
        },
        {
            "id": "urn:exa:wps:examind::test.param.dependency:input:district",
            "title": "District",
            "description": "District.",
            "minOccurs": "0",
            "maxOccurs": "1",
            "input": {
                "literalDataDomains": [
                    {
                        "allowedValues": {
                            "allowedValues": [
                                "1",
                                "2",
                                "3",
                                "4"
                            ]
                        },
                        "dataType": {
                            "name": "Integer",
                            "reference": "http://www.w3.org/TR/xmlschema-2/#integer"
                        }
                    }
                ]
            }
        },
        {
            "id": "urn:exa:wps:examind::test.param.dependency:input:boundary",
            "title": "Boundary",
            "description": "Boundary.",
            "minOccurs": "0",
            "maxOccurs": "1",
            "input": {
                "supportedCRS": [
                    {
                        "crs": "EPSG:4326",
                        "default": true
                    },
                    {
                        "crs": "CRS:84",
                        "default": false
                    },
                    {
                        "crs": "EPSG:3395",
                        "default": false
                    },
                    {
                        "crs": "EPSG:3857",
                        "default": false
                    },
                    {
                        "crs": "EPSG:27571",
                        "default": false
                    },
                    {
                        "crs": "EPSG:27572",
                        "default": false
                    },
                    {
                        "crs": "EPSG:27573",
                        "default": false
                    },
                    {
                        "crs": "EPSG:27574",
                        "default": false
                    }
                ]
            }
        }
    ],
    "outputs": [],
    "executeEndpoint": "http://localhost:8080/examind/WS/wps/default/processes/urn:exa:wps:examind::test.param.dependency/jobs",
    "abstract": "Param used to test parameter value dependencies."
}

If we supply the country Belgium and city Gognies-Chaussée, we do no longer have district in the reponse.

POST http://localhost:8080/examind/WS/wps/default/processes/urn:exa:wps:examind::test.param.dependency/domain
Body :

{
    "inputs": [{
            "id": "urn:exa:wps:examind::test.param.dependency:input:country",
            "input": {
                "dataType": {
                    "name": "String"
                },
                "value": "Belgique"
            }
        },{
            "id": "urn:exa:wps:examind::test.param.dependency:input:city",
            "input": {
                "dataType": {
                    "name": "String"
                },
                "value": "Gognies-Chaussée"
            }
        }]
}

Response :

{
    "id": "urn:exa:wps:examind::test.param.dependency",
    "title": "Examind : Test.param.dependency",
    "version": "1.0.0",
    "jobControlOptions": [
        "sync-execute",
        "async-execute",
        "dismiss"
    ],
    "outputTransmission": [
        "reference",
        "value"
    ],
    "inputs": [
        {
            "id": "urn:exa:wps:examind::test.param.dependency:input:country",
            "title": "Country",
            "description": "Country.",
            "minOccurs": "1",
            "maxOccurs": "1",
            "input": {
                "literalDataDomains": [
                    {
                        "allowedValues": {
                            "allowedValues": [
                                "Belgique"
                            ]
                        },
                        "dataType": {
                            "name": "String",
                            "reference": "http://www.w3.org/TR/xmlschema-2/#string"
                        }
                    }
                ]
            }
        },
        {
            "id": "urn:exa:wps:examind::test.param.dependency:input:city",
            "title": "City",
            "description": "City.",
            "minOccurs": "0",
            "maxOccurs": "1",
            "input": {
                "literalDataDomains": [
                    {
                        "allowedValues": {
                            "allowedValues": [
                                "Gognies-Chaussée"
                            ]
                        },
                        "dataType": {
                            "name": "String",
                            "reference": "http://www.w3.org/TR/xmlschema-2/#string"
                        }
                    }
                ]
            }
        },
        {
            "id": "urn:exa:wps:examind::test.param.dependency:input:district",
            "title": "District",
            "description": "District.",
            "minOccurs": "0",
            "maxOccurs": "1",
            "input": {
                "literalDataDomains": [
                    {
                        "dataType": {
                            "name": "Integer",
                            "reference": "http://www.w3.org/TR/xmlschema-2/#integer"
                        }
                    }
                ]
            }
        },
        {
            "id": "urn:exa:wps:examind::test.param.dependency:input:boundary",
            "title": "Boundary",
            "description": "Boundary.",
            "minOccurs": "0",
            "maxOccurs": "1",
            "input": {
                "supportedCRS": [
                    {
                        "crs": "EPSG:4326",
                        "default": true
                    },
                    {
                        "crs": "CRS:84",
                        "default": false
                    },
                    {
                        "crs": "EPSG:3395",
                        "default": false
                    },
                    {
                        "crs": "EPSG:3857",
                        "default": false
                    },
                    {
                        "crs": "EPSG:27571",
                        "default": false
                    },
                    {
                        "crs": "EPSG:27572",
                        "default": false
                    },
                    {
                        "crs": "EPSG:27573",
                        "default": false
                    },
                    {
                        "crs": "EPSG:27574",
                        "default": false
                    }
                ]
            }
        }
    ],
    "outputs": [],
    "executeEndpoint": "http://localhost:8080/examind/WS/wps/default/processes/urn:exa:wps:examind::test.param.dependency/jobs",
    "abstract": "Param used to test parameter value dependencies."
}

If we then filter on the country Spain, as the city Barcelone is configured with « Any » district,
All the available districts will be returned 

POST http://localhost:8080/examind/WS/wps/default/processes/urn:exa:wps:examind::test.param.dependency/domain
Body :

{
    "inputs": [{
            "id": "urn:exa:wps:examind::test.param.dependency:input:country",
            "input": {
                "dataType": {
                    "name": "String"
                },
                "value": "Espagne"
            }
        }]
}

Response :

{
    "id": "urn:exa:wps:examind::test.param.dependency",
    "title": "Examind : Test.param.dependency",
    "version": "1.0.0",
    "jobControlOptions": [
        "sync-execute",
        "async-execute",
        "dismiss"
    ],
    "outputTransmission": [
        "reference",
        "value"
    ],
    "inputs": [
        {
            "id": "urn:exa:wps:examind::test.param.dependency:input:country",
            "title": "Country",
            "description": "Country.",
            "minOccurs": "1",
            "maxOccurs": "1",
            "input": {
                "literalDataDomains": [
                    {
                        "allowedValues": {
                            "allowedValues": [
                                "Espagne"
                            ]
                        },
                        "dataType": {
                            "name": "String",
                            "reference": "http://www.w3.org/TR/xmlschema-2/#string"
                        }
                    }
                ]
            }
        },
        {
            "id": "urn:exa:wps:examind::test.param.dependency:input:city",
            "title": "City",
            "description": "City.",
            "minOccurs": "0",
            "maxOccurs": "1",
            "input": {
                "literalDataDomains": [
                    {
                        "allowedValues": {
                            "allowedValues": [
                                "Barcelone"
                            ]
                        },
                        "dataType": {
                            "name": "String",
                            "reference": "http://www.w3.org/TR/xmlschema-2/#string"
                        }
                    }
                ]
            }
        },
        {
            "id": "urn:exa:wps:examind::test.param.dependency:input:district",
            "title": "District",
            "description": "District.",
            "minOccurs": "0",
            "maxOccurs": "1",
            "input": {
                "literalDataDomains": [
                    {
                        "allowedValues": {
                            "allowedValues": [
                                "1",
                                "2",
                                "3",
                                "4"
                            ]
                        },
                        "dataType": {
                            "name": "Integer",
                            "reference": "http://www.w3.org/TR/xmlschema-2/#integer"
                        }
                    }
                ]
            }
        },
        {
            "id": "urn:exa:wps:examind::test.param.dependency:input:boundary",
            "title": "Boundary",
            "description": "Boundary.",
            "minOccurs": "0",
            "maxOccurs": "1",
            "input": {
                "supportedCRS": [
                    {
                        "crs": "EPSG:4326",
                        "default": true
                    },
                    {
                        "crs": "CRS:84",
                        "default": false
                    },
                    {
                        "crs": "EPSG:3395",
                        "default": false
                    },
                    {
                        "crs": "EPSG:3857",
                        "default": false
                    },
                    {
                        "crs": "EPSG:27571",
                        "default": false
                    },
                    {
                        "crs": "EPSG:27572",
                        "default": false
                    },
                    {
                        "crs": "EPSG:27573",
                        "default": false
                    },
                    {
                        "crs": "EPSG:27574",
                        "default": false
                    }
                ]
            }
        }
    ],
    "outputs": [],
    "executeEndpoint": "http://localhost:8080/examind/WS/wps/default/processes/urn:exa:wps:examind::test.param.dependency/jobs",
    "abstract": "Param used to test parameter value dependencies."
}

If we use the bbox parameter with a envelope englobing Paris and Barcelone we get all the paramters from both cities :

POST http://localhost:8080/examind/WS/wps/default/processes/urn:exa:wps:examind::test.param.dependency/domain
Body :

{
    "inputs": [{
            "id": "urn:exa:wps:examind::test.param.dependency:input:boundary",
            "input": {
                "bbox": [1.5, 41.1, 3.4, 49.2],
                "crs": "EPSG:4326"
            }
        }]
}

Response :

{
    "id": "urn:exa:wps:examind::test.param.dependency",
    "title": "Examind : Test.param.dependency",
    "version": "1.0.0",
    "jobControlOptions": [
        "sync-execute",
        "async-execute",
        "dismiss"
    ],
    "outputTransmission": [
        "reference",
        "value"
    ],
    "inputs": [
        {
            "id": "urn:exa:wps:examind::test.param.dependency:input:country",
            "title": "Country",
            "description": "Country.",
            "minOccurs": "1",
            "maxOccurs": "1",
            "input": {
                "literalDataDomains": [
                    {
                        "allowedValues": {
                            "allowedValues": [
                                "France",
                                "Espagne"
                            ]
                        },
                        "dataType": {
                            "name": "String",
                            "reference": "http://www.w3.org/TR/xmlschema-2/#string"
                        }
                    }
                ]
            }
        },
        {
            "id": "urn:exa:wps:examind::test.param.dependency:input:city",
            "title": "City",
            "description": "City.",
            "minOccurs": "0",
            "maxOccurs": "1",
            "input": {
                "literalDataDomains": [
                    {
                        "allowedValues": {
                            "allowedValues": [
                                "Barcelone",
                                "Paris"
                            ]
                        },
                        "dataType": {
                            "name": "String",
                            "reference": "http://www.w3.org/TR/xmlschema-2/#string"
                        }
                    }
                ]
            }
        },
        {
            "id": "urn:exa:wps:examind::test.param.dependency:input:district",
            "title": "District",
            "description": "District.",
            "minOccurs": "0",
            "maxOccurs": "1",
            "input": {
                "literalDataDomains": [
                    {
                        "allowedValues": {
                            "allowedValues": [
                                "1",
                                "2",
                                "3",
                                "4"
                            ]
                        },
                        "dataType": {
                            "name": "Integer",
                            "reference": "http://www.w3.org/TR/xmlschema-2/#integer"
                        }
                    }
                ]
            }
        },
        {
            "id": "urn:exa:wps:examind::test.param.dependency:input:boundary",
            "title": "Boundary",
            "description": "Boundary.",
            "minOccurs": "0",
            "maxOccurs": "1",
            "input": {
                "supportedCRS": [
                    {
                        "crs": "EPSG:4326",
                        "default": true
                    },
                    {
                        "crs": "CRS:84",
                        "default": false
                    },
                    {
                        "crs": "EPSG:3395",
                        "default": false
                    },
                    {
                        "crs": "EPSG:3857",
                        "default": false
                    },
                    {
                        "crs": "EPSG:27571",
                        "default": false
                    },
                    {
                        "crs": "EPSG:27572",
                        "default": false
                    },
                    {
                        "crs": "EPSG:27573",
                        "default": false
                    },
                    {
                        "crs": "EPSG:27574",
                        "default": false
                    }
                ]
            }
        }
    ],
    "outputs": [],
    "executeEndpoint": "http://localhost:8080/examind/WS/wps/default/processes/urn:exa:wps:examind::test.param.dependency/jobs",
    "abstract": "Param used to test parameter value dependencies."
}

Metadata

Metadata

Assignees

Labels

Part 1 (Core)OGC API - Processes - Part 1: Corefuture workA feature that may considered for addition in the future.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions