This is a small demonstration of named SPARQL queries in Callimachus.  It provides a file containing quotations and demonstrates how that file may be queried with and without parameters to create a toy application. This version of the quotes sample application demonstrates the use of the selectize.js library with named SPARQL queries to implement an auto-completion text lookup widget.

Download the CAR file and install it in your local Callimachus version 1.4.0 or greater. There is an older CAR file for use with Callimachus version 1.3.4 or older that does not use the selectize.js library.

The application consists of:

  • The file quotes.ttl, an RDF Turtle document containing quotations and their authors. The contents of this file are indexed by Callimachus's RDF database when the file is uploaded so it is ready to be queried.
  • The named SPARQL query all-quotes.rq, which queries the database for quotations and returns them all.
  • The named SPARQL query quote-by-name.rq, which requires a parameter called "lastname" to name a quote author.  Try it by calling quote-by-name.rq?view&lastname=Einstein (1 quote) or quote-by-name.rq?view&lastname=Mizner (2 quotes).
  • The XHTML file quotation.xhtml, which asks for a family name of an author and provides all the matching quotes.

Learning how this example works will allow you to build more complex applications using named SPARQL queries.  Find out more about how you can use named SPARQL queries at: