This file is indexed.

/usr/share/doc/python-rdflib-doc/html/univrdfstore.html is in python-rdflib-doc 4.1.2-3.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
<!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/html; charset=utf-8" />
    

    <title>A Universal RDF Store Interface &mdash; rdflib 4.1.2 documentation</title>

<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;"/>


    
    <link rel="stylesheet" href="_static/rtd.css" type="text/css" />
    <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
    
    <script type="text/javascript">
      var DOCUMENTATION_OPTIONS = {
        URL_ROOT:    './',
        VERSION:     '4.1.2',
        COLLAPSE_INDEX: false,
        FILE_SUFFIX: '.html',
        HAS_SOURCE:  true
      };
    </script>
    <script type="text/javascript" src="_static/jquery.js"></script>
    <script type="text/javascript" src="_static/underscore.js"></script>
    <script type="text/javascript" src="_static/doctools.js"></script>
    <script type="text/javascript" src="_static/searchtools.js"></script>
    <link rel="top" title="rdflib 4.1.2 documentation" href="index.html" />
    <link rel="next" title="Persisting Notation 3 Terms" href="persisting_n3_terms.html" />
    <link rel="prev" title="Writing RDFLib Documentation" href="docs.html" /> 
  </head>
  <body>
    <div class="related">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="genindex.html" title="General Index"
             accesskey="I">index</a></li>
        <li class="right" >
          <a href="py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li class="right" >
          <a href="persisting_n3_terms.html" title="Persisting Notation 3 Terms"
             accesskey="N">next</a> |</li>
        <li class="right" >
          <a href="docs.html" title="Writing RDFLib Documentation"
             accesskey="P">previous</a> |</li>
        <li><a href="index.html">rdflib 4.1.2 documentation</a> &raquo;</li> 
      </ul>
    </div>  

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body">
            
  <div class="section" id="a-universal-rdf-store-interface">
<span id="univrdfstore"></span><h1>A Universal RDF Store Interface<a class="headerlink" href="#a-universal-rdf-store-interface" title="Permalink to this headline"></a></h1>
<p>This document attempts to summarize some fundamental components of an RDF store. The motivation is to outline a standard set of interfaces for providing the support needed to persist an <a class="reference external" href="http://www.w3.org/TR/rdf-concepts/#dfn-rdf-graph">RDF Graph</a> in a way that is universal and not tied to any specific implementation.</p>
<p>For the most part, the interface adheres to the core RDF model and uses terminology that is consistent with the RDF Model specifications. However, this suggested interface also extends an RDF store with additional requirements necessary to facilitate those aspects of <a class="reference external" href="http://www.w3.org/2000/10/swap/Primer">Notation 3</a> that go beyond the RDF model to provide a framework for <a class="reference external" href="http://en.wikipedia.org/wiki/First-order_predicate_logic">First Order Predicate Logic</a> processing and persistence.</p>
<div class="section" id="terminology">
<h2>Terminology<a class="headerlink" href="#terminology" title="Permalink to this headline"></a></h2>
<div class="topic">
<p class="topic-title first"><strong>Context</strong></p>
<p>A named, unordered set of statements (that could also be called a sub-graph). The <tt class="docutils literal"><span class="pre">named</span> <span class="pre">graph</span></tt> <a class="reference external" href="http://www.w3.org/2004/03/trix/">literature</a> and <a class="reference external" href="http://metacognition.info/Triclops/?xslt=Triclops.xslt&amp;query=type(list(rdfs:Class,owl:Class,rdf:Property))&amp;queryType=Graph&amp;remoteGraph=http://www.w3.org/2004/03/trix/rdfg-1/">ontology</a> are relevant to this concept. The term <tt class="docutils literal"><span class="pre">context</span></tt> could be thought of as either the sub-graph itself or the relationship between an RDF triple and a sub-graph in which it is found (this latter is how the term context is used in the <a class="reference external" href="http://www.w3.org/DesignIssues/Notation3.html">Notation 3 Design Issues page</a>).</p>
<p>It is worth noting that the concept of logically grouping <a class="reference external" href="http://www.w3.org/TR/rdf-concepts/#section-triples">triples</a> within an addressable &#8216;set&#8217; or &#8216;subgraph&#8217; is just barely beyond the scope of the RDF model. The RDF model defines a graph to be an arbitrary collection of triples and the semantics of these triples &#8212; but doesn&#8217;t give guidance on how to address such arbitrary collections in a consistent manner. Although a collection of triples can be thought of as a resource itself, the association between a triple and the collection (of which it is a part) is not covered. <a class="reference external" href="http://laurentszyster.be/blog/public-rdf/">Public RDF</a> is an example of an attempt to formally model this relationship - and includes one other unrelated extension: Articulated Text</p>
</div>
<div class="topic">
<p class="topic-title first"><strong>Conjunctive Graph</strong></p>
<p>This refers to the &#8216;top-level&#8217; Graph. It is the aggregation of all the contexts within it and is also the appropriate, absolute boundary for <a class="reference external" href="http://cs.wwc.edu/~aabyan/Logic/CWA.html">closed world assumptions</a> / models. This distinction is the low-hanging fruit of RDF along the path to the semantic web and most of its value is in (corporate/enterprise) real-world problems:</p>
<blockquote class="pull-quote">
<div>There are at least two situations where the closed world assumption is used. The first is where it is assumed that a knowledge base contains all relevant facts. This is common in corporate databases. That is, the information it contains is assumed to be complete</div></blockquote>
<p>From a store perspective, closed world assumptions also provide the benefit of better query response times, due to the explicit closed world boundaries. Closed world boundaries can be made transparent by federated queries that assume each <tt class="xref py py-class docutils literal"><span class="pre">ConjunctiveGraph</span></tt> is a section of a larger, unbounded universe. So a closed world assumption does not preclude you from an open world assumption.</p>
<p>For the sake of persistence, Conjunctive Graphs must be distinguished by identifiers (which may not necessarily be RDF <a class="reference external" href="http://www.w3.org/2002/07/rdf-identifer-terminology/">identifiers</a> or may be an RDF identifier normalized - SHA1/MD5 perhaps - for database naming purposes) that could be referenced to indicate conjunctive queries (queries made across the entire conjunctive graph) or appear as nodes in asserted statements. In this latter case, such statements could be interpreted as being made about the entire &#8216;known&#8217; universe. For example:</p>
<div class="highlight-xml"><div class="highlight"><pre><span class="nt">&lt;urn:uuid:conjunctive-graph-foo&gt;</span> rdf:type :ConjunctiveGraph
<span class="nt">&lt;urn:uuid:conjunctive-graph-foo&gt;</span> rdf:type log:Truth
<span class="nt">&lt;urn:uuid:conjunctive-graph-foo&gt;</span> :persistedBy :MySQL
</pre></div>
</div>
</div>
<div class="topic">
<p class="topic-title first"><strong>Quoted Statement</strong></p>
<p>A statement that isn&#8217;t asserted but is referred to in some manner. Most often, this happens when we want to make a statement about another statement (or set of statements) without necessarily saying these quoted statements (are true). For example:</p>
<div class="highlight-text"><div class="highlight"><pre>Chimezie said &quot;higher-order statements are complicated&quot;
</pre></div>
</div>
<p>Which can be written (in N3) as:</p>
<div class="highlight-n3"><div class="highlight"><pre>:chimezie :said {:higherOrderStatements rdf:type :complicated}
</pre></div>
</div>
</div>
<div class="topic">
<p class="topic-title first"><strong>Formula</strong></p>
<p>A context whose statements are quoted or hypothetical.</p>
<p>Context quoting can be thought of as very similar to <a class="reference external" href="http://www.w3.org/TR/rdf-mt/#Reif">reification</a>. The main difference is that quoted statements are not asserted or considered as statements of truth about the universe and can be referenced as a group: a hypothetical RDF Graph</p>
</div>
<div class="topic">
<p class="topic-title first"><strong>Universal Quantifiers / Variables</strong></p>
<p>(relevant references):</p>
<blockquote>
<div><ul class="simple">
<li>OWL <a class="reference external" href="http://www.w3.org/Submission/SWRL/swrl.owl">Definition</a> of <a class="reference external" href="http://www.w3.org/Submission/SWRL/">SWRL</a>.</li>
<li>SWRL/RuleML <a class="reference external" href="http://www.w3.org/Submission/SWRL/#owls_Variable">Variable</a></li>
</ul>
</div></blockquote>
</div>
<div class="topic">
<p class="topic-title first"><strong>Terms</strong></p>
<p>Terms are the kinds of objects that can appear in a quoted/asserted triple.</p>
<p>This includes those that are core to RDF:</p>
<blockquote>
<div><ul class="simple">
<li>Blank Nodes</li>
<li>URI References</li>
<li>Literals (which consist of a literal value, datatype and language tag)</li>
</ul>
</div></blockquote>
<p>Those that extend the RDF model into N3:</p>
<blockquote>
<div><ul class="simple">
<li>Formulae</li>
<li>Universal Quantifications (Variables)</li>
</ul>
</div></blockquote>
<p>And those that are primarily for matching against &#8216;Nodes&#8217; in the underlying Graph:</p>
<blockquote>
<div><ul class="simple">
<li>REGEX Expressions</li>
<li>Date Ranges</li>
<li>Numerical Ranges</li>
</ul>
</div></blockquote>
</div>
<div class="topic">
<p class="topic-title first"><strong>Nodes</strong></p>
<p>Nodes are a subset of the Terms that the underlying store actually persists. The set of such Terms depends on whether or not the store is formula-aware. Stores that aren&#8217;t formula-aware would only persist those terms core to the RDF Model, and those that are formula-aware would be able to persist the N3 extensions as well. However, utility terms that only serve the purpose for matching nodes by term-patterns probably will only be terms and not nodes.</p>
<p>The set of nodes of an RDF graph is the set of subjects and objects of triples in the graph.</p>
</div>
<div class="topic">
<p class="topic-title first"><strong>Context-aware</strong></p>
<p>An RDF store capable of storing statements within contexts is considered context-aware. Essentially, such a store is able to partition the RDF model it represents into individual, named, and addressable sub-graphs.</p>
</div>
<div class="topic">
<p class="topic-title first"><strong>Formula-aware</strong></p>
<p>An RDF store capable of distinguishing between statements that are asserted and statements that are quoted is considered formula-aware.</p>
<p>Such a store is responsible for maintaining this separation and ensuring that queries against the entire model (the aggregation of all the contexts - specified by not limiting a &#8216;query&#8217; to a specifically name context) do not include quoted statements. Also, it is responsible for distinguishing universal quantifiers (variables).</p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">These 2 additional concepts (formulae and variables) must be thought of as core extensions and distinguishable from the other terms of a triple (for the sake of the persistence round trip - at the very least). It&#8217;s worth noting that the &#8216;scope&#8217; of universal quantifiers (variables) and existential quantifiers (BNodes) is the formula (or context - to be specific) in which their statements reside. Beyond this, a Formula-aware store behaves the same as a Context-aware store.</p>
</div>
</div>
<div class="topic">
<p class="topic-title first"><strong>Conjunctive Query</strong></p>
<p>Any query that doesn&#8217;t limit the store to search within a named context only. Such a query expects a context-aware store to search the entire asserted universe (the conjunctive graph). A formula-aware store is expected not to include quoted statements when matching such a query.</p>
</div>
<div class="topic">
<p class="topic-title first"><strong>N3 Round Trip</strong></p>
<p>This refers to the requirements on a formula-aware RDF store&#8217;s persistence mechanism necessary for it to be properly populated by a N3 parser and rendered as syntax by a N3 serializer.</p>
</div>
<div class="topic">
<p class="topic-title first"><strong>Transactional Store</strong></p>
<p>An RDF store capable of providing transactional integrity to the RDF operations performed on it.</p>
</div>
</div>
<div class="section" id="interpreting-syntax">
<h2>Interpreting Syntax<a class="headerlink" href="#interpreting-syntax" title="Permalink to this headline"></a></h2>
<p>The following <a class="reference external" href="http://metacognition.info/Triclops/?xslt=Triclops.xslt&amp;query=log:N3Document&amp;queryType=Triple&amp;remoteGraph=http://www.w3.org/2000/10/swap/log#">Notation 3 document</a>:</p>
<div class="highlight-text"><div class="highlight"><pre>{ ?x a :N3Programmer } =&gt; { ?x :has [a :Migraine] }
</pre></div>
</div>
<p>Could cause the following statements to be asserted in the store:</p>
<div class="highlight-text"><div class="highlight"><pre>_:a log:implies _:b
</pre></div>
</div>
<p>This statement would be asserted in the partition associated with quoted statements (in a formula named <tt class="docutils literal"><span class="pre">_:a</span></tt>)</p>
<div class="highlight-n3"><div class="highlight"><pre>?x rdf:type :N3Programmer
</pre></div>
</div>
<p>Finally, these statements would be asserted in the same partition (in a formula named <tt class="docutils literal"><span class="pre">_:b</span></tt>)</p>
<div class="highlight-n3"><div class="highlight"><pre>?x :has _:c

_:c rdf:type :Migraine
</pre></div>
</div>
</div>
<div class="section" id="formulae-and-variables-as-terms">
<h2>Formulae and Variables as Terms<a class="headerlink" href="#formulae-and-variables-as-terms" title="Permalink to this headline"></a></h2>
<p>Formulae and variables are distinguishable from URI references, Literals, and BNodes by the following syntax:</p>
<div class="highlight-text"><div class="highlight"><pre>{ .. } - Formula ?x - Variable
</pre></div>
</div>
<p>They must also be distinguishable in persistence to ensure they can be round-tripped.</p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">There are a number of other issues regarding the <a href="#id11"><span class="problematic" id="id12">:doc:`persisting of N3 terms &lt;persisting_n3_terms&gt;`_</span></a>.</p>
</div>
</div>
<div class="section" id="database-management">
<h2>Database Management<a class="headerlink" href="#database-management" title="Permalink to this headline"></a></h2>
<p>An RDF store should provide standard interfaces for the management of database connections. Such interfaces are standard to most database management systems (Oracle, MySQL, Berkeley DB, Postgres, etc..)</p>
<p>The following methods are defined to provide this capability (see below for description of the <em>configuration</em> string):</p>
<dl class="method">
<dt>
<tt class="descclassname">Store.</tt><tt class="descname">open</tt><big>(</big><em>configuration</em>, <em>create=False</em><big>)</big><a class="reference internal" href="_modules/rdflib/store.html#Store.open"><span class="viewcode-link">[source]</span></a></dt>
<dd><p>Opens the store specified by the configuration string. If
create is True a store will be created if it does not already
exist. If create is False and a store does not already exist
an exception is raised. An exception is also raised if a store
exists, but there is insufficient permissions to open the
store.  This should return one of:
VALID_STORE, CORRUPTED_STORE, or NO_STORE</p>
</dd></dl>

<dl class="method">
<dt>
<tt class="descclassname">Store.</tt><tt class="descname">close</tt><big>(</big><em>commit_pending_transaction=False</em><big>)</big><a class="reference internal" href="_modules/rdflib/store.html#Store.close"><span class="viewcode-link">[source]</span></a></dt>
<dd><p>This closes the database connection. The commit_pending_transaction
parameter specifies whether to commit all pending transactions before
closing (if the store is transactional).</p>
</dd></dl>

<dl class="method">
<dt>
<tt class="descclassname">Store.</tt><tt class="descname">destroy</tt><big>(</big><em>configuration</em><big>)</big><a class="reference internal" href="_modules/rdflib/store.html#Store.destroy"><span class="viewcode-link">[source]</span></a></dt>
<dd><p>This destroys the instance of the store identified by the
configuration string.</p>
</dd></dl>

<p>The <em>configuration</em> string is understood by the store implementation and represents all the parameters needed to locate an individual instance of a store. This could be similar to an ODBC string or in fact be an ODBC string, if the connection protocol to the underlying database is ODBC.</p>
<p>The <a class="reference internal" href="apidocs/rdflib.html#rdflib.graph.Graph.open" title="rdflib.graph.Graph.open"><tt class="xref py py-meth docutils literal"><span class="pre">open()</span></tt></a> function needs to fail intelligently in order to clearly express that a store (identified by the given configuration string) already exists or that there is no store (at the location specified by the configuration string) depending on the value of <tt class="docutils literal"><span class="pre">create</span></tt>.</p>
</div>
<div class="section" id="triple-interfaces">
<h2>Triple Interfaces<a class="headerlink" href="#triple-interfaces" title="Permalink to this headline"></a></h2>
<p>An RDF store could provide a standard set of interfaces for the manipulation, management, and/or retrieval of its contained triples (asserted or quoted):</p>
<span class="target" id="module-rdflib.store"></span><dl class="method">
<dt>
<tt class="descclassname">Store.</tt><tt class="descname">add</tt><big>(</big><em>(subject</em>, <em>predicate</em>, <em>object)</em>, <em>context</em>, <em>quoted=False</em><big>)</big><a class="reference internal" href="_modules/rdflib/store.html#Store.add"><span class="viewcode-link">[source]</span></a></dt>
<dd><p>Adds the given statement to a specific context or to the model. The
quoted argument is interpreted by formula-aware stores to indicate
this statement is quoted/hypothetical It should be an error to not
specify a context and have the quoted argument be True. It should also
be an error for the quoted argument to be True when the store is not
formula-aware.</p>
</dd></dl>

<dl class="method">
<dt>
<tt class="descclassname">Store.</tt><tt class="descname">remove</tt><big>(</big><em>(subject</em>, <em>predicate</em>, <em>object)</em>, <em>context=None</em><big>)</big><a class="reference internal" href="_modules/rdflib/store.html#Store.remove"><span class="viewcode-link">[source]</span></a></dt>
<dd><p>Remove the set of triples matching the pattern from the store</p>
</dd></dl>

<dl class="method">
<dt>
<tt class="descclassname">Store.</tt><tt class="descname">triples</tt><big>(</big><em>triple_pattern</em>, <em>context=None</em><big>)</big><a class="reference internal" href="_modules/rdflib/store.html#Store.triples"><span class="viewcode-link">[source]</span></a></dt>
<dd><p>A generator over all the triples matching the pattern. Pattern can
include any objects for used for comparing against nodes in the store,
for example, REGEXTerm, URIRef, Literal, BNode, Variable, Graph,
QuotedGraph, Date? DateRange?</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>context</strong> &#8211; A conjunctive query can be indicated by either</td>
</tr>
</tbody>
</table>
<p>providing a value of None, or a specific context can be
queries by passing a Graph instance (if store is context aware).</p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">The <a class="reference internal" href="apidocs/rdflib.html#rdflib.store.Store.triples" title="rdflib.store.Store.triples"><tt class="xref py py-meth docutils literal"><span class="pre">triples()</span></tt></a> method can be thought of as the primary mechanism for producing triples with nodes that match the corresponding terms in the <tt class="docutils literal"><span class="pre">(s,</span> <span class="pre">p,</span> <span class="pre">o)</span></tt> term pattern provided. The term pattern <tt class="docutils literal"><span class="pre">(None,</span> <span class="pre">None,</span> <span class="pre">None)</span></tt> matches <em>all</em> nodes.</p>
</div>
</dd></dl>

<dl class="method">
<dt>
<tt class="descclassname">Store.</tt><tt class="descname">__len__</tt><big>(</big><em>context=None</em><big>)</big><a class="reference internal" href="_modules/rdflib/store.html#Store.__len__"><span class="viewcode-link">[source]</span></a></dt>
<dd><p>Number of statements in the store. This should only account for non-
quoted (asserted) statements if the context is not specified,
otherwise it should return the number of statements in the formula or
context given.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>context</strong> &#8211; a graph instance to query or None</td>
</tr>
</tbody>
</table>
</dd></dl>

</div>
<div class="section" id="formula-context-interfaces">
<h2>Formula / Context Interfaces<a class="headerlink" href="#formula-context-interfaces" title="Permalink to this headline"></a></h2>
<p>These interfaces work on contexts and formulae (for stores that are formula-aware) interchangeably.</p>
<dl class="method">
<dt>
<tt class="descclassname">ConjunctiveGraph.</tt><tt class="descname">contexts</tt><big>(</big><em>triple=None</em><big>)</big><a class="reference internal" href="_modules/rdflib/graph.html#ConjunctiveGraph.contexts"><span class="viewcode-link">[source]</span></a></dt>
<dd><p>Iterate over all contexts in the graph</p>
<p>If triple is specified, iterate over all contexts the triple is in.</p>
</dd></dl>

<dl class="method">
<dt>
<tt class="descclassname">ConjunctiveGraph.</tt><tt class="descname">remove_context</tt><big>(</big><em>context</em><big>)</big><a class="reference internal" href="_modules/rdflib/graph.html#ConjunctiveGraph.remove_context"><span class="viewcode-link">[source]</span></a></dt>
<dd><p>Removes the given context from the graph</p>
</dd></dl>

</div>
<div class="section" id="interface-test-cases">
<h2>Interface Test Cases<a class="headerlink" href="#interface-test-cases" title="Permalink to this headline"></a></h2>
<div class="section" id="basic">
<h3>Basic<a class="headerlink" href="#basic" title="Permalink to this headline"></a></h3>
<p>Tests parsing, triple patterns, triple pattern removes, size, contextual removes</p>
<div class="section" id="source-graph">
<h4>Source Graph<a class="headerlink" href="#source-graph" title="Permalink to this headline"></a></h4>
<div class="highlight-n3"><div class="highlight"><pre>@prefix rdf: &lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#&gt; .
@prefix rdfs: &lt;http://www.w3.org/2000/01/rdf-schema#&gt; .
@prefix : &lt;http://test/&gt; .
{:a :b :c; a :foo} =&gt; {:a :d :c} .
_:foo a rdfs:Class .
:a :d :c .
</pre></div>
</div>
</div>
<div class="section" id="test-code">
<h4>Test code<a class="headerlink" href="#test-code" title="Permalink to this headline"></a></h4>
<div class="highlight-python"><div class="highlight"><pre><span class="n">implies</span> <span class="o">=</span> <span class="n">URIRef</span><span class="p">(</span><span class="s">&quot;http://www.w3.org/2000/10/swap/log#implies&quot;</span><span class="p">)</span>
<span class="n">a</span> <span class="o">=</span> <span class="n">URIRef</span><span class="p">(</span><span class="s">&#39;http://test/a&#39;</span><span class="p">)</span>
<span class="n">b</span> <span class="o">=</span> <span class="n">URIRef</span><span class="p">(</span><span class="s">&#39;http://test/b&#39;</span><span class="p">)</span>
<span class="n">c</span> <span class="o">=</span> <span class="n">URIRef</span><span class="p">(</span><span class="s">&#39;http://test/c&#39;</span><span class="p">)</span>
<span class="n">d</span> <span class="o">=</span> <span class="n">URIRef</span><span class="p">(</span><span class="s">&#39;http://test/d&#39;</span><span class="p">)</span>
<span class="k">for</span> <span class="n">s</span><span class="p">,</span><span class="n">p</span><span class="p">,</span><span class="n">o</span> <span class="ow">in</span> <span class="n">g</span><span class="o">.</span><span class="n">triples</span><span class="p">((</span><span class="bp">None</span><span class="p">,</span><span class="n">implies</span><span class="p">,</span><span class="bp">None</span><span class="p">)):</span>
    <span class="n">formulaA</span> <span class="o">=</span> <span class="n">s</span>
    <span class="n">formulaB</span> <span class="o">=</span> <span class="n">o</span>

    <span class="c">#contexts test</span>
    <span class="k">assert</span> <span class="nb">len</span><span class="p">(</span><span class="nb">list</span><span class="p">(</span><span class="n">g</span><span class="o">.</span><span class="n">contexts</span><span class="p">()))</span><span class="o">==</span><span class="mi">3</span>

    <span class="c">#contexts (with triple) test</span>
    <span class="k">assert</span> <span class="nb">len</span><span class="p">(</span><span class="nb">list</span><span class="p">(</span><span class="n">g</span><span class="o">.</span><span class="n">contexts</span><span class="p">((</span><span class="n">a</span><span class="p">,</span><span class="n">d</span><span class="p">,</span><span class="n">c</span><span class="p">))))</span><span class="o">==</span><span class="mi">2</span>

    <span class="c">#triples test cases</span>
    <span class="k">assert</span> <span class="nb">type</span><span class="p">(</span><span class="nb">list</span><span class="p">(</span><span class="n">g</span><span class="o">.</span><span class="n">triples</span><span class="p">((</span><span class="bp">None</span><span class="p">,</span><span class="n">RDF</span><span class="o">.</span><span class="n">type</span><span class="p">,</span><span class="n">RDFS</span><span class="o">.</span><span class="n">Class</span><span class="p">)))[</span><span class="mi">0</span><span class="p">][</span><span class="mi">0</span><span class="p">])</span> <span class="o">==</span> <span class="n">BNode</span>
    <span class="k">assert</span> <span class="nb">len</span><span class="p">(</span><span class="nb">list</span><span class="p">(</span><span class="n">g</span><span class="o">.</span><span class="n">triples</span><span class="p">((</span><span class="bp">None</span><span class="p">,</span><span class="n">implies</span><span class="p">,</span><span class="bp">None</span><span class="p">))))</span><span class="o">==</span><span class="mi">1</span>
    <span class="k">assert</span> <span class="nb">len</span><span class="p">(</span><span class="nb">list</span><span class="p">(</span><span class="n">g</span><span class="o">.</span><span class="n">triples</span><span class="p">((</span><span class="bp">None</span><span class="p">,</span><span class="n">RDF</span><span class="o">.</span><span class="n">type</span><span class="p">,</span><span class="bp">None</span><span class="p">))))</span><span class="o">==</span><span class="mi">3</span>
    <span class="k">assert</span> <span class="nb">len</span><span class="p">(</span><span class="nb">list</span><span class="p">(</span><span class="n">g</span><span class="o">.</span><span class="n">triples</span><span class="p">((</span><span class="bp">None</span><span class="p">,</span><span class="n">RDF</span><span class="o">.</span><span class="n">type</span><span class="p">,</span><span class="bp">None</span><span class="p">),</span><span class="n">formulaA</span><span class="p">)))</span><span class="o">==</span><span class="mi">1</span>
    <span class="k">assert</span> <span class="nb">len</span><span class="p">(</span><span class="nb">list</span><span class="p">(</span><span class="n">g</span><span class="o">.</span><span class="n">triples</span><span class="p">((</span><span class="bp">None</span><span class="p">,</span><span class="bp">None</span><span class="p">,</span><span class="bp">None</span><span class="p">),</span><span class="n">formulaA</span><span class="p">)))</span><span class="o">==</span><span class="mi">2</span>
    <span class="k">assert</span> <span class="nb">len</span><span class="p">(</span><span class="nb">list</span><span class="p">(</span><span class="n">g</span><span class="o">.</span><span class="n">triples</span><span class="p">((</span><span class="bp">None</span><span class="p">,</span><span class="bp">None</span><span class="p">,</span><span class="bp">None</span><span class="p">),</span><span class="n">formulaB</span><span class="p">)))</span><span class="o">==</span><span class="mi">1</span>
    <span class="k">assert</span> <span class="nb">len</span><span class="p">(</span><span class="nb">list</span><span class="p">(</span><span class="n">g</span><span class="o">.</span><span class="n">triples</span><span class="p">((</span><span class="bp">None</span><span class="p">,</span><span class="bp">None</span><span class="p">,</span><span class="bp">None</span><span class="p">))))</span><span class="o">==</span><span class="mi">5</span>
    <span class="k">assert</span> <span class="nb">len</span><span class="p">(</span><span class="nb">list</span><span class="p">(</span><span class="n">g</span><span class="o">.</span><span class="n">triples</span><span class="p">((</span><span class="bp">None</span><span class="p">,</span><span class="n">URIRef</span><span class="p">(</span><span class="s">&#39;http://test/d&#39;</span><span class="p">),</span><span class="bp">None</span><span class="p">),</span><span class="n">formulaB</span><span class="p">)))</span><span class="o">==</span><span class="mi">1</span>
    <span class="k">assert</span> <span class="nb">len</span><span class="p">(</span><span class="nb">list</span><span class="p">(</span><span class="n">g</span><span class="o">.</span><span class="n">triples</span><span class="p">((</span><span class="bp">None</span><span class="p">,</span><span class="n">URIRef</span><span class="p">(</span><span class="s">&#39;http://test/d&#39;</span><span class="p">),</span><span class="bp">None</span><span class="p">))))</span><span class="o">==</span><span class="mi">1</span>

    <span class="c">#Remove test cases</span>
    <span class="n">g</span><span class="o">.</span><span class="n">remove</span><span class="p">((</span><span class="bp">None</span><span class="p">,</span><span class="n">implies</span><span class="p">,</span><span class="bp">None</span><span class="p">))</span>
    <span class="k">assert</span> <span class="nb">len</span><span class="p">(</span><span class="nb">list</span><span class="p">(</span><span class="n">g</span><span class="o">.</span><span class="n">triples</span><span class="p">((</span><span class="bp">None</span><span class="p">,</span><span class="n">implies</span><span class="p">,</span><span class="bp">None</span><span class="p">))))</span><span class="o">==</span><span class="mi">0</span>
    <span class="k">assert</span> <span class="nb">len</span><span class="p">(</span><span class="nb">list</span><span class="p">(</span><span class="n">g</span><span class="o">.</span><span class="n">triples</span><span class="p">((</span><span class="bp">None</span><span class="p">,</span><span class="bp">None</span><span class="p">,</span><span class="bp">None</span><span class="p">),</span><span class="n">formulaA</span><span class="p">)))</span><span class="o">==</span><span class="mi">2</span>
    <span class="k">assert</span> <span class="nb">len</span><span class="p">(</span><span class="nb">list</span><span class="p">(</span><span class="n">g</span><span class="o">.</span><span class="n">triples</span><span class="p">((</span><span class="bp">None</span><span class="p">,</span><span class="bp">None</span><span class="p">,</span><span class="bp">None</span><span class="p">),</span><span class="n">formulaB</span><span class="p">)))</span><span class="o">==</span><span class="mi">1</span>
    <span class="n">g</span><span class="o">.</span><span class="n">remove</span><span class="p">((</span><span class="bp">None</span><span class="p">,</span><span class="n">b</span><span class="p">,</span><span class="bp">None</span><span class="p">),</span><span class="n">formulaA</span><span class="p">)</span>
    <span class="k">assert</span> <span class="nb">len</span><span class="p">(</span><span class="nb">list</span><span class="p">(</span><span class="n">g</span><span class="o">.</span><span class="n">triples</span><span class="p">((</span><span class="bp">None</span><span class="p">,</span><span class="bp">None</span><span class="p">,</span><span class="bp">None</span><span class="p">),</span><span class="n">formulaA</span><span class="p">)))</span><span class="o">==</span><span class="mi">1</span>
    <span class="n">g</span><span class="o">.</span><span class="n">remove</span><span class="p">((</span><span class="bp">None</span><span class="p">,</span><span class="n">RDF</span><span class="o">.</span><span class="n">type</span><span class="p">,</span><span class="bp">None</span><span class="p">),</span><span class="n">formulaA</span><span class="p">)</span>
    <span class="k">assert</span> <span class="nb">len</span><span class="p">(</span><span class="nb">list</span><span class="p">(</span><span class="n">g</span><span class="o">.</span><span class="n">triples</span><span class="p">((</span><span class="bp">None</span><span class="p">,</span><span class="bp">None</span><span class="p">,</span><span class="bp">None</span><span class="p">),</span><span class="n">formulaA</span><span class="p">)))</span><span class="o">==</span><span class="mi">0</span>
    <span class="n">g</span><span class="o">.</span><span class="n">remove</span><span class="p">((</span><span class="bp">None</span><span class="p">,</span><span class="n">RDF</span><span class="o">.</span><span class="n">type</span><span class="p">,</span><span class="n">RDFS</span><span class="o">.</span><span class="n">Class</span><span class="p">))</span>

    <span class="c">#remove_context tests</span>
    <span class="n">formulaBContext</span><span class="o">=</span><span class="n">Context</span><span class="p">(</span><span class="n">g</span><span class="p">,</span><span class="n">formulaB</span><span class="p">)</span>
    <span class="n">g</span><span class="o">.</span><span class="n">remove_context</span><span class="p">(</span><span class="n">formulaB</span><span class="p">)</span>
    <span class="k">assert</span> <span class="nb">len</span><span class="p">(</span><span class="nb">list</span><span class="p">(</span><span class="n">g</span><span class="o">.</span><span class="n">triples</span><span class="p">((</span><span class="bp">None</span><span class="p">,</span><span class="n">RDF</span><span class="o">.</span><span class="n">type</span><span class="p">,</span><span class="bp">None</span><span class="p">))))</span><span class="o">==</span><span class="mi">2</span>
    <span class="k">assert</span> <span class="nb">len</span><span class="p">(</span><span class="n">g</span><span class="p">)</span><span class="o">==</span><span class="mi">3</span> <span class="k">assert</span> <span class="nb">len</span><span class="p">(</span><span class="n">formulaBContext</span><span class="p">)</span><span class="o">==</span><span class="mi">0</span>
    <span class="n">g</span><span class="o">.</span><span class="n">remove</span><span class="p">((</span><span class="bp">None</span><span class="p">,</span><span class="bp">None</span><span class="p">,</span><span class="bp">None</span><span class="p">))</span>
    <span class="k">assert</span> <span class="nb">len</span><span class="p">(</span><span class="n">g</span><span class="p">)</span><span class="o">==</span><span class="mi">0</span>
</pre></div>
</div>
</div>
</div>
<div class="section" id="formula-and-variables-test">
<h3>Formula and Variables Test<a class="headerlink" href="#formula-and-variables-test" title="Permalink to this headline"></a></h3>
<div class="section" id="id13">
<h4>Source Graph<a class="headerlink" href="#id13" title="Permalink to this headline"></a></h4>
<div class="highlight-n3"><div class="highlight"><pre>@prefix rdf: &lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#&gt; .
@prefix rdfs:  &lt;http://www.w3.org/2000/01/rdf-schema#&gt; .
@prefix : &lt;http://test/&gt; .
{?x a rdfs:Class} =&gt; {?x a :Klass} .
</pre></div>
</div>
</div>
<div class="section" id="id14">
<h4>Test Code<a class="headerlink" href="#id14" title="Permalink to this headline"></a></h4>
<div class="highlight-python"><div class="highlight"><pre><span class="n">implies</span> <span class="o">=</span> <span class="n">URIRef</span><span class="p">(</span><span class="s">&quot;http://www.w3.org/2000/10/swap/log#implies&quot;</span><span class="p">)</span>
<span class="n">klass</span> <span class="o">=</span> <span class="n">URIRef</span><span class="p">(</span><span class="s">&#39;http://test/Klass&#39;</span><span class="p">)</span>
<span class="k">for</span> <span class="n">s</span><span class="p">,</span><span class="n">p</span><span class="p">,</span><span class="n">o</span> <span class="ow">in</span> <span class="n">g</span><span class="o">.</span><span class="n">triples</span><span class="p">((</span><span class="bp">None</span><span class="p">,</span><span class="n">implies</span><span class="p">,</span><span class="bp">None</span><span class="p">)):</span>
    <span class="n">formulaA</span> <span class="o">=</span> <span class="n">s</span>
    <span class="n">formulaB</span> <span class="o">=</span> <span class="n">o</span>
    <span class="k">assert</span> <span class="nb">type</span><span class="p">(</span><span class="n">formulaA</span><span class="p">)</span> <span class="o">==</span> <span class="n">Formula</span>
    <span class="k">assert</span> <span class="nb">type</span><span class="p">(</span><span class="n">formulaB</span><span class="p">)</span> <span class="o">==</span> <span class="n">Formula</span>
    <span class="k">for</span> <span class="n">s</span><span class="p">,</span><span class="n">p</span><span class="p">,</span><span class="n">o</span> <span class="ow">in</span> <span class="n">g</span><span class="o">.</span><span class="n">triples</span><span class="p">((</span><span class="bp">None</span><span class="p">,</span><span class="n">RDF</span><span class="o">.</span><span class="n">type</span><span class="p">,</span><span class="n">RDFS</span><span class="o">.</span><span class="n">Class</span><span class="p">)),</span><span class="n">formulaA</span><span class="p">):</span>
        <span class="k">assert</span> <span class="nb">type</span><span class="p">(</span><span class="n">s</span><span class="p">)</span> <span class="o">==</span> <span class="n">Variable</span>
    <span class="k">for</span> <span class="n">s</span><span class="p">,</span><span class="n">p</span><span class="p">,</span><span class="n">o</span> <span class="ow">in</span> <span class="n">g</span><span class="o">.</span><span class="n">triples</span><span class="p">((</span><span class="bp">None</span><span class="p">,</span><span class="n">RDF</span><span class="o">.</span><span class="n">type</span><span class="p">,</span><span class="n">klass</span><span class="p">)),</span><span class="n">formulaB</span><span class="p">):</span>
        <span class="k">assert</span> <span class="nb">type</span><span class="p">(</span><span class="n">s</span><span class="p">)</span> <span class="o">==</span> <span class="n">Variable</span>
</pre></div>
</div>
</div>
</div>
<div class="section" id="transactional-tests">
<h3>Transactional Tests<a class="headerlink" href="#transactional-tests" title="Permalink to this headline"></a></h3>
<p>To be instantiated.</p>
</div>
</div>
<div class="section" id="additional-terms-to-model">
<h2>Additional Terms to Model<a class="headerlink" href="#additional-terms-to-model" title="Permalink to this headline"></a></h2>
<p>These are a list of additional kinds of RDF terms (all of which are special Literals)</p>
<blockquote>
<div><ul class="simple">
<li><tt class="xref py py-class docutils literal"><span class="pre">rdflib.plugins.store.regexmatching.REGEXTerm</span></tt> - a REGEX string which can be used in any term slot in order to match by applying the Regular Expression to statements in the underlying graph.</li>
<li>Date (could provide some utility functions for date manipulation / serialization, etc..)</li>
<li>DateRange</li>
</ul>
</div></blockquote>
</div>
<div class="section" id="namespace-management-interfaces">
<h2>Namespace Management Interfaces<a class="headerlink" href="#namespace-management-interfaces" title="Permalink to this headline"></a></h2>
<p>The following namespace management interfaces (defined in Graph) could be implemented in the RDF store. Currently, they exist as stub methods of <a class="reference internal" href="apidocs/rdflib.html#rdflib.store.Store" title="rdflib.store.Store"><tt class="xref py py-class docutils literal"><span class="pre">Store</span></tt></a> and are defined in the store subclasses (e.g. <tt class="xref py py-class docutils literal"><span class="pre">IOMemory</span></tt>):</p>
<dl class="method">
<dt>
<tt class="descclassname">Store.</tt><tt class="descname">bind</tt><big>(</big><em>prefix</em>, <em>namespace</em><big>)</big><a class="reference internal" href="_modules/rdflib/store.html#Store.bind"><span class="viewcode-link">[source]</span></a></dt>
<dd></dd></dl>

<dl class="method">
<dt>
<tt class="descclassname">Store.</tt><tt class="descname">prefix</tt><big>(</big><em>namespace</em><big>)</big><a class="reference internal" href="_modules/rdflib/store.html#Store.prefix"><span class="viewcode-link">[source]</span></a></dt>
<dd></dd></dl>

<dl class="method">
<dt>
<tt class="descclassname">Store.</tt><tt class="descname">namespace</tt><big>(</big><em>prefix</em><big>)</big><a class="reference internal" href="_modules/rdflib/store.html#Store.namespace"><span class="viewcode-link">[source]</span></a></dt>
<dd></dd></dl>

<dl class="method">
<dt>
<tt class="descclassname">Store.</tt><tt class="descname">namespaces</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/rdflib/store.html#Store.namespaces"><span class="viewcode-link">[source]</span></a></dt>
<dd></dd></dl>

</div>
<div class="section" id="open-issues">
<h2>Open issues<a class="headerlink" href="#open-issues" title="Permalink to this headline"></a></h2>
<p>Does the Store interface need to have an identifier property or can we keep that at the Graph level?</p>
<p>The Store implementation needs a mechanism to distinguish between triples (quoted or asserted) in ConjunctiveGraphs (which are mutually exclusive universes in systems that make closed world assumptions - and queried separately). This is the separation that the store identifier provides. This is different from the name of a context within a ConjunctiveGraph (or the default context of a conjunctive graph). I tried to diagram the logical separation of ConjunctiveGraphs, SubGraphs and QuotedGraphs in this diagram</p>
<img alt="_images/ContextHierarchy.png" src="_images/ContextHierarchy.png" />
<p>An identifier of <tt class="docutils literal"><span class="pre">None</span></tt> can be used to indicate the store (aka <cite>all contexts</cite>) in methods such as <a class="reference internal" href="apidocs/rdflib.html#rdflib.store.Store.triples" title="rdflib.store.Store.triples"><tt class="xref py py-meth docutils literal"><span class="pre">triples()</span></tt></a>, <a class="reference internal" href="apidocs/rdflib.html#rdflib.store.Store.__len__" title="rdflib.store.Store.__len__"><tt class="xref py py-meth docutils literal"><span class="pre">__len__()</span></tt></a>, etc. This works as long as we&#8217;re only dealing with one Conjunctive Graph at a time &#8211; which may not always be the case.</p>
<p>Is there any value in persisting terms that lie outside N3 (<tt class="xref py py-class docutils literal"><span class="pre">rdflib.plugins.store.regexmatching.REGEXTerm</span></tt>, Date, etc..)?</p>
<p>Potentially, not sure yet.</p>
<p>Should a conjunctive query always return quads instead of triples? It would seem so, since knowing the context that produced a triple match is an essential aspect of query construction / optimization. Or if having the triples function yield/produce different length tuples is problematic, could an additional - and slightly redundant - interface be introduced?:</p>
<dl class="method">
<dt>
<tt class="descclassname">ConjunctiveGraph.</tt><tt class="descname">quads</tt><big>(</big><em>triple_or_quad=None</em><big>)</big><a class="reference internal" href="_modules/rdflib/graph.html#ConjunctiveGraph.quads"><span class="viewcode-link">[source]</span></a></dt>
<dd><p>Iterate over all the quads in the entire conjunctive graph</p>
</dd></dl>

<p>Stores that weren&#8217;t context-aware could simply return <tt class="docutils literal"><span class="pre">None</span></tt> as the 4th item in the produced/yielded tuples or simply not support this interface.</p>
</div>
</div>


          </div>
        </div>
      </div>
      <div class="sphinxsidebar">
        <div class="sphinxsidebarwrapper">
            <p class="logo"><a href="index.html">
              <img class="logo" src="_static/logo.svg" alt="Logo"/>
            </a></p>
  <h3><a href="index.html">Table Of Contents</a></h3>
  <ul>
<li><a class="reference internal" href="#">A Universal RDF Store Interface</a><ul>
<li><a class="reference internal" href="#terminology">Terminology</a></li>
<li><a class="reference internal" href="#interpreting-syntax">Interpreting Syntax</a></li>
<li><a class="reference internal" href="#formulae-and-variables-as-terms">Formulae and Variables as Terms</a></li>
<li><a class="reference internal" href="#database-management">Database Management</a></li>
<li><a class="reference internal" href="#triple-interfaces">Triple Interfaces</a></li>
<li><a class="reference internal" href="#formula-context-interfaces">Formula / Context Interfaces</a></li>
<li><a class="reference internal" href="#interface-test-cases">Interface Test Cases</a><ul>
<li><a class="reference internal" href="#basic">Basic</a><ul>
<li><a class="reference internal" href="#source-graph">Source Graph</a></li>
<li><a class="reference internal" href="#test-code">Test code</a></li>
</ul>
</li>
<li><a class="reference internal" href="#formula-and-variables-test">Formula and Variables Test</a><ul>
<li><a class="reference internal" href="#id13">Source Graph</a></li>
<li><a class="reference internal" href="#id14">Test Code</a></li>
</ul>
</li>
<li><a class="reference internal" href="#transactional-tests">Transactional Tests</a></li>
</ul>
</li>
<li><a class="reference internal" href="#additional-terms-to-model">Additional Terms to Model</a></li>
<li><a class="reference internal" href="#namespace-management-interfaces">Namespace Management Interfaces</a></li>
<li><a class="reference internal" href="#open-issues">Open issues</a></li>
</ul>
</li>
</ul>

  <h4>Previous topic</h4>
  <p class="topless"><a href="docs.html"
                        title="previous chapter">Writing RDFLib Documentation</a></p>
  <h4>Next topic</h4>
  <p class="topless"><a href="persisting_n3_terms.html"
                        title="next chapter">Persisting Notation 3 Terms</a></p>
  <h3>This Page</h3>
  <ul class="this-page-menu">
    <li><a href="_sources/univrdfstore.txt"
           rel="nofollow">Show Source</a></li>
  </ul>
<div id="searchbox" style="display: none">
  <h3>Quick search</h3>
    <form class="search" action="search.html" method="get">
      <input type="text" name="q" />
      <input type="submit" value="Go" />
      <input type="hidden" name="check_keywords" value="yes" />
      <input type="hidden" name="area" value="default" />
    </form>
    <p class="searchtip" style="font-size: 90%">
    Enter search terms or a module, class or function name.
    </p>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
        </div>
      </div>
      <div class="clearer"></div>
    </div>
    <div class="related">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="genindex.html" title="General Index"
             >index</a></li>
        <li class="right" >
          <a href="py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li class="right" >
          <a href="persisting_n3_terms.html" title="Persisting Notation 3 Terms"
             >next</a> |</li>
        <li class="right" >
          <a href="docs.html" title="Writing RDFLib Documentation"
             >previous</a> |</li>
        <li><a href="index.html">rdflib 4.1.2 documentation</a> &raquo;</li> 
      </ul>
    </div>
<div class="footer">
    &copy; Copyright 2009 - 2013, RDFLib Team.
  Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.2.2.
  <br />Theme based on <a href="http://readthedocs.org/">Read The Docs</a>

</div>





  </body>
</html>