query-70fb8a488d40cea7172ccc0d56690f33
Records of the Auckland Museum
SELECT DISTINCT ?article ?titleLabel (GROUP_CONCAT (DISTINCT ?authorLabel; separator="; ") AS ?authors) ?metadata ?JSTOR ?DOI WHERE { # Get JSTOR URL format wd:P888 wdt:P1630 ?JSTORformat .
#Get DOI URL format wd:P356 wdt:P1630 ?DOIformat .
# Get articles "P14333" (published in) "Q15756170" (Records of the Auckland Museum) ?article wdt:P1433 wd:Q15756170.
OPTIONAL { ?article wdt:P1476 ?title. }
OPTIONAL { ?article wdt:P50 ?author. }
OPTIONAL { ?article wdt:P577 ?date. }
OPTIONAL { ?article wdt:P478 ?vol. }
OPTIONAL { ?article wdt:P304 ?pp. }
OPTIONAL { ?article wdt:P888 ?JSTOR_ID. }
OPTIONAL { ?article wdt:P356 ?rawDOI. }
# Combine vol & page numbers with pub. date BIND(CONCAT("Vol. ", ?vol, "; pp. ", ?pp, ". Published ", STR(DAY(?date)), "/", STR(MONTH(?date)), "/", STR(YEAR(?date)), ".") AS ?metadata )
# Create JSTOR links BIND(IRI(REPLACE(?JSTOR_ID, "^(.+)$", ?JSTORformat)) AS ?JSTOR)
# Create DOI links BIND(IRI(REPLACE(?rawDOI, "^(.+)$", ?DOIformat)) AS ?DOI)
# Get English labels SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". } }
GROUP BY ?article ?titleLabel ?metadata ?JSTOR ?DOI ORDER BY ?date
Use at
- https://query.wikidata.org/sparql
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX bd: <http://www.bigdata.com/rdf#>
# Records of the Auckland Museum
SELECT DISTINCT ?article ?titleLabel
(GROUP_CONCAT (DISTINCT ?authorLabel; separator="; ") AS ?authors)
?metadata ?JSTOR ?DOI
WHERE {
# Get JSTOR URL format
wd:P888 wdt:P1630 ?JSTORformat .
#Get DOI URL format
wd:P356 wdt:P1630 ?DOIformat .
# Get articles "P14333" (published in) "Q15756170" (Records of the Auckland Museum)
?article wdt:P1433 wd:Q15756170.
OPTIONAL { ?article wdt:P1476 ?title. }
OPTIONAL { ?article wdt:P50 ?author. }
OPTIONAL { ?article wdt:P577 ?date. }
OPTIONAL { ?article wdt:P478 ?vol. }
OPTIONAL { ?article wdt:P304 ?pp. }
OPTIONAL { ?article wdt:P888 ?JSTOR_ID. }
OPTIONAL { ?article wdt:P356 ?rawDOI. }
# Combine vol & page numbers with pub. date
BIND(CONCAT("Vol. ", ?vol, "; pp. ", ?pp, ". Published ", STR(DAY(?date)), "/", STR(MONTH(?date)), "/", STR(YEAR(?date)), ".")
AS ?metadata )
# Create JSTOR links
BIND(IRI(REPLACE(?JSTOR_ID, "^(.+)$", ?JSTORformat)) AS ?JSTOR)
# Create DOI links
BIND(IRI(REPLACE(?rawDOI, "^(.+)$", ?DOIformat)) AS ?DOI)
# Get English labels
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
GROUP BY ?article ?titleLabel ?metadata ?JSTOR ?DOI
ORDER BY ?date