This page contains various SPARQL queries that can be performed on the MICA triplestore in order to provide useful information in the DDG interface.
Queries are sorted according to the type of resource to which they relate.
Theses concepts are the concepts that have micavocab:MICA as parent concept.
Select all concepts which have micavocab:MICA as parent and for these concepts give the URI and label
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX micavocab: <https://w3id.org/mica/ontology/MicaOntology/>
SELECT ?conceptURI ?label
WHERE {
?conceptURI a skos:Concept;
skos:prefLabel ?label;
skos:broader micavocab:MICA.
}
order by ?labelIn fact the previous query can be generalized to find all the direct sub-concepts of any given concept. For example :
Select all concepts which have micavocab:0491ee9f6cf74dcda7ab92db86284c05 as parent and for these concepts give the URI and label
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX micavocab: <https://w3id.org/mica/ontology/MicaOntology/>
SELECT ?conceptURI ?label
WHERE {
?conceptURI a skos:Concept;
skos:prefLabel ?label;
skos:broader micavocab:0491ee9f6cf74dcda7ab92db86284c05.
}
order by ?labelThe previous query uses the skos:broader relation to retrieve the sub-concepts. It's also possible to uses the inverse relation skos:narrower.
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX micavocab: <https://w3id.org/mica/ontology/MicaOntology/>
SELECT ?conceptURI ?label
WHERE {
?conceptURI a skos:Concept;
skos:prefLabel ?label.
micavocab:0491ee9f6cf74dcda7ab92db86284c05 skos:narrower ?conceptURI.
}
order by ?labele.g. parent of concept micavocab:0491ee9f6cf74dcda7ab92db86284c05
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX micavocab: <https://w3id.org/mica/ontology/MicaOntology/>
SELECT ?conceptURI ?label
WHERE {
?conceptURI a skos:Concept;
skos:prefLabel ?label .
micavocab:0491ee9f6cf74dcda7ab92db86284c05 skos:broader ?conceptURI.
}
order by ?labelThe same query using skos:narrower instead of skos:broader
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX micavocab: <https://w3id.org/mica/ontology/MicaOntology/>
SELECT ?conceptURI ?label
WHERE {
?conceptURI a skos:Concept;
skos:narrower micavocab:0491ee9f6cf74dcda7ab92db86284c05;
skos:prefLabel ?label .
}
order by ?labele.g. Select all concepts of micavocab:DomainScheme
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX micavocab: <https://w3id.org/mica/ontology/MicaOntology/>
SELECT ?conceptURI ?label
WHERE {
?conceptURI a skos:Concept;
skos:prefLabel ?label;
skos:inScheme micavocab:DomainScheme.
}
order by ?labelto get all the concepts of a concept scheme other than domain scheme just replace micavocab:DomainScheme URI by the corresponding MICA scheme URI.
To get all statistics about a given concept ( all types of sheets directly or undirectly related to a given conceptURI. micavocab:0491ee9f6cf74dcda7ab92db86284c05
PREFIX micamodel: <https://w3id.org/mica/ontology/MicaModel#>
PREFIX micavocab: <https://w3id.org/mica/ontology/MicaOntology/>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
SELECT (count (DISTINCT ?methodURI) as ?methodsNb)
(count (DISTINCT ?documentationURI) as ?documentationNb)
(count (DISTINCT ?legislationURI) as ?legislationNb)
(count (DISTINCT ?dataURI) as ?dataNb)
(count (DISTINCT ?portalURI) as ?portalNb)
(count (DISTINCT ?articleURI) as ?articleNb)
(count (DISTINCT ?otherURI) as ?otherNb)
(count (DISTINCT ?flowsheetURI) as ?flowsheetNb)
(count (DISTINCT ?questionURI) as ?questionNb)
WHERE {
{
?methodURI micamodel:hasContentType micamodel:MethodsAndTools;
?hasMicaConcept ?d.
?d skos:broaderTransitive micavocab:0491ee9f6cf74dcda7ab92db86284c05 .
}
union {
?documentationURI micamodel:hasContentType micamodel:Documentation;
?hasMicaConcept ?d.
?d skos:broaderTransitive micavocab:0491ee9f6cf74dcda7ab92db86284c05 .
}
union {
?legislationURI micamodel:hasContentType micamodel:Legislation;
?hasMicaConcept ?d.
?d skos:broaderTransitive micavocab:0491ee9f6cf74dcda7ab92db86284c05 .
}
union {
?dataURI micamodel:hasContentType micamodel:Data;
?hasMicaConcept ?d.
?d skos:broaderTransitive micavocab:0491ee9f6cf74dcda7ab92db86284c05 .
}
union {
?portalURI micamodel:hasContentType micamodel:Portal;
?hasMicaConcept ?d.
?d skos:broaderTransitive micavocab:0491ee9f6cf74dcda7ab92db86284c05 .
}
union {
?articleURI micamodel:hasContentType micamodel:ArticlesAndReports;
?hasMicaConcept ?d.
?d skos:broaderTransitive micavocab:0491ee9f6cf74dcda7ab92db86284c05 .
}
union {
?otherURI micamodel:hasContentType micamodel:Other;
?hasMicaConcept ?d.
?d skos:broaderTransitive micavocab:0491ee9f6cf74dcda7ab92db86284c05 .
}
union {
?flowSheetURI a micamodel:FlowSheet;
?hasMicaConcept ?d.
?d skos:broaderTransitive micavocab:0491ee9f6cf74dcda7ab92db86284c05 .
}
union {
?questionURI a micamodel:MICAQuestion;
?hasMicaConcept ?d.
?d skos:broaderTransitive micavocab:0491ee9f6cf74dcda7ab92db86284c05 .
}
}Select all Methods and Tools sheets (URI and title) directly related to domain concept micavocab:0491ee9f6cf74dcda7ab92db86284c05
PREFIX micavocab: <https://w3id.org/mica/ontology/MicaOntology/>
PREFIX micamodel: <https://w3id.org/mica/ontology/MicaModel#>
PREFIX dcterms: <http://purl.org/dc/terms/>
SELECT ?sheetURI ?title
WHERE {
?sheetURI a micamodel:Sheet;
micamodel:hasContentType micamodel:MethodsAndTools;
dcterms:title ?title;
?hasMicaConcept micavocab:0491ee9f6cf74dcda7ab92db86284c05 .
}
order by ?titleFor other types of content (Documentation, Legislation, Data, Portal,Articles & Reports, Other) just replace micamodel:MethodsAndTools in the previous query by the corresponding data type defined in MicaModel ontology.
e.g. find all Methods and Tools sheets (URI, title ) related (directly or undirectly through subconcepts) to the concept micavocab:0491ee9f6cf74dcda7ab92db86284c05
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX micavocab: <https://w3id.org/mica/ontology/MicaOntology/>
PREFIX micamodel: <https://w3id.org/mica/ontology/MicaModel#>
PREFIX dcterms: <http://purl.org/dc/terms/>
SELECT distinct ?sheetURI ?title
WHERE {
?sheetURI a micamodel:Sheet;
micamodel:hasContentType micamodel:MethodsAndTools;
dcterms:title ?title;
?hasMicaConcept ?d.
?d skos:broaderTransitive micavocab:0491ee9f6cf74dcda7ab92db86284c05 .
}
order by ?titleTo search for an other type of content (e.g. Documentation) just replace micamodel:MethodsAndTools by the appropriate corresponding type defined in types of content .
Select all flowSheets (URI and title) directly related to a given concept micavocab:0491ee9f6cf74dcda7ab92db86284c05.
PREFIX micavocab: <https://w3id.org/mica/ontology/MicaOntology/>
PREFIX micamodel: <https://w3id.org/mica/ontology/MicaModel#>
PREFIX dcterms: <http://purl.org/dc/terms/>
SELECT ?flowSheetURI ?title
WHERE {
?flowSheetURI a micamodel:FlowSheet;
dcterms:title ?title;
?hasMicaConcept micavocab:0491ee9f6cf74dcda7ab92db86284c05 .
}
order by ?titleSelect all flowSheets (URI and title) directly or undirectly (i.e. through subconcepts) related to a given concept micavocab:0491ee9f6cf74dcda7ab92db86284c05.
PREFIX micavocab: <https://w3id.org/mica/ontology/MicaOntology/>
PREFIX micamodel: <https://w3id.org/mica/ontology/MicaModel#>
PREFIX dcterms: <http://purl.org/dc/terms/>
SELECT distinct ?flowSheetURI ?title
WHERE {
?flowSheetURI a micamodel:FlowSheet;
dcterms:title ?title;
?hasMicaConcept ?d.
?d skos:broaderTransitive micavocab:0491ee9f6cf74dcda7ab92db86284c05 .
}
order by ?titlee.g. get all questions (URI , description) directly related to the a given concept micavocab:0491ee9f6cf74dcda7ab92db86284c05
PREFIX micavocab: <https://w3id.org/mica/ontology/MicaOntology/>
PREFIX micamodel: <https://w3id.org/mica/ontology/MicaModel#>
SELECT ?questionURI ?question
WHERE {
?questionURI a micamodel:MICAQuestion;
micamodel:question ?question;
?hasMicaConcept micavocab:0491ee9f6cf74dcda7ab92db86284c05 .
}
order by ?questione.g. get all questions (URI , description) directly or undirectly (i.e. through subconcepts) related to the a given concept micavocab:0491ee9f6cf74dcda7ab92db86284c05
PREFIX micavocab: <https://w3id.org/mica/ontology/MicaOntology/>
PREFIX micamodel: <https://w3id.org/mica/ontology/MicaModel#>
SELECT distinct ?questionURI ?question
WHERE {
?questionURI a micamodel:MICAQuestion;
micamodel:question ?question;
?hasMicaConcept ?d.
?d skos:broaderTransitive micavocab:0491ee9f6cf74dcda7ab92db86284c05 .
}
order by ?questionMain ontology (domain) concepts and tranversal ontologies concepts are defined in different concept schemes.
e.g. get all domain concepts (URI , label) related to the concept micavocab:0491ee9f6cf74dcda7ab92db86284c05
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX micavocab: <https://w3id.org/mica/ontology/MicaOntology/>
SELECT ?conceptURI ?label
WHERE {
?conceptURI a skos:Concept;
skos:prefLabel ?label;
skos:inScheme micavocab:DomainScheme;
skos:related micavocab:0491ee9f6cf74dcda7ab92db86284c05.
}
order by ?labelto get all the concepts of a concept scheme other than domain scheme just replace micavocab:DomainScheme URI by the corresponding MICA scheme URI.
e.g. get all commodities concepts (URI , label) related to the domain concept micavocab:0491ee9f6cf74dcda7ab92db86284c05
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX micavocab: <https://w3id.org/mica/ontology/MicaOntology/>
SELECT ?conceptURI ?label
WHERE {
?conceptURI a skos:Concept;
skos:prefLabel ?label;
skos:inScheme micavocab:CommoditiesScheme;
skos:related micavocab:0491ee9f6cf74dcda7ab92db86284c05.
}
order by ?labele.g. find URI, label and if they exist the definition and alternative labels of the domain concept micavocab:0491ee9f6cf74dcda7ab92db86284c05
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX owl: <http://www.w3.org/2002/07/owl#>
PREFIX micavocab: <https://w3id.org/mica/ontology/MicaOntology/>
SELECT ?label ?definition ?altLabel ?scheme ?uriSame
(group_concat(distinct ?broaderURI; separator = ";") AS ?broaderURIs)
(group_concat(distinct ?narrowerURI; separator = ";") AS ?narrowerURIs)
(group_concat(distinct ?relatedURI; separator = ";") AS ?relatedURIs)
WHERE {
micavocab:0491ee9f6cf74dcda7ab92db86284c05 skos:prefLabel ?label.
optional { micavocab:0491ee9f6cf74dcda7ab92db86284c05 skos:definition ?definition.}
optional { micavocab:0491ee9f6cf74dcda7ab92db86284c05 skos:altLabel ?altLabel.}
optional { micavocab:0491ee9f6cf74dcda7ab92db86284c05 skos:inScheme ?scheme.}
optional { micavocab:0491ee9f6cf74dcda7ab92db86284c05 owl:sameAs ?uriSame.}
optional { micavocab:0491ee9f6cf74dcda7ab92db86284c05 skos:broader ?broaderURI.}
optional { micavocab:0491ee9f6cf74dcda7ab92db86284c05 skos:narrower ?narrowerURI.}
optional { micavocab:0491ee9f6cf74dcda7ab92db86284c05 skos:related ?relatedURI.}
}
group by ?label ?definition ?altLabel ?scheme ?uriSamee.g. find URI, label and if they exist the definition and alternative labels of all the concepts containing the text "drilling"
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
SELECT ?conceptURI ?label ?definition ?altLabel
WHERE {
?conceptURI a skos:Concept;
skos:prefLabel ?label.
FILTER regex( ?label ,"drilling","i")
optional{
?conceptURI skos:definition ?definition.
FILTER regex( ?definition ,"drilling","i")
}
optional{
?conceptURI skos:altLabel ?altLabel.
FILTER regex( ?altLabel ,"drilling","i")
}
}
order by ?labelSheets can be of any type of MICAContentType MethodsAndTools, Documentation, Legislation... See MicaModel ontology.
e.g. get all Methods and Tools (URI and title)
PREFIX micamodel: <https://w3id.org/mica/ontology/MicaModel#>
PREFIX dcterms: <http://purl.org/dc/terms/>
SELECT ?sheetURI ?title
WHERE {
?sheetURI a micamodel:Sheet;
micamodel:hasContentType micamodel:MethodsAndTools;
dcterms:title ?title.
}
order by ?titleFor other type of content just replace micamodel:MethodsAndTools by the appropriate MicaModel ontology type. see types of content .
e.g. find all Methods and Tools related to the sheet micaresource:3928d0113e70425a8d26212e7db52247
PREFIX micaresource: <https://w3id.org/mica/resource/>
PREFIX micamodel: <https://w3id.org/mica/ontology/MicaModel#>
PREFIX dcterms: <http://purl.org/dc/terms/>
SELECT ?sheetURI ?title
WHERE {
?sheetURI a micamodel:Sheet;
dcterms:title ?title;
micamodel:hasContentType micamodel:MethodsAndTools;
micamodel:relatedTo micaresource:3928d0113e70425a8d26212e7db52247.
}
order by ?titleFor other type of sheets just replace micamodel:MethodsAndTools by the appropriate MicaModel ontology data type. see types of content .
eg get all the questions (URI and question) related to the sheet micaresource:3928d0113e70425a8d26212e7db52247
PREFIX micaresource: <https://w3id.org/mica/resource/>
PREFIX micamodel: <https://w3id.org/mica/ontology/MicaModel#>
SELECT ?questionURI ?question
WHERE {
?questionURI a micamodel:MICAQuestion;
micamodel:question ?question;
micamodel:relatedTo micaresource:3928d0113e70425a8d26212e7db52247.
}
order by ?questioneg get all the flowsheets (URI and title) related to the sheet micaresource:3928d0113e70425a8d26212e7db52247
PREFIX micaresource: <https://w3id.org/mica/resource/>
PREFIX micamodel: <https://w3id.org/mica/ontology/MicaModel#>
PREFIX dcterms: <http://purl.org/dc/terms/>
SELECT ?flowsheetURI ?title
WHERE {
?flowsheetURI a micamodel:FlowSheet;
dcterms:title ?title;
micamodel:relatedTo micaresource:3928d0113e70425a8d26212e7db52247.
}e.g. get all concepts (URI and label) related to the sheet micaresource:3928d0113e70425a8d26212e7db52247
PREFIX micaresource: <https://w3id.org/mica/resource/>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX micamodel: <https://w3id.org/mica/ontology/MicaModel#>
SELECT ?conceptURI ?label ?hasMicaConcept
WHERE {
micaresource:3928d0113e70425a8d26212e7db52247 ?hasMicaConcept ?conceptURI .
?conceptURI a skos:Concept;
skos:prefLabel ?label.
}e.g. find URI, label and if they exist the definition and alternative labels of a given sheet micaresource:3928d0113e70425a8d26212e7db52247
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX owl: <http://www.w3.org/2002/07/owl#>
PREFIX micavocab: <https://w3id.org/mica/ontology/MicaOntology/>
PREFIX dcterms: <http://purl.org/dc/terms/>
PREFIX micamodel: <https://w3id.org/mica/ontology/MicaModel#>
SELECT ?title ?summary ?publicURI
(group_concat(distinct ?micaResourceURI; separator = ";") AS ?micaResourceURIs)
(group_concat(distinct ?conceptURI; separator = ";") AS ?conceptURIs)
WHERE {
micaresource:3928d0113e70425a8d26212e7db52247 dcterms:title ?title;
micamodel:summary ?summary;
micamodel:publicURI ?publicURI;
optional { micaresource:3928d0113e70425a8d26212e7db52247 micamodel:relatedTo ?micaResourceURI.}
optional { micaresource:3928d0113e70425a8d26212e7db52247 ?hasMicaConcept ?conceptURI.}
}
group by ?title ?summary ?publicURITo get all statistics about a given sheet. For a given sheetURI. micaresource:3928d0113e70425a8d26212e7db52247
PREFIX micamodel: <https://w3id.org/mica/ontology/MicaModel#>
PREFIX micavocab: <https://w3id.org/mica/ontology/MicaOntology/>
PREFIX micaresource: <https://w3id.org/mica/resource/>
SELECT (count (DISTINCT ?methodURI) as ?methodsNb)
(count (DISTINCT ?documentationURI) as ?documentationNb)
(count (DISTINCT ?legislationURI) as ?legislationNb)
(count (DISTINCT ?dataURI) as ?dataNb)
(count (DISTINCT ?portalURI) as ?portalNb)
(count (DISTINCT ?articleURI) as ?articleNb)
(count (DISTINCT ?otherURI) as ?otherNb)
(count (DISTINCT ?flowsheetURI) as ?flowsheetNb)
(count (DISTINCT ?questionURI) as ?questionNb)
WHERE {
{
?methodURI micamodel:relatedTo micaresource:3928d0113e70425a8d26212e7db52247;
micamodel:hasContentType micamodel:MethodsAndTools.
}
union {
?documentationURI micamodel:relatedTo micaresource:3928d0113e70425a8d26212e7db52247;
micamodel:hasContentType micamodel:Documentation.
}
union {
?legislationURI micamodel:relatedTo micaresource:3928d0113e70425a8d26212e7db52247;
micamodel:hasContentType micamodel:Legislation.
}
union {
?dataURI micamodel:relatedTo micaresource:3928d0113e70425a8d26212e7db52247;
micamodel:hasContentType micamodel:Data.
}
union {
?portalURI micamodel:relatedTo micaresource:3928d0113e70425a8d26212e7db52247;
micamodel:hasContentType micamodel:Portal.
}
union {
?articleURI micamodel:relatedTo micaresource:3928d0113e70425a8d26212e7db52247;
micamodel:hasContentType micamodel:ArticlesAndReports.
}
union {
?otherURI micamodel:relatedTo micaresource:3928d0113e70425a8d26212e7db52247;
micamodel:hasContentType micamodel:Other.
}
union {
?flowSheetURI micamodel:relatedTo micaresource:3928d0113e70425a8d26212e7db52247;
a micamodel:FlowSheet.
}
union {
?questionURI micamodel:relatedTo micaresource:3928d0113e70425a8d26212e7db52247;
a micamodel:MICAQuestion.
}
}e.g. find all Methods and Tools (URI, title and summary) containing the text "de"
prefix micamodel: <https://w3id.org/mica/ontology/MicaModel#>
prefix dcterms: <http://purl.org/dc/terms/>
SELECT ?sheetURI ?title ?summary
WHERE {
?sheetURI a micamodel:Sheet;
dcterms:title ?title;
micamodel:hasContentType micamodel:MethodsAndTools;
FILTER regex( ?title ,"de","i")
micamodel:summary ?summary.
FILTER regex( ?summary ,"de","i")
}For other type of sheets just replace micamodel:MethodsAndTools by the appropriate MicaModel ontology data type. see types of content .
FlowSheets is an ordered list of Sheets MicaModel FlowSheet.
e.g. get all flowSheets(URI and title)
PREFIX micamodel: <https://w3id.org/mica/ontology/MicaModel#>
PREFIX dcterms: <http://purl.org/dc/terms/>
SELECT ?flowsheetURI ?title
WHERE {
?flowsheetURI a micamodel:FlowSheet;
dcterms:title ?title.
}prefix micaresource: <https://w3id.org/mica/resource/>
prefix micamodel: <https://w3id.org/mica/ontology/MicaModel#>
prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
SELECT ?micaKnowledgeElementURI ?role
WHERE {
micaresource:b86f2a6a40414626889222fbff4d9305 micamodel:hasElements/rdf:rest*/rdf:first ?element.
?element micamodel:role ?role;
micamodel:hasKnowledgeElement ?micaKnowledgeElementURI.
}e.g. find all Methods and Tools related to the sheet micaresource:b86f2a6a40414626889222fbff4d9305
PREFIX micaresource: <https://w3id.org/mica/resource/>
PREFIX micamodel: <https://w3id.org/mica/ontology/MicaModel#>
PREFIX dcterms: <http://purl.org/dc/terms/>
SELECT ?sheetURI ?title
WHERE {
?sheetURI a micamodel:Sheet;
dcterms:title ?title;
micamodel:hasContentType micamodel:MethodsAndTools;
micamodel:relatedTo micaresource:b86f2a6a40414626889222fbff4d9305.
}For other type of sheets just replace micamodel:MethodsAndTools by the appropriate MicaModel ontology data type. see types of content .
eg get all the questions (URI and question) related to the FlowSheet micaresource:b86f2a6a40414626889222fbff4d9305
PREFIX micaresource: <https://w3id.org/mica/resource/>
PREFIX micamodel: <https://w3id.org/mica/ontology/MicaModel#>
SELECT ?questionURI ?question
WHERE {
?questionURI a micamodel:MICAQuestion;
micamodel:question ?question;
micamodel:relatedTo micaresource:b86f2a6a40414626889222fbff4d9305.
}eg get all the flowsheets (URI and title) related to the FlowSheet micaresource:b86f2a6a40414626889222fbff4d9305
PREFIX micaresource: <https://w3id.org/mica/resource/>
PREFIX micamodel: <https://w3id.org/mica/ontology/MicaModel#>
PREFIX dcterms: <http://purl.org/dc/terms/>
SELECT ?flowsheetURI ?title
WHERE {
?flowsheetURI a micamodel:FlowSheet;
dcterms:title ?title;
micamodel:relatedTo micaresource:b86f2a6a40414626889222fbff4d9305.
}e.g. get all concepts (URI and label) related to the FlowSheet micaresource:b86f2a6a40414626889222fbff4d9305
PREFIX micaresource: <https://w3id.org/mica/resource/>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX micamodel: <https://w3id.org/mica/ontology/MicaModel#>
SELECT ?conceptURI ?label ?hasMicaConcept
WHERE {
micaresource:b86f2a6a40414626889222fbff4d9305 ?hasMicaConcept ?conceptURI .
?conceptURI a skos:Concept;
skos:prefLabel ?label.
}e.g. find URI, label and if they exist the definition and alternative labels of a given sheet micaresource:b86f2a6a40414626889222fbff4d9305
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX owl: <http://www.w3.org/2002/07/owl#>
PREFIX micavocab: <https://w3id.org/mica/ontology/MicaOntology/>
PREFIX dcterms: <http://purl.org/dc/terms/>
PREFIX micamodel: <https://w3id.org/mica/ontology/MicaModel#>
SELECT ?title ?summary
(group_concat(distinct ?micaResourceURI; separator = ";") AS ?micaResourceURIs)
(group_concat(distinct ?conceptURI; separator = ";") AS ?conceptURIs)
WHERE {
micaresource:b86f2a6a40414626889222fbff4d9305 dcterms:title ?title;
micamodel:summary ?summary;
optional { micaresource:b86f2a6a40414626889222fbff4d9305 micamodel:relatedTo ?micaResourceURI.}
optional { micaresource:b86f2a6a40414626889222fbff4d9305 ?hasMicaConcept ?conceptURI.}
}
group by ?title ?summary To get all statistics about a given sheet. For a given sheetURI. micaresource:b86f2a6a40414626889222fbff4d9305
PREFIX micamodel: <https://w3id.org/mica/ontology/MicaModel#>
PREFIX micavocab: <https://w3id.org/mica/ontology/MicaOntology/>
PREFIX micaresource: <https://w3id.org/mica/resource/>
SELECT (count (DISTINCT ?methodURI) as ?methodsNb)
(count (DISTINCT ?documentationURI) as ?documentationNb)
(count (DISTINCT ?legislationURI) as ?legislationNb)
(count (DISTINCT ?dataURI) as ?dataNb)
(count (DISTINCT ?portalURI) as ?portalNb)
(count (DISTINCT ?articleURI) as ?articleNb)
(count (DISTINCT ?otherURI) as ?otherNb)
(count (DISTINCT ?flowsheetURI) as ?flowsheetNb)
(count (DISTINCT ?questionURI) as ?questionNb)
WHERE {
{
?methodURI micamodel:relatedTo micaresource:b86f2a6a40414626889222fbff4d9305;
micamodel:hasContentType micamodel:MethodsAndTools.
}
union {
?documentationURI micamodel:relatedTo micaresource:b86f2a6a40414626889222fbff4d9305;
micamodel:hasContentType micamodel:Documentation.
}
union {
?legislationURI micamodel:relatedTo micaresource:b86f2a6a40414626889222fbff4d9305;
micamodel:hasContentType micamodel:Legislation.
}
union {
?dataURI micamodel:relatedTo micaresource:b86f2a6a40414626889222fbff4d9305;
micamodel:hasContentType micamodel:Data.
}
union {
?portalURI micamodel:relatedTo micaresource:b86f2a6a40414626889222fbff4d9305;
micamodel:hasContentType micamodel:Portal.
}
union {
?articleURI micamodel:relatedTo micaresource:b86f2a6a40414626889222fbff4d9305;
micamodel:hasContentType micamodel:ArticlesAndReports.
}
union {
?otherURI micamodel:relatedTo micaresource:b86f2a6a40414626889222fbff4d9305;
micamodel:hasContentType micamodel:Other.
}
union {
?flowSheetURI micamodel:relatedTo micaresource:b86f2a6a40414626889222fbff4d9305;
a micamodel:FlowSheet.
}
union {
?questionURI micamodel:relatedTo micaresource:b86f2a6a40414626889222fbff4d9305;
a micamodel:MICAQuestion.
}
}e.g. find all Methods and Tools (URI, title and summary) containing the text "de"
prefix micamodel: <https://w3id.org/mica/ontology/MicaModel#>
prefix dcterms: <http://purl.org/dc/terms/>
SELECT ?sheetURI ?title ?summary
WHERE {
?sheetURI a micamodel:FlowSheet;
dcterms:title ?title;
FILTER regex( ?title ,"de","i")
micamodel:summary ?summary.
FILTER regex( ?summary ,"de","i")
} PREFIX micamodel: <https://w3id.org/mica/ontology/MicaModel#>
SELECT ?questionURI ?question
WHERE {
?questionURI a micamodel:MICAQuestion;
micamodel:question ?question.
}e.g. get all Methods and Tools (URI and title) related to the question micaresource:1bfc399dfc314a8b81f50cfdf119cc9e
PREFIX micaresource: <https://w3id.org/mica/resource/>
PREFIX micamodel: <https://w3id.org/mica/ontology/MicaModel#>
PREFIX dcterms: <http://purl.org/dc/terms/>
SELECT ?sheetURI ?title
WHERE {
?sheetURI a micamodel:Sheet;
dcterms:title ?title;
micamodel:hasContentType micamodel:MethodsAndTools;
micamodel:relatedTo micaresource:1bfc399dfc314a8b81f50cfdf119cc9e.
}For other type of sheets just replace micamodel:MethodsAndTools by the appropriate MicaModel ontology data type. see types of content .
PREFIX micaresource: <https://w3id.org/mica/resource/>
PREFIX micamodel: <https://w3id.org/mica/ontology/MicaModel#>
SELECT ?questionURI ?question
WHERE {
?questionURI a micamodel:MICAQuestion;
micamodel:question ?question;
micamodel:relatedTo micaresource:1bfc399dfc314a8b81f50cfdf119cc9e.
}PREFIX micaresource: <https://w3id.org/mica/resource/>
PREFIX micamodel: <https://w3id.org/mica/ontology/MicaModel#>
PREFIX dcterms: <http://purl.org/dc/terms/>
SELECT ?flowsheetURI ?title
WHERE {
?flowsheetURI a micamodel:FlowSheet;
dcterms:title ?title;
micamodel:relatedTo micaresource:1bfc399dfc314a8b81f50cfdf119cc9e.
}To get all statistics about a given question. For a given questionURI. micaresource:1bfc399dfc314a8b81f50cfdf119cc9e
PREFIX micamodel: <https://w3id.org/mica/ontology/MicaModel#>
PREFIX micavocab: <https://w3id.org/mica/ontology/MicaOntology/>
PREFIX micaresource: <https://w3id.org/mica/resource/>
SELECT (count (DISTINCT ?methodURI) as ?methodsNb)
(count (DISTINCT ?documentationURI) as ?documentationNb)
(count (DISTINCT ?legislationURI) as ?legislationNb)
(count (DISTINCT ?dataURI) as ?dataNb)
(count (DISTINCT ?portalURI) as ?portalNb)
(count (DISTINCT ?articleURI) as ?articleNb)
(count (DISTINCT ?otherURI) as ?otherNb)
(count (DISTINCT ?flowsheetURI) as ?flowsheetNb)
(count (DISTINCT ?questionURI) as ?questionNb)
WHERE {
{
?methodURI micamodel:relatedTo micaresource:1bfc399dfc314a8b81f50cfdf119cc9e;
micamodel:hasContentType micamodel:MethodsAndTools.
}
union {
?documentationURI micamodel:relatedTo micaresource:1bfc399dfc314a8b81f50cfdf119cc9e;
micamodel:hasContentType micamodel:Documentation.
}
union {
?legislationURI micamodel:relatedTo micaresource:1bfc399dfc314a8b81f50cfdf119cc9e;
micamodel:hasContentType micamodel:Legislation.
}
union {
?dataURI micamodel:relatedTo micaresource:1bfc399dfc314a8b81f50cfdf119cc9e;
micamodel:hasContentType micamodel:Data.
}
union {
?portalURI micamodel:relatedTo micaresource:1bfc399dfc314a8b81f50cfdf119cc9e;
micamodel:hasContentType micamodel:Portal.
}
union {
?articleURI micamodel:relatedTo micaresource:1bfc399dfc314a8b81f50cfdf119cc9e;
micamodel:hasContentType micamodel:ArticlesAndReports.
}
union {
?otherURI micamodel:relatedTo micaresource:1bfc399dfc314a8b81f50cfdf119cc9e;
micamodel:hasContentType micamodel:Other.
}
union {
?flowSheetURI micamodel:relatedTo micaresource:1bfc399dfc314a8b81f50cfdf119cc9e;
a micamodel:FlowSheet.
}
union {
?questionURI micamodel:relatedTo micaresource:1bfc399dfc314a8b81f50cfdf119cc9e;
a micamodel:MICAQuestion.
}
}e.g. find metadata of a given question micaresource:1bfc399dfc314a8b81f50cfdf119cc9e
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX owl: <http://www.w3.org/2002/07/owl#>
PREFIX micavocab: <https://w3id.org/mica/ontology/MicaOntology/>
PREFIX dcterms: <http://purl.org/dc/terms/>
PREFIX micamodel: <https://w3id.org/mica/ontology/MicaModel#>
SELECT ?question
(group_concat(distinct ?micaResourceURI; separator = ";") AS ?micaResourceURIs)
(group_concat(distinct ?conceptURI; separator = ";") AS ?conceptURIs)
WHERE {
micaresource:1bfc399dfc314a8b81f50cfdf119cc9e micamodel:question ?question;
optional { micaresource:1bfc399dfc314a8b81f50cfdf119cc9e micamodel:relatedTo ?micaResourceURI.}
optional { micaresource:1bfc399dfc314a8b81f50cfdf119cc9e ?hasMicaConcept ?conceptURI.}
}
group by ?questione.g. get all questions containing the text "mining waste"
prefix micamodel: <https://w3id.org/mica/ontology/MicaModel#>
prefix dcterms: <http://purl.org/dc/terms/>
SELECT ?questionURI ?description
WHERE {
?questionURI a micamodel:MICAQuestion;
micamodel:question ?question.
FILTER regex( ?question ,"mining waste","i")
}