Dreams:pattern: Difference between revisions

From DREAMS
Jump to navigation Jump to search
(Fix for report)
No edit summary
Line 1: Line 1:
== Data ==
== Pattern data ==
{{SPARQL | query=  
{{SPARQL | query=  
PREFIX target: <https://dreams.wikibase.cloud/entity/Q196>
PREFIX target: <https://dreams.wikibase.cloud/entity/Q196>
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 dreamspsv: <https://dreams.wikibase.cloud/prop/statement/value/>


SELECT  
SELECT  
Line 37: Line 35:
     ?pattern dreamst:P20 ?value .
     ?pattern dreamst:P20 ?value .
     BIND(CONCAT("#report/", SUBSTR(STR(?value), 38)) AS ?valueUrl)
     BIND(CONCAT("#report/", SUBSTR(STR(?value), 38)) AS ?valueUrl)
  }
  UNION
  {
    BIND(15 AS ?order)
    BIND("Project type" AS ?description)
    ?pattern dreamst:P16 ?value .
    BIND(CONCAT("#project-type/", SUBSTR(STR(?value), 38)) AS ?valueUrl)
   }
   }
   SERVICE wikibase:label { bd:serviceParam wikibase:language "da,en". }
   SERVICE wikibase:label { bd:serviceParam wikibase:language "da,en". }

Revision as of 15:17, 25 August 2022

Pattern data

PREFIX target: <https://dreams.wikibase.cloud/entity/Q196>
PREFIX dreams: <https://dreams.wikibase.cloud/entity/>
PREFIX dreamst: <https://dreams.wikibase.cloud/prop/direct/>

SELECT 
  ?description
  ?value ?valueLabel ?valueUrl
WHERE {
  BIND(target: AS ?pattern)
  {
    BIND(1 AS ?order)
    BIND("Subject" AS ?description)
    ?pattern dreamst:P33 ?value .
    BIND(CONCAT("#effect/", SUBSTR(STR(?value), 38)) AS ?valueUrl)
  }
  UNION
  {
    BIND(2 AS ?order)
    BIND("Object" AS ?description)
    ?pattern dreamst:P34 ?value .
    BIND(CONCAT("#effect/", SUBSTR(STR(?value), 38)) AS ?valueUrl)
  }
  UNION
  {
    BIND(5 AS ?order)
    BIND("Quote" AS ?description)
    ?pattern dreamst:P18 ?value .
  }
  UNION
  {
    BIND(10 AS ?order)
    BIND("Report" AS ?description)
    ?pattern dreamst:P20 ?value .
    BIND(CONCAT("#report/", SUBSTR(STR(?value), 38)) AS ?valueUrl)
  }
  UNION
  {
    BIND(15 AS ?order)
    BIND("Project type" AS ?description)
    ?pattern dreamst:P16 ?value .
    BIND(CONCAT("#project-type/", SUBSTR(STR(?value), 38)) AS ?valueUrl)
  }
  SERVICE wikibase:label { bd:serviceParam wikibase:language "da,en". }
}
ORDER BY ?order