pho 0.4.1 → 0.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (82) hide show
  1. data/CHANGES +18 -1
  2. data/README +10 -0
  3. data/Rakefile +2 -1
  4. data/doc/rdoc/classes/Pho.html +33 -22
  5. data/doc/rdoc/classes/Pho/DatatypeProperty.html +12 -12
  6. data/doc/rdoc/classes/Pho/{RDF_JSON.html → Enrichment.html} +8 -7
  7. data/doc/rdoc/classes/Pho/Enrichment/ResourceEnricher.html +310 -0
  8. data/doc/rdoc/classes/Pho/Etags.html +42 -42
  9. data/doc/rdoc/classes/Pho/Facet/Results.html +19 -19
  10. data/doc/rdoc/classes/Pho/Facet/Term.html +6 -6
  11. data/doc/rdoc/classes/Pho/FieldPredicateMap.html +110 -105
  12. data/doc/rdoc/classes/Pho/FieldWeighting.html +12 -12
  13. data/doc/rdoc/classes/Pho/FileManagement.html +121 -0
  14. data/doc/rdoc/classes/Pho/FileManagement/AbstractFileManager.html +443 -0
  15. data/doc/rdoc/classes/Pho/FileManagement/FileManager.html +258 -0
  16. data/doc/rdoc/classes/Pho/FileManagement/RDFManager.html +271 -0
  17. data/doc/rdoc/classes/Pho/Job.html +64 -64
  18. data/doc/rdoc/classes/Pho/Jobs.html +60 -60
  19. data/doc/rdoc/classes/Pho/QueryProfile.html +60 -60
  20. data/doc/rdoc/classes/Pho/RDFCollection.html +4 -378
  21. data/doc/rdoc/classes/Pho/ResourceHash.html +123 -0
  22. data/doc/rdoc/classes/Pho/ResourceHash/Converter.html +323 -0
  23. data/doc/rdoc/classes/Pho/{RDF_JSON → ResourceHash}/SetAlgebra.html +18 -18
  24. data/doc/rdoc/classes/Pho/Snapshot.html +35 -35
  25. data/doc/rdoc/classes/Pho/Sparql.html +137 -0
  26. data/doc/rdoc/classes/Pho/Sparql/SparqlClient.html +515 -0
  27. data/doc/rdoc/classes/Pho/Sparql/SparqlHelper.html +575 -0
  28. data/doc/rdoc/classes/Pho/Status.html +26 -26
  29. data/doc/rdoc/classes/Pho/Store.html +271 -241
  30. data/doc/rdoc/classes/Pho/Update/Changeset.html +73 -73
  31. data/doc/rdoc/classes/Pho/Update/ChangesetBuilder.html +34 -34
  32. data/doc/rdoc/classes/Pho/Update/Changesets.html +14 -14
  33. data/doc/rdoc/classes/Pho/Update/LiteralStatement.html +31 -23
  34. data/doc/rdoc/classes/Pho/Update/ResourceStatement.html +45 -21
  35. data/doc/rdoc/classes/Pho/Update/Statement.html +29 -29
  36. data/doc/rdoc/classes/String.html +1 -1
  37. data/doc/rdoc/created.rid +1 -1
  38. data/doc/rdoc/files/CHANGES.html +49 -3
  39. data/doc/rdoc/files/README.html +15 -1
  40. data/doc/rdoc/files/lib/pho/changeset_builder_rb.html +1 -1
  41. data/doc/rdoc/files/lib/pho/changeset_rb.html +1 -1
  42. data/doc/rdoc/files/lib/pho/converter_rb.html +108 -0
  43. data/doc/rdoc/files/lib/pho/enrichment_rb.html +101 -0
  44. data/doc/rdoc/files/lib/pho/etags_rb.html +1 -1
  45. data/doc/rdoc/files/lib/pho/field_predicate_map_rb.html +1 -1
  46. data/doc/rdoc/files/lib/pho/file_management_rb.html +101 -0
  47. data/doc/rdoc/files/lib/pho/file_manager_rb.html +108 -0
  48. data/doc/rdoc/files/lib/pho/rdf_collection_rb.html +1 -1
  49. data/doc/rdoc/files/lib/pho/resource_hash_rb.html +101 -0
  50. data/doc/rdoc/files/lib/pho/{rdf_json_rb.html → sparql_rb.html} +4 -4
  51. data/doc/rdoc/files/lib/pho/store_rb.html +1 -1
  52. data/doc/rdoc/files/lib/pho_rb.html +7 -2
  53. data/doc/rdoc/fr_class_index.html +12 -2
  54. data/doc/rdoc/fr_file_index.html +6 -1
  55. data/doc/rdoc/fr_method_index.html +176 -139
  56. data/examples/sparql_construct_hash.rb +26 -0
  57. data/examples/sparql_select.rb +18 -0
  58. data/lib/pho.rb +6 -1
  59. data/lib/pho/changeset.rb +24 -9
  60. data/lib/pho/changeset_builder.rb +10 -10
  61. data/lib/pho/converter.rb +74 -0
  62. data/lib/pho/enrichment.rb +81 -0
  63. data/lib/pho/etags.rb +1 -0
  64. data/lib/pho/field_predicate_map.rb +6 -1
  65. data/lib/pho/file_management.rb +102 -0
  66. data/lib/pho/file_manager.rb +61 -0
  67. data/lib/pho/rdf_collection.rb +54 -120
  68. data/lib/pho/{rdf_json.rb → resource_hash.rb} +3 -4
  69. data/lib/pho/sparql.rb +332 -0
  70. data/lib/pho/store.rb +20 -14
  71. data/tests/tc_changeset.rb +46 -0
  72. data/tests/tc_changeset_builder.rb +122 -1
  73. data/tests/tc_converter.rb +95 -0
  74. data/tests/tc_enrichment.rb +83 -0
  75. data/tests/tc_file_manager.rb +88 -0
  76. data/tests/tc_rdf_collection.rb +3 -0
  77. data/tests/{tc_rdf_json.rb → tc_resource_hash.rb} +23 -23
  78. data/tests/tc_search.rb +1 -1
  79. data/tests/tc_sparql.rb +131 -6
  80. data/tests/tc_sparql_helper.rb +214 -0
  81. data/tests/ts_pho.rb +6 -2
  82. metadata +47 -8
@@ -118,16 +118,16 @@ Processing of batch changesets is described at:
118
118
  <h3 class="section-bar">Methods</h3>
119
119
 
120
120
  <div class="name-list">
121
- <a href="#M000022">add_addition</a>&nbsp;&nbsp;
122
- <a href="#M000023">add_additions</a>&nbsp;&nbsp;
123
- <a href="#M000025">add_removal</a>&nbsp;&nbsp;
124
- <a href="#M000026">add_removals</a>&nbsp;&nbsp;
125
- <a href="#M000021">additions</a>&nbsp;&nbsp;
126
- <a href="#M000018">new</a>&nbsp;&nbsp;
127
- <a href="#M000024">removals</a>&nbsp;&nbsp;
128
- <a href="#M000027">submit</a>&nbsp;&nbsp;
129
- <a href="#M000020">to_rdf</a>&nbsp;&nbsp;
130
- <a href="#M000019">to_s</a>&nbsp;&nbsp;
121
+ <a href="#M000059">add_addition</a>&nbsp;&nbsp;
122
+ <a href="#M000060">add_additions</a>&nbsp;&nbsp;
123
+ <a href="#M000062">add_removal</a>&nbsp;&nbsp;
124
+ <a href="#M000063">add_removals</a>&nbsp;&nbsp;
125
+ <a href="#M000058">additions</a>&nbsp;&nbsp;
126
+ <a href="#M000055">new</a>&nbsp;&nbsp;
127
+ <a href="#M000061">removals</a>&nbsp;&nbsp;
128
+ <a href="#M000064">submit</a>&nbsp;&nbsp;
129
+ <a href="#M000057">to_rdf</a>&nbsp;&nbsp;
130
+ <a href="#M000056">to_s</a>&nbsp;&nbsp;
131
131
  </div>
132
132
  </div>
133
133
 
@@ -181,11 +181,11 @@ URI of the subject of change for this changeset
181
181
  <div id="methods">
182
182
  <h3 class="section-bar">Public Class methods</h3>
183
183
 
184
- <div id="method-M000018" class="method-detail">
185
- <a name="M000018"></a>
184
+ <div id="method-M000055" class="method-detail">
185
+ <a name="M000055"></a>
186
186
 
187
187
  <div class="method-heading">
188
- <a href="#M000018" class="method-signature">
188
+ <a href="#M000055" class="method-signature">
189
189
  <span class="method-name">new</span><span class="method-args">(subject_of_change, creator_name=nil, change_reason=nil) {|self if block_given?| ...}</span>
190
190
  </a>
191
191
  </div>
@@ -200,10 +200,10 @@ Constructor. Parameter should be the URI of the subject of change
200
200
  change_reason:: the reason for the change (optional)
201
201
  </pre>
202
202
  <p><a class="source-toggle" href="#"
203
- onclick="toggleCode('M000018-source');return false;">[Source]</a></p>
204
- <div class="method-source-code" id="M000018-source">
203
+ onclick="toggleCode('M000055-source');return false;">[Source]</a></p>
204
+ <div class="method-source-code" id="M000055-source">
205
205
  <pre>
206
- <span class="ruby-comment cmt"># File lib/pho/changeset.rb, line 206</span>
206
+ <span class="ruby-comment cmt"># File lib/pho/changeset.rb, line 221</span>
207
207
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">subject_of_change</span>, <span class="ruby-identifier">creator_name</span>=<span class="ruby-keyword kw">nil</span>, <span class="ruby-identifier">change_reason</span>=<span class="ruby-keyword kw">nil</span>)
208
208
  <span class="ruby-identifier">u</span> = <span class="ruby-constant">URI</span>.<span class="ruby-identifier">parse</span>(<span class="ruby-identifier">subject_of_change</span>)
209
209
  <span class="ruby-comment cmt">#this should catch literals</span>
@@ -224,11 +224,11 @@ Constructor. Parameter should be the URI of the subject of change
224
224
 
225
225
  <h3 class="section-bar">Public Instance methods</h3>
226
226
 
227
- <div id="method-M000022" class="method-detail">
228
- <a name="M000022"></a>
227
+ <div id="method-M000059" class="method-detail">
228
+ <a name="M000059"></a>
229
229
 
230
230
  <div class="method-heading">
231
- <a href="#M000022" class="method-signature">
231
+ <a href="#M000059" class="method-signature">
232
232
  <span class="method-name">add_addition</span><span class="method-args">(statement)</span>
233
233
  </a>
234
234
  </div>
@@ -239,10 +239,10 @@ Include a <a href="Statement.html">Statement</a> in the <a
239
239
  href="Changeset.html">Changeset</a> as an addition
240
240
  </p>
241
241
  <p><a class="source-toggle" href="#"
242
- onclick="toggleCode('M000022-source');return false;">[Source]</a></p>
243
- <div class="method-source-code" id="M000022-source">
242
+ onclick="toggleCode('M000059-source');return false;">[Source]</a></p>
243
+ <div class="method-source-code" id="M000059-source">
244
244
  <pre>
245
- <span class="ruby-comment cmt"># File lib/pho/changeset.rb, line 265</span>
245
+ <span class="ruby-comment cmt"># File lib/pho/changeset.rb, line 280</span>
246
246
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add_addition</span>(<span class="ruby-identifier">statement</span>)
247
247
  <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">statement</span>.<span class="ruby-identifier">subject</span> <span class="ruby-operator">!=</span> <span class="ruby-ivar">@subject_of_change</span>
248
248
  <span class="ruby-identifier">raise</span> <span class="ruby-value str">&quot;Subject of statement must match subject of change of changeset&quot;</span>
@@ -254,11 +254,11 @@ href="Changeset.html">Changeset</a> as an addition
254
254
  </div>
255
255
  </div>
256
256
 
257
- <div id="method-M000023" class="method-detail">
258
- <a name="M000023"></a>
257
+ <div id="method-M000060" class="method-detail">
258
+ <a name="M000060"></a>
259
259
 
260
260
  <div class="method-heading">
261
- <a href="#M000023" class="method-signature">
261
+ <a href="#M000060" class="method-signature">
262
262
  <span class="method-name">add_additions</span><span class="method-args">(statements)</span>
263
263
  </a>
264
264
  </div>
@@ -266,13 +266,13 @@ href="Changeset.html">Changeset</a> as an addition
266
266
  <div class="method-description">
267
267
  <p>
268
268
  Add an array of statements as <a
269
- href="Changeset.html#M000021">additions</a>
269
+ href="Changeset.html#M000058">additions</a>
270
270
  </p>
271
271
  <p><a class="source-toggle" href="#"
272
- onclick="toggleCode('M000023-source');return false;">[Source]</a></p>
273
- <div class="method-source-code" id="M000023-source">
272
+ onclick="toggleCode('M000060-source');return false;">[Source]</a></p>
273
+ <div class="method-source-code" id="M000060-source">
274
274
  <pre>
275
- <span class="ruby-comment cmt"># File lib/pho/changeset.rb, line 273</span>
275
+ <span class="ruby-comment cmt"># File lib/pho/changeset.rb, line 288</span>
276
276
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add_additions</span>(<span class="ruby-identifier">statements</span>)
277
277
  <span class="ruby-identifier">statements</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">statement</span><span class="ruby-operator">|</span>
278
278
  <span class="ruby-identifier">add_addition</span>(<span class="ruby-identifier">statement</span>)
@@ -283,11 +283,11 @@ href="Changeset.html#M000021">additions</a>
283
283
  </div>
284
284
  </div>
285
285
 
286
- <div id="method-M000025" class="method-detail">
287
- <a name="M000025"></a>
286
+ <div id="method-M000062" class="method-detail">
287
+ <a name="M000062"></a>
288
288
 
289
289
  <div class="method-heading">
290
- <a href="#M000025" class="method-signature">
290
+ <a href="#M000062" class="method-signature">
291
291
  <span class="method-name">add_removal</span><span class="method-args">(statement)</span>
292
292
  </a>
293
293
  </div>
@@ -298,10 +298,10 @@ Include a <a href="Statement.html">Statement</a> in the <a
298
298
  href="Changeset.html">Changeset</a> as a removal
299
299
  </p>
300
300
  <p><a class="source-toggle" href="#"
301
- onclick="toggleCode('M000025-source');return false;">[Source]</a></p>
302
- <div class="method-source-code" id="M000025-source">
301
+ onclick="toggleCode('M000062-source');return false;">[Source]</a></p>
302
+ <div class="method-source-code" id="M000062-source">
303
303
  <pre>
304
- <span class="ruby-comment cmt"># File lib/pho/changeset.rb, line 285</span>
304
+ <span class="ruby-comment cmt"># File lib/pho/changeset.rb, line 300</span>
305
305
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add_removal</span>(<span class="ruby-identifier">statement</span>)
306
306
  <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">statement</span>.<span class="ruby-identifier">subject</span> <span class="ruby-operator">!=</span> <span class="ruby-ivar">@subject_of_change</span>
307
307
  <span class="ruby-identifier">raise</span> <span class="ruby-value str">&quot;Subject of statement must match subject of change of changeset&quot;</span>
@@ -313,24 +313,24 @@ href="Changeset.html">Changeset</a> as a removal
313
313
  </div>
314
314
  </div>
315
315
 
316
- <div id="method-M000026" class="method-detail">
317
- <a name="M000026"></a>
316
+ <div id="method-M000063" class="method-detail">
317
+ <a name="M000063"></a>
318
318
 
319
319
  <div class="method-heading">
320
- <a href="#M000026" class="method-signature">
320
+ <a href="#M000063" class="method-signature">
321
321
  <span class="method-name">add_removals</span><span class="method-args">(statements)</span>
322
322
  </a>
323
323
  </div>
324
324
 
325
325
  <div class="method-description">
326
326
  <p>
327
- Add an array of statements as <a href="Changeset.html#M000024">removals</a>
327
+ Add an array of statements as <a href="Changeset.html#M000061">removals</a>
328
328
  </p>
329
329
  <p><a class="source-toggle" href="#"
330
- onclick="toggleCode('M000026-source');return false;">[Source]</a></p>
331
- <div class="method-source-code" id="M000026-source">
330
+ onclick="toggleCode('M000063-source');return false;">[Source]</a></p>
331
+ <div class="method-source-code" id="M000063-source">
332
332
  <pre>
333
- <span class="ruby-comment cmt"># File lib/pho/changeset.rb, line 293</span>
333
+ <span class="ruby-comment cmt"># File lib/pho/changeset.rb, line 308</span>
334
334
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add_removals</span>(<span class="ruby-identifier">statements</span>)
335
335
  <span class="ruby-identifier">statements</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">statement</span><span class="ruby-operator">|</span>
336
336
  <span class="ruby-identifier">add_removal</span>(<span class="ruby-identifier">statement</span>)
@@ -341,11 +341,11 @@ Add an array of statements as <a href="Changeset.html#M000024">removals</a>
341
341
  </div>
342
342
  </div>
343
343
 
344
- <div id="method-M000021" class="method-detail">
345
- <a name="M000021"></a>
344
+ <div id="method-M000058" class="method-detail">
345
+ <a name="M000058"></a>
346
346
 
347
347
  <div class="method-heading">
348
- <a href="#M000021" class="method-signature">
348
+ <a href="#M000058" class="method-signature">
349
349
  <span class="method-name">additions</span><span class="method-args">()</span>
350
350
  </a>
351
351
  </div>
@@ -356,10 +356,10 @@ Return the <a href="Statement.html">Statement</a> describing the addition
356
356
  in this <a href="Changeset.html">Changeset</a>
357
357
  </p>
358
358
  <p><a class="source-toggle" href="#"
359
- onclick="toggleCode('M000021-source');return false;">[Source]</a></p>
360
- <div class="method-source-code" id="M000021-source">
359
+ onclick="toggleCode('M000058-source');return false;">[Source]</a></p>
360
+ <div class="method-source-code" id="M000058-source">
361
361
  <pre>
362
- <span class="ruby-comment cmt"># File lib/pho/changeset.rb, line 260</span>
362
+ <span class="ruby-comment cmt"># File lib/pho/changeset.rb, line 275</span>
363
363
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">additions</span>()
364
364
  <span class="ruby-keyword kw">return</span> <span class="ruby-ivar">@additions</span>
365
365
  <span class="ruby-keyword kw">end</span>
@@ -368,11 +368,11 @@ in this <a href="Changeset.html">Changeset</a>
368
368
  </div>
369
369
  </div>
370
370
 
371
- <div id="method-M000024" class="method-detail">
372
- <a name="M000024"></a>
371
+ <div id="method-M000061" class="method-detail">
372
+ <a name="M000061"></a>
373
373
 
374
374
  <div class="method-heading">
375
- <a href="#M000024" class="method-signature">
375
+ <a href="#M000061" class="method-signature">
376
376
  <span class="method-name">removals</span><span class="method-args">()</span>
377
377
  </a>
378
378
  </div>
@@ -380,14 +380,14 @@ in this <a href="Changeset.html">Changeset</a>
380
380
  <div class="method-description">
381
381
  <p>
382
382
  Return the list of Statements describing the <a
383
- href="Changeset.html#M000024">removals</a> in this <a
383
+ href="Changeset.html#M000061">removals</a> in this <a
384
384
  href="Changeset.html">Changeset</a>
385
385
  </p>
386
386
  <p><a class="source-toggle" href="#"
387
- onclick="toggleCode('M000024-source');return false;">[Source]</a></p>
388
- <div class="method-source-code" id="M000024-source">
387
+ onclick="toggleCode('M000061-source');return false;">[Source]</a></p>
388
+ <div class="method-source-code" id="M000061-source">
389
389
  <pre>
390
- <span class="ruby-comment cmt"># File lib/pho/changeset.rb, line 280</span>
390
+ <span class="ruby-comment cmt"># File lib/pho/changeset.rb, line 295</span>
391
391
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">removals</span>()
392
392
  <span class="ruby-keyword kw">return</span> <span class="ruby-ivar">@removals</span>
393
393
  <span class="ruby-keyword kw">end</span>
@@ -396,11 +396,11 @@ href="Changeset.html">Changeset</a>
396
396
  </div>
397
397
  </div>
398
398
 
399
- <div id="method-M000027" class="method-detail">
400
- <a name="M000027"></a>
399
+ <div id="method-M000064" class="method-detail">
400
+ <a name="M000064"></a>
401
401
 
402
402
  <div class="method-heading">
403
- <a href="#M000027" class="method-signature">
403
+ <a href="#M000064" class="method-signature">
404
404
  <span class="method-name">submit</span><span class="method-args">(store, versioned=false)</span>
405
405
  </a>
406
406
  </div>
@@ -413,10 +413,10 @@ Submit this changeset to the specified store
413
413
  store:: the store to which the changeset should be applied
414
414
  </pre>
415
415
  <p><a class="source-toggle" href="#"
416
- onclick="toggleCode('M000027-source');return false;">[Source]</a></p>
417
- <div class="method-source-code" id="M000027-source">
416
+ onclick="toggleCode('M000064-source');return false;">[Source]</a></p>
417
+ <div class="method-source-code" id="M000064-source">
418
418
  <pre>
419
- <span class="ruby-comment cmt"># File lib/pho/changeset.rb, line 302</span>
419
+ <span class="ruby-comment cmt"># File lib/pho/changeset.rb, line 317</span>
420
420
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">submit</span>(<span class="ruby-identifier">store</span>, <span class="ruby-identifier">versioned</span>=<span class="ruby-keyword kw">false</span>)
421
421
  <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">store</span>.<span class="ruby-identifier">submit_changeset</span>(<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">to_rdf</span>, <span class="ruby-identifier">versioned</span>)
422
422
  <span class="ruby-keyword kw">end</span>
@@ -425,11 +425,11 @@ Submit this changeset to the specified store
425
425
  </div>
426
426
  </div>
427
427
 
428
- <div id="method-M000020" class="method-detail">
429
- <a name="M000020"></a>
428
+ <div id="method-M000057" class="method-detail">
429
+ <a name="M000057"></a>
430
430
 
431
431
  <div class="method-heading">
432
- <a href="#M000020" class="method-signature">
432
+ <a href="#M000057" class="method-signature">
433
433
  <span class="method-name">to_rdf</span><span class="method-args">(include_root=true)</span>
434
434
  </a>
435
435
  </div>
@@ -440,10 +440,10 @@ Serialize this changeset as RDF/XML suitable for submitting to the
440
440
  Platform.
441
441
  </p>
442
442
  <p><a class="source-toggle" href="#"
443
- onclick="toggleCode('M000020-source');return false;">[Source]</a></p>
444
- <div class="method-source-code" id="M000020-source">
443
+ onclick="toggleCode('M000057-source');return false;">[Source]</a></p>
444
+ <div class="method-source-code" id="M000057-source">
445
445
  <pre>
446
- <span class="ruby-comment cmt"># File lib/pho/changeset.rb, line 225</span>
446
+ <span class="ruby-comment cmt"># File lib/pho/changeset.rb, line 240</span>
447
447
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_rdf</span>(<span class="ruby-identifier">include_root</span>=<span class="ruby-keyword kw">true</span>)
448
448
  <span class="ruby-identifier">rdf</span> = <span class="ruby-value str">&quot;&quot;</span>
449
449
  <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">include_root</span>
@@ -482,21 +482,21 @@ Platform.
482
482
  </div>
483
483
  </div>
484
484
 
485
- <div id="method-M000019" class="method-detail">
486
- <a name="M000019"></a>
485
+ <div id="method-M000056" class="method-detail">
486
+ <a name="M000056"></a>
487
487
 
488
488
  <div class="method-heading">
489
- <a href="#M000019" class="method-signature">
489
+ <a href="#M000056" class="method-signature">
490
490
  <span class="method-name">to_s</span><span class="method-args">()</span>
491
491
  </a>
492
492
  </div>
493
493
 
494
494
  <div class="method-description">
495
495
  <p><a class="source-toggle" href="#"
496
- onclick="toggleCode('M000019-source');return false;">[Source]</a></p>
497
- <div class="method-source-code" id="M000019-source">
496
+ onclick="toggleCode('M000056-source');return false;">[Source]</a></p>
497
+ <div class="method-source-code" id="M000056-source">
498
498
  <pre>
499
- <span class="ruby-comment cmt"># File lib/pho/changeset.rb, line 220</span>
499
+ <span class="ruby-comment cmt"># File lib/pho/changeset.rb, line 235</span>
500
500
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_s</span>
501
501
  <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">to_rdf</span>
502
502
  <span class="ruby-keyword kw">end</span>
@@ -93,10 +93,10 @@ href="Changesets.html">Changesets</a> from triple hashes
93
93
  <h3 class="section-bar">Methods</h3>
94
94
 
95
95
  <div class="name-list">
96
- <a href="#M000006">build</a>&nbsp;&nbsp;
97
- <a href="#M000005">build_batch</a>&nbsp;&nbsp;
98
- <a href="#M000007">create_statements</a>&nbsp;&nbsp;
99
- <a href="#M000008">create_statements_for_uri</a>&nbsp;&nbsp;
96
+ <a href="#M000042">build</a>&nbsp;&nbsp;
97
+ <a href="#M000041">build_batch</a>&nbsp;&nbsp;
98
+ <a href="#M000043">create_statements</a>&nbsp;&nbsp;
99
+ <a href="#M000044">create_statements_for_uri</a>&nbsp;&nbsp;
100
100
  </div>
101
101
  </div>
102
102
 
@@ -118,11 +118,11 @@ href="Changesets.html">Changesets</a> from triple hashes
118
118
  <div id="methods">
119
119
  <h3 class="section-bar">Public Class methods</h3>
120
120
 
121
- <div id="method-M000006" class="method-detail">
122
- <a name="M000006"></a>
121
+ <div id="method-M000042" class="method-detail">
122
+ <a name="M000042"></a>
123
123
 
124
124
  <div class="method-heading">
125
- <a href="#M000006" class="method-signature">
125
+ <a href="#M000042" class="method-signature">
126
126
  <span class="method-name">build</span><span class="method-args">(subject_of_change, before, after, creator_name=nil, change_reason=nil)</span>
127
127
  </a>
128
128
  </div>
@@ -142,19 +142,19 @@ object.
142
142
  </p>
143
143
  <pre>
144
144
  subject_of_change:: uri of the resource being updated
145
- before:: triple hash describing current state of the resource
146
- after:: triple hash describing updated state of the resource
145
+ before:: resource hash describing current state of the resource
146
+ after:: resource hash describing updated state of the resource
147
147
  creator_name:: name of the creator of the changes
148
148
  change_reason:: description of why the changes are being made
149
149
  </pre>
150
150
  <p><a class="source-toggle" href="#"
151
- onclick="toggleCode('M000006-source');return false;">[Source]</a></p>
152
- <div class="method-source-code" id="M000006-source">
151
+ onclick="toggleCode('M000042-source');return false;">[Source]</a></p>
152
+ <div class="method-source-code" id="M000042-source">
153
153
  <pre>
154
154
  <span class="ruby-comment cmt"># File lib/pho/changeset_builder.rb, line 65</span>
155
155
  <span class="ruby-keyword kw">def</span> <span class="ruby-constant">ChangesetBuilder</span>.<span class="ruby-identifier">build</span>(<span class="ruby-identifier">subject_of_change</span>, <span class="ruby-identifier">before</span>, <span class="ruby-identifier">after</span>, <span class="ruby-identifier">creator_name</span>=<span class="ruby-keyword kw">nil</span>, <span class="ruby-identifier">change_reason</span>=<span class="ruby-keyword kw">nil</span>)
156
- <span class="ruby-identifier">removals</span> = <span class="ruby-constant">Pho</span><span class="ruby-operator">::</span><span class="ruby-constant">RDF_JSON</span><span class="ruby-operator">::</span><span class="ruby-constant">SetAlgebra</span>.<span class="ruby-identifier">minus</span>(<span class="ruby-identifier">before</span>, <span class="ruby-identifier">after</span>)
157
- <span class="ruby-identifier">additions</span> = <span class="ruby-constant">Pho</span><span class="ruby-operator">::</span><span class="ruby-constant">RDF_JSON</span><span class="ruby-operator">::</span><span class="ruby-constant">SetAlgebra</span>.<span class="ruby-identifier">minus</span>(<span class="ruby-identifier">after</span>, <span class="ruby-identifier">before</span>)
156
+ <span class="ruby-identifier">removals</span> = <span class="ruby-constant">Pho</span><span class="ruby-operator">::</span><span class="ruby-constant">ResourceHash</span><span class="ruby-operator">::</span><span class="ruby-constant">SetAlgebra</span>.<span class="ruby-identifier">minus</span>(<span class="ruby-identifier">before</span>, <span class="ruby-identifier">after</span>)
157
+ <span class="ruby-identifier">additions</span> = <span class="ruby-constant">Pho</span><span class="ruby-operator">::</span><span class="ruby-constant">ResourceHash</span><span class="ruby-operator">::</span><span class="ruby-constant">SetAlgebra</span>.<span class="ruby-identifier">minus</span>(<span class="ruby-identifier">after</span>, <span class="ruby-identifier">before</span>)
158
158
 
159
159
  <span class="ruby-identifier">cs</span> = <span class="ruby-constant">Pho</span><span class="ruby-operator">::</span><span class="ruby-constant">Update</span><span class="ruby-operator">::</span><span class="ruby-constant">Changeset</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">subject_of_change</span>, <span class="ruby-identifier">creator_name</span>, <span class="ruby-identifier">change_reason</span>) <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">cs</span><span class="ruby-operator">|</span>
160
160
  <span class="ruby-identifier">cs</span>.<span class="ruby-identifier">add_removals</span>( <span class="ruby-identifier">create_statements</span>(<span class="ruby-identifier">removals</span>) )
@@ -169,11 +169,11 @@ object.
169
169
  </div>
170
170
  </div>
171
171
 
172
- <div id="method-M000005" class="method-detail">
173
- <a name="M000005"></a>
172
+ <div id="method-M000041" class="method-detail">
173
+ <a name="M000041"></a>
174
174
 
175
175
  <div class="method-heading">
176
- <a href="#M000005" class="method-signature">
176
+ <a href="#M000041" class="method-signature">
177
177
  <span class="method-name">build_batch</span><span class="method-args">(before, after, creator_name=nil, change_reason=nil)</span>
178
178
  </a>
179
179
  </div>
@@ -190,20 +190,20 @@ changes made to a number of different resources.
190
190
  Returns an array of <a href="Changeset.html">Changeset</a> objects
191
191
  </p>
192
192
  <pre>
193
- before:: triple hash describing current state of the resource
194
- after:: triple hash describing updated state of the resource
193
+ before:: resource hash describing current state of the resource
194
+ after:: resource hash describing updated state of the resource
195
195
  creator_name:: name of the creator of the changes
196
196
  change_reason:: description of why the changes are being made
197
197
  </pre>
198
198
  <p><a class="source-toggle" href="#"
199
- onclick="toggleCode('M000005-source');return false;">[Source]</a></p>
200
- <div class="method-source-code" id="M000005-source">
199
+ onclick="toggleCode('M000041-source');return false;">[Source]</a></p>
200
+ <div class="method-source-code" id="M000041-source">
201
201
  <pre>
202
202
  <span class="ruby-comment cmt"># File lib/pho/changeset_builder.rb, line 22</span>
203
203
  <span class="ruby-keyword kw">def</span> <span class="ruby-constant">ChangesetBuilder</span>.<span class="ruby-identifier">build_batch</span>(<span class="ruby-identifier">before</span>, <span class="ruby-identifier">after</span>, <span class="ruby-identifier">creator_name</span>=<span class="ruby-keyword kw">nil</span>, <span class="ruby-identifier">change_reason</span>=<span class="ruby-keyword kw">nil</span>)
204
204
 
205
- <span class="ruby-identifier">removals</span> = <span class="ruby-constant">Pho</span><span class="ruby-operator">::</span><span class="ruby-constant">RDF_JSON</span><span class="ruby-operator">::</span><span class="ruby-constant">SetAlgebra</span>.<span class="ruby-identifier">minus</span>(<span class="ruby-identifier">before</span>, <span class="ruby-identifier">after</span>)
206
- <span class="ruby-identifier">additions</span> = <span class="ruby-constant">Pho</span><span class="ruby-operator">::</span><span class="ruby-constant">RDF_JSON</span><span class="ruby-operator">::</span><span class="ruby-constant">SetAlgebra</span>.<span class="ruby-identifier">minus</span>(<span class="ruby-identifier">after</span>, <span class="ruby-identifier">before</span>)
205
+ <span class="ruby-identifier">removals</span> = <span class="ruby-constant">Pho</span><span class="ruby-operator">::</span><span class="ruby-constant">ResourceHash</span><span class="ruby-operator">::</span><span class="ruby-constant">SetAlgebra</span>.<span class="ruby-identifier">minus</span>(<span class="ruby-identifier">before</span>, <span class="ruby-identifier">after</span>)
206
+ <span class="ruby-identifier">additions</span> = <span class="ruby-constant">Pho</span><span class="ruby-operator">::</span><span class="ruby-constant">ResourceHash</span><span class="ruby-operator">::</span><span class="ruby-constant">SetAlgebra</span>.<span class="ruby-identifier">minus</span>(<span class="ruby-identifier">after</span>, <span class="ruby-identifier">before</span>)
207
207
 
208
208
  <span class="ruby-identifier">batch</span> = <span class="ruby-constant">Array</span>.<span class="ruby-identifier">new</span>
209
209
 
@@ -235,26 +235,26 @@ Returns an array of <a href="Changeset.html">Changeset</a> objects
235
235
  </div>
236
236
  </div>
237
237
 
238
- <div id="method-M000007" class="method-detail">
239
- <a name="M000007"></a>
238
+ <div id="method-M000043" class="method-detail">
239
+ <a name="M000043"></a>
240
240
 
241
241
  <div class="method-heading">
242
- <a href="#M000007" class="method-signature">
242
+ <a href="#M000043" class="method-signature">
243
243
  <span class="method-name">create_statements</span><span class="method-args">(triples)</span>
244
244
  </a>
245
245
  </div>
246
246
 
247
247
  <div class="method-description">
248
248
  <p>
249
- Takes an triple hash and serializes it as an array of <a
249
+ Takes a resource hash and serializes it as an array of <a
250
250
  href="Statement.html">Pho::Update::Statement</a> objects
251
251
  </p>
252
252
  <pre>
253
- triples:: a hash of triples, conforming to RDF-in-JSON structure
253
+ triples:: a resource hash, conforming to RDF-in-JSON structure
254
254
  </pre>
255
255
  <p><a class="source-toggle" href="#"
256
- onclick="toggleCode('M000007-source');return false;">[Source]</a></p>
257
- <div class="method-source-code" id="M000007-source">
256
+ onclick="toggleCode('M000043-source');return false;">[Source]</a></p>
257
+ <div class="method-source-code" id="M000043-source">
258
258
  <pre>
259
259
  <span class="ruby-comment cmt"># File lib/pho/changeset_builder.rb, line 81</span>
260
260
  <span class="ruby-keyword kw">def</span> <span class="ruby-constant">ChangesetBuilder</span>.<span class="ruby-identifier">create_statements</span>(<span class="ruby-identifier">triples</span>)
@@ -269,11 +269,11 @@ href="Statement.html">Pho::Update::Statement</a> objects
269
269
  </div>
270
270
  </div>
271
271
 
272
- <div id="method-M000008" class="method-detail">
273
- <a name="M000008"></a>
272
+ <div id="method-M000044" class="method-detail">
273
+ <a name="M000044"></a>
274
274
 
275
275
  <div class="method-heading">
276
- <a href="#M000008" class="method-signature">
276
+ <a href="#M000044" class="method-signature">
277
277
  <span class="method-name">create_statements_for_uri</span><span class="method-args">(uri, properties)</span>
278
278
  </a>
279
279
  </div>
@@ -288,8 +288,8 @@ provided properties hash
288
288
  properties:: hash of predicate-object values
289
289
  </pre>
290
290
  <p><a class="source-toggle" href="#"
291
- onclick="toggleCode('M000008-source');return false;">[Source]</a></p>
292
- <div class="method-source-code" id="M000008-source">
291
+ onclick="toggleCode('M000044-source');return false;">[Source]</a></p>
292
+ <div class="method-source-code" id="M000044-source">
293
293
  <pre>
294
294
  <span class="ruby-comment cmt"># File lib/pho/changeset_builder.rb, line 94</span>
295
295
  <span class="ruby-keyword kw">def</span> <span class="ruby-constant">ChangesetBuilder</span>.<span class="ruby-identifier">create_statements_for_uri</span>(<span class="ruby-identifier">uri</span>, <span class="ruby-identifier">properties</span>)