Queries

Some sampling queries.

Prefixes

PREFIX :   <https://w3id.org/mica/resource/factsheet/>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX owl: <http://www.w3.org/2002/07/owl#>
PREFIX model: <https://w3id.org/mica/ontology/MicaModel#>
PREFIX micavocab: <https://w3id.org/mica/ontology/MicaOntology/>
PREFIX org: <https://w3id.org/mica/resource/organization/> 
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
PREFIX dcterms: <http://purl.org/dc/terms/>

List of direct sub concepts of a given concept

e.g. direct sub concepts of D8 International Reporting concept with their `skos:prefLabel`

SELECT DISTINCT ?domain ?prefLabel
WHERE {
   micavocab:D8InternationalReporting skos:narrower ?domain.
   ?domain skos:prefLabel ?prefLabel.
}

results

domainprefLabel
micavocab:SustainableDevelopmentReporting"Sustainable development reporting"@en
micavocab:CorporateSocialResponsability_2"Corporate social responsability (D8 INTERNATIONAL REPORTING)"@en
micavocab:ImpactBenefitAgreements"Impact benefit agreements"@en
micavocab:ToCommunities"To communities"@en
micavocab:InternationalReportingOfResourcesAndReserves"International reporting of resources and reserves"@en
micavocab:ToEmployees"To employees"@en
micavocab:ShareholderInformation"Shareholder information"@en

List of factsheets related to a given domain concept

List of factsheets directly related to a given domain concept

e.g. factsheets for D8 International Reporting domain.

SELECT DISTINCT ?factsheet ?title
WHERE {
    ?factsheet rdf:type model:FactSheet;
               dcterms:title ?title;
                 model:hasDomainConcept micavocab:D8InternationalReporting.
}

result

factsheettitle
:BackCasting"Back-Casting"@en
:CIA"Cross Impact Analysis"@en
:CLA"Causal Layered Analysis"@en
:DelphiSurveys"Delphi Surveys"@en
:DPSIR"DPSIR Framework"@en
:FocusGroups"Citizens panel or Focus Groups"@en
:GeniusForecasting-MinPol"Genius Forecasting"@en
:MindMapping"Mind mapping"@en
:MorphAnalysis"Morphological Analysis"@en
:RelevanceTree"Relevance Tree"@en
:ScenarioDevelopment"Scenario Development"@en
:SeriousGaming"Serious Gaming"@en
:STEEPLEDAnalysis"STEEP(LED) Analysis"@en
:SWOT"SWOT Analyses"@en
:TE"Trend Extrapolation"@en
List of factsheets related to sub concepts of a given domain concept

e.g. factsheets related to sub concepts of D8 International Reporting domain concept.

SELECT DISTINCT ?factsheet ?title ?domainLabel
WHERE {
    ?factsheet rdf:type model:FactSheet;
               dcterms:title ?title;
               model:hasDomainConcept ?d.
    ?d skos:broaderTransitive micavocab:D8InternationalReporting;
       skos:prefLabel ?domainLabel.
} ORDER BY ?factsheet

this query retreives all the factsheets that have any domain that is a sub concept of D8 International Reporting as domain and gives the domain labels.

result

factsheettitledomainLabel
:2DPredictivityMapping"2D - Predictive Mapping"@en"International reporting of resources and reserves"@en
:2DPredictivityMapping"2D - Predictive Mapping"@en"Sustainable development reporting"@en
:LCA"Life Cycle Analysis (LCA)"@en"Corporate social responsability (D8 INTERNATIONAL REPORTING)"@en
:LCA"Life Cycle Analysis (LCA)"@en"Impact benefit agreements"@en
:LCA"Life Cycle Analysis (LCA)"@en"Sustainable development reporting"@en
:LCA"Life Cycle Analysis (LCA)"@en"To communities"@en
:MineClosureProcess"Mine closure process (overview of different phases and actions)"@en"Corporate social responsability (D8 INTERNATIONAL REPORTING)"@en
:PermittingLicensingAtEULevel"Permitting/Licensing at EU level"@en"Corporate social responsability (D8 INTERNATIONAL REPORTING)"@en
:PermittingLicensingAtEULevel"Permitting/Licensing at EU level"@en"To communities"@en
List of factsheets related to a given domain concept (directly or through subconcepts)

e.g. factsheets related (directly or undirectly through subconcepts) to D8 International Reporting domain concept.

SELECT DISTINCT ?factsheet ?title 
WHERE {
  {
    ?factsheet rdf:type model:FactSheet;
               dcterms:title ?title;
               model:hasDomainConcept ?d.
    ?d skos:broaderTransitive micavocab:D8InternationalReporting;
  } 
  UNION 
  {
    ?factsheet rdf:type model:FactSheet;
               dcterms:title ?title;
               model:hasDomainConcept  micavocab:D8InternationalReporting;
  }
} ORDER BY ?factsheet

result

factsheettitle
:2DPredictivityMapping"2D - Predictive Mapping"@en
:BackCasting"Back-Casting"@en
:CIA"Cross Impact Analysis"@en
:CLA"Causal Layered Analysis"@en
:DPSIR"DPSIR Framework"@en
:DelphiSurveys"Delphi Surveys"@en
:FocusGroups"Citizens panel or Focus Groups"@en
:GeniusForecasting-MinPol"Genius Forecasting"@en
:LCA"Life Cycle Analysis (LCA)"@en
:MindMapping"Mind mapping"@en
:MineClosureProcess"Mine closure process (overview of different phases and actions)"@en
:MorphAnalysis"Morphological Analysis"@en
:PermittingLicensingAtEULevel"Permitting/Licensing at EU level"@en
:RelevanceTree"Relevance Tree"@en
:STEEPLEDAnalysis"STEEP(LED) Analysis"@en
:SWOT"SWOT Analyses"@en
:ScenarioDevelopment"Scenario Development"@en
:SeriousGaming"Serious Gaming"@en
:TE"Trend Extrapolation"@en

the previous query can be written differently using a filter instead of a union, giving the same results.

SELECT DISTINCT ?factsheet ?title 
WHERE {
    ?factsheet rdf:type model:FactSheet;
               dcterms:title ?title;
               model:hasDomainConcept ?d.
    FILTER ( 
      ?d = micavocab:D8InternationalReporting || 
      EXISTS {?d skos:broaderTransitive micavocab:D8InternationalReporting. } 
   )

} ORDER BY ?factsheet

List of factsheets relevant to concepts related to a given concept

In the following examples are presented SPARQL queries that exploit the `skos:related` links that exists between concepts (here domain and methods concepts).

To perform these queries we are using the dataset graph presented in the image below.

dataset graph

Q1: for a given factsheet `f1` (e.g. `FSD2`) find all factsheets concerning methods concept that are related to `f1` domain concept.

SELECT DISTINCT ?fsm
WHERE {
  :FSD2 model:hasDomainConcept ?d.
  ?m  skos:inScheme micavocab:MethodsScheme;
      skos:related ?d.
  ?fsm model:hasMethodConcept ?m.
} ORDER by ?fsm

result

fsm
:FSM1

Q2: for a given factsheet `f1` (e.g. `FSD2`) find all factsheets concerning methods concept that are related to `f1` domain concept __or that are sub concepts of a method concept related to f1 domain concept__.

SELECT DISTINCT ?fsm 
WHERE {
  :FSD2 model:hasDomainConcept ?d.
  ?m  skos:inScheme micavocab:MethodsScheme;
      skos:related ?d.
  {
     ?fsm model:hasMethodConcept ?m.
  }
  UNION 
  {
    ?m1 skos:broaderTransitive ?m.
    ?fsm model:hasMethodConcept ?m1.
  }
} ORDER by ?fsm

results

fsm
:FSM1
:FSM2

Q3: for a given factsheet f1 (e.g. FSD2) find all factsheets concerning methods concepts that are related to f1 domain concept __or to a sub concept of f1 domain concept__ or that are sub concepts of a method concept related to f1 domain concept __or to a sub concept of f1 domain concept__.

SELECT DISTINCT ?fsm
WHERE {
  :FSD2 model:hasDomainConcept ?d.
  {
     ?m  skos:inScheme micavocab:MethodsScheme;
          skos:related ?d.
     {
        ?fsm model:hasMethodConcept ?m.
     }
     UNION 
     {
        ?m1 skos:broaderTransitive ?m.
        ?fsm model:hasMethodConcept ?m1.
     }
  } 
  UNION {
     ?d1 skos:broaderTransitive ?d.
     ?m  skos:inScheme micavocab:MethodsScheme;
         skos:related ?d1.
     {
       ?fsm model:hasMethodConcept ?m.
     }
     UNION 
     {
        ?m1 skos:broaderTransitive ?m.
        ?fsm model:hasMethodConcept ?m1.
     }
  }
} ORDER by ?fsm

results

fsm
:FSM1
:FSM2
:FSM3
:FSM4

Q4: find all factsheets concerning (directly or indirectly) a given domain (e.g. `Hibernating Stocks`) and for each factsheet find related factsheet (using methods concepts related directly or indirectly to the domain concepts)

SELECT DISTINCT ?fsd ?d ?fsm ?meth
WHERE {
  {
    ?fsd model:hasDomainConcept ?d.
     FILTER( ?d = micavocab:HibernatingStocks_1 || EXISTS {?d skos:broaderTransitive micavocab:HibernatingStocks_1})
  }
  OPTIONAL {
    {
       ?m  skos:inScheme micavocab:MethodsScheme;
           skos:related ?d.
       {
          ?fsm model:hasMethodConcept ?m.
          BIND (?m as ?meth)
       }
       UNION 
       {
          ?m1 skos:broaderTransitive ?m.
          ?fsm model:hasMethodConcept ?m1.
          BIND (?m1 as ?meth)
       }
    } 
    UNION 
    {
       ?d1 skos:broaderTransitive ?d.
       ?m  skos:inScheme micavocab:MethodsScheme;
           skos:related ?d1.
       {
           ?fsm model:hasMethodConcept ?m.
           BIND (?m as ?meth)
       }
       UNION 
       {
           ?m1 skos:broaderTransitive ?m.
           ?fsm model:hasMethodConcept ?m1.
           BIND (?m1 as ?meth)
       }
    }
  }
} ORDER by ?fsd ?fsm

results

fsddfsmmeth
:FSD1micavocab:HibernatingStocks_1:FSM1micavocab:InputsAndOutputsOfIndustrialProcesses
:FSD1micavocab:HibernatingStocks_1:FSM2micavocab:EWE1
:FSD1micavocab:HibernatingStocks_1:FSM3micavocab:StockAssessments
:FSD1micavocab:HibernatingStocks_1:FSM4micavocab:SA1
:FSD2micavocab:MiningWastes:FSM1micavocab:InputsAndOutputsOfIndustrialProcesses
:FSD2micavocab:MiningWastes:FSM2micavocab:EWE1
:FSD2micavocab:MiningWastes:FSM3micavocab:StockAssessments
:FSD2micavocab:MiningWastes:FSM4micavocab:SA1
:FSD3micavocab:Tailings
:FSD4micavocab:DrillingMudsAndOtherDrillingWastes:FSM3micavocab:StockAssessments
:FSD4micavocab:DrillingMudsAndOtherDrillingWastes:FSM4micavocab:SA1

All factsheets written by members of a given organization

e.g. all factsheets written by members of BRGM.

SELECT DISTINCT ?factsheet ?member ?firstName ?lastName
WHERE {
    ?factsheet rdf:type model:FactSheet;
               model:hasWriter ?member .
    ?member foaf:member org:BRGM;
            foaf:givenName ?firstName;
            foaf:familyName ?lastName.

} ORDER BY ?member ?factsheet

results

SELECT DISTINCT ?factsheet ?member ?firstName ?lastName
factsheetmemberfirstNamelastName
:2DPredictivityMappinghttps://w3id.org/mica/resource/person/BrunoTourliere"Bruno""Tourliere"
:MineClosureProcesshttps://w3id.org/mica/resource/person/DanielCassard"Daniel""Cassard"
:PermittingLicensingAtEULevelhttps://w3id.org/mica/resource/person/DanielCassard"Daniel""Cassard"

[[5]] All sheets (fact, doc et def sheets) written by given person

e.g. all sheets written by Daniel Cassard.

add these prefix for defsheets, docsheets and factsheets

PREFIX person: <https://w3id.org/mica/resource/person/>
PREFIX defsheet: <https://w3id.org/mica/resource/defsheet/> 
PREFIX docsheet: <https://w3id.org/mica/resource/docsheet/> 
PREFIX factsheet: <https://w3id.org/mica/resource/factsheet/> 

the query

SELECT DISTINCT ?sheet ?title
WHERE {
    ?sheet dcterms:title ?title;
           model:hasWriter person:DanielCassard .

} ORDER BY ?sheet

result

sheettitle
docsheet:DepositsGroupsTypesBRGM"Mineral deposits groups and types"@en
docsheet:MineralDepositsMINATURA2020"Mineral deposits of public importance: the MINATURA2020 Approach"@en
docsheet:SubstitutionCRM"Substitution: the CRM_InnoNet vision"@en
factsheet:MineClosureProcess"Mine closure process (overview of different phases and actions)"@en
factsheet:PermittingLicensingAtEULevel"Permitting/Licensing at EU level"@en