Dreams:effect: Difference between revisions
Jump to navigation
Jump to search
Line 73: | Line 73: | ||
ORDER BY ?order}} | ORDER BY ?order}} | ||
== | == Mønstre == | ||
{{SPARQL | query= | {{SPARQL | query= | ||
Line 84: | Line 84: | ||
SELECT | SELECT | ||
? | ?mønster ("🔍" AS ?mønsterLabel) | ||
(CONCAT("#pattern/", SUBSTR(STR(? | (CONCAT("#pattern/", SUBSTR(STR(?mønster), 38)) AS ?mønsterUrl) | ||
?affected ?affectedLabel | ?affected ?affectedLabel | ||
Line 105: | Line 105: | ||
?link ?linkUrl | ?link ?linkUrl | ||
WHERE { | WHERE { | ||
? | ?mønster dreamst:P2 dreams:Q263 ; | ||
dreamst:P33 / dreamst:P10* target: . | ( dreamst:P33 | dreamst:P34 | dreamst:P55 | dreamst:P56 ) / dreamst:P10* target: . | ||
OPTIONAL { ? | |||
OPTIONAL { ? | OPTIONAL { | ||
?mønster dreamst:P33 ?subject . | |||
?subject rdfs:label ?subject_label . | |||
FILTER(LANG(?subject_label) = 'da') | |||
BIND(CONCAT("#effect/", SUBSTR(STR(?subject), 38)) AS ?subjectUrl) | |||
} | |||
OPTIONAL { ?mønster dreamst:P47 ?subject_text } | |||
BIND(COALESCE(?subject, ?subject_text, "") AS ?subject) | |||
BIND(CONCAT(?subject_text, " (", COALESCE(?subject_label, ""), ")") AS ?subjectLabel) | |||
OPTIONAL { | |||
?mønster dreamst:P34 ?impact . | |||
?impact rdfs:label ?impact_label . | |||
FILTER (LANG(?impact_label) = 'da') | |||
BIND(CONCAT("#effect/", SUBSTR(STR(?impact), 38)) AS ?impactUrl) | |||
} | |||
OPTIONAL { ?mønster dreamst:P49 ?impact_text } | |||
BIND(COALESCE(?impact, ?impact_text) AS ?impact) | |||
BIND(CONCAT(?impact_text, " (", COALESCE(?impact_label, ""), ")") AS ?impactLabel) | |||
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) | |||
OPTIONAL { | OPTIONAL { | ||
? | ?mønster dreamst:P56 ?mitigation . | ||
?mitigation rdfs:label ?mitigation_label . | |||
FILTER (LANG(?mitigation_label) = 'da') | |||
BIND(CONCAT("#effect/", SUBSTR(STR(?mitigation), 38)) AS ?mitigationUrl) | |||
} | } | ||
OPTIONAL { ?mønster dreamst:P53 ?mitigation_text } | |||
BIND(COALESCE(?mitigation, ?mitigation_text) AS ?mitigation) | |||
BIND(CONCAT(?mitigation_text, " (", COALESCE(?mitigation_label, ""), ")") AS ?mitigationLabel) | |||
OPTIONAL { ? | OPTIONAL { ?mønster dreamst:P18 ?quote . } | ||
OPTIONAL { ?mønster dreamst:P19 ?project_phase . } | |||
OPTIONAL { ?mønster dreamst:P20 ?report . } | |||
OPTIONAL { | |||
?mønster dreamst:P21 ?significance . | |||
?significance rdfs:label ?significance_text . | |||
FILTER (LANG(?significance_text) = 'da') | |||
OPTIONAL { ?significance dreamst:P44 ?symbol . } | |||
BIND(IF(BOUND(?symbol), ?symbol, "❓") AS ?significance_symbol) | |||
BIND(CONCAT(?significance_symbol, " ", ?significance_text) AS ?significanceLabel) | |||
} | |||
OPTIONAL { | |||
?mønster dreamst:P20 ?report . | |||
?report dreamst:P40 ?miljøportal . | |||
OPTIONAL { ?mønster dreamst:P46 ?page } | |||
BIND(IF(BOUND(?page), CONCAT(?page, " ↗"), " ↗") AS ?link) | |||
BIND(CONCAT("https://daieproddreamspdfsto.blob.core.windows.net/files/", STR(?miljøportal), | |||
IF(BOUND(?page), CONCAT("#page=", ?page), "")) AS ?linkUrl) | |||
} | |||
SERVICE wikibase:label { bd:serviceParam wikibase:language "da,en". } | SERVICE wikibase:label { bd:serviceParam wikibase:language "da,en". } | ||
}} | }} | ||
Revision as of 14:21, 9 December 2022
Effektdata
PREFIX target: <https://dreams.wikibase.cloud/entity/Q179> 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 DISTINCT (?description AS ?beskrivelse) ?value ?valueLabel ?valueUrl WHERE { BIND(target: AS ?effect) { BIND(1 AS ?order) BIND("Effekt" AS ?description) BIND(target: AS ?value) . } UNION { BIND(5 AS ?order) BIND("Overbegreb" AS ?description) target: dreamst:P10 ?value . BIND(SUBSTR(STR(?value), 38) AS ?q) BIND(CONCAT("#effect/", ?q) AS ?valueUrl) } UNION { BIND(6 AS ?order) BIND("Overbegreb" AS ?description) target: ^dreamst:P10 ?value . BIND(SUBSTR(STR(?value), 38) AS ?q) BIND(CONCAT("#effect/", ?q) AS ?valueUrl) } UNION { BIND(6 AS ?order) BIND("Påvirker" AS ?description) target: dreamst:P9 ?value . BIND(CONCAT("#effect/", SUBSTR(STR(?value), 38)) AS ?valueUrl) } UNION { BIND(2 AS ?order) BIND("Er påvirket af" AS ?description) target: ^dreamst:P9 ?value . BIND(CONCAT("#effect/", SUBSTR(STR(?value), 38)) AS ?valueUrl) } UNION { BIND(10 AS ?order) BIND("SDG" AS ?description) target: dreamst:P42 ?value . BIND(CONCAT("#sdg/", SUBSTR(STR(?value), 38)) AS ?valueUrl) } UNION { BIND(11 AS ?order) BIND("arter.dk" AS ?description) target: dreamst:P45 ?value_ . BIND(CONCAT(?value_, " ↗") AS ?value) BIND(CONCAT("https://arter.dk/taxa/taxon/details/", ?value_) AS ?valueUrl) } UNION { BIND(20 AS ?order) BIND("Scholia" AS ?description) target: dreamst:P3 ?value_ . BIND(CONCAT(?value_, " ↗") AS ?value) BIND(CONCAT("https://scholia.toolforge.org/topic/", ?value_) AS ?valueUrl) } SERVICE wikibase:label { bd:serviceParam wikibase:language "da,en". } } ORDER BY ?order
Mønstre
PREFIX target: <https://dreams.wikibase.cloud/entity/Q309> 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 ?mønster ("🔍" AS ?mønsterLabel) (CONCAT("#pattern/", SUBSTR(STR(?mønster), 38)) AS ?mønsterUrl) ?affected ?affectedLabel (CONCAT("#effect/", SUBSTR(STR(?affected), 38)) AS ?affectedUrl) ?significance ?significanceLabel ?quote ?project_phase ?project_phaseLabel (CONCAT("#projectphase/", SUBSTR(STR(?project_phase), 38)) AS ?project_phaseUrl) ?project_type ?project_typeLabel (CONCAT("#projecttype/", SUBSTR(STR(?project_type), 38)) AS ?project_typeUrl) ?report ?reportLabel (CONCAT("#report/", SUBSTR(STR(?report), 38)) AS ?reportUrl) ?link ?linkUrl WHERE { ?mønster dreamst:P2 dreams:Q263 ; ( dreamst:P33
Er påvirket af
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 ?pattern ?patternLabel (CONCAT("#pattern/", SUBSTR(STR(?pattern), 38)) AS ?patternUrl) ?effect ?effectLabel (CONCAT("#effect/", SUBSTR(STR(?effect), 38)) AS ?effectUrl) ?significance ?significanceLabel ?quote ?project_phase ?project_phaseLabel (CONCAT("#projectphase/", SUBSTR(STR(?project_phase), 38)) AS ?project_phaseUrl) ?project_type ?project_typeLabel (CONCAT("#projecttype/", SUBSTR(STR(?project_type), 38)) AS ?project_typeUrl) ?report ?reportLabel (CONCAT("#report/", SUBSTR(STR(?report), 38)) AS ?reportUrl) ?link ?linkUrl WHERE { ?pattern dreamst:P2 dreams:Q263 ; dreamst:P34 / dreamst:P10* target: OPTIONAL { ?pattern dreamst:P33 ?effect . } OPTIONAL { ?pattern dreamst:P18 ?quote . } OPTIONAL { ?pattern dreamst:P20 ?report . OPTIONAL { ?report dreamst:P40 ?miljøportal . BIND("↗" AS ?link1) BIND(CONCAT("https://daieproddreamspdfsto.blob.core.windows.net/files/", STR(?miljøportal)) AS ?link1Url) } OPTIONAL { ?report dreamst:P40 ?miljøportal . ?pattern dreamst:P46 ?page . BIND(CONCAT(?page, " ↗") AS ?link2) BIND(CONCAT("https://daieproddreamspdfsto.blob.core.windows.net/files/", ?miljøportal, "#page=", ?page) AS ?link2Url) } # This doesn't not make sense BIND(COALESCE(?link2, ?link1) AS ?link) BIND(COALESCE(?link2Url, ?link1Url) AS ?linkUrl) } OPTIONAL { ?pattern dreamst:P21 ?significance } # / dreamst:P44 ?symbol . } # BIND(IF(BOUND(?symbol), ?symbol, "❓") AS ?significance) OPTIONAL { ?pattern dreamst:P19 ?project_phase . } OPTIONAL { ?pattern dreamst:P16 ?project_type . } SERVICE wikibase:label { bd:serviceParam wikibase:language "da,en". } }