3. Querying OxPoints
The data is stored in an RDF datastore and can be accessed by means of pre-defined query URLs or by constructing more complex queries using SPARQL.
The OxPoints service is located at http://oxpoints.oucs.ox.ac.uk/; all queries should be performed relative to this URL.
Queries are constructed from a path (e.g. /occupies/oucs:oucs/), an optional format extension (e.g. .kml) and an optional set of query parameters (e.g. ?date=1999).
3.1. Query paths
- /all
- Returns all the data held within OxPoints.
- /id/
OxpointsID - The canonical URI for an resource controlled by OxPoints. Returns a description of that resource.
- /type/
TypeName - Retrieves all entities with the type given by
TypeName - /
Identifier Identifiermay be an OxPoints ID or one of oucs:code, olis:code, obn:code, finance:code. Multiple identifiers may be separated with a pipe or vertical bar (|).- /
relation/Identifier - Returns all
xsuch thatxrelationIdentifieris true.Identifieris as described above. - /
Identifier/relation - Returns all
xsuch thatIdentifierrelationxis true.Identifieris as described above.
Relations can be any of most of the predicates used in OxPoints. For example, /title/Keble+College returns all entities called "Keble College". /oucs:linc/occupies returns all places occupied by Lincoln College.
3.2. Query parameters
date= parameter. Other parameters are:
not- Filters results to exclude those that have the given predicate defined.
indirect- Extends the filter to take into account indirect properties. For example the location of a room would be inferred to be the same as its containing building.
jsCallback- Adds a function call around the returned data for when one is utilising JSONP with the
.jsformat extension. jsonNesting- Declares the recursion depth when outputting as
.jsonor.js.
3.3. Format extensions
.xml- RDF/XML (default if format not specified).n3- Notation3.nt- N-Triples (a simplified RDF serialization syntax).json- JavaScript Object Notation.js- Same as.jsonbut adding a callback given byjsCallback(which defaults to "oxpoints").gpx- GPX waypoints.tomtom- Data suitable for loading into TomTom satellite navigation devices.kml- KML (suitable for use with Google Maps and Google Earth).txt- Simplified plain text.csv- Comma-separated values
RDF/XML, Notation3 and N-Triples are standard RDF serializations. These and the JSON and JavaScript serializations provide all the available data, whereas the remainder are simplified, omitting various fields.
3.4. Examples
- http://oxpoints.oucs.ox.ac.uk/oucs:kebl.json
- All information about the unit with OUCS code 'kebl' (Keble College), in JSON format
- http://oxpoints.oucs.ox.ac.uk/finance:EN.xml
- All information about the unit with finance code 'EN' (the Computing Services), in RDF/XML format
- http://oxpoints.oucs.ox.ac.uk/olis:BOD.xml
- All information about the unit with OLIS code 'BOD' (the Bodleian Library), in RDF/XML format
- http://oxpoints.oucs.ox.ac.uk/obn:154.n3
- All information about the Holder Building (number 154)
- http://oxpoints.oucs.ox.ac.uk/type/Department.kml
- All departments in KML - can be viewed in Google Maps
- http://oxpoints.oucs.ox.ac.uk/oucs:exet,jesu,linc.kml
- Exeter, Jesus and Lincoln Colleges, selected using their OUCS codes.
- http://oxpoints.oucs.ox.ac.uk/type/Library|Museum.n3
- All libraries and museums in Notation3 format.
- http://oxpoints.oucs.ox.ac.uk/oucs:engsci,bioch/occupies.n3
- Everything occupied by either Engineering Science or Biochemistry in Notation3 format.
Up: Contents Previous: 2. What data are stored in OxPoints? Next: 4. SPARQL endpoint

