-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgetConfigI_OVariablesAndStandardNames.rq
29 lines (27 loc) · 1.14 KB
/
getConfigI_OVariablesAndStandardNames.rq
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: Given a model configuration URI, this query returns the inputs/outputs and their data types, corresponding variable presentations, units and relevance level.
#+ defaults:
#+ - config: https://w3id.org/mint/instance/FSC_config
PREFIX model: <https://w3id.org/mint/modelCatalog#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
prefix dc: <http://purl.org/dc/terms/>
SELECT DISTINCT ?prop ?io ?iolabel ?ioDescription ?format ?type ?dim ?vp ?st ?units ?rl
from <https://w3id.org/mint/instance/modelservice_graph>
WHERE {
{
?_config_iri model:hasInput ?io.
}UNION
{
?_config_iri model:hasOutput ?io.
}
?_config_iri ?prop ?io.
OPTIONAL {?io model:hasFormat ?format}
OPTIONAL {?io model:hasDimensionality ?dim}
OPTIONAL {?io dc:description ?ioDescription}
?io a ?type.
?io rdfs:label ?iolabel.
FILTER(?type != model:DatasetSpecification).
OPTIONAL {?io model:hasPresentation ?vp.?vp model:hasStandardVariable ?sv. ?sv rdfs:label ?st}
OPTIONAL {?io model:hasPresentation ?vp.?vp model:usesUnit ?u. ?u rdfs:label ?units.}
OPTIONAL {?io model:hasPresentation ?vp.?vp model:hasRelevanceLevel ?rl.}
}