mulgara - semantic store

skip navigation


HTTP Resolver and MP3 Content Handler Tutorial

External resolvers are usually, but not always, related to parsing content from a file into data that is meaningful to Mulgara. To make it easier to resolve a file's URL (which can be of any protocol) the resolver architecture and construction of statements is split into two parts, the:

  1. Protocol resolver

    Protocol resolvers are in charge of communicating with the database via the resolver SPI.

  2. Content handler

    Content handlers convert the data supplied into statements that can be used for resolving queries against.

The purpose of this tutorial is to show you how to construct a protocol resolver and content handler, which can be used together to query an MP3 file across an http connection.

The following example queries an MP3 file for the data contained within its id3 tags:

select $subject $predicate $object
from <>
where $subject $predicate $object;

This query could return information like the following:

$subject $predicate $object
node_2 <> <>
node_2 <> 'The latest hit from U2'
node_2 <> 'Vertigo'
node_2 <> 'U2'
node_2 <> '1'
node_2 <> '2004'
node_2 <> '78'

This general query is useful for finding out everything about a single MP3 file located on a server. However, using more complex queries, it is possible to query across several MP3 files to discover information such as:


An RDF schema file (mp3.rdfs) is provided with the tutorial source to allow you to know the available predicates and classes to be able to construct your queries. It is located in the src/jar/content-mp3/rdfs/ directory of the your Mulgara installation.

Valid XHTML 1.0 TransitionalValid CSS 3.0!