diff --git a/whelk-core/src/main/groovy/whelk/external/Wikidata.groovy b/whelk-core/src/main/groovy/whelk/external/Wikidata.groovy index 199ff3de29..6932b1e2f0 100644 --- a/whelk-core/src/main/groovy/whelk/external/Wikidata.groovy +++ b/whelk-core/src/main/groovy/whelk/external/Wikidata.groovy @@ -282,16 +282,16 @@ class WikidataEntity { List getLcsh() { String queryString = """ - SELECT ?fullId { - wd:${shortId} wdtn:${LC_AUTH} ?fullId ; - wdt:${LC_AUTH} ?shortId . + SELECT ?id { + wd:${shortId} wdt:${LC_AUTH} ?shortId . + bind(iri(concat("http://id.loc.gov/authorities/subjects/", ?shortId)) as ?id) FILTER(strstarts(?shortId, "sh")) } """ ResultSet rs = QueryRunner.localSelectResult(queryString, graph) - return rs.collect { it.get("fullId") } + return rs.collect { it.get("id") } } List getFast() {