Created
February 15, 2017 20:36
-
-
Save ewg118/e641e5377b809ad7ea27d0a01b082c85 to your computer and use it in GitHub Desktop.
Types, emperors, and years in OCRE
This file contains 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 rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> | |
PREFIX bio: <http://purl.org/vocab/bio/0.1/> | |
PREFIX crm: <http://www.cidoc-crm.org/cidoc-crm/> | |
PREFIX dcmitype: <http://purl.org/dc/dcmitype/> | |
PREFIX dcterms: <http://purl.org/dc/terms/> | |
PREFIX foaf: <http://xmlns.com/foaf/0.1/> | |
PREFIX geo: <http://www.w3.org/2003/01/geo/wgs84_pos#> | |
PREFIX nm: <http://nomisma.org/id/> | |
PREFIX nmo: <http://nomisma.org/ontology#> | |
PREFIX org: <http://www.w3.org/ns/org#> | |
PREFIX osgeo: <http://data.ordnancesurvey.co.uk/ontology/geometry/> | |
PREFIX rdac: <http://www.rdaregistry.info/Elements/c/> | |
PREFIX skos: <http://www.w3.org/2004/02/skos/core#> | |
PREFIX spatial: <http://jena.apache.org/spatial#> | |
PREFIX un: <http://www.owl-ontologies.com/Ontology1181490123.owl#> | |
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#> | |
SELECT ?type ?obvLegend ?emperor ?fromDate ?toDate ?reignStart ?reignEnd WHERE { | |
?type a nmo:TypeSeriesItem ; | |
dcterms:source nm:ric ; | |
nmo:hasAuthority ?authority ; | |
nmo:hasStartDate ?fromDate ; | |
nmo:hasEndDate ?toDate ; | |
nmo:hasObverse ?obv . | |
OPTIONAL {?obv nmo:hasLegend ?obvLegend} | |
?authority skos:prefLabel ?emperor FILTER (langMatches(lang(?emperor), "en")). | |
OPTIONAL {?authority org:hasMembership ?membership | |
OPTIONAL {?membership nmo:hasStartDate ?reignStart} | |
OPTIONAL {?membership nmo:hasEndDate ?reignEnd} | |
} | |
} ORDER BY ?reignStart OFFSET 0 LIMIT 1000 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Iterate through each page by changing the offset.