Dreams:effect: Difference between revisions

 
(47 intermediate revisions by the same user not shown)
Line 1: Line 1:
== Data ==
== Effektdata ==
{{SPARQL | query=
{{SPARQL | query=
PREFIX target: <https://dreams.wikibase.cloud/entity/Q12>
PREFIX target: <https://dreams.wikibase.cloud/entity/Q179>
PREFIX dreams: <https://dreams.wikibase.cloud/entity/>
PREFIX dreams: <https://dreams.wikibase.cloud/entity/>
PREFIX dreamst: <https://dreams.wikibase.cloud/prop/direct/>
PREFIX dreamst: <https://dreams.wikibase.cloud/prop/direct/>
PREFIX dreamsp: <https://dreams.wikibase.cloud/prop/>
PREFIX dreamsp: <https://dreams.wikibase.cloud/prop/>
PREFIX dreamspsv: <https://dreams.wikibase.cloud/prop/statement/value/>  
PREFIX dreamspsv: <https://dreams.wikibase.cloud/prop/statement/værdi/>  


SELECT DISTINCT ?description ?value ?valueLabel ?valueUrl
SELECT DISTINCT (?description AS ?beskrivelse) ?værdi ?værdiLabel ?værdiUrl
WHERE {
WHERE {
   BIND(target: AS ?effect)
   BIND(target: AS ?effect)
   {
   {
     BIND(1 AS ?order)
     BIND(1 AS ?order)
     BIND("Effect" AS ?description)
     BIND("Effekt" AS ?description)
     BIND(target: AS ?value) .
     BIND(target: AS ?værdi) .
   }
   }
   UNION
   UNION
   {
   {
     BIND(5 AS ?order)
     BIND(5 AS ?order)
     BIND("Superconcept" AS ?description)
     BIND("Overbegreb" AS ?description)
     target: dreamst:P10 ?value .
     target: dreamst:P10 ?værdi .
     BIND(SUBSTR(STR(?value), 38) AS ?q)  
     BIND(SUBSTR(STR(?værdi), 38) AS ?q)  
     BIND(CONCAT("#effect/", ?q) AS ?valueUrl)
     BIND(CONCAT("#effect/", ?q) AS ?værdiUrl)
  }
  UNION
  {
    BIND(6 AS ?order)
    BIND("Underbegreb" AS ?description)
    target: ^dreamst:P10 ?værdi .
    BIND(SUBSTR(STR(?værdi), 38) AS ?q)
    BIND(CONCAT("#effect/", ?q) AS ?værdiUrl)
   }
   }
   UNION
   UNION
   {
   {
     BIND(6 AS ?order)
     BIND(6 AS ?order)
     BIND("Subconcepts" AS ?description)
     BIND("Påvirker" AS ?description)
     target: ^dreamst:P10 ?value .
    target: dreamst:P9 ?værdi .
     BIND(SUBSTR(STR(?value), 38) AS ?q)  
    BIND(CONCAT("#effect/", SUBSTR(STR(?værdi), 38)) AS ?værdiUrl)
     BIND(CONCAT("#effect/", ?q) AS ?valueUrl)
  }
  UNION
  {
    BIND(2 AS ?order)
    BIND("Er påvirket af" AS ?description)
     target: ^dreamst:P9 ?værdi .
    BIND(CONCAT("#effect/", SUBSTR(STR(?værdi), 38)) AS ?værdiUrl)
  }
  UNION
  {
    BIND(10 AS ?order)
    BIND("SDG" AS ?description)
    target:  dreamst:P10* / dreamst:P10* / dreamst:P42 ?værdi .
     BIND(CONCAT("#sdg/", SUBSTR(STR(?værdi), 38)) AS ?værdiUrl)
  }
  UNION
  {
    BIND(11 AS ?order)
    BIND("arter.dk" AS ?description)
    target: dreamst:P45 ?værdi_ .
     BIND(CONCAT(?værdi_, " ↗") AS ?værdi)
    BIND(CONCAT("https://arter.dk/taxa/taxon/details/", ?værdi_) AS ?værdiUrl)
   }
   }
  UNION
  {
    BIND(20 AS ?order)
    BIND("Scholia" AS ?description)
    target: dreamst:P3 ?værdi_ .
    BIND(CONCAT(?værdi_, " ↗") AS ?værdi)
    BIND(CONCAT("https://scholia.toolforge.org/topic/", ?værdi_) AS ?værdiUrl)
  }
 
   SERVICE wikibase:label { bd:serviceParam wikibase:language "da,en". }
   SERVICE wikibase:label { bd:serviceParam wikibase:language "da,en". }
}
}
}}
ORDER BY ?order}}


== Affects ==
== Mønstre ==
{{SPARQL | query=
{{SPARQL | query=
PREFIX target: <https://dreams.wikibase.cloud/entity/Q6>
 
 
PREFIX target: <https://dreams.wikibase.cloud/entity/Q309>
PREFIX dreams: <https://dreams.wikibase.cloud/entity/>
PREFIX dreams: <https://dreams.wikibase.cloud/entity/>
PREFIX dreamst: <https://dreams.wikibase.cloud/prop/direct/>
PREFIX dreamst: <https://dreams.wikibase.cloud/prop/direct/>
Line 43: Line 83:
PREFIX dreamspsv: <https://dreams.wikibase.cloud/prop/statement/value/>  
PREFIX dreamspsv: <https://dreams.wikibase.cloud/prop/statement/value/>  


SELECT
SELECT DISTINCT
   ?pattern ?patternLabel
   ?mønster ("🔍" AS ?mønsterLabel)
   (CONCAT("#pattern/", SUBSTR(STR(?pattern), 38)) AS ?patternUrl)   
   (CONCAT("#pattern/", SUBSTR(STR(?mønster), 38)) AS ?mønsterUrl)   


   ?affected ?affectedLabel
   ?rapport ?rapportLabel
   (CONCAT("#effect/", SUBSTR(STR(?affected), 38)) AS ?affectedUrl)   
   (CONCAT("#report/", SUBSTR(STR(?rapport), 38)) AS ?rapportUrl)   


   ?significance
   ?subjekt ?subjektLabel ?subjektUrl


   ?quote
   ?påvirkning ?påvirkningLabel ?påvirkningUrl


   ?project_phase ?project_phaseLabel
   ?recipient ?recipientLabel ?recipientUrl
  (CONCAT("#project-phase/", SUBSTR(STR(?project_phase), 38)) AS ?project_phaseUrl) 


   ?project_type ?project_typeLabel
   ?signifikans ?signifikansLabel
  (CONCAT("#project-type/", SUBSTR(STR(?project_type), 38)) AS ?project_typeUrl) 


   ?report ?reportLabel
   ?afbødning ?afbødningLabel ?afbødningUrl
  (CONCAT("#report/", SUBSTR(STR(?report), 38)) AS ?reportUrl) 


WHERE {
   ?quote  
   ?pattern dreamst:P2 dreams:Q263 ;
          dreamst:P33 target: ;
          dreamst:P34 ?affected ;
          dreamst:P18 ?quote ;
          dreamst:P20 ?report .
  OPTIONAL {
  ?pattern dreamst:P21 ?significance_ .
  BIND(IF(?significance_ = dreams:Q78, "🔴",
        IF(?significance_ = dreams:Q176, "🔴🔴",
        IF(?significance_ = dreams:Q231, "😀",
        "❓"))) AS ?significance)
  }
  OPTIONAL { ?pattern dreamst:P19 ?project_phase . }
  OPTIONAL { ?pattern dreamst:P16 ?project_type . }
  SERVICE wikibase:label { bd:serviceParam wikibase:language "da,en". }
}
}}


== Is affected by ==
  ?projektfase ?projektfaseLabel
{{SPARQL | query=
  (CONCAT("#projectphase/", SUBSTR(STR(?projektfase), 38)) AS ?projektfaseUrl) 
PREFIX target: <https://dreams.wikibase.cloud/entity/Q6>
PREFIX dreams: <https://dreams.wikibase.cloud/entity/>
PREFIX dreamst: <https://dreams.wikibase.cloud/prop/direct/>
PREFIX dreamsp: <https://dreams.wikibase.cloud/prop/>
PREFIX dreamspsv: <https://dreams.wikibase.cloud/prop/statement/value/>


SELECT
   ?link ?linkUrl
   ?pattern ?patternLabel
  (CONCAT("#pattern/", SUBSTR(STR(?pattern), 38)) AS ?patternUrl) 


   ?effect ?effectLabel
WHERE {
  (CONCAT("#effect/", SUBSTR(STR(?effect), 38)) AS ?effectUrl) 
   ?mønster dreamst:P2 dreams:Q263 ;
          ( dreamst:P33 | dreamst:P34 | dreamst:P55 | dreamst:P56  ) / dreamst:P10* target: .


   ?significance
OPTIONAL {
    ?mønster dreamst:P33 ?subjekt .
    ?subjekt rdfs:label ?subjekt_label .
    FILTER(LANG(?subjekt_label) = 'da')
    BIND(CONCAT("#effect/", SUBSTR(STR(?subjekt), 38)) AS ?subjektUrl)
   }
  OPTIONAL { ?mønster dreamst:P47 ?subjekt_text }
  BIND(COALESCE(?subjekt, ?subjekt_text, "") AS ?subjekt)
  BIND(CONCAT(?subjekt_text, " (", COALESCE(?subjekt_label, ""), ")") AS ?subjektLabel)
   
  OPTIONAL {
    ?mønster dreamst:P34 ?påvirkning .
    ?påvirkning rdfs:label ?påvirkning_label .
    FILTER (LANG(?påvirkning_label) = 'da')
    BIND(CONCAT("#effect/", SUBSTR(STR(?påvirkning), 38)) AS ?påvirkningUrl)
  }
  OPTIONAL { ?mønster dreamst:P49 ?påvirkning_text }
  BIND(COALESCE(?påvirkning, ?påvirkning_text) AS ?påvirkning)
  BIND(CONCAT(?påvirkning_text, " (", COALESCE(?påvirkning_label, ""), ")") AS ?påvirkningLabel)


   ?quote
   OPTIONAL {
    ?mønster dreamst:P55 ?recipient .
    ?recipient rdfs:label ?recipient_label .
    FILTER (LANG(?recipient_label) = 'da')
    BIND(CONCAT("#effect/", SUBSTR(STR(?recipient), 38)) AS ?recipientUrl)
  }
  OPTIONAL { ?mønster dreamst:P54 ?recipient_text }
  BIND(COALESCE(?recipient, ?recipient_text) AS ?recipient)
  BIND(CONCAT(?recipient_text, " (", COALESCE(?recipient_label, ""), ")") AS ?recipientLabel)


   ?project_phase ?project_phaseLabel
   OPTIONAL {
  (CONCAT("#project-phase/", SUBSTR(STR(?project_phase), 38)) AS ?project_phaseUrl)
    ?mønster dreamst:P56 ?afbødning .
    ?afbødning rdfs:label ?afbødning_label .
    FILTER (LANG(?afbødning_label) = 'da')
    BIND(CONCAT("#effect/", SUBSTR(STR(?afbødning), 38)) AS ?afbødningUrl)
  }
  OPTIONAL { ?mønster dreamst:P53 ?afbødning_text }
  BIND(COALESCE(?afbødning, ?afbødning_text) AS ?afbødning)
  BIND(CONCAT(?afbødning_text, " (", COALESCE(?afbødning_label, ""), ")") AS ?afbødningLabel)


   ?project_type ?project_typeLabel
   OPTIONAL { ?mønster dreamst:P18 ?quote . }
   (CONCAT("#project-type/", SUBSTR(STR(?project_type), 38)) AS ?project_typeUrl) 
   OPTIONAL { ?mønster dreamst:P19 ?projektfase . }
  OPTIONAL { ?mønster dreamst:P20 ?rapport . }


   ?report ?reportLabel
   OPTIONAL {
  (CONCAT("#report/", SUBSTR(STR(?report), 38)) AS ?reportUrl)
    ?mønster dreamst:P21 ?signifikans .
    ?signifikans rdfs:label ?signifikans_text .
    FILTER (LANG(?signifikans_text) = 'da')
    OPTIONAL { ?signifikans dreamst:P44 ?symbol . }
    BIND(IF(BOUND(?symbol), ?symbol, "") AS ?signifikans_symbol)
    BIND(CONCAT(?signifikans_symbol, " ", ?signifikans_text) AS ?signifikansLabel)
  }


WHERE {
  ?pattern dreamst:P2 dreams:Q263 ;
          dreamst:P33 ?effect ;
          dreamst:P34 target: ;
          dreamst:P18 ?quote ;
          dreamst:P20 ?report .
   OPTIONAL {
   OPTIONAL {
  ?pattern dreamst:P21 ?significance_ .
    ?mønster dreamst:P20 ?rapport .
  BIND(IF(?significance_ = dreams:Q78, "🔴",  
    ?rapport dreamst:P40 ?miljøportal .
        IF(?significance_ = dreams:Q176, "🔴🔴",  
    OPTIONAL { ?mønster dreamst:P46 ?page }
        IF(?significance_ = dreams:Q231, "😀",  
    BIND(IF(BOUND(?page), CONCAT(?page, " "), " ↗") AS ?link)
        ""))) AS ?significance)
    BIND(CONCAT("https://daieproddreamspdfsto.blob.core.windows.net/files/", STR(?miljøportal),  
                IF(BOUND(?page), CONCAT("#page=", ?page), "")) AS ?linkUrl)
   }
   }
  OPTIONAL { ?pattern dreamst:P19 ?project_phase . }
 
  OPTIONAL { ?pattern dreamst:P16 ?project_type . }
   SERVICE wikibase:label { bd:serviceParam wikibase:language "da,en". }
   SERVICE wikibase:label { bd:serviceParam wikibase:language "da,en". }
}
}
}}
}}