Development/Tutorials/Metadata/Nepomuk/NepomukServer: Difference between revisions

From KDE TechBase
mNo edit summary
No edit summary
Line 3: Line 3:
name=Nepomuk Server|
name=Nepomuk Server|
pre=|
pre=|
next=|
next=[[../AdvancedQueries|Advanced Queries]]|
reading=[[../RDFIntroduction|Introduction to RDF and Ontologies]], [[../Resources|Handling Resources with Nepomuk]]|
reading=[[../RDFIntroduction|Introduction to RDF and Ontologies]], [[../Resources|Handling Resources with Nepomuk]]|
}}
}}

Revision as of 09:57, 16 February 2008

Nepomuk Server
Tutorial Series   Nepomuk
Previous  
What's Next   Advanced Queries
Further Reading   Introduction to RDF and Ontologies, Handling Resources with Nepomuk

The Nepomuk Server

The Nepomuk Server is a KDED module which hosts the main Nepomuk data repository. The main repository is an RDF database using Soprano including a Soprano full text index. The interface of the repository is exported via DBus (The DBus interface is defined by Soprano). When using the Soprano DBus interface from within a KDE application there is no need to bother with QDBus. Soprano provides the Soprano::Client::DBusModel class which wraps all DBus communication into a nice Soprano::Model interface.

There are two ways to access this wrapper model:

1. Use Soprano::Client::DBusClient to create a connection to the Nepomuk Server:

Soprano::Client::DBusClient* client = new Soprano::Client::DBusClient( "org.kde.NepomukServer" ); Soprano::Model* model = client->createModel( "main" );

The Nepomuk Server registers as DBus service org.kde.NepomukServer and the name of the main data repository is main.

2. Use the Nepomuk library, i.e. ResourceManager to access the main model:

Soprano::Model* model = Nepomuk::ResourceManager::instance()->mainModel();

The advantage of the first version is that there is no need to link to libnepomuk.