Skip to main content Link Menu Expand (external link) Document Search Copy Copied

SPARQL Plugins

The Coypu SPARQL Endpoint has several plugins enabled.

Service Enhancer Plugin

Jena's Service Enhancer plugin enhances the SERVICE clause with capabilities for bulk requests, caching and lateral joins.

For each graph count the use of every property and cache the result. Include a timestamp in order to track when the information was cached.

  SERVICE <cache:> {
    SELECT ?g ?p (COUNT(*) AS ?c) (NOW() AS ?timestamp) {
      GRAPH ?g { ?s ?p ?o }
    } GROUP BY ?g ?p
  # The cached results can be reused e.g. for filtering.
  # FILTER(regex(str(?p), "type"))

JenaX Plugins

JenaX is a set of unofficial extensions for Apache Jena. For all supported plugins refer to the JenaX documentation.

Example - RDFS Inferencing against the Coypu Ontology

# Juxtapose results for a certain { ?s a ?o } with RDFS reasoning disabled and enabled
SELECT ?reasoning ?s ?o {
  BIND(<> AS ?s)
      { ?s a ?o BIND(false as ?reasoning) }
      { SERVICE <sameAs+rdfs:> { ?s a ?o } BIND(true as ?reasoning) }
} ORDER BY ?reasoning