
webapp.data.query.dbpedia.dbpediadatemd3.rq Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of corese-server Show documentation
Show all versions of corese-server Show documentation
Corese is a Semantic Web Factory (triple store and SPARQL endpoint) implementing RDF, RDFS, SPARQL 1.1
Query and Update.
The newest version!
#
# uri = st:dyyyy-mm-dd
# day = dd ; month = mm
# query dbpedia for events occurring this day of month
#
prefix o:
prefix cal:
@bind kg:values
construct {
?x o:deathDate ?death
?x o:bornDate ?born
; rdfs:label ?l
}
where {
bind (substr(st:get(st:uri), strlen(st:) + 2) as ?str)
bind (coalesce(xsd:date(?str), "2000-02-29"^^xsd:date) as ?param)
bind (month(?param) as ?month)
bind (day(?param) as ?day)
service {
select ?x ?d1 ?d2 ?month ?day ?l where {
values (?month ?day) { (UNDEF UNDEF) }
?x o:birthDate ?d1
?x o:deathDate ?d2
filter (datatype(?d1) = xsd:date)
filter (month(?d1) = ?month && day(?d1) = ?day)
filter (datatype(?d2) = xsd:date)
filter (month(?d2) = ?month && day(?d2) = ?day)
?x rdfs:label ?l
filter langMatches(lang(?l), "fr")
}
}
bind (cal:date(year(?d1), month(?d1), day(?d1)) as ?born)
bind (cal:date(year(?d2), month(?d2), day(?d2)) as ?death)
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy