-
Notifications
You must be signed in to change notification settings - Fork 0
/
getI_OForStandardVariable.rq
30 lines (28 loc) · 1.02 KB
/
getI_OForStandardVariable.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
30
#+ method: GET
#+ summary: Given a standard name (?_std_string), this query returns which input (or output) and its type, configuration, version and model refers to it.
#+ defaults:
#+ - std: atmosphere_water__precipitation_volume_flux
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX mc: <https://w3id.org/mint/modelCatalog#>
PREFIX os: <http://ontosoft.org/software#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
SELECT DISTINCT ?io ?type ?model_config ?compLoc ?modelVersion ?model
from <https://w3id.org/mint/instance/modelservice_graph>
WHERE {
?io a mc:DatasetSpecification.
?io rdf:type ?type.
FILTER(?type != mc:DatasetSpecification).
?io mc:hasPresentation ?presentation.
?presentation mc:hasStandardVariable ?sv.
?sv rdfs:label ?_std_string.
?model os:hasSoftwareVersion ?modelVersion.
?modelVersion mc:hasConfiguration ?model_config.
OPTIONAL{?model_config mc:hasComponentLocation ?compLoc}.
{
?model_config mc:hasInput ?io.
}
UNION
{
?model_config mc:hasOutput ?io.
}
}