Skip to content

Instantly share code, notes, and snippets.

@cmarat
Created March 24, 2015 14:58
Show Gist options
  • Save cmarat/1c3d75d940972fbf1f10 to your computer and use it in GitHub Desktop.
Save cmarat/1c3d75d940972fbf1f10 to your computer and use it in GitHub Desktop.
@prefix api: <http://purl.org/linked-data/api/vocab#> .
@prefix dc: <http://purl.org/dc/elements/1.1/> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix geo: <http://www.w3.org/2003/01/geo/wgs84_pos#> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix dbo: <http://dbpedia.org/ontology/> .
@prefix dbpedia: <http://dbpedia.org/resource/> .
@prefix gn: <http://www.geonames.org/ontology#> .
@prefix elda: <http://www.epimorphics.com/vocabularies/lda#> .
@prefix cortext: <http://risis.org/cortext#> .
@prefix risis: <http://risis.org/sms/vocab/> .
cortext:api a api:API
; rdfs:label "Cortext Test"@en
; api:sparqlEndpoint <http://localhost:8895/sparql/>
; api:maxPageSize 500
; api:defaultPageSize 10
; api:defaultViewer api:basicViewer
; api:viewer cortext:compactViewer, cortext:geoViewer, api:describeViewer, api:labelledDescribeViewer
; api:defaultFormatter cortext:HtmlFormatter
; api:endpoint cortext:universityList
; api:variable _:city
; api:variable [
api:name "visibleSparqlForm";
api:value "http://risis.data2semantics.ops.few.vu.nl/sparql/"
]
; elda:rewriteResultURIs [
elda:ifStarts "http://localhost:8080/";
elda:replaceStartBy "http://lda.risis.ops.few.vu.nl/"
] .
cortext:universityList a api:ListEndpoint
; rdfs:label "List of Universities"
; api:uriTemplate "/unis"
; api:selector [
api:where """
?s a <http://risis.org/sms/vocab/rankings> .
?s <http://risis.org/sms/vocab/rank> ?rank .
?s <http://xmlns.com/foaf/0.1/primaryTopic> ?uni .
BIND(IRI(?uni) AS ?item) . """
]
; api:defaultFormatter cortext:JsonFormatter
; api:defaultViewer cortext:geoViewer
.
_:city a rdf:Property
; api:name "city"
; api:label "city"
; api:value "City filter."
; api:filterVariable "?city"
.
cortext:compactViewer a api:Viewer
; api:name "compact"
; api:properties "title"
.
cortext:geoViewer a api:Viewer
; api:name "geo"
; api:properties "title,country,lat,long,abstract,rank"
.
cortext:HtmlFormatter a api:XsltFormatter
; api:name "html"
; api:mimeType "text/html; charset=utf-8"
; api:stylesheet "lda-assets/xslt/result-osm.xsl"
.
cortext:JsonFormatter a api:JsonFormatter
; api:name "json"
; api:mimeType "application/json;charset=UTF-8"
.
dbo:country api:label "country".
geo:lat api:label "lat" .
geo:long api:label "long" .
risis:rank api:label "rank" .
rdfs:comment api:label "abstract" .
rdfs:label api:label "title" .
rdf:type api:label "type"
; api:multiValued true
; rdfs:range rdfs:Class
.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment