Dreams:effect: Difference between revisions

Line 87: Line 87:
   (CONCAT("#pattern/", SUBSTR(STR(?mønster), 38)) AS ?mønsterUrl)   
   (CONCAT("#pattern/", SUBSTR(STR(?mønster), 38)) AS ?mønsterUrl)   


   ?report ?reportLabel
   ?rapport ?rapportLabel
   (CONCAT("#report/", SUBSTR(STR(?report), 38)) AS ?reportUrl)   
   (CONCAT("#report/", SUBSTR(STR(?rapport), 38)) AS ?rapportUrl)   


   ?subject ?subjectLabel ?subjectUrl
   ?subjekt ?subjektLabel ?subjektUrl


   ?impact ?impactLabel ?impactUrl
   ?impact ?impactLabel ?impactUrl
Line 96: Line 96:
   ?recipient ?recipientLabel ?recipientUrl
   ?recipient ?recipientLabel ?recipientUrl


   ?significance ?significanceLabel
   ?signifikans ?signifikansLabel


   ?mitigation ?mitigationLabel ?mitigationUrl
   ?afbødning ?afbødningLabel ?afbødningUrl


   ?quote  
   ?quote  


   ?project_phase ?project_phaseLabel
   ?projektfase ?projektfaseLabel
   (CONCAT("#projectphase/", SUBSTR(STR(?project_phase), 38)) AS ?project_phaseUrl)   
   (CONCAT("#projectphase/", SUBSTR(STR(?projektfase), 38)) AS ?projektfaseUrl)   


   ?link ?linkUrl
   ?link ?linkUrl
Line 112: Line 112:


OPTIONAL {
OPTIONAL {
     ?mønster dreamst:P33 ?subject .
     ?mønster dreamst:P33 ?subjekt .
     ?subject rdfs:label ?subject_label .
     ?subjekt rdfs:label ?subjekt_label .
     FILTER(LANG(?subject_label) = 'da')
     FILTER(LANG(?subjekt_label) = 'da')
     BIND(CONCAT("#effect/", SUBSTR(STR(?subject), 38)) AS ?subjectUrl)
     BIND(CONCAT("#effect/", SUBSTR(STR(?subjekt), 38)) AS ?subjektUrl)
   }
   }
   OPTIONAL { ?mønster dreamst:P47 ?subject_text }
   OPTIONAL { ?mønster dreamst:P47 ?subjekt_text }
   BIND(COALESCE(?subject, ?subject_text, "") AS ?subject)
   BIND(COALESCE(?subjekt, ?subjekt_text, "") AS ?subjekt)
   BIND(CONCAT(?subject_text, " (", COALESCE(?subject_label, ""), ")") AS ?subjectLabel)
   BIND(CONCAT(?subjekt_text, " (", COALESCE(?subjekt_label, ""), ")") AS ?subjektLabel)
      
      
   OPTIONAL {
   OPTIONAL {
Line 142: Line 142:


   OPTIONAL {
   OPTIONAL {
     ?mønster dreamst:P56 ?mitigation .
     ?mønster dreamst:P56 ?afbødning .
     ?mitigation rdfs:label ?mitigation_label .
     ?afbødning rdfs:label ?afbødning_label .
     FILTER (LANG(?mitigation_label) = 'da')
     FILTER (LANG(?afbødning_label) = 'da')
     BIND(CONCAT("#effect/", SUBSTR(STR(?mitigation), 38)) AS ?mitigationUrl)
     BIND(CONCAT("#effect/", SUBSTR(STR(?afbødning), 38)) AS ?afbødningUrl)
   }
   }
   OPTIONAL { ?mønster dreamst:P53 ?mitigation_text }
   OPTIONAL { ?mønster dreamst:P53 ?afbødning_text }
   BIND(COALESCE(?mitigation, ?mitigation_text) AS ?mitigation)
   BIND(COALESCE(?afbødning, ?afbødning_text) AS ?afbødning)
   BIND(CONCAT(?mitigation_text, " (", COALESCE(?mitigation_label, ""), ")") AS ?mitigationLabel)
   BIND(CONCAT(?afbødning_text, " (", COALESCE(?afbødning_label, ""), ")") AS ?afbødningLabel)


   OPTIONAL { ?mønster dreamst:P18 ?quote . }
   OPTIONAL { ?mønster dreamst:P18 ?quote . }
   OPTIONAL { ?mønster dreamst:P19 ?project_phase . }
   OPTIONAL { ?mønster dreamst:P19 ?projektfase . }
   OPTIONAL { ?mønster dreamst:P20 ?report . }
   OPTIONAL { ?mønster dreamst:P20 ?rapport . }


   OPTIONAL {
   OPTIONAL {
     ?mønster dreamst:P21 ?significance .
     ?mønster dreamst:P21 ?signifikans .
     ?significance rdfs:label ?significance_text .
     ?signifikans rdfs:label ?signifikans_text .
     FILTER (LANG(?significance_text) = 'da')
     FILTER (LANG(?signifikans_text) = 'da')
     OPTIONAL { ?significance dreamst:P44 ?symbol . }
     OPTIONAL { ?signifikans dreamst:P44 ?symbol . }
     BIND(IF(BOUND(?symbol), ?symbol, "❓") AS ?significance_symbol)
     BIND(IF(BOUND(?symbol), ?symbol, "❓") AS ?signifikans_symbol)
     BIND(CONCAT(?significance_symbol, " ", ?significance_text) AS ?significanceLabel)
     BIND(CONCAT(?signifikans_symbol, " ", ?signifikans_text) AS ?signifikansLabel)
   }
   }


   OPTIONAL {
   OPTIONAL {
     ?mønster dreamst:P20 ?report .
     ?mønster dreamst:P20 ?rapport .
     ?report dreamst:P40 ?miljøportal .
     ?rapport dreamst:P40 ?miljøportal .
     OPTIONAL { ?mønster dreamst:P46 ?page }
     OPTIONAL { ?mønster dreamst:P46 ?page }
     BIND(IF(BOUND(?page), CONCAT(?page, " ↗"), " ↗") AS ?link)
     BIND(IF(BOUND(?page), CONCAT(?page, " ↗"), " ↗") AS ?link)