Dreams:report: Difference between revisions

 
(10 intermediate revisions by the same user not shown)
Line 14: Line 14:
   {
   {
     BIND(1 AS ?order)
     BIND(1 AS ?order)
     BIND("Title" AS ?beskrivelse)
     BIND("Titel" AS ?beskrivelse)
     ?work dreamst:P1 ?værdi .
     ?work dreamst:P1 ?værdi .
   }
   }
Line 20: Line 20:
   {
   {
     BIND(2 AS ?order)
     BIND(2 AS ?order)
     BIND("Author" AS ?beskrivelse)
     BIND("Forfatter" AS ?beskrivelse)
     target: dreamst:P24 ?iri .
     target: dreamst:P24 ?iri .
     BIND(SUBSTR(STR(?iri), 38) AS ?q)  
     BIND(SUBSTR(STR(?iri), 38) AS ?q)  
Line 30: Line 30:
   {
   {
     BIND(2.5 AS ?order)
     BIND(2.5 AS ?order)
     BIND("Language" AS ?beskrivelse)
     BIND("Sprog" AS ?beskrivelse)
     ?work dreamst:P11 ?iri .
     ?work dreamst:P11 ?iri .
     ?iri rdfs:label ?værdi_string .
     ?iri rdfs:label ?værdi_string .
Line 39: Line 39:
   {
   {
     BIND(6 AS ?order)
     BIND(6 AS ?order)
     BIND("Publication date" AS ?beskrivelse)
     BIND("Udgivelsesdato" AS ?beskrivelse)
     ?work dreamsp:P6 / dreamspsv:P6 ?publication_date_værdi .
     ?work dreamsp:P6 / dreamspsv:P6 ?publication_date_værdi .
     ?publication_date_værdi wikibase:timePrecision ?time_precision ;
     ?publication_date_værdi wikibase:timePrecision ?time_precision ;
Line 48: Line 48:
   {
   {
     BIND(7 AS ?order)
     BIND(7 AS ?order)
     BIND("Publisher" AS ?beskrivelse)
     BIND("Udgiver" AS ?beskrivelse)
     ?work dreamst:P26 ?iri .
     ?work dreamst:P26 ?iri .
     BIND(SUBSTR(STR(?iri), 38) AS ?q)  
     BIND(SUBSTR(STR(?iri), 38) AS ?q)  
Line 59: Line 59:
   {
   {
     BIND(10 AS ?order)
     BIND(10 AS ?order)
     BIND("Project type" AS ?beskrivelse)
     BIND("Projekttype" AS ?beskrivelse)
     ?work dreamst:P16 ?værdi .
     ?work dreamst:P16 ?værdi .
     BIND(CONCAT("#projecttype/", SUBSTR(STR(?værdi), 38)) AS ?værdiUrl)
     BIND(CONCAT("#projecttype/", SUBSTR(STR(?værdi), 38)) AS ?værdiUrl)
Line 78: Line 78:
     BIND(CONCAT(STR(?værdi_), " ↗") AS ?værdi)
     BIND(CONCAT(STR(?værdi_), " ↗") AS ?værdi)
     BIND(CONCAT("https://daieproddreamspdfsto.blob.core.windows.net/files/", STR(?værdi_)) AS ?værdiUrl)
     BIND(CONCAT("https://daieproddreamspdfsto.blob.core.windows.net/files/", STR(?værdi_)) AS ?værdiUrl)
  }
  UNION
  {
    BIND(100 AS ?order)
    BIND("Andre rapporter" AS ?beskrivelse)
    BIND("🔍" AS ?værdi)
    BIND(CONCAT("#report/", SUBSTR(STR(target:), 38), "/report") AS ?værdiUrl)
   }
   }
   SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],da,en". }
   SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],da,en". }
Line 84: Line 91:
}}
}}


== Patterns ==
== Mønstre ==
{{SPARQL | query=  
{{SPARQL | query=  
PREFIX target: <https://dreams.wikibase.cloud/entity/Q406>
PREFIX target: <https://dreams.wikibase.cloud/entity/Q406>
Line 93: Line 100:


SELECT
SELECT
   ?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)   


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


   ?object ?objectLabel ?objectUrl
   ?påvirkning ?påvirkningLabel ?påvirkningUrl


   ?recipient ?recipientLabel ?recipientUrl
   ?recipient ?recipientLabel ?recipientUrl


   ?significance ?significanceLabel
   ?signifikans ?signifikansLabel


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


   ?quote
   ?citat


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


   ?project_type ?project_typeLabel
   ?projekttype ?projekttypeLabel
   (CONCAT("#projecttype/", SUBSTR(STR(?project_type), 38)) AS ?project_typeUrl)   
   (CONCAT("#projecttype/", SUBSTR(STR(?projekttype), 38)) AS ?projekttypeUrl)   


   ?link ?linkUrl
   ?link ?linkUrl
Line 118: Line 125:
WITH {
WITH {
   SELECT DISTINCT  
   SELECT DISTINCT  
     ?pattern
     ?mønster
     ?subject ?subjectLabel ?subjectUrl
     ?subjekt ?subjektLabel ?subjektUrl
     ?object ?objectLabel ?objectUrl
     ?påvirkning ?påvirkningLabel ?påvirkningUrl
     ?recipient ?recipientLabel ?recipientUrl
     ?recipient ?recipientLabel ?recipientUrl
     ?significance ?significanceLabel
     ?signifikans ?signifikansLabel
     ?mitigation ?mitigationLabel ?mitigationUrl
     ?afbødning ?afbødningLabel ?afbødningUrl
     ?quote
     ?citat
     ?project_phase
     ?projektfase
     ?project_type
     ?projekttype
     ?link ?linkUrl
     ?link ?linkUrl
   WHERE {
   WHERE {
     ?pattern dreamst:P2 dreams:Q263 ;
     ?mønster dreamst:P2 dreams:Q263 ;
             dreamst:P20 target: .
             dreamst:P20 target: .


     OPTIONAL {
     OPTIONAL {
       ?pattern 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 { ?pattern 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 {
       ?pattern dreamst:P34 ?object .  
       ?mønster dreamst:P34 ?påvirkning .  
       ?object rdfs:label ?object_label .
       ?påvirkning rdfs:label ?påvirkning_label .
       FILTER (LANG(?object_label) = 'da')
       FILTER (LANG(?påvirkning_label) = 'da')
       BIND(CONCAT("#effect/", SUBSTR(STR(?object), 38)) AS ?objectUrl)
       BIND(CONCAT("#effect/", SUBSTR(STR(?påvirkning), 38)) AS ?påvirkningUrl)
     }
     }
     OPTIONAL { ?pattern dreamst:P49 ?object_text }
     OPTIONAL { ?mønster dreamst:P49 ?påvirkning_text }
     BIND(COALESCE(?object, ?object_text) AS ?object)
     BIND(COALESCE(?påvirkning, ?påvirkning_text) AS ?påvirkning)
     BIND(CONCAT(?object_text, " (", COALESCE(?object_label, ""), ")") AS ?objectLabel)
     BIND(CONCAT(?påvirkning_text, " (", COALESCE(?påvirkning_label, ""), ")") AS ?påvirkningLabel)


     OPTIONAL {
     OPTIONAL {
       ?pattern dreamst:P55 ?recipient .
       ?mønster dreamst:P55 ?recipient .
       ?recipient rdfs:label ?recipient_label .
       ?recipient rdfs:label ?recipient_label .
       FILTER (LANG(?recipient_label) = 'da')
       FILTER (LANG(?recipient_label) = 'da')
       BIND(CONCAT("#effect/", SUBSTR(STR(?recipient), 38)) AS ?recipientUrl)
       BIND(CONCAT("#effect/", SUBSTR(STR(?recipient), 38)) AS ?recipientUrl)
     }
     }
     OPTIONAL { ?pattern dreamst:P54 ?recipient_text }
     OPTIONAL { ?mønster dreamst:P54 ?recipient_text }
     BIND(COALESCE(?recipient, ?recipient_text) AS ?recipient)
     BIND(COALESCE(?recipient, ?recipient_text) AS ?recipient)
     BIND(CONCAT(?recipient_text, " (", COALESCE(?recipient_label, ""), ")") AS ?recipientLabel)
     BIND(CONCAT(?recipient_text, " (", COALESCE(?recipient_label, ""), ")") AS ?recipientLabel)
    
    
     OPTIONAL {
     OPTIONAL {
       ?pattern 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 { ?pattern 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 { ?pattern dreamst:P18 ?quote . }
     OPTIONAL { ?mønster dreamst:P18 ?citat . }
    
    
     OPTIONAL { ?pattern dreamst:P19 ?project_phase . }
     OPTIONAL { ?mønster dreamst:P19 ?projektfase . }
      
      
     OPTIONAL { ?pattern dreamst:P16 ?project_type1 . }
     OPTIONAL { ?mønster dreamst:P16 ?projekttype1 . }
     OPTIONAL { ?pattern dreamst:P20 / dreamst:P16 ?project_type2 . }
     OPTIONAL { ?mønster dreamst:P20 / dreamst:P16 ?projekttype2 . }
     BIND(COALESCE(?project_type1, ?project_type2) AS ?project_type)
     BIND(COALESCE(?projekttype1, ?projekttype2) AS ?projekttype)
                  
                  
     OPTIONAL {
     OPTIONAL {
       ?pattern 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 {
       ?pattern dreamst:P20 ?report .
       ?mønster dreamst:P20 ?report .
       ?report dreamst:P40 ?miljøportal .
       ?report dreamst:P40 ?miljøportal .
       OPTIONAL { ?pattern 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)
       BIND(CONCAT("https://daieproddreamspdfsto.blob.core.windows.net/files/", STR(?miljøportal),  
       BIND(CONCAT("https://daieproddreamspdfsto.blob.core.windows.net/files/", STR(?miljøportal),  
Line 205: Line 212:
}}
}}


== Locations ==
== Steder ==
SPARQL | query=
{{SPARQL | query=
PREFIX target: <https://dreams.wikibase.cloud/entity/Q158>
PREFIX target: <https://dreams.wikibase.cloud/entity/Q158>
PREFIX dreams: <https://dreams.wikibase.cloud/entity/>
PREFIX dreams: <https://dreams.wikibase.cloud/entity/>
Line 216: Line 223:


SELECT  
SELECT  
   ?location ?locationLabel
   ?sted ?stedLabel
   (CONCAT("#location/", SUBSTR(STR(?location), 38)) AS ?locationUrl)
   (CONCAT("#location/", SUBSTR(STR(?sted), 38)) AS ?stedUrl)
   ?locationDescription
   ?stedDescription


   ?quote
   ?citat
WHERE {
WHERE {
   target: dreamsp:P12 ?location_statement .
   target: dreamsp:P12 ?sted_statement .
   ?location_statement dreamsps:P12 ?location .
   ?sted_statement dreamsps:P12 ?sted .
   OPTIONAL {
   OPTIONAL {
     ?location_statement prov:wasDerivedFrom / dreamspr:P18 ?quote .
     ?sted_statement prov:wasDerivedFrom / dreamspr:P18 ?citat .
   }
   }
    
    
Line 232: Line 239:
}}
}}


== Citations ==
Citations
SPARQL | query=
SPARQL | query=
PREFIX target: <https://dreams.wikibase.cloud/entity/Q100>
PREFIX target: <https://dreams.wikibase.cloud/entity/Q100>
Line 259: Line 266:
}}
}}


== Related works from co-citations ==
Related works from co-citations  
SPARQL | query=
SPARQL | query=
PREFIX target: <https://dreams.wikibase.cloud/entity/Q100>
PREFIX target: <https://dreams.wikibase.cloud/entity/Q100>