SPARQL-MM support

Skip to end of metadata
Go to start of metadata
GraphDB Documentation
This documentation is NOT for the latest version of GraphDB.

Latest version - GraphDB 7.1

Next versions

GraphDB 6.5
GraphBD 6.6
GraphBD 7.0
GraphDB 7.1

Previous versions

GraphDB 6.3
GraphDB 6.2
GraphDB 6.0 & 6.1

[OWLIM 5.4]
OWLIM 5.3
[OWLIM 5.2]
[OWLIM 5.1]
[OWLIM 5.0]
[OWLIM 4.4]
[OWLIM 4.3]
[OWLIM 4.2]
[OWLIM 4.1]
[OWLIM 4.0]

Overview

GraphDB 6.4 introduces support for SPARQL-MM, a multimedia-extension for SPARQL 1.1. The implementation is based on code by Thomas Kurz.

Installation

The SPARQL-MM support is implemented as a GraphDB plugin, which is currently not enabled by default. To enable the plugin follow these steps:

  1. Locate the plugin zip file in the plugins/sparql-mm folder of the GraphDB distribution.
  2. Unzip the file into your plugins directory (by default root of unpacked web app/WEB-INF/classes/plugins}}.

Usage examples

Temporal Relations
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX mm: <http://linkedmultimedia.org/sparql-mm/ns/1.0.0/function#>

SELECT ?t1 ?t2 WHERE {
    ?f1 rdfs:label ?t1.
    ?f2 rdfs:label ?t2.
    FILTER mm:precedes(?f1,?f2)
} ORDER BY ?t1 ?t2
Temporal Aggregation
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX mm:  <http://linkedmultimedia.org/sparql-mm/ns/1.0.0/function#>

SELECT ?f1 ?f2 (mm:temporalIntermediate(?f1,?f2) AS ?box) WHERE {
    ?f1 rdfs:label "a".
    ?f2 rdfs:label "b".
}
Spatial Relations
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX mm: <http://linkedmultimedia.org/sparql-mm/ns/1.0.0/function#>

SELECT ?t1 ?t2 WHERE {
    ?f1 rdfs:label ?t1.
    ?f2 rdfs:label ?t2.
    FILTER mm:rightBeside(?f1,?f2)
} ORDER BY ?t1 ?t2
Spatial Aggregation
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX mm:  <http://linkedmultimedia.org/sparql-mm/ns/1.0.0/function#>

SELECT ?f1 ?f2 (mm:spatialIntersection(?f1,?f2) AS ?box) WHERE {
    ?f1 rdfs:label "a".
    ?f2 rdfs:label "b".
}
Combined Aggregation
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX mm:  <http://linkedmultimedia.org/sparql-mm/ns/1.0.0/function#>

SELECT ?f1 ?f2 (mm:boundingBox(?f1,?f2) AS ?box) WHERE {
    ?f1 rdfs:label "a".
    ?f2 rdfs:label "b".
}
Accessor Method
PREFIX ma: <http://www.w3.org/ns/ma-ont#>
PREFIX mm: <http://linkedmultimedia.org/sparql-mm/ns/1.0.0/function#>

SELECT ?f1 WHERE {
    ?f1 a ma:MediaFragment.
} ORDER BY mm:duration(?f1)

More information

  1. The SPARQL-MM Specification
  2. List of SPARQL-MM functions
Labels:
None
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.