• Skip to content
  • Skip to link menu
KDE 4.1 API Reference
  • KDE API Reference
  • API Reference
  • Sitemap
  • Contact Us
 

soprano

Soprano (aka QRDF) - A modular RDF storage framework

Soprano is a QT-based pluggable framework for RDF storage and parsing. It tries to provide a highly usable interface to several RDF storage solutions.

Overview

Soprano centers around the Soprano::Model class which represents one storage set. A Soprano::Model is basically a set of RDF quadruples, i.e. Soprano::Statement. The actual storage is done via Soprano::Backend plugins. All query operations return Soprano::Iterator instances. Iterator is a explicitely shared class which is very easy to understand and use.

Soprano makes the distinction between two types of Models: Soprano::StorageModel and Soprano::FilterModel. The former one is intended to be the basic Model which actually stores the data while the latter ones can be stacked on top of a Soprano::StorageModel to perform certain filter operations. Thes filter operations can range from very basic things such as disallowing any write operation (Soprano::Util::ReadOnlyModel) to more complex things such as full text indexing of all literal statements (Soprano::Index::IndexFilterModel) or exporting the Model via D-Bus (Soprano::Server::DBusExportModel).

Apart from storage Soprano provides a system for RDF parser and serializer plugins. For more details on parsing or serializing RDF data see the Soprano::Parser and Soprano::Serializer classes.

Quickstart

Create an RDF Model:

 Soprano::Model* model = Soprano::createModel();

Fill it with statements:

 model->addStatement( Soprano::Statement( QUrl( "http://mysite.org/data#A"), Soprano::Vocabulary::RDFS::label(), Soprano::LiteralValue( "A test resource" ) ) );

Read the data back:

 Soprano::StatementIterator it = model->listStatements();
 while( it.next() ) {
    displayStatement( *it );
 }

Query the data:

 Soprano::QueryResultIterator it = model->executeQuery( "select ?r where { ?r ?p ?o . }", Soprano::Query::QueryLanguageSparql );
 while( it.next() ) {
    displayResult( it.binding( "r" ) );
 }

Contents

The following sections contain further information on the usage of Soprano.

  • RDF Storage
  • RDF Parsing and Serialization
  • Error handling in Soprano
  • Writing Soprano Plugins
  • Soprano Server

soprano

Skip menu "soprano"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

API Reference

Skip menu "API Reference"
  •   server
  • Decibel
  • eigen
  • kdewin32
  •   Phonon
  •     Backend
  • qca
  • qimageblitz
  • soprano
  • strigi
  •     searchclient
  •     streamanalyzer
  •     streams
Generated for API Reference by doxygen 1.5.4
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal