-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgetModels.rq
21 lines (18 loc) · 1007 Bytes
/
getModels.rq
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#+ method: GET
#+ summary: Query that returns a label, description, documentation, assumptions, restrictions, category and versions of each model
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX mc: <https://w3id.org/mint/modelCatalog#>
PREFIX dc: <http://purl.org/dc/terms/>
PREFIX os: <http://ontosoft.org/software#>
SELECT ?model ?label ?desc ?doc (GROUP_CONCAT(DISTINCT ?as;SEPARATOR=', ') AS ?assumptions) (GROUP_CONCAT(DISTINCT ?r;SEPARATOR=', ') AS ?restrictions) (GROUP_CONCAT(DISTINCT ?cat;SEPARATOR=', ') AS ?categories) (GROUP_CONCAT(DISTINCT ?v;SEPARATOR=', ') AS ?versions)
from <https://w3id.org/mint/instance/modelservice_graph>
WHERE {
?model a mc:Model.
?model rdfs:label ?label.
OPTIONAL{?model mc:hasAssumption ?as}.
OPTIONAL{?model mc:hasConstraint ?r}.
OPTIONAL{?model dc:description ?desc}.
OPTIONAL{?model mc:hasModelCategory ?cat}.
OPTIONAL{?model os:hasSoftwareVersion ?v}.
OPTIONAL{?model os:hasDocumentation ?doc}.
}group by ?model ?label ?desc ?doc