query-5a961529485f1bd206ecc17e292aa3ca

rq turtle/ttl

Query #15: CONSTRUCT WIKIDATA:WRITTEN WORK (Q47461344) TO SCHEMA:CREATIVE WORK

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX schema: <http://schema.org/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX bd: <http://www.bigdata.com/rdf#>
CONSTRUCT
{
 ?oclc_work_uri a schema:CreativeWork ;
     schema:name ?workLabel ;
     schema:author ?loc_naf_uri .
 ?loc_naf_uri a schema:Person ;
     schema:name ?authorLabel ;
     schema:description ?authorDescription .
 ?oclc_work_uri schema:bookEdition ?oclcCtrlNum_uri .
 ?oclcCtrlNum_uri a schema:Book ;
     schema:name ?hasEditionLabel ;
     schema:description ?hasEditionDescription .
}
WHERE
{
 ?work wdt:P31 wd:Q47461344,?instanceOf .
 ?work wdt:P5331 ?oclc_work_id .
 BIND(URI(CONCAT("http://experiment.worldcat.org/entity/work/data/", ?oclc_work_id )) AS ?oclc_work_uri)
 ?work wdt:P50 ?author .
 ?author rdfs:label ?authorLabel .
 FILTER (LANG(?authorLabel) = "en")
 ?author wdt:P244 ?loc_name .
 BIND(URI(CONCAT("https://id.loc.gov/authorities/names/", ?loc_name )) AS ?loc_naf_uri)
 ?work wdt:P747 ?hasEdition .
 ?hasEdition rdfs:label ?hasEditionLabel .
 FILTER (LANG(?hasEditionLabel) = "en")
 ?hasEdition wdt:P243 ?oclcCtrlNum .
 BIND(URI(CONCAT("https://search.worldcat.org/title/",?oclcCtrlNum)) AS ?oclcCtrlNum_uri)
 SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}LIMIT 1

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v18("?_const_1b5f379b_uri") v17("?_const_3943d1b1_uri") v21("?_const_594e622f_uri") v19("?_const_5fa4fb96_uri") v14("?_const_7b480b26_uri") v22("?_const_975030af_uri") v15("?_const_9763fc31_uri") v13("?_const_f5e5585a_uri") v7("?author"):::projected v20("?authorDescription"):::projected v2("?authorLabel"):::projected v10("?hasEdition"):::projected v23("?hasEditionDescription"):::projected v1("?hasEditionLabel"):::projected v4("?instanceOf"):::projected v18("?loc_naf_uri"):::projected v8("?loc_name"):::projected v11("?oclcCtrlNum"):::projected v22("?oclcCtrlNum_uri"):::projected v5("?oclc_work_id"):::projected v13("?oclc_work_uri"):::projected v3("?work"):::projected v16("?workLabel"):::projected c3(["wd:Q47461344"]):::iri c11(["bd:serviceParam"]):::iri c13(["#91;AUTO_LANGUAGE#93;,en"]):::literal f0[["?hasEditionLabel = 'en'"]] f0 --> v1 f1[["?authorLabel = 'en'"]] f1 --> v2 v3 --"wdt:P31"--> c3 v3 --"wdt:P31"--> v4 v3 --"wdt:P5331"--> v5 bind2[/"concat('http://experiment.worldcat.org/entity/work/data/',?oclc_work_id)"/] v5 --o bind2 bind2 --as--o v13 v3 --"wdt:P50"--> v7 v7 --"rdfs:label"--> v2 v7 --"wdt:P244"--> v8 bind3[/"concat('https://id.loc.gov/authorities/names/',?loc_name)"/] v8 --o bind3 bind3 --as--o v18 v3 --"wdt:P747"--> v10 v10 --"rdfs:label"--> v1 v10 --"wdt:P243"--> v11 bind4[/"concat('https://search.worldcat.org/title/',?oclcCtrlNum)"/] v11 --o bind4 bind4 --as--o v22 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c11 --"wikibase:language"--> c13 end bind5[/"?oclc_work_uri"/] v13 --o bind5 bind5 --as--o v13 bind6[/""a""/] bind6 --as--o v13 bind7[/"'schema:CreativeWork'"/] bind7 --as--o v14 bind8[/"'schema:name'"/] bind8 --as--o v15 bind9[/"?workLabel"/] v16 --o bind9 bind9 --as--o v16 bind10[/"'schema:author'"/] bind10 --as--o v17 bind11[/"?loc_naf_uri"/] v18 --o bind11 bind11 --as--o v18 bind12[/"'schema:Person'"/] bind12 --as--o v18 bind13[/"'schema:description'"/] bind13 --as--o v19 bind14[/"?authorDescription"/] v20 --o bind14 bind14 --as--o v20 bind15[/"'schema:bookEdition'"/] bind15 --as--o v21 bind16[/"?oclcCtrlNum_uri"/] v22 --o bind16 bind16 --as--o v22 bind17[/"'schema:Book'"/] bind17 --as--o v22 bind18[/"?hasEditionDescription"/] v23 --o bind18 bind18 --as--o v23