16,603
edits
No edit summary |
|||
Line 86: | Line 86: | ||
== Patterns == | == Patterns == | ||
{{SPARQL | query= | {{SPARQL | query= | ||
PREFIX target: <https://dreams.wikibase.cloud/entity/ | PREFIX target: <https://dreams.wikibase.cloud/entity/Q676> | ||
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 96: | Line 96: | ||
(CONCAT("#pattern/", SUBSTR(STR(?pattern), 38)) AS ?patternUrl) | (CONCAT("#pattern/", SUBSTR(STR(?pattern), 38)) AS ?patternUrl) | ||
?subject ?subjectLabel | ?subject ?subjectLabel ?subjectUrl | ||
?object ?objectLabel ?objectUrl | ?object ?objectLabel ?objectUrl | ||
Line 118: | Line 117: | ||
SELECT | SELECT | ||
?pattern | ?pattern | ||
?subject | ?subject ?subjectLabel ?subjectUrl | ||
?object ?objectLabel ?objectUrl | ?object ?objectLabel ?objectUrl | ||
?recipient ?recipientLabel ?recipientUrl | ?recipient ?recipientLabel ?recipientUrl | ||
Line 130: | Line 129: | ||
dreamst:P20 target: . | dreamst:P20 target: . | ||
OPTIONAL { ?pattern dreamst:P33 ?subject . } | OPTIONAL { | ||
?pattern dreamst:P33 ?subject . | |||
?subject rdfs:label ?subject_label . | |||
FILTER(LANG(?subject_label) = 'da') | |||
BIND(CONCAT("#effect/", SUBSTR(STR(?subject), 38)) AS ?subjectUrl) | |||
} | |||
OPTIONAL { ?pattern dreamst:P47 ?subject_text } | |||
BIND(COALESCE(?subject, ?subject_text, "") AS ?subject) | |||
BIND(CONCAT(COALESCE(?subject_label, ""), ' ("', ?subject_text, '")') AS ?subjectLabel) | |||
OPTIONAL { | OPTIONAL { | ||
OPTIONAL { | OPTIONAL { |