pho 0.6 → 0.6.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (41) hide show
  1. data/CHANGES +6 -0
  2. data/Rakefile +1 -1
  3. data/doc/rdoc/classes/Pho/CommandLine.html +67 -67
  4. data/doc/rdoc/classes/Pho/DatatypeProperty.html +12 -12
  5. data/doc/rdoc/classes/Pho/Enrichment/StoreEnricher.html +29 -29
  6. data/doc/rdoc/classes/Pho/Etags.html +36 -36
  7. data/doc/rdoc/classes/Pho/Facet/Results.html +19 -19
  8. data/doc/rdoc/classes/Pho/Facet/Term.html +6 -6
  9. data/doc/rdoc/classes/Pho/FieldPredicateMap.html +90 -90
  10. data/doc/rdoc/classes/Pho/FieldWeighting.html +12 -12
  11. data/doc/rdoc/classes/Pho/FileManagement/AbstractFileManager.html +63 -63
  12. data/doc/rdoc/classes/Pho/FileManagement/FileManager.html +24 -24
  13. data/doc/rdoc/classes/Pho/FileManagement/RDFManager.html +18 -18
  14. data/doc/rdoc/classes/Pho/Job.html +64 -64
  15. data/doc/rdoc/classes/Pho/Jobs.html +60 -60
  16. data/doc/rdoc/classes/Pho/QueryProfile.html +60 -60
  17. data/doc/rdoc/classes/Pho/RDF/Parser.html +24 -24
  18. data/doc/rdoc/classes/Pho/ResourceHash/Converter.html +36 -36
  19. data/doc/rdoc/classes/Pho/ResourceHash/SetAlgebra.html +12 -12
  20. data/doc/rdoc/classes/Pho/Snapshot.html +35 -35
  21. data/doc/rdoc/classes/Pho/Sparql/SparqlHelper.html +78 -42
  22. data/doc/rdoc/classes/Pho/Status.html +26 -26
  23. data/doc/rdoc/classes/Pho/Store.html +209 -209
  24. data/doc/rdoc/classes/Pho/StoreSparqlClient.html +12 -12
  25. data/doc/rdoc/classes/Pho/Update/Changeset.html +63 -63
  26. data/doc/rdoc/classes/Pho/Update/ChangesetBuilder.html +24 -24
  27. data/doc/rdoc/classes/Pho/Update/ChangesetHelper.html +159 -0
  28. data/doc/rdoc/classes/Pho/Update/Changesets.html +12 -12
  29. data/doc/rdoc/classes/Pho/Update/LiteralStatement.html +18 -18
  30. data/doc/rdoc/classes/Pho/Update/ResourceStatement.html +24 -24
  31. data/doc/rdoc/classes/Pho/Update/Statement.html +24 -24
  32. data/doc/rdoc/created.rid +1 -1
  33. data/doc/rdoc/files/CHANGES.html +13 -1
  34. data/doc/rdoc/files/lib/pho/command_line_rb.html +1 -1
  35. data/doc/rdoc/files/lib/pho/sparql_rb.html +1 -1
  36. data/doc/rdoc/fr_method_index.html +183 -182
  37. data/examples/linkeddata/proxy.rb +74 -0
  38. data/lib/pho/command_line.rb +1 -1
  39. data/lib/pho/sparql.rb +9 -0
  40. data/tests/tc_sparql_helper.rb +10 -1
  41. metadata +5 -2
@@ -92,8 +92,8 @@ Class providing set algebra methods over triple hashes
92
92
  <h3 class="section-bar">Methods</h3>
93
93
 
94
94
  <div class="name-list">
95
- <a href="#M000082">minus</a>&nbsp;&nbsp;
96
- <a href="#M000083">object_in_array?</a>&nbsp;&nbsp;
95
+ <a href="#M000083">minus</a>&nbsp;&nbsp;
96
+ <a href="#M000084">object_in_array?</a>&nbsp;&nbsp;
97
97
  </div>
98
98
  </div>
99
99
 
@@ -115,11 +115,11 @@ Class providing set algebra methods over triple hashes
115
115
  <div id="methods">
116
116
  <h3 class="section-bar">Public Class methods</h3>
117
117
 
118
- <div id="method-M000082" class="method-detail">
119
- <a name="M000082"></a>
118
+ <div id="method-M000083" class="method-detail">
119
+ <a name="M000083"></a>
120
120
 
121
121
  <div class="method-heading">
122
- <a href="#M000082" class="method-signature">
122
+ <a href="#M000083" class="method-signature">
123
123
  <span class="method-name">minus</span><span class="method-args">(first, second)</span>
124
124
  </a>
125
125
  </div>
@@ -139,8 +139,8 @@ first graph but which are not present in the second.
139
139
  second:: the second graph.
140
140
  </pre>
141
141
  <p><a class="source-toggle" href="#"
142
- onclick="toggleCode('M000082-source');return false;">[Source]</a></p>
143
- <div class="method-source-code" id="M000082-source">
142
+ onclick="toggleCode('M000083-source');return false;">[Source]</a></p>
143
+ <div class="method-source-code" id="M000083-source">
144
144
  <pre>
145
145
  <span class="ruby-comment cmt"># File lib/pho/resource_hash.rb, line 20</span>
146
146
  <span class="ruby-keyword kw">def</span> <span class="ruby-constant">SetAlgebra</span>.<span class="ruby-identifier">minus</span>(<span class="ruby-identifier">first</span>, <span class="ruby-identifier">second</span>)
@@ -183,11 +183,11 @@ first graph but which are not present in the second.
183
183
  </div>
184
184
  </div>
185
185
 
186
- <div id="method-M000083" class="method-detail">
187
- <a name="M000083"></a>
186
+ <div id="method-M000084" class="method-detail">
187
+ <a name="M000084"></a>
188
188
 
189
189
  <div class="method-heading">
190
- <a href="#M000083" class="method-signature">
190
+ <a href="#M000084" class="method-signature">
191
191
  <span class="method-name">object_in_array?</span><span class="method-args">(array, val)</span>
192
192
  </a>
193
193
  </div>
@@ -198,8 +198,8 @@ Is there an object in the specified array, that matches the provided
198
198
  description
199
199
  </p>
200
200
  <p><a class="source-toggle" href="#"
201
- onclick="toggleCode('M000083-source');return false;">[Source]</a></p>
202
- <div class="method-source-code" id="M000083-source">
201
+ onclick="toggleCode('M000084-source');return false;">[Source]</a></p>
202
+ <div class="method-source-code" id="M000084-source">
203
203
  <pre>
204
204
  <span class="ruby-comment cmt"># File lib/pho/resource_hash.rb, line 57</span>
205
205
  <span class="ruby-keyword kw">def</span> <span class="ruby-constant">SetAlgebra</span>.<span class="ruby-identifier">object_in_array?</span>(<span class="ruby-identifier">array</span>, <span class="ruby-identifier">val</span>)
@@ -81,7 +81,7 @@
81
81
  <div id="description">
82
82
  <p>
83
83
  In the Talis Platform a &quot;snapshot&quot; is an <a
84
- href="Snapshot.html#M000179">backup</a> of the contents of a <a
84
+ href="Snapshot.html#M000180">backup</a> of the contents of a <a
85
85
  href="Store.html">Store</a>
86
86
  </p>
87
87
  <p>
@@ -102,11 +102,11 @@ A snapshot can be generated (or scheduled) using the Store.snapshot method.
102
102
  <h3 class="section-bar">Methods</h3>
103
103
 
104
104
  <div class="name-list">
105
- <a href="#M000179">backup</a>&nbsp;&nbsp;
106
- <a href="#M000177">new</a>&nbsp;&nbsp;
107
- <a href="#M000176">parse</a>&nbsp;&nbsp;
108
- <a href="#M000175">read_from_store</a>&nbsp;&nbsp;
109
- <a href="#M000178">read_md5</a>&nbsp;&nbsp;
105
+ <a href="#M000180">backup</a>&nbsp;&nbsp;
106
+ <a href="#M000178">new</a>&nbsp;&nbsp;
107
+ <a href="#M000177">parse</a>&nbsp;&nbsp;
108
+ <a href="#M000176">read_from_store</a>&nbsp;&nbsp;
109
+ <a href="#M000179">read_md5</a>&nbsp;&nbsp;
110
110
  </div>
111
111
  </div>
112
112
 
@@ -176,19 +176,19 @@ The URL from which the snapshot can be retrieved
176
176
  <div id="methods">
177
177
  <h3 class="section-bar">Public Class methods</h3>
178
178
 
179
- <div id="method-M000177" class="method-detail">
180
- <a name="M000177"></a>
179
+ <div id="method-M000178" class="method-detail">
180
+ <a name="M000178"></a>
181
181
 
182
182
  <div class="method-heading">
183
- <a href="#M000177" class="method-signature">
183
+ <a href="#M000178" class="method-signature">
184
184
  <span class="method-name">new</span><span class="method-args">(url, md5_url, size, units, date)</span>
185
185
  </a>
186
186
  </div>
187
187
 
188
188
  <div class="method-description">
189
189
  <p><a class="source-toggle" href="#"
190
- onclick="toggleCode('M000177-source');return false;">[Source]</a></p>
191
- <div class="method-source-code" id="M000177-source">
190
+ onclick="toggleCode('M000178-source');return false;">[Source]</a></p>
191
+ <div class="method-source-code" id="M000178-source">
192
192
  <pre>
193
193
  <span class="ruby-comment cmt"># File lib/pho/snapshot.rb, line 76</span>
194
194
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">url</span>, <span class="ruby-identifier">md5_url</span>, <span class="ruby-identifier">size</span>, <span class="ruby-identifier">units</span>, <span class="ruby-identifier">date</span>)
@@ -203,21 +203,21 @@ The URL from which the snapshot can be retrieved
203
203
  </div>
204
204
  </div>
205
205
 
206
- <div id="method-M000176" class="method-detail">
207
- <a name="M000176"></a>
206
+ <div id="method-M000177" class="method-detail">
207
+ <a name="M000177"></a>
208
208
 
209
209
  <div class="method-heading">
210
- <a href="#M000176" class="method-signature">
210
+ <a href="#M000177" class="method-signature">
211
211
  <span class="method-name">parse</span><span class="method-args">(storeuri, content)</span>
212
212
  </a>
213
213
  </div>
214
214
 
215
215
  <div class="method-description">
216
216
  <p>
217
- Class method to <a href="Snapshot.html#M000176">parse</a> the <a
217
+ Class method to <a href="Snapshot.html#M000177">parse</a> the <a
218
218
  href="RDF.html">RDF</a> response from the API, e.g. as produced by the <a
219
- href="Store.html#M000170">Store.get_snapshots</a> method and create a <a
220
- href="Snapshot.html#M000177">new</a> <a href="Snapshot.html">Snapshot</a>
219
+ href="Store.html#M000171">Store.get_snapshots</a> method and create a <a
220
+ href="Snapshot.html#M000178">new</a> <a href="Snapshot.html">Snapshot</a>
221
221
  object. At the moment the Platform only supports single snapshot.
222
222
  </p>
223
223
  <p>
@@ -228,8 +228,8 @@ If the response was an error, then an exception will be thrown
228
228
  content:: response from the API
229
229
  </pre>
230
230
  <p><a class="source-toggle" href="#"
231
- onclick="toggleCode('M000176-source');return false;">[Source]</a></p>
232
- <div class="method-source-code" id="M000176-source">
231
+ onclick="toggleCode('M000177-source');return false;">[Source]</a></p>
232
+ <div class="method-source-code" id="M000177-source">
233
233
  <pre>
234
234
  <span class="ruby-comment cmt"># File lib/pho/snapshot.rb, line 52</span>
235
235
  <span class="ruby-keyword kw">def</span> <span class="ruby-constant">Snapshot</span>.<span class="ruby-identifier">parse</span>(<span class="ruby-identifier">storeuri</span>, <span class="ruby-identifier">content</span>)
@@ -260,11 +260,11 @@ If the response was an error, then an exception will be thrown
260
260
  </div>
261
261
  </div>
262
262
 
263
- <div id="method-M000175" class="method-detail">
264
- <a name="M000175"></a>
263
+ <div id="method-M000176" class="method-detail">
264
+ <a name="M000176"></a>
265
265
 
266
266
  <div class="method-heading">
267
- <a href="#M000175" class="method-signature">
267
+ <a href="#M000176" class="method-signature">
268
268
  <span class="method-name">read_from_store</span><span class="method-args">(store)</span>
269
269
  </a>
270
270
  </div>
@@ -279,8 +279,8 @@ Read snapshot data from the given store
279
279
  </td></tr>
280
280
  </table>
281
281
  <p><a class="source-toggle" href="#"
282
- onclick="toggleCode('M000175-source');return false;">[Source]</a></p>
283
- <div class="method-source-code" id="M000175-source">
282
+ onclick="toggleCode('M000176-source');return false;">[Source]</a></p>
283
+ <div class="method-source-code" id="M000176-source">
284
284
  <pre>
285
285
  <span class="ruby-comment cmt"># File lib/pho/snapshot.rb, line 34</span>
286
286
  <span class="ruby-keyword kw">def</span> <span class="ruby-constant">Snapshot</span>.<span class="ruby-identifier">read_from_store</span>(<span class="ruby-identifier">store</span>)
@@ -300,11 +300,11 @@ Read snapshot data from the given store
300
300
 
301
301
  <h3 class="section-bar">Public Instance methods</h3>
302
302
 
303
- <div id="method-M000179" class="method-detail">
304
- <a name="M000179"></a>
303
+ <div id="method-M000180" class="method-detail">
304
+ <a name="M000180"></a>
305
305
 
306
306
  <div class="method-heading">
307
- <a href="#M000179" class="method-signature">
307
+ <a href="#M000180" class="method-signature">
308
308
  <span class="method-name">backup</span><span class="method-args">(store, dir=Dir.tmpdir)</span>
309
309
  </a>
310
310
  </div>
@@ -317,7 +317,7 @@ published value. If they don&#8216;t match then a RuntimeError will be
317
317
  raised
318
318
  </p>
319
319
  <table>
320
- <tr><td valign="top">store:</td><td>the store to <a href="Snapshot.html#M000179">backup</a>
320
+ <tr><td valign="top">store:</td><td>the store to <a href="Snapshot.html#M000180">backup</a>
321
321
 
322
322
  </td></tr>
323
323
  <tr><td valign="top">dir:</td><td>directory in which snapshot will be stored
@@ -325,8 +325,8 @@ raised
325
325
  </td></tr>
326
326
  </table>
327
327
  <p><a class="source-toggle" href="#"
328
- onclick="toggleCode('M000179-source');return false;">[Source]</a></p>
329
- <div class="method-source-code" id="M000179-source">
328
+ onclick="toggleCode('M000180-source');return false;">[Source]</a></p>
329
+ <div class="method-source-code" id="M000180-source">
330
330
  <pre>
331
331
  <span class="ruby-comment cmt"># File lib/pho/snapshot.rb, line 96</span>
332
332
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">backup</span>(<span class="ruby-identifier">store</span>, <span class="ruby-identifier">dir</span>=<span class="ruby-constant">Dir</span>.<span class="ruby-identifier">tmpdir</span>)
@@ -356,11 +356,11 @@ raised
356
356
  </div>
357
357
  </div>
358
358
 
359
- <div id="method-M000178" class="method-detail">
360
- <a name="M000178"></a>
359
+ <div id="method-M000179" class="method-detail">
360
+ <a name="M000179"></a>
361
361
 
362
362
  <div class="method-heading">
363
- <a href="#M000178" class="method-signature">
363
+ <a href="#M000179" class="method-signature">
364
364
  <span class="method-name">read_md5</span><span class="method-args">(client=HttpClient.new())</span>
365
365
  </a>
366
366
  </div>
@@ -370,8 +370,8 @@ raised
370
370
  Read the published MD5 value
371
371
  </p>
372
372
  <p><a class="source-toggle" href="#"
373
- onclick="toggleCode('M000178-source');return false;">[Source]</a></p>
374
- <div class="method-source-code" id="M000178-source">
373
+ onclick="toggleCode('M000179-source');return false;">[Source]</a></p>
374
+ <div class="method-source-code" id="M000179-source">
375
375
  <pre>
376
376
  <span class="ruby-comment cmt"># File lib/pho/snapshot.rb, line 86</span>
377
377
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">read_md5</span>(<span class="ruby-identifier">client</span>=<span class="ruby-constant">HttpClient</span>.<span class="ruby-identifier">new</span>())
@@ -95,15 +95,16 @@ manipulating the results
95
95
  <div class="name-list">
96
96
  <a href="#M000012">apply_initial_bindings</a>&nbsp;&nbsp;
97
97
  <a href="#M000016">ask</a>&nbsp;&nbsp;
98
- <a href="#M000019">construct_to_resource_hash</a>&nbsp;&nbsp;
99
- <a href="#M000020">describe_to_resource_hash</a>&nbsp;&nbsp;
100
- <a href="#M000022">describe_uri</a>&nbsp;&nbsp;
101
- <a href="#M000021">multi_describe</a>&nbsp;&nbsp;
98
+ <a href="#M000020">construct_to_resource_hash</a>&nbsp;&nbsp;
99
+ <a href="#M000021">describe_to_resource_hash</a>&nbsp;&nbsp;
100
+ <a href="#M000023">describe_uri</a>&nbsp;&nbsp;
101
+ <a href="#M000017">exists</a>&nbsp;&nbsp;
102
+ <a href="#M000022">multi_describe</a>&nbsp;&nbsp;
102
103
  <a href="#M000013">result_to_query_binding</a>&nbsp;&nbsp;
103
104
  <a href="#M000014">results_to_query_bindings</a>&nbsp;&nbsp;
104
105
  <a href="#M000015">select</a>&nbsp;&nbsp;
105
- <a href="#M000018">select_single_value</a>&nbsp;&nbsp;
106
- <a href="#M000017">select_values</a>&nbsp;&nbsp;
106
+ <a href="#M000019">select_single_value</a>&nbsp;&nbsp;
107
+ <a href="#M000018">select_values</a>&nbsp;&nbsp;
107
108
  </div>
108
109
  </div>
109
110
 
@@ -230,11 +231,11 @@ resulting JSON results, and extract the true/false response.
230
231
  </div>
231
232
  </div>
232
233
 
233
- <div id="method-M000019" class="method-detail">
234
- <a name="M000019"></a>
234
+ <div id="method-M000020" class="method-detail">
235
+ <a name="M000020"></a>
235
236
 
236
237
  <div class="method-heading">
237
- <a href="#M000019" class="method-signature">
238
+ <a href="#M000020" class="method-signature">
238
239
  <span class="method-name">construct_to_resource_hash</span><span class="method-args">(query, sparql_client)</span>
239
240
  </a>
240
241
  </div>
@@ -257,10 +258,10 @@ returns RDF_JSON), and parses the resulting JSON document.
257
258
  </td></tr>
258
259
  </table>
259
260
  <p><a class="source-toggle" href="#"
260
- onclick="toggleCode('M000019-source');return false;">[Source]</a></p>
261
- <div class="method-source-code" id="M000019-source">
261
+ onclick="toggleCode('M000020-source');return false;">[Source]</a></p>
262
+ <div class="method-source-code" id="M000020-source">
262
263
  <pre>
263
- <span class="ruby-comment cmt"># File lib/pho/sparql.rb, line 391</span>
264
+ <span class="ruby-comment cmt"># File lib/pho/sparql.rb, line 400</span>
264
265
  <span class="ruby-keyword kw">def</span> <span class="ruby-constant">SparqlHelper</span>.<span class="ruby-identifier">construct_to_resource_hash</span>(<span class="ruby-identifier">query</span>, <span class="ruby-identifier">sparql_client</span>)
265
266
  <span class="ruby-comment cmt">#TODO: test whether endpoint supports json, and if not, switch to parsing XML</span>
266
267
  <span class="ruby-identifier">resp</span> = <span class="ruby-identifier">sparql_client</span>.<span class="ruby-identifier">construct</span>(<span class="ruby-identifier">query</span>, <span class="ruby-value str">&quot;application/json&quot;</span>)
@@ -274,11 +275,11 @@ returns RDF_JSON), and parses the resulting JSON document.
274
275
  </div>
275
276
  </div>
276
277
 
277
- <div id="method-M000020" class="method-detail">
278
- <a name="M000020"></a>
278
+ <div id="method-M000021" class="method-detail">
279
+ <a name="M000021"></a>
279
280
 
280
281
  <div class="method-heading">
281
- <a href="#M000020" class="method-signature">
282
+ <a href="#M000021" class="method-signature">
282
283
  <span class="method-name">describe_to_resource_hash</span><span class="method-args">(query, sparql_client)</span>
283
284
  </a>
284
285
  </div>
@@ -301,10 +302,10 @@ returns RDF_JSON), and parses the resulting JSON document.
301
302
  </td></tr>
302
303
  </table>
303
304
  <p><a class="source-toggle" href="#"
304
- onclick="toggleCode('M000020-source');return false;">[Source]</a></p>
305
- <div class="method-source-code" id="M000020-source">
305
+ onclick="toggleCode('M000021-source');return false;">[Source]</a></p>
306
+ <div class="method-source-code" id="M000021-source">
306
307
  <pre>
307
- <span class="ruby-comment cmt"># File lib/pho/sparql.rb, line 407</span>
308
+ <span class="ruby-comment cmt"># File lib/pho/sparql.rb, line 416</span>
308
309
  <span class="ruby-keyword kw">def</span> <span class="ruby-constant">SparqlHelper</span>.<span class="ruby-identifier">describe_to_resource_hash</span>(<span class="ruby-identifier">query</span>, <span class="ruby-identifier">sparql_client</span>)
309
310
  <span class="ruby-comment cmt">#TODO: test whether endpoint supports json, and if not, switch to parsing XML</span>
310
311
  <span class="ruby-identifier">resp</span> = <span class="ruby-identifier">sparql_client</span>.<span class="ruby-identifier">describe</span>(<span class="ruby-identifier">query</span>, <span class="ruby-value str">&quot;application/json&quot;</span>)
@@ -318,11 +319,11 @@ returns RDF_JSON), and parses the resulting JSON document.
318
319
  </div>
319
320
  </div>
320
321
 
321
- <div id="method-M000022" class="method-detail">
322
- <a name="M000022"></a>
322
+ <div id="method-M000023" class="method-detail">
323
+ <a name="M000023"></a>
323
324
 
324
325
  <div class="method-heading">
325
- <a href="#M000022" class="method-signature">
326
+ <a href="#M000023" class="method-signature">
326
327
  <span class="method-name">describe_uri</span><span class="method-args">(uri, sparql_client, type=:cbd)</span>
327
328
  </a>
328
329
  </div>
@@ -344,10 +345,10 @@ Describe a single URI using one of several forms of Bounded Description See
344
345
  </td></tr>
345
346
  </table>
346
347
  <p><a class="source-toggle" href="#"
347
- onclick="toggleCode('M000022-source');return false;">[Source]</a></p>
348
- <div class="method-source-code" id="M000022-source">
348
+ onclick="toggleCode('M000023-source');return false;">[Source]</a></p>
349
+ <div class="method-source-code" id="M000023-source">
349
350
  <pre>
350
- <span class="ruby-comment cmt"># File lib/pho/sparql.rb, line 435</span>
351
+ <span class="ruby-comment cmt"># File lib/pho/sparql.rb, line 444</span>
351
352
  <span class="ruby-keyword kw">def</span> <span class="ruby-constant">SparqlHelper</span>.<span class="ruby-identifier">describe_uri</span>(<span class="ruby-identifier">uri</span>, <span class="ruby-identifier">sparql_client</span>, <span class="ruby-identifier">type</span>=<span class="ruby-identifier">:cbd</span>)
352
353
  <span class="ruby-comment cmt">#TODO: test whether endpoint supports json, and if not, switch to parsing XML</span>
353
354
  <span class="ruby-identifier">resp</span> = <span class="ruby-identifier">sparql_client</span>.<span class="ruby-identifier">describe_uri</span>(<span class="ruby-identifier">uri</span>, <span class="ruby-value str">&quot;application/json&quot;</span>, <span class="ruby-identifier">type</span>)
@@ -361,11 +362,46 @@ Describe a single URI using one of several forms of Bounded Description See
361
362
  </div>
362
363
  </div>
363
364
 
364
- <div id="method-M000021" class="method-detail">
365
- <a name="M000021"></a>
365
+ <div id="method-M000017" class="method-detail">
366
+ <a name="M000017"></a>
366
367
 
367
368
  <div class="method-heading">
368
- <a href="#M000021" class="method-signature">
369
+ <a href="#M000017" class="method-signature">
370
+ <span class="method-name">exists</span><span class="method-args">(uri, sparql_client)</span>
371
+ </a>
372
+ </div>
373
+
374
+ <div class="method-description">
375
+ <p>
376
+ Performs an ASK query on the SPARQL endpoint to test whether there are any
377
+ statements in the triple store about the specified uri.
378
+ </p>
379
+ <table>
380
+ <tr><td valign="top">uri:</td><td>the uri to test for
381
+
382
+ </td></tr>
383
+ <tr><td valign="top">sparql_client:</td><td>a configured <a href="SparqlClient.html">SparqlClient</a> object
384
+
385
+ </td></tr>
386
+ </table>
387
+ <p><a class="source-toggle" href="#"
388
+ onclick="toggleCode('M000017-source');return false;">[Source]</a></p>
389
+ <div class="method-source-code" id="M000017-source">
390
+ <pre>
391
+ <span class="ruby-comment cmt"># File lib/pho/sparql.rb, line 353</span>
392
+ <span class="ruby-keyword kw">def</span> <span class="ruby-constant">SparqlHelper</span>.<span class="ruby-identifier">exists</span>(<span class="ruby-identifier">uri</span>, <span class="ruby-identifier">sparql_client</span>)
393
+ <span class="ruby-keyword kw">return</span> <span class="ruby-constant">SparqlHelper</span>.<span class="ruby-identifier">ask</span>(<span class="ruby-node">&quot;ASK { &lt;#{uri}&gt; ?p ?o }&quot;</span>, <span class="ruby-identifier">sparql_client</span>)
394
+ <span class="ruby-keyword kw">end</span>
395
+ </pre>
396
+ </div>
397
+ </div>
398
+ </div>
399
+
400
+ <div id="method-M000022" class="method-detail">
401
+ <a name="M000022"></a>
402
+
403
+ <div class="method-heading">
404
+ <a href="#M000022" class="method-signature">
369
405
  <span class="method-name">multi_describe</span><span class="method-args">(uris, sparql_client)</span>
370
406
  </a>
371
407
  </div>
@@ -383,10 +419,10 @@ DESCRIBE multiple resources in a single SPARQL request
383
419
  </td></tr>
384
420
  </table>
385
421
  <p><a class="source-toggle" href="#"
386
- onclick="toggleCode('M000021-source');return false;">[Source]</a></p>
387
- <div class="method-source-code" id="M000021-source">
422
+ onclick="toggleCode('M000022-source');return false;">[Source]</a></p>
423
+ <div class="method-source-code" id="M000022-source">
388
424
  <pre>
389
- <span class="ruby-comment cmt"># File lib/pho/sparql.rb, line 420</span>
425
+ <span class="ruby-comment cmt"># File lib/pho/sparql.rb, line 429</span>
390
426
  <span class="ruby-keyword kw">def</span> <span class="ruby-constant">SparqlHelper</span>.<span class="ruby-identifier">multi_describe</span>(<span class="ruby-identifier">uris</span>, <span class="ruby-identifier">sparql_client</span>)
391
427
  <span class="ruby-comment cmt">#TODO: test whether endpoint supports json, and if not, switch to parsing XML</span>
392
428
  <span class="ruby-identifier">resp</span> = <span class="ruby-identifier">sparql_client</span>.<span class="ruby-identifier">multi_describe</span>(<span class="ruby-identifier">uris</span>, <span class="ruby-value str">&quot;application/json&quot;</span>)
@@ -545,11 +581,11 @@ An error will be raised if the response is HTTP OK.
545
581
  </div>
546
582
  </div>
547
583
 
548
- <div id="method-M000018" class="method-detail">
549
- <a name="M000018"></a>
584
+ <div id="method-M000019" class="method-detail">
585
+ <a name="M000019"></a>
550
586
 
551
587
  <div class="method-heading">
552
- <a href="#M000018" class="method-signature">
588
+ <a href="#M000019" class="method-signature">
553
589
  <span class="method-name">select_single_value</span><span class="method-args">(query, sparql_client)</span>
554
590
  </a>
555
591
  </div>
@@ -576,10 +612,10 @@ returned
576
612
  </td></tr>
577
613
  </table>
578
614
  <p><a class="source-toggle" href="#"
579
- onclick="toggleCode('M000018-source');return false;">[Source]</a></p>
580
- <div class="method-source-code" id="M000018-source">
615
+ onclick="toggleCode('M000019-source');return false;">[Source]</a></p>
616
+ <div class="method-source-code" id="M000019-source">
581
617
  <pre>
582
- <span class="ruby-comment cmt"># File lib/pho/sparql.rb, line 378</span>
618
+ <span class="ruby-comment cmt"># File lib/pho/sparql.rb, line 387</span>
583
619
  <span class="ruby-keyword kw">def</span> <span class="ruby-constant">SparqlHelper</span>.<span class="ruby-identifier">select_single_value</span>(<span class="ruby-identifier">query</span>, <span class="ruby-identifier">sparql_client</span>)
584
620
  <span class="ruby-identifier">results</span> = <span class="ruby-constant">SparqlHelper</span>.<span class="ruby-identifier">select</span>(<span class="ruby-identifier">query</span>, <span class="ruby-identifier">sparql_client</span>)
585
621
  <span class="ruby-identifier">v</span> = <span class="ruby-identifier">results</span>[<span class="ruby-value str">&quot;head&quot;</span>][<span class="ruby-value str">&quot;vars&quot;</span>][<span class="ruby-value">0</span>];
@@ -590,11 +626,11 @@ returned
590
626
  </div>
591
627
  </div>
592
628
 
593
- <div id="method-M000017" class="method-detail">
594
- <a name="M000017"></a>
629
+ <div id="method-M000018" class="method-detail">
630
+ <a name="M000018"></a>
595
631
 
596
632
  <div class="method-heading">
597
- <a href="#M000017" class="method-signature">
633
+ <a href="#M000018" class="method-signature">
598
634
  <span class="method-name">select_values</span><span class="method-args">(query, sparql_client)</span>
599
635
  </a>
600
636
  </div>
@@ -623,10 +659,10 @@ are returned
623
659
  </td></tr>
624
660
  </table>
625
661
  <p><a class="source-toggle" href="#"
626
- onclick="toggleCode('M000017-source');return false;">[Source]</a></p>
627
- <div class="method-source-code" id="M000017-source">
662
+ onclick="toggleCode('M000018-source');return false;">[Source]</a></p>
663
+ <div class="method-source-code" id="M000018-source">
628
664
  <pre>
629
- <span class="ruby-comment cmt"># File lib/pho/sparql.rb, line 358</span>
665
+ <span class="ruby-comment cmt"># File lib/pho/sparql.rb, line 367</span>
630
666
  <span class="ruby-keyword kw">def</span> <span class="ruby-constant">SparqlHelper</span>.<span class="ruby-identifier">select_values</span>(<span class="ruby-identifier">query</span>, <span class="ruby-identifier">sparql_client</span>)
631
667
  <span class="ruby-identifier">results</span> = <span class="ruby-constant">SparqlHelper</span>.<span class="ruby-identifier">select</span>(<span class="ruby-identifier">query</span>, <span class="ruby-identifier">sparql_client</span>)
632
668
  <span class="ruby-identifier">v</span> = <span class="ruby-identifier">results</span>[<span class="ruby-value str">&quot;head&quot;</span>][<span class="ruby-value str">&quot;vars&quot;</span>][<span class="ruby-value">0</span>];