query-4c6ba0e23e27b5491814f4e6060ec3db

rq turtle/ttl

Identifiers

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX bd: <http://www.bigdata.com/rdf#>
PREFIX target: <http://www.wikidata.org/entity/L2310>

SELECT 
  ?property_item ?property_itemLabel ?property_itemDescription
  ?identifier ?identifierLabel ?identifierUrl
WHERE {
  target: ?property ?identifier .
  ?property_item wikibase:directClaim ?property ;
                 wikibase:propertyType wikibase:ExternalId .
  OPTIONAL {
    ?property_item wdt:P1630 ?url_pattern .
  }
  BIND(CONCAT(?identifier, "&nbsp;↗") AS ?identifierLabel)
  BIND(IRI(REPLACE(?url_pattern, "\\$1", ENCODE_FOR_URI(STR(?identifier)))) AS ?identifierUrl)

  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
ORDER BY ?property_itemLabel

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v3("?identifier"):::projected v6("?identifierLabel"):::projected v7("?identifierUrl"):::projected v2("?property") v4("?property_item"):::projected v1("?property_itemLabel"):::projected v5("?url_pattern") c7(["bd:serviceParam"]):::iri c9(["#91;AUTO_LANGUAGE#93;,en"]):::literal c1([http://www.wikidata.org/entity/L2310]):::iri c4(["wikibase:ExternalId"]):::iri c1 -->v2--> v3 v4 --"wikibase:directClaim"--> v2 v4 --"wikibase:propertyType"--> c4 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v4 -."wdt:P1630".-> v5 end bind0[/"concat(?identifier,'&nbsp;↗')"/] v3 --o bind0 bind0 --as--o v6 bind1[/"replace(?url_pattern,'\$1',encode-for-uri(str(?identifier)))"/] v5 --o bind1 v3 --o bind1 bind1 --as--o v7 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c7 --"wikibase:language"--> c9 end