pho 0.6.2 → 0.7
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGES +12 -0
- data/Rakefile +1 -1
- data/bin/talis_store +98 -24
- data/doc/rdoc/classes/Pho.html +15 -0
- data/doc/rdoc/classes/Pho/CommandLine.html +353 -91
- data/doc/rdoc/classes/Pho/DatatypeProperty.html +12 -12
- data/doc/rdoc/classes/Pho/Enrichment/StoreEnricher.html +29 -29
- data/doc/rdoc/classes/Pho/Etags.html +36 -36
- data/doc/rdoc/classes/Pho/Facet/Results.html +19 -19
- data/doc/rdoc/classes/Pho/Facet/Term.html +6 -6
- data/doc/rdoc/classes/Pho/FieldPredicateMap.html +105 -106
- data/doc/rdoc/classes/Pho/FieldWeighting.html +12 -12
- data/doc/rdoc/classes/Pho/FileManagement/RDFManager.html +31 -8
- data/doc/rdoc/classes/Pho/Job.html +64 -64
- data/doc/rdoc/classes/Pho/Jobs.html +60 -60
- data/doc/rdoc/classes/Pho/QueryProfile.html +60 -60
- data/doc/rdoc/classes/Pho/RDF/Parser.html +28 -26
- data/doc/rdoc/classes/Pho/ResourceHash/Converter.html +36 -36
- data/doc/rdoc/classes/Pho/ResourceHash/SetAlgebra.html +12 -12
- data/doc/rdoc/classes/Pho/Snapshot.html +35 -35
- data/doc/rdoc/classes/Pho/Status.html +26 -26
- data/doc/rdoc/classes/Pho/Store.html +289 -245
- data/doc/rdoc/classes/Pho/StoreSparqlClient.html +14 -14
- data/doc/rdoc/classes/String.html +1 -1
- data/doc/rdoc/created.rid +1 -1
- data/doc/rdoc/files/CHANGES.html +35 -1
- data/doc/rdoc/files/lib/pho/command_line_rb.html +1 -1
- data/doc/rdoc/files/lib/pho/converter_rb.html +1 -1
- data/doc/rdoc/files/lib/pho/field_predicate_map_rb.html +1 -1
- data/doc/rdoc/files/lib/pho/rdf_collection_rb.html +1 -1
- data/doc/rdoc/files/lib/pho/rdf_rb.html +1 -1
- data/doc/rdoc/files/lib/pho/store_rb.html +1 -1
- data/doc/rdoc/files/lib/pho_rb.html +2 -1
- data/doc/rdoc/fr_class_index.html +3 -0
- data/doc/rdoc/fr_file_index.html +1 -0
- data/doc/rdoc/fr_method_index.html +153 -141
- data/lib/pho.rb +3 -0
- data/lib/pho/command_line.rb +139 -14
- data/lib/pho/field_predicate_map.rb +1 -2
- data/lib/pho/oai.rb +58 -0
- data/lib/pho/rdf.rb +2 -0
- data/lib/pho/rdf_collection.rb +16 -4
- data/lib/pho/store.rb +23 -5
- data/tests/tc_command_line.rb +229 -0
- data/tests/tc_field_predicate_map.rb +5 -1
- data/tests/tc_metabox.rb +29 -1
- data/tests/tc_oai.rb +31 -0
- data/tests/tc_rdf_collection.rb +80 -15
- data/tests/ts_pho.rb +3 -1
- metadata +5 -2
@@ -98,16 +98,16 @@ href="Store.html">Store</a> methods.
|
|
98
98
|
<h3 class="section-bar">Methods</h3>
|
99
99
|
|
100
100
|
<div class="name-list">
|
101
|
-
<a href="#
|
102
|
-
<a href="#
|
103
|
-
<a href="#
|
104
|
-
<a href="#
|
105
|
-
<a href="#
|
106
|
-
<a href="#
|
107
|
-
<a href="#
|
108
|
-
<a href="#
|
109
|
-
<a href="#
|
110
|
-
<a href="#
|
101
|
+
<a href="#M000133"><<</a>
|
102
|
+
<a href="#M000131">create_weighting</a>
|
103
|
+
<a href="#M000134">get_by_name</a>
|
104
|
+
<a href="#M000137">mapped_name?</a>
|
105
|
+
<a href="#M000132">new</a>
|
106
|
+
<a href="#M000130">read_from_store</a>
|
107
|
+
<a href="#M000136">remove</a>
|
108
|
+
<a href="#M000135">remove_by_name</a>
|
109
|
+
<a href="#M000138">to_rdf</a>
|
110
|
+
<a href="#M000139">upload</a>
|
111
111
|
</div>
|
112
112
|
</div>
|
113
113
|
|
@@ -161,11 +161,11 @@ URI for this resource
|
|
161
161
|
<div id="methods">
|
162
162
|
<h3 class="section-bar">Public Class methods</h3>
|
163
163
|
|
164
|
-
<div id="method-
|
165
|
-
<a name="
|
164
|
+
<div id="method-M000131" class="method-detail">
|
165
|
+
<a name="M000131"></a>
|
166
166
|
|
167
167
|
<div class="method-heading">
|
168
|
-
<a href="#
|
168
|
+
<a href="#M000131" class="method-signature">
|
169
169
|
<span class="method-name">create_weighting</span><span class="method-args">(store, name, weight)</span>
|
170
170
|
</a>
|
171
171
|
</div>
|
@@ -188,8 +188,8 @@ according to the Platform naming rules
|
|
188
188
|
</td></tr>
|
189
189
|
</table>
|
190
190
|
<p><a class="source-toggle" href="#"
|
191
|
-
onclick="toggleCode('
|
192
|
-
<div class="method-source-code" id="
|
191
|
+
onclick="toggleCode('M000131-source');return false;">[Source]</a></p>
|
192
|
+
<div class="method-source-code" id="M000131-source">
|
193
193
|
<pre>
|
194
194
|
<span class="ruby-comment cmt"># File lib/pho/query_profile.rb, line 84</span>
|
195
195
|
<span class="ruby-keyword kw">def</span> <span class="ruby-constant">QueryProfile</span>.<span class="ruby-identifier">create_weighting</span>(<span class="ruby-identifier">store</span>, <span class="ruby-identifier">name</span>, <span class="ruby-identifier">weight</span>)
|
@@ -206,19 +206,19 @@ according to the Platform naming rules
|
|
206
206
|
</div>
|
207
207
|
</div>
|
208
208
|
|
209
|
-
<div id="method-
|
210
|
-
<a name="
|
209
|
+
<div id="method-M000132" class="method-detail">
|
210
|
+
<a name="M000132"></a>
|
211
211
|
|
212
212
|
<div class="method-heading">
|
213
|
-
<a href="#
|
213
|
+
<a href="#M000132" class="method-signature">
|
214
214
|
<span class="method-name">new</span><span class="method-args">(uri, label, field_weights=Array.new)</span>
|
215
215
|
</a>
|
216
216
|
</div>
|
217
217
|
|
218
218
|
<div class="method-description">
|
219
219
|
<p><a class="source-toggle" href="#"
|
220
|
-
onclick="toggleCode('
|
221
|
-
<div class="method-source-code" id="
|
220
|
+
onclick="toggleCode('M000132-source');return false;">[Source]</a></p>
|
221
|
+
<div class="method-source-code" id="M000132-source">
|
222
222
|
<pre>
|
223
223
|
<span class="ruby-comment cmt"># File lib/pho/query_profile.rb, line 94</span>
|
224
224
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">uri</span>, <span class="ruby-identifier">label</span>, <span class="ruby-identifier">field_weights</span>=<span class="ruby-constant">Array</span>.<span class="ruby-identifier">new</span>)
|
@@ -231,19 +231,19 @@ according to the Platform naming rules
|
|
231
231
|
</div>
|
232
232
|
</div>
|
233
233
|
|
234
|
-
<div id="method-
|
235
|
-
<a name="
|
234
|
+
<div id="method-M000130" class="method-detail">
|
235
|
+
<a name="M000130"></a>
|
236
236
|
|
237
237
|
<div class="method-heading">
|
238
|
-
<a href="#
|
238
|
+
<a href="#M000130" class="method-signature">
|
239
239
|
<span class="method-name">read_from_store</span><span class="method-args">(store)</span>
|
240
240
|
</a>
|
241
241
|
</div>
|
242
242
|
|
243
243
|
<div class="method-description">
|
244
244
|
<p><a class="source-toggle" href="#"
|
245
|
-
onclick="toggleCode('
|
246
|
-
<div class="method-source-code" id="
|
245
|
+
onclick="toggleCode('M000130-source');return false;">[Source]</a></p>
|
246
|
+
<div class="method-source-code" id="M000130-source">
|
247
247
|
<pre>
|
248
248
|
<span class="ruby-comment cmt"># File lib/pho/query_profile.rb, line 53</span>
|
249
249
|
<span class="ruby-keyword kw">def</span> <span class="ruby-constant">QueryProfile</span>.<span class="ruby-identifier">read_from_store</span>(<span class="ruby-identifier">store</span>)
|
@@ -277,19 +277,19 @@ according to the Platform naming rules
|
|
277
277
|
|
278
278
|
<h3 class="section-bar">Public Instance methods</h3>
|
279
279
|
|
280
|
-
<div id="method-
|
281
|
-
<a name="
|
280
|
+
<div id="method-M000133" class="method-detail">
|
281
|
+
<a name="M000133"></a>
|
282
282
|
|
283
283
|
<div class="method-heading">
|
284
|
-
<a href="#
|
284
|
+
<a href="#M000133" class="method-signature">
|
285
285
|
<span class="method-name"><<</span><span class="method-args">(weight)</span>
|
286
286
|
</a>
|
287
287
|
</div>
|
288
288
|
|
289
289
|
<div class="method-description">
|
290
290
|
<p><a class="source-toggle" href="#"
|
291
|
-
onclick="toggleCode('
|
292
|
-
<div class="method-source-code" id="
|
291
|
+
onclick="toggleCode('M000133-source');return false;">[Source]</a></p>
|
292
|
+
<div class="method-source-code" id="M000133-source">
|
293
293
|
<pre>
|
294
294
|
<span class="ruby-comment cmt"># File lib/pho/query_profile.rb, line 100</span>
|
295
295
|
<span class="ruby-keyword kw">def</span> <span class="ruby-operator"><<</span>(<span class="ruby-identifier">weight</span>)
|
@@ -300,11 +300,11 @@ according to the Platform naming rules
|
|
300
300
|
</div>
|
301
301
|
</div>
|
302
302
|
|
303
|
-
<div id="method-
|
304
|
-
<a name="
|
303
|
+
<div id="method-M000134" class="method-detail">
|
304
|
+
<a name="M000134"></a>
|
305
305
|
|
306
306
|
<div class="method-heading">
|
307
|
-
<a href="#
|
307
|
+
<a href="#M000134" class="method-signature">
|
308
308
|
<span class="method-name">get_by_name</span><span class="method-args">(name)</span>
|
309
309
|
</a>
|
310
310
|
</div>
|
@@ -314,8 +314,8 @@ according to the Platform naming rules
|
|
314
314
|
Retrieve a FieldWeighing by name
|
315
315
|
</p>
|
316
316
|
<p><a class="source-toggle" href="#"
|
317
|
-
onclick="toggleCode('
|
318
|
-
<div class="method-source-code" id="
|
317
|
+
onclick="toggleCode('M000134-source');return false;">[Source]</a></p>
|
318
|
+
<div class="method-source-code" id="M000134-source">
|
319
319
|
<pre>
|
320
320
|
<span class="ruby-comment cmt"># File lib/pho/query_profile.rb, line 105</span>
|
321
321
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">get_by_name</span>(<span class="ruby-identifier">name</span>)
|
@@ -326,11 +326,11 @@ Retrieve a FieldWeighing by name
|
|
326
326
|
</div>
|
327
327
|
</div>
|
328
328
|
|
329
|
-
<div id="method-
|
330
|
-
<a name="
|
329
|
+
<div id="method-M000137" class="method-detail">
|
330
|
+
<a name="M000137"></a>
|
331
331
|
|
332
332
|
<div class="method-heading">
|
333
|
-
<a href="#
|
333
|
+
<a href="#M000137" class="method-signature">
|
334
334
|
<span class="method-name">mapped_name?</span><span class="method-args">(name)</span>
|
335
335
|
</a>
|
336
336
|
</div>
|
@@ -340,8 +340,8 @@ Retrieve a FieldWeighing by name
|
|
340
340
|
Is there a field weighting for a property with this name?
|
341
341
|
</p>
|
342
342
|
<p><a class="source-toggle" href="#"
|
343
|
-
onclick="toggleCode('
|
344
|
-
<div class="method-source-code" id="
|
343
|
+
onclick="toggleCode('M000137-source');return false;">[Source]</a></p>
|
344
|
+
<div class="method-source-code" id="M000137-source">
|
345
345
|
<pre>
|
346
346
|
<span class="ruby-comment cmt"># File lib/pho/query_profile.rb, line 123</span>
|
347
347
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">mapped_name?</span>(<span class="ruby-identifier">name</span>)
|
@@ -352,11 +352,11 @@ Is there a field weighting for a property with this name?
|
|
352
352
|
</div>
|
353
353
|
</div>
|
354
354
|
|
355
|
-
<div id="method-
|
356
|
-
<a name="
|
355
|
+
<div id="method-M000136" class="method-detail">
|
356
|
+
<a name="M000136"></a>
|
357
357
|
|
358
358
|
<div class="method-heading">
|
359
|
-
<a href="#
|
359
|
+
<a href="#M000136" class="method-signature">
|
360
360
|
<span class="method-name">remove</span><span class="method-args">(fw)</span>
|
361
361
|
</a>
|
362
362
|
</div>
|
@@ -367,8 +367,8 @@ Remove a <a href="FieldWeighting.html">FieldWeighting</a> from the
|
|
367
367
|
collection
|
368
368
|
</p>
|
369
369
|
<p><a class="source-toggle" href="#"
|
370
|
-
onclick="toggleCode('
|
371
|
-
<div class="method-source-code" id="
|
370
|
+
onclick="toggleCode('M000136-source');return false;">[Source]</a></p>
|
371
|
+
<div class="method-source-code" id="M000136-source">
|
372
372
|
<pre>
|
373
373
|
<span class="ruby-comment cmt"># File lib/pho/query_profile.rb, line 118</span>
|
374
374
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">remove</span>(<span class="ruby-identifier">fw</span>)
|
@@ -379,11 +379,11 @@ collection
|
|
379
379
|
</div>
|
380
380
|
</div>
|
381
381
|
|
382
|
-
<div id="method-
|
383
|
-
<a name="
|
382
|
+
<div id="method-M000135" class="method-detail">
|
383
|
+
<a name="M000135"></a>
|
384
384
|
|
385
385
|
<div class="method-heading">
|
386
|
-
<a href="#
|
386
|
+
<a href="#M000135" class="method-signature">
|
387
387
|
<span class="method-name">remove_by_name</span><span class="method-args">(name)</span>
|
388
388
|
</a>
|
389
389
|
</div>
|
@@ -393,8 +393,8 @@ collection
|
|
393
393
|
Remove a <a href="FieldWeighting.html">FieldWeighting</a> by name
|
394
394
|
</p>
|
395
395
|
<p><a class="source-toggle" href="#"
|
396
|
-
onclick="toggleCode('
|
397
|
-
<div class="method-source-code" id="
|
396
|
+
onclick="toggleCode('M000135-source');return false;">[Source]</a></p>
|
397
|
+
<div class="method-source-code" id="M000135-source">
|
398
398
|
<pre>
|
399
399
|
<span class="ruby-comment cmt"># File lib/pho/query_profile.rb, line 110</span>
|
400
400
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">remove_by_name</span>(<span class="ruby-identifier">name</span>)
|
@@ -408,11 +408,11 @@ Remove a <a href="FieldWeighting.html">FieldWeighting</a> by name
|
|
408
408
|
</div>
|
409
409
|
</div>
|
410
410
|
|
411
|
-
<div id="method-
|
412
|
-
<a name="
|
411
|
+
<div id="method-M000138" class="method-detail">
|
412
|
+
<a name="M000138"></a>
|
413
413
|
|
414
414
|
<div class="method-heading">
|
415
|
-
<a href="#
|
415
|
+
<a href="#M000138" class="method-signature">
|
416
416
|
<span class="method-name">to_rdf</span><span class="method-args">()</span>
|
417
417
|
</a>
|
418
418
|
</div>
|
@@ -423,8 +423,8 @@ Dump this object to an <a href="RDF.html">RDF</a>/XML representation
|
|
423
423
|
suitable for submitting to the Platform
|
424
424
|
</p>
|
425
425
|
<p><a class="source-toggle" href="#"
|
426
|
-
onclick="toggleCode('
|
427
|
-
<div class="method-source-code" id="
|
426
|
+
onclick="toggleCode('M000138-source');return false;">[Source]</a></p>
|
427
|
+
<div class="method-source-code" id="M000138-source">
|
428
428
|
<pre>
|
429
429
|
<span class="ruby-comment cmt"># File lib/pho/query_profile.rb, line 128</span>
|
430
430
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_rdf</span>
|
@@ -455,11 +455,11 @@ suitable for submitting to the Platform
|
|
455
455
|
</div>
|
456
456
|
</div>
|
457
457
|
|
458
|
-
<div id="method-
|
459
|
-
<a name="
|
458
|
+
<div id="method-M000139" class="method-detail">
|
459
|
+
<a name="M000139"></a>
|
460
460
|
|
461
461
|
<div class="method-heading">
|
462
|
-
<a href="#
|
462
|
+
<a href="#M000139" class="method-signature">
|
463
463
|
<span class="method-name">upload</span><span class="method-args">(store)</span>
|
464
464
|
</a>
|
465
465
|
</div>
|
@@ -470,8 +470,8 @@ Upload an <a href="RDF.html">RDF</a>/XML presentation of this object to the
|
|
470
470
|
provided Platform <a href="Store.html">Store</a>
|
471
471
|
</p>
|
472
472
|
<p><a class="source-toggle" href="#"
|
473
|
-
onclick="toggleCode('
|
474
|
-
<div class="method-source-code" id="
|
473
|
+
onclick="toggleCode('M000139-source');return false;">[Source]</a></p>
|
474
|
+
<div class="method-source-code" id="M000139-source">
|
475
475
|
<pre>
|
476
476
|
<span class="ruby-comment cmt"># File lib/pho/query_profile.rb, line 153</span>
|
477
477
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">upload</span>(<span class="ruby-identifier">store</span>)
|
@@ -95,10 +95,10 @@ Currently a convenience wrapper around the Redland Ruby bindings
|
|
95
95
|
<h3 class="section-bar">Methods</h3>
|
96
96
|
|
97
97
|
<div class="name-list">
|
98
|
-
<a href="#
|
99
|
-
<a href="#
|
100
|
-
<a href="#
|
101
|
-
<a href="#
|
98
|
+
<a href="#M000089">parse_ntriples</a>
|
99
|
+
<a href="#M000090">parse_ntriples_from_string</a>
|
100
|
+
<a href="#M000091">store_ntriples</a>
|
101
|
+
<a href="#M000092">store_ntriples_from_string</a>
|
102
102
|
</div>
|
103
103
|
</div>
|
104
104
|
|
@@ -120,11 +120,11 @@ Currently a convenience wrapper around the Redland Ruby bindings
|
|
120
120
|
<div id="methods">
|
121
121
|
<h3 class="section-bar">Public Class methods</h3>
|
122
122
|
|
123
|
-
<div id="method-
|
124
|
-
<a name="
|
123
|
+
<div id="method-M000089" class="method-detail">
|
124
|
+
<a name="M000089"></a>
|
125
125
|
|
126
126
|
<div class="method-heading">
|
127
|
-
<a href="#
|
127
|
+
<a href="#M000089" class="method-signature">
|
128
128
|
<span class="method-name">parse_ntriples</span><span class="method-args">(file, base_uri=nil)</span>
|
129
129
|
</a>
|
130
130
|
</div>
|
@@ -140,8 +140,8 @@ Returns a string
|
|
140
140
|
relative to the File
|
141
141
|
</pre>
|
142
142
|
<p><a class="source-toggle" href="#"
|
143
|
-
onclick="toggleCode('
|
144
|
-
<div class="method-source-code" id="
|
143
|
+
onclick="toggleCode('M000089-source');return false;">[Source]</a></p>
|
144
|
+
<div class="method-source-code" id="M000089-source">
|
145
145
|
<pre>
|
146
146
|
<span class="ruby-comment cmt"># File lib/pho/rdf.rb, line 24</span>
|
147
147
|
<span class="ruby-keyword kw">def</span> <span class="ruby-constant">Parser</span>.<span class="ruby-identifier">parse_ntriples</span>(<span class="ruby-identifier">file</span>, <span class="ruby-identifier">base_uri</span>=<span class="ruby-keyword kw">nil</span>)
|
@@ -159,11 +159,11 @@ Returns a string
|
|
159
159
|
</div>
|
160
160
|
</div>
|
161
161
|
|
162
|
-
<div id="method-
|
163
|
-
<a name="
|
162
|
+
<div id="method-M000090" class="method-detail">
|
163
|
+
<a name="M000090"></a>
|
164
164
|
|
165
165
|
<div class="method-heading">
|
166
|
-
<a href="#
|
166
|
+
<a href="#M000090" class="method-signature">
|
167
167
|
<span class="method-name">parse_ntriples_from_string</span><span class="method-args">(string, base_uri)</span>
|
168
168
|
</a>
|
169
169
|
</div>
|
@@ -178,8 +178,8 @@ Returns a string
|
|
178
178
|
base_uri:: base uri for parsing the data
|
179
179
|
</pre>
|
180
180
|
<p><a class="source-toggle" href="#"
|
181
|
-
onclick="toggleCode('
|
182
|
-
<div class="method-source-code" id="
|
181
|
+
onclick="toggleCode('M000090-source');return false;">[Source]</a></p>
|
182
|
+
<div class="method-source-code" id="M000090-source">
|
183
183
|
<pre>
|
184
184
|
<span class="ruby-comment cmt"># File lib/pho/rdf.rb, line 39</span>
|
185
185
|
<span class="ruby-keyword kw">def</span> <span class="ruby-constant">Parser</span>.<span class="ruby-identifier">parse_ntriples_from_string</span>(<span class="ruby-identifier">string</span>, <span class="ruby-identifier">base_uri</span>)
|
@@ -195,11 +195,11 @@ Returns a string
|
|
195
195
|
</div>
|
196
196
|
</div>
|
197
197
|
|
198
|
-
<div id="method-
|
199
|
-
<a name="
|
198
|
+
<div id="method-M000091" class="method-detail">
|
199
|
+
<a name="M000091"></a>
|
200
200
|
|
201
201
|
<div class="method-heading">
|
202
|
-
<a href="#
|
202
|
+
<a href="#M000091" class="method-signature">
|
203
203
|
<span class="method-name">store_ntriples</span><span class="method-args">(file, store, base_uri=nil, graph_name=nil)</span>
|
204
204
|
</a>
|
205
205
|
</div>
|
@@ -213,12 +213,13 @@ Convenience method to parse an ntriples file and store it a Platform store
|
|
213
213
|
store:: the store to receive the data
|
214
214
|
base_uri:: base uri against which the data is parsed
|
215
215
|
graph_name:: uri of graph in store
|
216
|
+
TODO: can now be submitted as turtle
|
216
217
|
</pre>
|
217
218
|
<p><a class="source-toggle" href="#"
|
218
|
-
onclick="toggleCode('
|
219
|
-
<div class="method-source-code" id="
|
219
|
+
onclick="toggleCode('M000091-source');return false;">[Source]</a></p>
|
220
|
+
<div class="method-source-code" id="M000091-source">
|
220
221
|
<pre>
|
221
|
-
<span class="ruby-comment cmt"># File lib/pho/rdf.rb, line
|
222
|
+
<span class="ruby-comment cmt"># File lib/pho/rdf.rb, line 55</span>
|
222
223
|
<span class="ruby-keyword kw">def</span> <span class="ruby-constant">Parser</span>.<span class="ruby-identifier">store_ntriples</span>(<span class="ruby-identifier">file</span>, <span class="ruby-identifier">store</span>, <span class="ruby-identifier">base_uri</span>=<span class="ruby-keyword kw">nil</span>, <span class="ruby-identifier">graph_name</span>=<span class="ruby-keyword kw">nil</span>)
|
223
224
|
<span class="ruby-identifier">data</span> = <span class="ruby-constant">Parser</span>.<span class="ruby-identifier">parse_ntriples</span>(<span class="ruby-identifier">file</span>, <span class="ruby-identifier">base_uri</span>)
|
224
225
|
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">store</span>.<span class="ruby-identifier">store_data</span>(<span class="ruby-identifier">data</span>, <span class="ruby-identifier">graph_name</span>)
|
@@ -228,11 +229,11 @@ Convenience method to parse an ntriples file and store it a Platform store
|
|
228
229
|
</div>
|
229
230
|
</div>
|
230
231
|
|
231
|
-
<div id="method-
|
232
|
-
<a name="
|
232
|
+
<div id="method-M000092" class="method-detail">
|
233
|
+
<a name="M000092"></a>
|
233
234
|
|
234
235
|
<div class="method-heading">
|
235
|
-
<a href="#
|
236
|
+
<a href="#M000092" class="method-signature">
|
236
237
|
<span class="method-name">store_ntriples_from_string</span><span class="method-args">(string, store, base_uri, graph_name=nil)</span>
|
237
238
|
</a>
|
238
239
|
</div>
|
@@ -247,12 +248,13 @@ store
|
|
247
248
|
store:: the store to receive the data
|
248
249
|
base_uri:: base uri against which the data is parsed
|
249
250
|
graph_name:: uri of graph in store
|
251
|
+
TODO: can now be submitted as turtle
|
250
252
|
</pre>
|
251
253
|
<p><a class="source-toggle" href="#"
|
252
|
-
onclick="toggleCode('
|
253
|
-
<div class="method-source-code" id="
|
254
|
+
onclick="toggleCode('M000092-source');return false;">[Source]</a></p>
|
255
|
+
<div class="method-source-code" id="M000092-source">
|
254
256
|
<pre>
|
255
|
-
<span class="ruby-comment cmt"># File lib/pho/rdf.rb, line
|
257
|
+
<span class="ruby-comment cmt"># File lib/pho/rdf.rb, line 67</span>
|
256
258
|
<span class="ruby-keyword kw">def</span> <span class="ruby-constant">Parser</span>.<span class="ruby-identifier">store_ntriples_from_string</span>(<span class="ruby-identifier">string</span>, <span class="ruby-identifier">store</span>, <span class="ruby-identifier">base_uri</span>, <span class="ruby-identifier">graph_name</span>=<span class="ruby-keyword kw">nil</span>)
|
257
259
|
<span class="ruby-identifier">data</span> = <span class="ruby-constant">Parser</span>.<span class="ruby-identifier">parse_ntriples_from_string</span>(<span class="ruby-identifier">string</span>, <span class="ruby-identifier">base_uri</span>)
|
258
260
|
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">store</span>.<span class="ruby-identifier">store_data</span>(<span class="ruby-identifier">data</span>, <span class="ruby-identifier">graph_name</span>)
|
@@ -92,12 +92,12 @@ Class for converting to and from resource hashes
|
|
92
92
|
<h3 class="section-bar">Methods</h3>
|
93
93
|
|
94
94
|
<div class="name-list">
|
95
|
-
<a href="#
|
96
|
-
<a href="#
|
97
|
-
<a href="#
|
98
|
-
<a href="#
|
99
|
-
<a href="#
|
100
|
-
<a href="#
|
95
|
+
<a href="#M000085">parse</a>
|
96
|
+
<a href="#M000081">parse_json</a>
|
97
|
+
<a href="#M000083">parse_ntriples</a>
|
98
|
+
<a href="#M000082">parse_rdfxml</a>
|
99
|
+
<a href="#M000084">parse_turtle</a>
|
100
|
+
<a href="#M000086">serialize_json</a>
|
101
101
|
</div>
|
102
102
|
</div>
|
103
103
|
|
@@ -119,11 +119,11 @@ Class for converting to and from resource hashes
|
|
119
119
|
<div id="methods">
|
120
120
|
<h3 class="section-bar">Public Class methods</h3>
|
121
121
|
|
122
|
-
<div id="method-
|
123
|
-
<a name="
|
122
|
+
<div id="method-M000085" class="method-detail">
|
123
|
+
<a name="M000085"></a>
|
124
124
|
|
125
125
|
<div class="method-heading">
|
126
|
-
<a href="#
|
126
|
+
<a href="#M000085" class="method-signature">
|
127
127
|
<span class="method-name">parse</span><span class="method-args">(data, base_uri, format="rdfxml")</span>
|
128
128
|
</a>
|
129
129
|
</div>
|
@@ -139,8 +139,8 @@ href="../ResourceHash.html">ResourceHash</a>
|
|
139
139
|
base_uri:: base uri of the data
|
140
140
|
</pre>
|
141
141
|
<p><a class="source-toggle" href="#"
|
142
|
-
onclick="toggleCode('
|
143
|
-
<div class="method-source-code" id="
|
142
|
+
onclick="toggleCode('M000085-source');return false;">[Source]</a></p>
|
143
|
+
<div class="method-source-code" id="M000085-source">
|
144
144
|
<pre>
|
145
145
|
<span class="ruby-comment cmt"># File lib/pho/converter.rb, line 53</span>
|
146
146
|
<span class="ruby-keyword kw">def</span> <span class="ruby-constant">Converter</span>.<span class="ruby-identifier">parse</span>(<span class="ruby-identifier">data</span>, <span class="ruby-identifier">base_uri</span>, <span class="ruby-identifier">format</span>=<span class="ruby-value str">"rdfxml"</span>)
|
@@ -162,11 +162,11 @@ href="../ResourceHash.html">ResourceHash</a>
|
|
162
162
|
</div>
|
163
163
|
</div>
|
164
164
|
|
165
|
-
<div id="method-
|
166
|
-
<a name="
|
165
|
+
<div id="method-M000081" class="method-detail">
|
166
|
+
<a name="M000081"></a>
|
167
167
|
|
168
168
|
<div class="method-heading">
|
169
|
-
<a href="#
|
169
|
+
<a href="#M000081" class="method-signature">
|
170
170
|
<span class="method-name">parse_json</span><span class="method-args">(json)</span>
|
171
171
|
</a>
|
172
172
|
</div>
|
@@ -181,8 +181,8 @@ Simply invokes the JSON parser.
|
|
181
181
|
json:: valid RDF-in-JSON
|
182
182
|
</pre>
|
183
183
|
<p><a class="source-toggle" href="#"
|
184
|
-
onclick="toggleCode('
|
185
|
-
<div class="method-source-code" id="
|
184
|
+
onclick="toggleCode('M000081-source');return false;">[Source]</a></p>
|
185
|
+
<div class="method-source-code" id="M000081-source">
|
186
186
|
<pre>
|
187
187
|
<span class="ruby-comment cmt"># File lib/pho/converter.rb, line 23</span>
|
188
188
|
<span class="ruby-keyword kw">def</span> <span class="ruby-constant">Converter</span>.<span class="ruby-identifier">parse_json</span>(<span class="ruby-identifier">json</span>)
|
@@ -193,11 +193,11 @@ Simply invokes the JSON parser.
|
|
193
193
|
</div>
|
194
194
|
</div>
|
195
195
|
|
196
|
-
<div id="method-
|
197
|
-
<a name="
|
196
|
+
<div id="method-M000083" class="method-detail">
|
197
|
+
<a name="M000083"></a>
|
198
198
|
|
199
199
|
<div class="method-heading">
|
200
|
-
<a href="#
|
200
|
+
<a href="#M000083" class="method-signature">
|
201
201
|
<span class="method-name">parse_ntriples</span><span class="method-args">(ntriples, base_uri)</span>
|
202
202
|
</a>
|
203
203
|
</div>
|
@@ -210,8 +210,8 @@ Parse a string containing N-Triples into a resource hash
|
|
210
210
|
ntriples:: a String containing N-Triples
|
211
211
|
</pre>
|
212
212
|
<p><a class="source-toggle" href="#"
|
213
|
-
onclick="toggleCode('
|
214
|
-
<div class="method-source-code" id="
|
213
|
+
onclick="toggleCode('M000083-source');return false;">[Source]</a></p>
|
214
|
+
<div class="method-source-code" id="M000083-source">
|
215
215
|
<pre>
|
216
216
|
<span class="ruby-comment cmt"># File lib/pho/converter.rb, line 37</span>
|
217
217
|
<span class="ruby-keyword kw">def</span> <span class="ruby-constant">Converter</span>.<span class="ruby-identifier">parse_ntriples</span>(<span class="ruby-identifier">ntriples</span>, <span class="ruby-identifier">base_uri</span>)
|
@@ -222,11 +222,11 @@ Parse a string containing N-Triples into a resource hash
|
|
222
222
|
</div>
|
223
223
|
</div>
|
224
224
|
|
225
|
-
<div id="method-
|
226
|
-
<a name="
|
225
|
+
<div id="method-M000082" class="method-detail">
|
226
|
+
<a name="M000082"></a>
|
227
227
|
|
228
228
|
<div class="method-heading">
|
229
|
-
<a href="#
|
229
|
+
<a href="#M000082" class="method-signature">
|
230
230
|
<span class="method-name">parse_rdfxml</span><span class="method-args">(rdfxml, base_uri)</span>
|
231
231
|
</a>
|
232
232
|
</div>
|
@@ -240,8 +240,8 @@ hash
|
|
240
240
|
rdfxml: a String containing RDF/XML
|
241
241
|
</pre>
|
242
242
|
<p><a class="source-toggle" href="#"
|
243
|
-
onclick="toggleCode('
|
244
|
-
<div class="method-source-code" id="
|
243
|
+
onclick="toggleCode('M000082-source');return false;">[Source]</a></p>
|
244
|
+
<div class="method-source-code" id="M000082-source">
|
245
245
|
<pre>
|
246
246
|
<span class="ruby-comment cmt"># File lib/pho/converter.rb, line 30</span>
|
247
247
|
<span class="ruby-keyword kw">def</span> <span class="ruby-constant">Converter</span>.<span class="ruby-identifier">parse_rdfxml</span>(<span class="ruby-identifier">rdfxml</span>, <span class="ruby-identifier">base_uri</span>)
|
@@ -252,11 +252,11 @@ hash
|
|
252
252
|
</div>
|
253
253
|
</div>
|
254
254
|
|
255
|
-
<div id="method-
|
256
|
-
<a name="
|
255
|
+
<div id="method-M000084" class="method-detail">
|
256
|
+
<a name="M000084"></a>
|
257
257
|
|
258
258
|
<div class="method-heading">
|
259
|
-
<a href="#
|
259
|
+
<a href="#M000084" class="method-signature">
|
260
260
|
<span class="method-name">parse_turtle</span><span class="method-args">(turtle, base_uri)</span>
|
261
261
|
</a>
|
262
262
|
</div>
|
@@ -269,8 +269,8 @@ Parse a string containing Turtle into a resource hash
|
|
269
269
|
ntriples:: a String containing Turtle
|
270
270
|
</pre>
|
271
271
|
<p><a class="source-toggle" href="#"
|
272
|
-
onclick="toggleCode('
|
273
|
-
<div class="method-source-code" id="
|
272
|
+
onclick="toggleCode('M000084-source');return false;">[Source]</a></p>
|
273
|
+
<div class="method-source-code" id="M000084-source">
|
274
274
|
<pre>
|
275
275
|
<span class="ruby-comment cmt"># File lib/pho/converter.rb, line 44</span>
|
276
276
|
<span class="ruby-keyword kw">def</span> <span class="ruby-constant">Converter</span>.<span class="ruby-identifier">parse_turtle</span>(<span class="ruby-identifier">turtle</span>, <span class="ruby-identifier">base_uri</span>)
|
@@ -281,11 +281,11 @@ Parse a string containing Turtle into a resource hash
|
|
281
281
|
</div>
|
282
282
|
</div>
|
283
283
|
|
284
|
-
<div id="method-
|
285
|
-
<a name="
|
284
|
+
<div id="method-M000086" class="method-detail">
|
285
|
+
<a name="M000086"></a>
|
286
286
|
|
287
287
|
<div class="method-heading">
|
288
|
-
<a href="#
|
288
|
+
<a href="#M000086" class="method-signature">
|
289
289
|
<span class="method-name">serialize_json</span><span class="method-args">(hash)</span>
|
290
290
|
</a>
|
291
291
|
</div>
|
@@ -298,8 +298,8 @@ Serialize a resource hash as <a href="../RDF.html">RDF</a>-in-JSON
|
|
298
298
|
hash:: the resource hash to serialize
|
299
299
|
</pre>
|
300
300
|
<p><a class="source-toggle" href="#"
|
301
|
-
onclick="toggleCode('
|
302
|
-
<div class="method-source-code" id="
|
301
|
+
onclick="toggleCode('M000086-source');return false;">[Source]</a></p>
|
302
|
+
<div class="method-source-code" id="M000086-source">
|
303
303
|
<pre>
|
304
304
|
<span class="ruby-comment cmt"># File lib/pho/converter.rb, line 71</span>
|
305
305
|
<span class="ruby-keyword kw">def</span> <span class="ruby-constant">Converter</span>.<span class="ruby-identifier">serialize_json</span>(<span class="ruby-identifier">hash</span>)
|