sparqlimg is an implementation of the CITE Image extension to CITE Collections. It runs as a jvm servlet, and draws its data from two resources:

  1. a SPARQL endpoint with data about the images it serves.
  2. IIPServer's iipsrv fast cgi for working with binary image data.


  • iipsrv fastcgi
  • a SPARQL endpoint with data using the CITE Image RDF vocabulary (see below)


Two values must be set in a configuration file: a URL for a SPARQL endpoint, and a URL for the IIPSrv fastcgi. By default, sparqlimg looks for these settings in a file named conf.grade. You can copy conf.gradle-dist to conf.gradle, set the appropriate values for your system, and build or run the war.

You can override the default configuration file name with a property named conf. To select a configuration file from a command-line invocation of gradle, use the -P flag, e.g.,

gradle -Pconf=PROPERTYFILETOUSE jettyRunWar


Installing multiple instances of sparqlimg

It can be handy to have separate installations of sparqlimg for various project. The gradle build file included in this distribution includes a task to simplify that by building a minimal template for you. Run

gradle buildTemplate

to create a simple template in build/sparqlimg-template

RDF vocabulary

sparqlcts queries RDF vocabulary in these three RDF namespaces:

@Dmitry Bobrov hmt: . @Dmitry Bobrov cite: . @Dmitry Bobrov rdf: .

Image archives are documented with three statements as illustrated here:

<urn:cite:ecod:codbod8> rdf:type cite:ImageArchive .
<urn:cite:ecod:codbod8> rdf:label "Images of Cologny, Fondation Martin Bodmer, Cod. Bodmer 8 (" .
<urn:cite:ecod:codbod8> hmt:path "/project/homer/pyramidal/CodBod8" .

Individual images are documented with three further statements as illustrated here:

<urn:cite:ecod:codbod8.cb-0008_243v> cite:belongsTo <urn:cite:ecod:codbod8> .
<urn:cite:ecod:codbod8.cb-0008_243v> rdf:label "Cologny, Fondation Martin Bodmer, Cod. Bodmer 8, folio 243 verso." .
<urn:cite:ecod:codbod8.cb-0008_243v> hmt:license "This image is available under the terms of a Creative Commons license (CC BY-NC 3.0).  Any reuse must include the following attribution: Cologny, Fondation Martin Bodmer, Cod. Bodmer 8, f. 243v (" .


Running unit tests

To run the (currently, few) unit tests, load the test data set in testdata/codexbodmer8.ttl into a SPARQL endpoint.