<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> <title>Soprano: RDF Storage</title> <link href="tabs.css" rel="stylesheet" type="text/css"/> <link href="doxygen.css" rel="stylesheet" type="text/css"/> </head> <body> <!-- Generated by Doxygen 1.7.1 --> <script type="text/javascript"> function hasClass(ele,cls) { return ele.className.match(new RegExp('(\\s|^)'+cls+'(\\s|$)')); } function addClass(ele,cls) { if (!this.hasClass(ele,cls)) ele.className += " "+cls; } function removeClass(ele,cls) { if (hasClass(ele,cls)) { var reg = new RegExp('(\\s|^)'+cls+'(\\s|$)'); ele.className=ele.className.replace(reg,' '); } } function toggleVisibility(linkObj) { var base = linkObj.getAttribute('id'); var summary = document.getElementById(base + '-summary'); var content = document.getElementById(base + '-content'); var trigger = document.getElementById(base + '-trigger'); if ( hasClass(linkObj,'closed') ) { summary.style.display = 'none'; content.style.display = 'block'; trigger.src = 'open.png'; removeClass(linkObj,'closed'); addClass(linkObj,'opened'); } else if ( hasClass(linkObj,'opened') ) { summary.style.display = 'block'; content.style.display = 'none'; trigger.src = 'closed.png'; removeClass(linkObj,'opened'); addClass(linkObj,'closed'); } return false; } </script> <div class="navigation" id="top"> <div class="tabs"> <ul class="tablist"> <li><a href="index.html"><span>Main Page</span></a></li> <li class="current"><a href="pages.html"><span>Related Pages</span></a></li> <li><a href="namespaces.html"><span>Namespaces</span></a></li> <li><a href="annotated.html"><span>Classes</span></a></li> <li><a href="files.html"><span>Files</span></a></li> </ul> </div> <div class="navpath"> <ul> <li><a class="el" href="index.html">Soprano (aka QRDF) - A modular RDF storage framework</a> </li> </ul> </div> </div> <div class="header"> <div class="headertitle"> <h1>RDF Storage </h1> </div> </div> <div class="contents"> <p>The central class in <a class="el" href="namespaceSoprano.html">Soprano</a> is <a class="el" href="classSoprano_1_1Model.html" title="A Model is the central class in Soprano. It is a queryable collection of RDF quadruples, i.e statements.">Soprano::Model</a> which represents an RDF repository. Model provides methods to add, remove, and list statements and to query the repository.</p> <p>The actual work is done by storage plugins (<a class="el" href="classSoprano_1_1Backend.html" title="Soprano::Backend defines the interface for a Soprano backend plugin.">Soprano::Backend</a>).</p> <p>Model instances are mostly created by the plugin implementations through the <a class="el" href="classSoprano_1_1Backend.html#abe4347c68662b53fc2f709b4536febb2">Soprano::Backend::createModel()</a> methods. In the most simple case one does not need to bother with <a class="el" href="classSoprano_1_1Backend.html" title="Soprano::Backend defines the interface for a Soprano backend plugin.">Soprano::Backend</a> though, as the basic methods are duplicated in the <a class="el" href="namespaceSoprano.html">Soprano</a> namespace. Thus, to create a simple memory model using the default Soprano backend:</p> <div class="fragment"><pre class="fragment"> <a class="code" href="classSoprano_1_1Model.html" title="A Model is the central class in Soprano. It is a queryable collection of RDF quadruples, i.e statements.">Soprano::Model</a> m = <a class="code" href="namespaceSoprano.html#a66f765cf9fd9aae07f874fdb8867dd1c">Soprano::createModel</a>(); </pre></div><p>Finer grained control can be achieved by using the Backend directly:</p> <div class="fragment"><pre class="fragment"> <a class="code" href="classSoprano_1_1Backend.html" title="Soprano::Backend defines the interface for a Soprano backend plugin.">Soprano::Backend</a>* backend = <a class="code" href="namespaceSoprano.html#aeed48e726dae9828430ed9b397310481">Soprano::discoverBackendByName</a>( <span class="stringliteral">"redland"</span> ); <a class="code" href="classSoprano_1_1Model.html" title="A Model is the central class in Soprano. It is a queryable collection of RDF quadruples, i.e statements.">Soprano::Model</a>* model = backend-><a class="code" href="classSoprano_1_1Backend.html#abe4347c68662b53fc2f709b4536febb2">createModel</a>(); </pre></div><p>Soprano makes use of contexts, i.e. named graphs. Thus, statements as represented by <a class="el" href="classSoprano_1_1Statement.html" title="A Statement instance represents one RDF quadruple.">Soprano::Statement</a> are actually RDF quadruples.</p> <p>For further details on <a class="el" href="classSoprano_1_1Model.html" title="A Model is the central class in Soprano. It is a queryable collection of RDF quadruples, i.e statements.">Soprano::Model</a> usage see the class and method documentation.</p> <p>For details on existing backends see: </p> <ul> <li><a class="el" href="soprano_backends.html">Soprano Backends</a> </li> </ul> </div> <hr class="footer"/><address class="footer"><small>Generated on Thu Oct 21 2010 for Soprano by <a href="http://www.doxygen.org/index.html"> <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.1 </small></address> </body> </html>