-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgetModelConfigurationMetadata.rq
More file actions
29 lines (27 loc) · 1.56 KB
/
Copy pathgetModelConfigurationMetadata.rq
File metadata and controls
29 lines (27 loc) · 1.56 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#+ method: GET
#+ summary: Query that returns all metadata of a configuration, including the model version it belongs to, its label, description, inputs, outputs, modules, processes, time step (unit and value), constraints and CAG id associated to it.
#+ defaults:
#+ - modelConfig: https://w3id.org/mint/instance/FSC_config
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX mc: <https://w3id.org/mint/modelCatalog#>
PREFIX dc: <http://purl.org/dc/terms/>
SELECT ?label ?compLoc ?desc (GROUP_CONCAT(DISTINCT ?input;SEPARATOR=', ') AS ?input_variables) (GROUP_CONCAT(DISTINCT ?output;SEPARATOR=', ') AS ?output_variables) (GROUP_CONCAT(DISTINCT ?module;SEPARATOR=', ') AS ?modules) (GROUP_CONCAT(DISTINCT ?process;SEPARATOR=', ') AS ?processes) (GROUP_CONCAT(DISTINCT ?c;SEPARATOR=', ') AS ?constraints) ?cag ?tIUnits ?tIValue
from <https://w3id.org/mint/instance/modelservice_graph>
WHERE {
?_modelConfig_iri a mc:ModelConfiguration;
rdfs:label ?label.
OPTIONAL{?_modelConfig_iri mc:hasComponentLocation ?compLoc}.
OPTIONAL{?_modelConfig_iri dc:description ?desc}.
OPTIONAL{?_modelConfig_iri mc:hasConstraint ?c}.
OPTIONAL{?_modelConfig_iri mc:hasInput ?input}.
OPTIONAL{?_modelConfig_iri mc:hasOutput ?output}.
OPTIONAL{?_modelConfig_iri mc:hasModule ?module}.
OPTIONAL{?_modelConfig_iri mc:hasProcess ?process}.
OPTIONAL{?_modelConfig_iri mc:hasCAG ?cag}.
OPTIONAL{
?_modelConfig_iri mc:hasTimeInterval ?ti.
?ti mc:usesUnit ?tu;
mc:hasValue ?tIValue.
?tu rdfs:label ?tIUnits.
}.
}GROUP BY ?label ?desc ?cag ?tIUnits ?tIValue ?compLoc