Created
March 12, 2018 14:20
-
-
Save baskaufs/222ed08b2026a0c2551edc9b3c9b404c to your computer and use it in GitHub Desktop.
Starter query for constructing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PREFIX adhoc: <https://rawgit.com/HeardLibrary/semantic-web/master/adhoc#> | |
PREFIX dcterms: <http://purl.org/dc/terms/> | |
CONSTRUCT { | |
?person adhoc:status "student". # use "employee" for employees | |
?person adhoc:identifierSource "wikidata". | |
?person rdfs:label ?label. | |
?person dcterms:description ?description. | |
} | |
WHERE { | |
?person wdt:P69 wd:Q29052. # educated at Vanderbilt, use P108 for employer | |
?person wdt:P31 wd:Q5. # instance of human | |
?person rdfs:label ?label. | |
FILTER ( langMatches(lang(?label),"en" )) | |
OPTIONAL { | |
?person skos:altLabel ?alt. | |
FILTER ( langMatches(lang(?alt),"en" )) | |
} | |
?person schema:description ?description. | |
FILTER ( langMatches(lang(?description),"en" )) | |
OPTIONAL {?person wdt:P569 ?birthDate.} | |
OPTIONAL {?person wdt:P735 ?givenName.} | |
OPTIONAL {?person wdt:P734 ?familyName.} | |
OPTIONAL {?person wdt:P21 ?gender.} | |
OPTIONAL {?person wdt:P496 ?orcidId.} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment