All Downloads are FREE. Search and download functionalities are using the official Maven repository.

webapp.data.query.dbpedia.dbpediadatemd2.rq Maven / Gradle / Ivy

Go to download

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 ?date ; 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  ?d ?month ?day ?l where {  
          values (?month ?day) { (UNDEF UNDEF) }
          ?x o:deathDate ?d  
          filter (datatype(?d) = xsd:date)         
          filter (month(?d) = ?month && day(?d) = ?day) 
          ?x rdfs:label ?l
          filter langMatches(lang(?l), "fr")
    } 
  }
  
  bind (cal:date(year(?d), month(?d), day(?d)) as ?date)
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy