pho 0.6.2 → 0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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
@@ -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="#
|
96
|
-
<a href="#
|
95
|
+
<a href="#M000087">minus</a>
|
96
|
+
<a href="#M000088">object_in_array?</a>
|
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-
|
119
|
-
<a name="
|
118
|
+
<div id="method-M000087" class="method-detail">
|
119
|
+
<a name="M000087"></a>
|
120
120
|
|
121
121
|
<div class="method-heading">
|
122
|
-
<a href="#
|
122
|
+
<a href="#M000087" 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('
|
143
|
-
<div class="method-source-code" id="
|
142
|
+
onclick="toggleCode('M000087-source');return false;">[Source]</a></p>
|
143
|
+
<div class="method-source-code" id="M000087-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-
|
187
|
-
<a name="
|
186
|
+
<div id="method-M000088" class="method-detail">
|
187
|
+
<a name="M000088"></a>
|
188
188
|
|
189
189
|
<div class="method-heading">
|
190
|
-
<a href="#
|
190
|
+
<a href="#M000088" 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('
|
202
|
-
<div class="method-source-code" id="
|
201
|
+
onclick="toggleCode('M000088-source');return false;">[Source]</a></p>
|
202
|
+
<div class="method-source-code" id="M000088-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 "snapshot" is an <a
|
84
|
-
href="Snapshot.html#
|
84
|
+
href="Snapshot.html#M000192">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="#
|
106
|
-
<a href="#
|
107
|
-
<a href="#
|
108
|
-
<a href="#
|
109
|
-
<a href="#
|
105
|
+
<a href="#M000192">backup</a>
|
106
|
+
<a href="#M000190">new</a>
|
107
|
+
<a href="#M000189">parse</a>
|
108
|
+
<a href="#M000188">read_from_store</a>
|
109
|
+
<a href="#M000191">read_md5</a>
|
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-
|
180
|
-
<a name="
|
179
|
+
<div id="method-M000190" class="method-detail">
|
180
|
+
<a name="M000190"></a>
|
181
181
|
|
182
182
|
<div class="method-heading">
|
183
|
-
<a href="#
|
183
|
+
<a href="#M000190" 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('
|
191
|
-
<div class="method-source-code" id="
|
190
|
+
onclick="toggleCode('M000190-source');return false;">[Source]</a></p>
|
191
|
+
<div class="method-source-code" id="M000190-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-
|
207
|
-
<a name="
|
206
|
+
<div id="method-M000189" class="method-detail">
|
207
|
+
<a name="M000189"></a>
|
208
208
|
|
209
209
|
<div class="method-heading">
|
210
|
-
<a href="#
|
210
|
+
<a href="#M000189" 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#
|
217
|
+
Class method to <a href="Snapshot.html#M000189">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#
|
220
|
-
href="Snapshot.html#
|
219
|
+
href="Store.html#M000182">Store.get_snapshots</a> method and create a <a
|
220
|
+
href="Snapshot.html#M000190">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('
|
232
|
-
<div class="method-source-code" id="
|
231
|
+
onclick="toggleCode('M000189-source');return false;">[Source]</a></p>
|
232
|
+
<div class="method-source-code" id="M000189-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-
|
264
|
-
<a name="
|
263
|
+
<div id="method-M000188" class="method-detail">
|
264
|
+
<a name="M000188"></a>
|
265
265
|
|
266
266
|
<div class="method-heading">
|
267
|
-
<a href="#
|
267
|
+
<a href="#M000188" 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('
|
283
|
-
<div class="method-source-code" id="
|
282
|
+
onclick="toggleCode('M000188-source');return false;">[Source]</a></p>
|
283
|
+
<div class="method-source-code" id="M000188-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-
|
304
|
-
<a name="
|
303
|
+
<div id="method-M000192" class="method-detail">
|
304
|
+
<a name="M000192"></a>
|
305
305
|
|
306
306
|
<div class="method-heading">
|
307
|
-
<a href="#
|
307
|
+
<a href="#M000192" 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‘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#
|
320
|
+
<tr><td valign="top">store:</td><td>the store to <a href="Snapshot.html#M000192">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('
|
329
|
-
<div class="method-source-code" id="
|
328
|
+
onclick="toggleCode('M000192-source');return false;">[Source]</a></p>
|
329
|
+
<div class="method-source-code" id="M000192-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-
|
360
|
-
<a name="
|
359
|
+
<div id="method-M000191" class="method-detail">
|
360
|
+
<a name="M000191"></a>
|
361
361
|
|
362
362
|
<div class="method-heading">
|
363
|
-
<a href="#
|
363
|
+
<a href="#M000191" 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('
|
374
|
-
<div class="method-source-code" id="
|
373
|
+
onclick="toggleCode('M000191-source');return false;">[Source]</a></p>
|
374
|
+
<div class="method-source-code" id="M000191-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>())
|
@@ -92,10 +92,10 @@ Captures status information relating to a store
|
|
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="#
|
95
|
+
<a href="#M000108">new</a>
|
96
|
+
<a href="#M000109">read_from_store</a>
|
97
|
+
<a href="#M000110">readable?</a>
|
98
|
+
<a href="#M000111">writeable?</a>
|
99
99
|
</div>
|
100
100
|
</div>
|
101
101
|
|
@@ -153,19 +153,19 @@ Interval before status should be requested again.
|
|
153
153
|
<div id="methods">
|
154
154
|
<h3 class="section-bar">Public Class methods</h3>
|
155
155
|
|
156
|
-
<div id="method-
|
157
|
-
<a name="
|
156
|
+
<div id="method-M000108" class="method-detail">
|
157
|
+
<a name="M000108"></a>
|
158
158
|
|
159
159
|
<div class="method-heading">
|
160
|
-
<a href="#
|
160
|
+
<a href="#M000108" class="method-signature">
|
161
161
|
<span class="method-name">new</span><span class="method-args">(retry_interval, status_message, access_mode)</span>
|
162
162
|
</a>
|
163
163
|
</div>
|
164
164
|
|
165
165
|
<div class="method-description">
|
166
166
|
<p><a class="source-toggle" href="#"
|
167
|
-
onclick="toggleCode('
|
168
|
-
<div class="method-source-code" id="
|
167
|
+
onclick="toggleCode('M000108-source');return false;">[Source]</a></p>
|
168
|
+
<div class="method-source-code" id="M000108-source">
|
169
169
|
<pre>
|
170
170
|
<span class="ruby-comment cmt"># File lib/pho/status.rb, line 25</span>
|
171
171
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">retry_interval</span>, <span class="ruby-identifier">status_message</span>, <span class="ruby-identifier">access_mode</span>)
|
@@ -178,11 +178,11 @@ Interval before status should be requested again.
|
|
178
178
|
</div>
|
179
179
|
</div>
|
180
180
|
|
181
|
-
<div id="method-
|
182
|
-
<a name="
|
181
|
+
<div id="method-M000109" class="method-detail">
|
182
|
+
<a name="M000109"></a>
|
183
183
|
|
184
184
|
<div class="method-heading">
|
185
|
-
<a href="#
|
185
|
+
<a href="#M000109" class="method-signature">
|
186
186
|
<span class="method-name">read_from_store</span><span class="method-args">(store)</span>
|
187
187
|
</a>
|
188
188
|
</div>
|
@@ -202,8 +202,8 @@ href="Status.html">Status</a> object.
|
|
202
202
|
</td></tr>
|
203
203
|
</table>
|
204
204
|
<p><a class="source-toggle" href="#"
|
205
|
-
onclick="toggleCode('
|
206
|
-
<div class="method-source-code" id="
|
205
|
+
onclick="toggleCode('M000109-source');return false;">[Source]</a></p>
|
206
|
+
<div class="method-source-code" id="M000109-source">
|
207
207
|
<pre>
|
208
208
|
<span class="ruby-comment cmt"># File lib/pho/status.rb, line 36</span>
|
209
209
|
<span class="ruby-keyword kw">def</span> <span class="ruby-constant">Status</span>.<span class="ruby-identifier">read_from_store</span>(<span class="ruby-identifier">store</span>)
|
@@ -229,22 +229,22 @@ href="Status.html">Status</a> object.
|
|
229
229
|
|
230
230
|
<h3 class="section-bar">Public Instance methods</h3>
|
231
231
|
|
232
|
-
<div id="method-
|
233
|
-
<a name="
|
232
|
+
<div id="method-M000110" class="method-detail">
|
233
|
+
<a name="M000110"></a>
|
234
234
|
|
235
235
|
<div class="method-heading">
|
236
|
-
<a href="#
|
236
|
+
<a href="#M000110" class="method-signature">
|
237
237
|
<span class="method-name">readable?</span><span class="method-args">()</span>
|
238
238
|
</a>
|
239
239
|
</div>
|
240
240
|
|
241
241
|
<div class="method-description">
|
242
242
|
<p>
|
243
|
-
Is the store <a href="Status.html#
|
243
|
+
Is the store <a href="Status.html#M000110">readable?</a>
|
244
244
|
</p>
|
245
245
|
<p><a class="source-toggle" href="#"
|
246
|
-
onclick="toggleCode('
|
247
|
-
<div class="method-source-code" id="
|
246
|
+
onclick="toggleCode('M000110-source');return false;">[Source]</a></p>
|
247
|
+
<div class="method-source-code" id="M000110-source">
|
248
248
|
<pre>
|
249
249
|
<span class="ruby-comment cmt"># File lib/pho/status.rb, line 54</span>
|
250
250
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">readable?</span>
|
@@ -255,22 +255,22 @@ Is the store <a href="Status.html#M000106">readable?</a>
|
|
255
255
|
</div>
|
256
256
|
</div>
|
257
257
|
|
258
|
-
<div id="method-
|
259
|
-
<a name="
|
258
|
+
<div id="method-M000111" class="method-detail">
|
259
|
+
<a name="M000111"></a>
|
260
260
|
|
261
261
|
<div class="method-heading">
|
262
|
-
<a href="#
|
262
|
+
<a href="#M000111" class="method-signature">
|
263
263
|
<span class="method-name">writeable?</span><span class="method-args">()</span>
|
264
264
|
</a>
|
265
265
|
</div>
|
266
266
|
|
267
267
|
<div class="method-description">
|
268
268
|
<p>
|
269
|
-
Is the store <a href="Status.html#
|
269
|
+
Is the store <a href="Status.html#M000111">writeable?</a>
|
270
270
|
</p>
|
271
271
|
<p><a class="source-toggle" href="#"
|
272
|
-
onclick="toggleCode('
|
273
|
-
<div class="method-source-code" id="
|
272
|
+
onclick="toggleCode('M000111-source');return false;">[Source]</a></p>
|
273
|
+
<div class="method-source-code" id="M000111-source">
|
274
274
|
<pre>
|
275
275
|
<span class="ruby-comment cmt"># File lib/pho/status.rb, line 59</span>
|
276
276
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">writeable?</span>
|
@@ -109,39 +109,40 @@ See the examples directory in the distribution
|
|
109
109
|
<h3 class="section-bar">Methods</h3>
|
110
110
|
|
111
111
|
<div class="name-list">
|
112
|
-
<a href="#
|
113
|
-
<a href="#
|
114
|
-
<a href="#
|
115
|
-
<a href="#
|
116
|
-
<a href="#
|
117
|
-
<a href="#
|
118
|
-
<a href="#
|
119
|
-
<a href="#
|
120
|
-
<a href="#
|
121
|
-
<a href="#
|
122
|
-
<a href="#
|
123
|
-
<a href="#
|
124
|
-
<a href="#
|
125
|
-
<a href="#
|
126
|
-
<a href="#
|
127
|
-
<a href="#
|
128
|
-
<a href="#
|
129
|
-
<a href="#
|
130
|
-
<a href="#
|
131
|
-
<a href="#
|
132
|
-
<a href="#
|
133
|
-
<a href="#
|
134
|
-
<a href="#
|
135
|
-
<a href="#
|
136
|
-
<a href="#
|
137
|
-
<a href="#
|
138
|
-
<a href="#
|
139
|
-
<a href="#
|
140
|
-
<a href="#
|
141
|
-
<a href="#
|
142
|
-
<a href="#
|
143
|
-
<a href="#
|
144
|
-
<a href="#
|
112
|
+
<a href="#M000172">augment</a>
|
113
|
+
<a href="#M000171">augment_uri</a>
|
114
|
+
<a href="#M000156">build_uri</a>
|
115
|
+
<a href="#M000173">configure_headers_for_conditional_get</a>
|
116
|
+
<a href="#M000176">delete_item</a>
|
117
|
+
<a href="#M000160">describe</a>
|
118
|
+
<a href="#M000169">facet</a>
|
119
|
+
<a href="#M000184">get_field_predicate_map</a>
|
120
|
+
<a href="#M000177">get_item</a>
|
121
|
+
<a href="#M000178">get_job</a>
|
122
|
+
<a href="#M000179">get_jobs</a>
|
123
|
+
<a href="#M000186">get_query_profile</a>
|
124
|
+
<a href="#M000170">get_search_params</a>
|
125
|
+
<a href="#M000182">get_snapshots</a>
|
126
|
+
<a href="#M000181">get_status</a>
|
127
|
+
<a href="#M000183">list_records</a>
|
128
|
+
<a href="#M000154">new</a>
|
129
|
+
<a href="#M000185">put_field_predicate_map</a>
|
130
|
+
<a href="#M000187">put_query_profile</a>
|
131
|
+
<a href="#M000174">record_etags</a>
|
132
|
+
<a href="#M000168">search</a>
|
133
|
+
<a href="#M000155">set_credentials</a>
|
134
|
+
<a href="#M000167">sparql</a>
|
135
|
+
<a href="#M000165">sparql_ask</a>
|
136
|
+
<a href="#M000162">sparql_client</a>
|
137
|
+
<a href="#M000164">sparql_construct</a>
|
138
|
+
<a href="#M000163">sparql_describe</a>
|
139
|
+
<a href="#M000166">sparql_select</a>
|
140
|
+
<a href="#M000157">store_data</a>
|
141
|
+
<a href="#M000158">store_file</a>
|
142
|
+
<a href="#M000159">store_url</a>
|
143
|
+
<a href="#M000161">submit_changeset</a>
|
144
|
+
<a href="#M000180">submit_job</a>
|
145
|
+
<a href="#M000175">upload_item</a>
|
145
146
|
</div>
|
146
147
|
</div>
|
147
148
|
|
@@ -195,11 +196,11 @@ Retrieve the admin username configured in this instance
|
|
195
196
|
<div id="methods">
|
196
197
|
<h3 class="section-bar">Public Class methods</h3>
|
197
198
|
|
198
|
-
<div id="method-
|
199
|
-
<a name="
|
199
|
+
<div id="method-M000154" class="method-detail">
|
200
|
+
<a name="M000154"></a>
|
200
201
|
|
201
202
|
<div class="method-heading">
|
202
|
-
<a href="#
|
203
|
+
<a href="#M000154" class="method-signature">
|
203
204
|
<span class="method-name">new</span><span class="method-args">(storeuri, username=nil, password=nil, client = HTTPClient.new() )</span>
|
204
205
|
</a>
|
205
206
|
</div>
|
@@ -223,8 +224,8 @@ Create an instance of the store class
|
|
223
224
|
</td></tr>
|
224
225
|
</table>
|
225
226
|
<p><a class="source-toggle" href="#"
|
226
|
-
onclick="toggleCode('
|
227
|
-
<div class="method-source-code" id="
|
227
|
+
onclick="toggleCode('M000154-source');return false;">[Source]</a></p>
|
228
|
+
<div class="method-source-code" id="M000154-source">
|
228
229
|
<pre>
|
229
230
|
<span class="ruby-comment cmt"># File lib/pho/store.rb, line 43</span>
|
230
231
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">storeuri</span>, <span class="ruby-identifier">username</span>=<span class="ruby-keyword kw">nil</span>, <span class="ruby-identifier">password</span>=<span class="ruby-keyword kw">nil</span>, <span class="ruby-identifier">client</span> = <span class="ruby-constant">HTTPClient</span>.<span class="ruby-identifier">new</span>() )
|
@@ -241,11 +242,11 @@ Create an instance of the store class
|
|
241
242
|
|
242
243
|
<h3 class="section-bar">Public Instance methods</h3>
|
243
244
|
|
244
|
-
<div id="method-
|
245
|
-
<a name="
|
245
|
+
<div id="method-M000172" class="method-detail">
|
246
|
+
<a name="M000172"></a>
|
246
247
|
|
247
248
|
<div class="method-heading">
|
248
|
-
<a href="#
|
249
|
+
<a href="#M000172" class="method-signature">
|
249
250
|
<span class="method-name">augment</span><span class="method-args">(data)</span>
|
250
251
|
</a>
|
251
252
|
</div>
|
@@ -261,10 +262,10 @@ Platform
|
|
261
262
|
</td></tr>
|
262
263
|
</table>
|
263
264
|
<p><a class="source-toggle" href="#"
|
264
|
-
onclick="toggleCode('
|
265
|
-
<div class="method-source-code" id="
|
265
|
+
onclick="toggleCode('M000172-source');return false;">[Source]</a></p>
|
266
|
+
<div class="method-source-code" id="M000172-source">
|
266
267
|
<pre>
|
267
|
-
<span class="ruby-comment cmt"># File lib/pho/store.rb, line
|
268
|
+
<span class="ruby-comment cmt"># File lib/pho/store.rb, line 307</span>
|
268
269
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">augment</span>(<span class="ruby-identifier">data</span>)
|
269
270
|
<span class="ruby-identifier">u</span> = <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">build_uri</span>(<span class="ruby-value str">"/services/augment"</span>)
|
270
271
|
<span class="ruby-identifier">response</span> = <span class="ruby-ivar">@client</span>.<span class="ruby-identifier">post</span>(<span class="ruby-identifier">u</span>, <span class="ruby-identifier">data</span>, {<span class="ruby-value str">"Content-Type"</span> =<span class="ruby-operator">></span> <span class="ruby-value str">"application/rss+xml"</span>})
|
@@ -275,11 +276,11 @@ Platform
|
|
275
276
|
</div>
|
276
277
|
</div>
|
277
278
|
|
278
|
-
<div id="method-
|
279
|
-
<a name="
|
279
|
+
<div id="method-M000171" class="method-detail">
|
280
|
+
<a name="M000171"></a>
|
280
281
|
|
281
282
|
<div class="method-heading">
|
282
|
-
<a href="#
|
283
|
+
<a href="#M000171" class="method-signature">
|
283
284
|
<span class="method-name">augment_uri</span><span class="method-args">(uri)</span>
|
284
285
|
</a>
|
285
286
|
</div>
|
@@ -295,10 +296,10 @@ data in this store
|
|
295
296
|
</td></tr>
|
296
297
|
</table>
|
297
298
|
<p><a class="source-toggle" href="#"
|
298
|
-
onclick="toggleCode('
|
299
|
-
<div class="method-source-code" id="
|
299
|
+
onclick="toggleCode('M000171-source');return false;">[Source]</a></p>
|
300
|
+
<div class="method-source-code" id="M000171-source">
|
300
301
|
<pre>
|
301
|
-
<span class="ruby-comment cmt"># File lib/pho/store.rb, line
|
302
|
+
<span class="ruby-comment cmt"># File lib/pho/store.rb, line 298</span>
|
302
303
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">augment_uri</span>(<span class="ruby-identifier">uri</span>)
|
303
304
|
<span class="ruby-identifier">u</span> = <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">build_uri</span>(<span class="ruby-value str">"/services/augment"</span>)
|
304
305
|
<span class="ruby-identifier">response</span> = <span class="ruby-ivar">@client</span>.<span class="ruby-identifier">get</span>(<span class="ruby-identifier">u</span>, {<span class="ruby-value str">"data-uri"</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">uri</span>})
|
@@ -309,11 +310,11 @@ data in this store
|
|
309
310
|
</div>
|
310
311
|
</div>
|
311
312
|
|
312
|
-
<div id="method-
|
313
|
-
<a name="
|
313
|
+
<div id="method-M000156" class="method-detail">
|
314
|
+
<a name="M000156"></a>
|
314
315
|
|
315
316
|
<div class="method-heading">
|
316
|
-
<a href="#
|
317
|
+
<a href="#M000156" class="method-signature">
|
317
318
|
<span class="method-name">build_uri</span><span class="method-args">(uri)</span>
|
318
319
|
</a>
|
319
320
|
</div>
|
@@ -328,8 +329,8 @@ Build a request uri, by concatenating it with the base uri of the store
|
|
328
329
|
</td></tr>
|
329
330
|
</table>
|
330
331
|
<p><a class="source-toggle" href="#"
|
331
|
-
onclick="toggleCode('
|
332
|
-
<div class="method-source-code" id="
|
332
|
+
onclick="toggleCode('M000156-source');return false;">[Source]</a></p>
|
333
|
+
<div class="method-source-code" id="M000156-source">
|
333
334
|
<pre>
|
334
335
|
<span class="ruby-comment cmt"># File lib/pho/store.rb, line 61</span>
|
335
336
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">build_uri</span>(<span class="ruby-identifier">uri</span>)
|
@@ -347,11 +348,11 @@ Build a request uri, by concatenating it with the base uri of the store
|
|
347
348
|
</div>
|
348
349
|
</div>
|
349
350
|
|
350
|
-
<div id="method-
|
351
|
-
<a name="
|
351
|
+
<div id="method-M000173" class="method-detail">
|
352
|
+
<a name="M000173"></a>
|
352
353
|
|
353
354
|
<div class="method-heading">
|
354
|
-
<a href="#
|
355
|
+
<a href="#M000173" class="method-signature">
|
355
356
|
<span class="method-name">configure_headers_for_conditional_get</span><span class="method-args">(u, headers, etags, if_match)</span>
|
356
357
|
</a>
|
357
358
|
</div>
|
@@ -361,10 +362,10 @@ Build a request uri, by concatenating it with the base uri of the store
|
|
361
362
|
Added appropriate http header for conditional get requests
|
362
363
|
</p>
|
363
364
|
<p><a class="source-toggle" href="#"
|
364
|
-
onclick="toggleCode('
|
365
|
-
<div class="method-source-code" id="
|
365
|
+
onclick="toggleCode('M000173-source');return false;">[Source]</a></p>
|
366
|
+
<div class="method-source-code" id="M000173-source">
|
366
367
|
<pre>
|
367
|
-
<span class="ruby-comment cmt"># File lib/pho/store.rb, line
|
368
|
+
<span class="ruby-comment cmt"># File lib/pho/store.rb, line 314</span>
|
368
369
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">configure_headers_for_conditional_get</span>(<span class="ruby-identifier">u</span>, <span class="ruby-identifier">headers</span>, <span class="ruby-identifier">etags</span>, <span class="ruby-identifier">if_match</span>)
|
369
370
|
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">etags</span> <span class="ruby-operator">!=</span> <span class="ruby-keyword kw">nil</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">etags</span>.<span class="ruby-identifier">has_tag?</span>(<span class="ruby-identifier">u</span>)
|
370
371
|
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">if_match</span>
|
@@ -380,11 +381,11 @@ Added appropriate http header for conditional get requests
|
|
380
381
|
</div>
|
381
382
|
</div>
|
382
383
|
|
383
|
-
<div id="method-
|
384
|
-
<a name="
|
384
|
+
<div id="method-M000176" class="method-detail">
|
385
|
+
<a name="M000176"></a>
|
385
386
|
|
386
387
|
<div class="method-heading">
|
387
|
-
<a href="#
|
388
|
+
<a href="#M000176" class="method-signature">
|
388
389
|
<span class="method-name">delete_item</span><span class="method-args">(uri)</span>
|
389
390
|
</a>
|
390
391
|
</div>
|
@@ -402,10 +403,10 @@ Delete an item from the Contentbox in this <a href="Store.html">Store</a>
|
|
402
403
|
TODO: conditional deletes
|
403
404
|
</p>
|
404
405
|
<p><a class="source-toggle" href="#"
|
405
|
-
onclick="toggleCode('
|
406
|
-
<div class="method-source-code" id="
|
406
|
+
onclick="toggleCode('M000176-source');return false;">[Source]</a></p>
|
407
|
+
<div class="method-source-code" id="M000176-source">
|
407
408
|
<pre>
|
408
|
-
<span class="ruby-comment cmt"># File lib/pho/store.rb, line
|
409
|
+
<span class="ruby-comment cmt"># File lib/pho/store.rb, line 369</span>
|
409
410
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">delete_item</span>(<span class="ruby-identifier">uri</span>)
|
410
411
|
<span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">uri</span>.<span class="ruby-identifier">start_with?</span>(<span class="ruby-ivar">@storeuri</span>)
|
411
412
|
<span class="ruby-identifier">uri</span> = <span class="ruby-identifier">build_uri</span>(<span class="ruby-identifier">uri</span>)
|
@@ -417,11 +418,11 @@ TODO: conditional deletes
|
|
417
418
|
</div>
|
418
419
|
</div>
|
419
420
|
|
420
|
-
<div id="method-
|
421
|
-
<a name="
|
421
|
+
<div id="method-M000160" class="method-detail">
|
422
|
+
<a name="M000160"></a>
|
422
423
|
|
423
424
|
<div class="method-heading">
|
424
|
-
<a href="#
|
425
|
+
<a href="#M000160" class="method-signature">
|
425
426
|
<span class="method-name">describe</span><span class="method-args">(uri, format="application/rdf+xml", etags=nil, if_match=false)</span>
|
426
427
|
</a>
|
427
428
|
</div>
|
@@ -434,7 +435,7 @@ document, but other formats can be requested, as supported by the Talis
|
|
434
435
|
Platform. E.g. application/json
|
435
436
|
</p>
|
436
437
|
<table>
|
437
|
-
<tr><td valign="top">uri:</td><td>the URI of the resource to <a href="Store.html#
|
438
|
+
<tr><td valign="top">uri:</td><td>the URI of the resource to <a href="Store.html#M000160">describe</a>
|
438
439
|
|
439
440
|
</td></tr>
|
440
441
|
<tr><td valign="top">format:</td><td>the preferred response format
|
@@ -451,20 +452,20 @@ false to perform a Conditional GET
|
|
451
452
|
</table>
|
452
453
|
<p>
|
453
454
|
Note that this method is different from <a
|
454
|
-
href="Store.html#
|
455
|
+
href="Store.html#M000163">sparql_describe</a> in that it is intended to be
|
455
456
|
used to generate a description of a single URI, using an separated service
|
456
457
|
exposed by the Platform. This service is optimised for retrieval of
|
457
458
|
descriptions for single resources and supports HTTP caching and conditional
|
458
|
-
retrieval. The <a href="Store.html#
|
459
|
+
retrieval. The <a href="Store.html#M000163">sparql_describe</a> method
|
459
460
|
should be used to submit more complex DESCRIBE queries to the Platform,
|
460
461
|
e.g. to generate descriptions of resources matching a particular graph
|
461
462
|
pattern.
|
462
463
|
</p>
|
463
464
|
<p><a class="source-toggle" href="#"
|
464
|
-
onclick="toggleCode('
|
465
|
-
<div class="method-source-code" id="
|
465
|
+
onclick="toggleCode('M000160-source');return false;">[Source]</a></p>
|
466
|
+
<div class="method-source-code" id="M000160-source">
|
466
467
|
<pre>
|
467
|
-
<span class="ruby-comment cmt"># File lib/pho/store.rb, line
|
468
|
+
<span class="ruby-comment cmt"># File lib/pho/store.rb, line 148</span>
|
468
469
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">describe</span>(<span class="ruby-identifier">uri</span>, <span class="ruby-identifier">format</span>=<span class="ruby-value str">"application/rdf+xml"</span>, <span class="ruby-identifier">etags</span>=<span class="ruby-keyword kw">nil</span>, <span class="ruby-identifier">if_match</span>=<span class="ruby-keyword kw">false</span>)
|
469
470
|
<span class="ruby-identifier">u</span> = <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">build_uri</span>(<span class="ruby-value str">"/meta"</span>)
|
470
471
|
<span class="ruby-identifier">headers</span> = {<span class="ruby-value str">"Accept"</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">format</span>}
|
@@ -478,18 +479,18 @@ pattern.
|
|
478
479
|
</div>
|
479
480
|
</div>
|
480
481
|
|
481
|
-
<div id="method-
|
482
|
-
<a name="
|
482
|
+
<div id="method-M000169" class="method-detail">
|
483
|
+
<a name="M000169"></a>
|
483
484
|
|
484
485
|
<div class="method-heading">
|
485
|
-
<a href="#
|
486
|
+
<a href="#M000169" class="method-signature">
|
486
487
|
<span class="method-name">facet</span><span class="method-args">(query, facets, params=nil)</span>
|
487
488
|
</a>
|
488
489
|
</div>
|
489
490
|
|
490
491
|
<div class="method-description">
|
491
492
|
<p>
|
492
|
-
Perform a facetted <a href="Store.html#
|
493
|
+
Perform a facetted <a href="Store.html#M000168">search</a> against the
|
493
494
|
Metabox indexes.
|
494
495
|
</p>
|
495
496
|
<table>
|
@@ -508,7 +509,7 @@ The <em>params</em> hash can contain the following values:
|
|
508
509
|
</p>
|
509
510
|
<ul>
|
510
511
|
<li><b>top</b>: the maximum number of results to return for each <a
|
511
|
-
href="Store.html#
|
512
|
+
href="Store.html#M000169">facet</a>
|
512
513
|
|
513
514
|
</li>
|
514
515
|
<li><b>output</b>: the preferred response format, can be html or xml (the
|
@@ -517,10 +518,10 @@ default)
|
|
517
518
|
</li>
|
518
519
|
</ul>
|
519
520
|
<p><a class="source-toggle" href="#"
|
520
|
-
onclick="toggleCode('
|
521
|
-
<div class="method-source-code" id="
|
521
|
+
onclick="toggleCode('M000169-source');return false;">[Source]</a></p>
|
522
|
+
<div class="method-source-code" id="M000169-source">
|
522
523
|
<pre>
|
523
|
-
<span class="ruby-comment cmt"># File lib/pho/store.rb, line
|
524
|
+
<span class="ruby-comment cmt"># File lib/pho/store.rb, line 273</span>
|
524
525
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">facet</span>(<span class="ruby-identifier">query</span>, <span class="ruby-identifier">facets</span>, <span class="ruby-identifier">params</span>=<span class="ruby-keyword kw">nil</span>)
|
525
526
|
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">facets</span> <span class="ruby-operator">==</span> <span class="ruby-keyword kw">nil</span> <span class="ruby-keyword kw">or</span> <span class="ruby-identifier">facets</span>.<span class="ruby-identifier">empty?</span>
|
526
527
|
<span class="ruby-comment cmt">#todo</span>
|
@@ -537,11 +538,11 @@ default)
|
|
537
538
|
</div>
|
538
539
|
</div>
|
539
540
|
|
540
|
-
<div id="method-
|
541
|
-
<a name="
|
541
|
+
<div id="method-M000184" class="method-detail">
|
542
|
+
<a name="M000184"></a>
|
542
543
|
|
543
544
|
<div class="method-heading">
|
544
|
-
<a href="#
|
545
|
+
<a href="#M000184" class="method-signature">
|
545
546
|
<span class="method-name">get_field_predicate_map</span><span class="method-args">(output=ACCEPT_JSON)</span>
|
546
547
|
</a>
|
547
548
|
</div>
|
@@ -551,7 +552,7 @@ default)
|
|
551
552
|
Read the field predicate map configuration for this store. The config can
|
552
553
|
be requested in any format supported by the platform, but the default will
|
553
554
|
return JSON. See <a
|
554
|
-
href="FieldPredicateMap.html#
|
555
|
+
href="FieldPredicateMap.html#M000093">FieldPredicateMap.read_from_store</a>
|
555
556
|
for a convenient way to quickly create a <a
|
556
557
|
href="FieldPredicateMap.html">FieldPredicateMap</a> object based on a
|
557
558
|
specific stores‘s configuration.
|
@@ -562,10 +563,10 @@ specific stores‘s configuration.
|
|
562
563
|
</td></tr>
|
563
564
|
</table>
|
564
565
|
<p><a class="source-toggle" href="#"
|
565
|
-
onclick="toggleCode('
|
566
|
-
<div class="method-source-code" id="
|
566
|
+
onclick="toggleCode('M000184-source');return false;">[Source]</a></p>
|
567
|
+
<div class="method-source-code" id="M000184-source">
|
567
568
|
<pre>
|
568
|
-
<span class="ruby-comment cmt"># File lib/pho/store.rb, line
|
569
|
+
<span class="ruby-comment cmt"># File lib/pho/store.rb, line 461</span>
|
569
570
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">get_field_predicate_map</span>(<span class="ruby-identifier">output</span>=<span class="ruby-constant">ACCEPT_JSON</span>)
|
570
571
|
<span class="ruby-identifier">u</span> = <span class="ruby-identifier">build_uri</span>(<span class="ruby-value str">"/config/fpmaps/1"</span>)
|
571
572
|
<span class="ruby-identifier">response</span> = <span class="ruby-ivar">@client</span>.<span class="ruby-identifier">get</span>(<span class="ruby-identifier">u</span>, <span class="ruby-keyword kw">nil</span>, <span class="ruby-identifier">output</span>)
|
@@ -576,11 +577,11 @@ specific stores‘s configuration.
|
|
576
577
|
</div>
|
577
578
|
</div>
|
578
579
|
|
579
|
-
<div id="method-
|
580
|
-
<a name="
|
580
|
+
<div id="method-M000177" class="method-detail">
|
581
|
+
<a name="M000177"></a>
|
581
582
|
|
582
583
|
<div class="method-heading">
|
583
|
-
<a href="#
|
584
|
+
<a href="#M000177" class="method-signature">
|
584
585
|
<span class="method-name">get_item</span><span class="method-args">(uri, etags=nil, if_match=false)</span>
|
585
586
|
</a>
|
586
587
|
</div>
|
@@ -603,10 +604,10 @@ item, as available from the Metabox.
|
|
603
604
|
TODO: document etags, redirects
|
604
605
|
</p>
|
605
606
|
<p><a class="source-toggle" href="#"
|
606
|
-
onclick="toggleCode('
|
607
|
-
<div class="method-source-code" id="
|
607
|
+
onclick="toggleCode('M000177-source');return false;">[Source]</a></p>
|
608
|
+
<div class="method-source-code" id="M000177-source">
|
608
609
|
<pre>
|
609
|
-
<span class="ruby-comment cmt"># File lib/pho/store.rb, line
|
610
|
+
<span class="ruby-comment cmt"># File lib/pho/store.rb, line 383</span>
|
610
611
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">get_item</span>(<span class="ruby-identifier">uri</span>, <span class="ruby-identifier">etags</span>=<span class="ruby-keyword kw">nil</span>, <span class="ruby-identifier">if_match</span>=<span class="ruby-keyword kw">false</span>)
|
611
612
|
<span class="ruby-identifier">u</span> = <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">build_uri</span>(<span class="ruby-identifier">uri</span>)
|
612
613
|
<span class="ruby-identifier">headers</span> = <span class="ruby-constant">Hash</span>.<span class="ruby-identifier">new</span>
|
@@ -620,11 +621,11 @@ TODO: document etags, redirects
|
|
620
621
|
</div>
|
621
622
|
</div>
|
622
623
|
|
623
|
-
<div id="method-
|
624
|
-
<a name="
|
624
|
+
<div id="method-M000178" class="method-detail">
|
625
|
+
<a name="M000178"></a>
|
625
626
|
|
626
627
|
<div class="method-heading">
|
627
|
-
<a href="#
|
628
|
+
<a href="#M000178" class="method-signature">
|
628
629
|
<span class="method-name">get_job</span><span class="method-args">(uri)</span>
|
629
630
|
</a>
|
630
631
|
</div>
|
@@ -632,7 +633,7 @@ TODO: document etags, redirects
|
|
632
633
|
<div class="method-description">
|
633
634
|
<p>
|
634
635
|
Retrieve metadata about a single job. Use <a
|
635
|
-
href="Job.html#
|
636
|
+
href="Job.html#M000194">Job.read_from_store</a> as a convenience function
|
636
637
|
which will return a fully-populated <a href="Job.html">Job</a> object
|
637
638
|
</p>
|
638
639
|
<table>
|
@@ -641,10 +642,10 @@ which will return a fully-populated <a href="Job.html">Job</a> object
|
|
641
642
|
</td></tr>
|
642
643
|
</table>
|
643
644
|
<p><a class="source-toggle" href="#"
|
644
|
-
onclick="toggleCode('
|
645
|
-
<div class="method-source-code" id="
|
645
|
+
onclick="toggleCode('M000178-source');return false;">[Source]</a></p>
|
646
|
+
<div class="method-source-code" id="M000178-source">
|
646
647
|
<pre>
|
647
|
-
<span class="ruby-comment cmt"># File lib/pho/store.rb, line
|
648
|
+
<span class="ruby-comment cmt"># File lib/pho/store.rb, line 400</span>
|
648
649
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">get_job</span>(<span class="ruby-identifier">uri</span>)
|
649
650
|
<span class="ruby-identifier">u</span> = <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">build_uri</span>(<span class="ruby-identifier">uri</span>)
|
650
651
|
<span class="ruby-identifier">response</span> = <span class="ruby-ivar">@client</span>.<span class="ruby-identifier">get</span>(<span class="ruby-identifier">u</span>, <span class="ruby-keyword kw">nil</span>, <span class="ruby-constant">ACCEPT_RDF</span>)
|
@@ -655,11 +656,11 @@ which will return a fully-populated <a href="Job.html">Job</a> object
|
|
655
656
|
</div>
|
656
657
|
</div>
|
657
658
|
|
658
|
-
<div id="method-
|
659
|
-
<a name="
|
659
|
+
<div id="method-M000179" class="method-detail">
|
660
|
+
<a name="M000179"></a>
|
660
661
|
|
661
662
|
<div class="method-heading">
|
662
|
-
<a href="#
|
663
|
+
<a href="#M000179" class="method-signature">
|
663
664
|
<span class="method-name">get_jobs</span><span class="method-args">()</span>
|
664
665
|
</a>
|
665
666
|
</div>
|
@@ -670,10 +671,10 @@ Retrieve metadata about the Scheduled <a href="Jobs.html">Jobs</a>
|
|
670
671
|
Collection from the store
|
671
672
|
</p>
|
672
673
|
<p><a class="source-toggle" href="#"
|
673
|
-
onclick="toggleCode('
|
674
|
-
<div class="method-source-code" id="
|
674
|
+
onclick="toggleCode('M000179-source');return false;">[Source]</a></p>
|
675
|
+
<div class="method-source-code" id="M000179-source">
|
675
676
|
<pre>
|
676
|
-
<span class="ruby-comment cmt"># File lib/pho/store.rb, line
|
677
|
+
<span class="ruby-comment cmt"># File lib/pho/store.rb, line 407</span>
|
677
678
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">get_jobs</span>()
|
678
679
|
<span class="ruby-identifier">u</span> = <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">build_uri</span>(<span class="ruby-value str">"/jobs"</span>)
|
679
680
|
<span class="ruby-identifier">response</span> = <span class="ruby-ivar">@client</span>.<span class="ruby-identifier">get</span>(<span class="ruby-identifier">u</span>, <span class="ruby-keyword kw">nil</span>, <span class="ruby-constant">ACCEPT_RDF</span>)
|
@@ -684,11 +685,11 @@ Collection from the store
|
|
684
685
|
</div>
|
685
686
|
</div>
|
686
687
|
|
687
|
-
<div id="method-
|
688
|
-
<a name="
|
688
|
+
<div id="method-M000186" class="method-detail">
|
689
|
+
<a name="M000186"></a>
|
689
690
|
|
690
691
|
<div class="method-heading">
|
691
|
-
<a href="#
|
692
|
+
<a href="#M000186" class="method-signature">
|
692
693
|
<span class="method-name">get_query_profile</span><span class="method-args">(output=ACCEPT_JSON)</span>
|
693
694
|
</a>
|
694
695
|
</div>
|
@@ -698,7 +699,7 @@ Collection from the store
|
|
698
699
|
Read the query profile configuration for this store. The config can be
|
699
700
|
requested in any format supported by the platform, but the default will
|
700
701
|
return JSON. See <a
|
701
|
-
href="QueryProfile.html#
|
702
|
+
href="QueryProfile.html#M000130">QueryProfile.read_from_store</a> for a
|
702
703
|
convenient way to quickly create a <a
|
703
704
|
href="QueryProfile.html">QueryProfile</a> object based on a specific
|
704
705
|
stores‘s configuration.
|
@@ -709,10 +710,10 @@ stores‘s configuration.
|
|
709
710
|
</td></tr>
|
710
711
|
</table>
|
711
712
|
<p><a class="source-toggle" href="#"
|
712
|
-
onclick="toggleCode('
|
713
|
-
<div class="method-source-code" id="
|
713
|
+
onclick="toggleCode('M000186-source');return false;">[Source]</a></p>
|
714
|
+
<div class="method-source-code" id="M000186-source">
|
714
715
|
<pre>
|
715
|
-
<span class="ruby-comment cmt"># File lib/pho/store.rb, line
|
716
|
+
<span class="ruby-comment cmt"># File lib/pho/store.rb, line 482</span>
|
716
717
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">get_query_profile</span>(<span class="ruby-identifier">output</span>=<span class="ruby-constant">ACCEPT_JSON</span>)
|
717
718
|
<span class="ruby-identifier">u</span> = <span class="ruby-identifier">build_uri</span>(<span class="ruby-value str">"/config/queryprofiles/1"</span>)
|
718
719
|
<span class="ruby-identifier">response</span> = <span class="ruby-ivar">@client</span>.<span class="ruby-identifier">get</span>(<span class="ruby-identifier">u</span>, <span class="ruby-keyword kw">nil</span>, <span class="ruby-identifier">output</span>)
|
@@ -723,21 +724,21 @@ stores‘s configuration.
|
|
723
724
|
</div>
|
724
725
|
</div>
|
725
726
|
|
726
|
-
<div id="method-
|
727
|
-
<a name="
|
727
|
+
<div id="method-M000170" class="method-detail">
|
728
|
+
<a name="M000170"></a>
|
728
729
|
|
729
730
|
<div class="method-heading">
|
730
|
-
<a href="#
|
731
|
+
<a href="#M000170" class="method-signature">
|
731
732
|
<span class="method-name">get_search_params</span><span class="method-args">(u, query, params)</span>
|
732
733
|
</a>
|
733
734
|
</div>
|
734
735
|
|
735
736
|
<div class="method-description">
|
736
737
|
<p><a class="source-toggle" href="#"
|
737
|
-
onclick="toggleCode('
|
738
|
-
<div class="method-source-code" id="
|
738
|
+
onclick="toggleCode('M000170-source');return false;">[Source]</a></p>
|
739
|
+
<div class="method-source-code" id="M000170-source">
|
739
740
|
<pre>
|
740
|
-
<span class="ruby-comment cmt"># File lib/pho/store.rb, line
|
741
|
+
<span class="ruby-comment cmt"># File lib/pho/store.rb, line 285</span>
|
741
742
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">get_search_params</span>(<span class="ruby-identifier">u</span>, <span class="ruby-identifier">query</span>, <span class="ruby-identifier">params</span>)
|
742
743
|
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">params</span> <span class="ruby-operator">!=</span> <span class="ruby-keyword kw">nil</span>
|
743
744
|
<span class="ruby-identifier">search_params</span> = <span class="ruby-identifier">params</span>.<span class="ruby-identifier">clone</span>()
|
@@ -752,11 +753,11 @@ stores‘s configuration.
|
|
752
753
|
</div>
|
753
754
|
</div>
|
754
755
|
|
755
|
-
<div id="method-
|
756
|
-
<a name="
|
756
|
+
<div id="method-M000182" class="method-detail">
|
757
|
+
<a name="M000182"></a>
|
757
758
|
|
758
759
|
<div class="method-heading">
|
759
|
-
<a href="#
|
760
|
+
<a href="#M000182" class="method-signature">
|
760
761
|
<span class="method-name">get_snapshots</span><span class="method-args">()</span>
|
761
762
|
</a>
|
762
763
|
</div>
|
@@ -767,14 +768,14 @@ Retrieve the list of snapshots for this store
|
|
767
768
|
</p>
|
768
769
|
<p>
|
769
770
|
Currently the response will contain an HTML document. Use <a
|
770
|
-
href="Snapshot.html#
|
771
|
+
href="Snapshot.html#M000189">Snapshot.parse</a> to turn this into a <a
|
771
772
|
href="Snapshot.html">Snapshot</a> object
|
772
773
|
</p>
|
773
774
|
<p><a class="source-toggle" href="#"
|
774
|
-
onclick="toggleCode('
|
775
|
-
<div class="method-source-code" id="
|
775
|
+
onclick="toggleCode('M000182-source');return false;">[Source]</a></p>
|
776
|
+
<div class="method-source-code" id="M000182-source">
|
776
777
|
<pre>
|
777
|
-
<span class="ruby-comment cmt"># File lib/pho/store.rb, line
|
778
|
+
<span class="ruby-comment cmt"># File lib/pho/store.rb, line 436</span>
|
778
779
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">get_snapshots</span>()
|
779
780
|
<span class="ruby-identifier">u</span> = <span class="ruby-identifier">build_uri</span>(<span class="ruby-value str">"/snapshots"</span>)
|
780
781
|
<span class="ruby-identifier">response</span> = <span class="ruby-ivar">@client</span>.<span class="ruby-identifier">get</span>(<span class="ruby-identifier">u</span>, <span class="ruby-keyword kw">nil</span>, <span class="ruby-constant">ACCEPT_RDF</span>)
|
@@ -785,11 +786,11 @@ href="Snapshot.html">Snapshot</a> object
|
|
785
786
|
</div>
|
786
787
|
</div>
|
787
788
|
|
788
|
-
<div id="method-
|
789
|
-
<a name="
|
789
|
+
<div id="method-M000181" class="method-detail">
|
790
|
+
<a name="M000181"></a>
|
790
791
|
|
791
792
|
<div class="method-heading">
|
792
|
-
<a href="#
|
793
|
+
<a href="#M000181" class="method-signature">
|
793
794
|
<span class="method-name">get_status</span><span class="method-args">()</span>
|
794
795
|
</a>
|
795
796
|
</div>
|
@@ -799,10 +800,10 @@ href="Snapshot.html">Snapshot</a> object
|
|
799
800
|
ADMIN
|
800
801
|
</p>
|
801
802
|
<p><a class="source-toggle" href="#"
|
802
|
-
onclick="toggleCode('
|
803
|
-
<div class="method-source-code" id="
|
803
|
+
onclick="toggleCode('M000181-source');return false;">[Source]</a></p>
|
804
|
+
<div class="method-source-code" id="M000181-source">
|
804
805
|
<pre>
|
805
|
-
<span class="ruby-comment cmt"># File lib/pho/store.rb, line
|
806
|
+
<span class="ruby-comment cmt"># File lib/pho/store.rb, line 426</span>
|
806
807
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">get_status</span>()
|
807
808
|
<span class="ruby-identifier">u</span> = <span class="ruby-identifier">build_uri</span>(<span class="ruby-value str">"/config/access-status"</span>)
|
808
809
|
<span class="ruby-identifier">response</span> = <span class="ruby-ivar">@client</span>.<span class="ruby-identifier">get</span>(<span class="ruby-identifier">u</span>, <span class="ruby-keyword kw">nil</span>, <span class="ruby-constant">ACCEPT_JSON</span> )
|
@@ -813,11 +814,39 @@ ADMIN
|
|
813
814
|
</div>
|
814
815
|
</div>
|
815
816
|
|
816
|
-
<div id="method-
|
817
|
-
<a name="
|
817
|
+
<div id="method-M000183" class="method-detail">
|
818
|
+
<a name="M000183"></a>
|
818
819
|
|
819
820
|
<div class="method-heading">
|
820
|
-
<a href="#
|
821
|
+
<a href="#M000183" class="method-signature">
|
822
|
+
<span class="method-name">list_records</span><span class="method-args">()</span>
|
823
|
+
</a>
|
824
|
+
</div>
|
825
|
+
|
826
|
+
<div class="method-description">
|
827
|
+
<p>
|
828
|
+
<a href="OAI.html">OAI</a>
|
829
|
+
</p>
|
830
|
+
<p><a class="source-toggle" href="#"
|
831
|
+
onclick="toggleCode('M000183-source');return false;">[Source]</a></p>
|
832
|
+
<div class="method-source-code" id="M000183-source">
|
833
|
+
<pre>
|
834
|
+
<span class="ruby-comment cmt"># File lib/pho/store.rb, line 446</span>
|
835
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">list_records</span>
|
836
|
+
<span class="ruby-identifier">u</span> = <span class="ruby-identifier">build_uri</span>(<span class="ruby-value str">"/services/oai-pmh"</span>)
|
837
|
+
<span class="ruby-identifier">response</span> = <span class="ruby-ivar">@client</span>.<span class="ruby-identifier">get</span>(<span class="ruby-identifier">u</span>, {<span class="ruby-value str">"verb"</span> =<span class="ruby-operator">></span> <span class="ruby-value str">"ListRecords"</span>, <span class="ruby-value str">"metadataPrefix"</span> =<span class="ruby-operator">></span> <span class="ruby-value str">"oai_dc"</span>})
|
838
|
+
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">response</span>
|
839
|
+
<span class="ruby-keyword kw">end</span>
|
840
|
+
</pre>
|
841
|
+
</div>
|
842
|
+
</div>
|
843
|
+
</div>
|
844
|
+
|
845
|
+
<div id="method-M000185" class="method-detail">
|
846
|
+
<a name="M000185"></a>
|
847
|
+
|
848
|
+
<div class="method-heading">
|
849
|
+
<a href="#M000185" class="method-signature">
|
821
850
|
<span class="method-name">put_field_predicate_map</span><span class="method-args">(data)</span>
|
822
851
|
</a>
|
823
852
|
</div>
|
@@ -827,7 +856,7 @@ ADMIN
|
|
827
856
|
<a href="Update.html">Update</a>/replace the current Field Predicate map
|
828
857
|
configuration in the store. Assumes that the provided data is valid <a
|
829
858
|
href="RDF.html">RDF</a>/XML. Use <a
|
830
|
-
href="FieldPredicateMap.html#
|
859
|
+
href="FieldPredicateMap.html#M000107">FieldPredicateMap.upload</a> as a
|
831
860
|
convenience function
|
832
861
|
</p>
|
833
862
|
<table>
|
@@ -836,10 +865,10 @@ convenience function
|
|
836
865
|
</td></tr>
|
837
866
|
</table>
|
838
867
|
<p><a class="source-toggle" href="#"
|
839
|
-
onclick="toggleCode('
|
840
|
-
<div class="method-source-code" id="
|
868
|
+
onclick="toggleCode('M000185-source');return false;">[Source]</a></p>
|
869
|
+
<div class="method-source-code" id="M000185-source">
|
841
870
|
<pre>
|
842
|
-
<span class="ruby-comment cmt"># File lib/pho/store.rb, line
|
871
|
+
<span class="ruby-comment cmt"># File lib/pho/store.rb, line 471</span>
|
843
872
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">put_field_predicate_map</span>(<span class="ruby-identifier">data</span>)
|
844
873
|
<span class="ruby-identifier">u</span> = <span class="ruby-identifier">build_uri</span>(<span class="ruby-value str">"/config/fpmaps/1"</span>)
|
845
874
|
<span class="ruby-identifier">headers</span> = {<span class="ruby-value str">"Content-Type"</span> =<span class="ruby-operator">></span> <span class="ruby-value str">"application/rdf+xml"</span>}
|
@@ -850,11 +879,11 @@ convenience function
|
|
850
879
|
</div>
|
851
880
|
</div>
|
852
881
|
|
853
|
-
<div id="method-
|
854
|
-
<a name="
|
882
|
+
<div id="method-M000187" class="method-detail">
|
883
|
+
<a name="M000187"></a>
|
855
884
|
|
856
885
|
<div class="method-heading">
|
857
|
-
<a href="#
|
886
|
+
<a href="#M000187" class="method-signature">
|
858
887
|
<span class="method-name">put_query_profile</span><span class="method-args">(data)</span>
|
859
888
|
</a>
|
860
889
|
</div>
|
@@ -864,7 +893,7 @@ convenience function
|
|
864
893
|
<a href="Update.html">Update</a>/replace the current Query Profile
|
865
894
|
configuration in the store. Assumes that the provided data is valid <a
|
866
895
|
href="RDF.html">RDF</a>/XML. Use <a
|
867
|
-
href="QueryProfile.html#
|
896
|
+
href="QueryProfile.html#M000139">QueryProfile.upload</a> as a convenience
|
868
897
|
function
|
869
898
|
</p>
|
870
899
|
<table>
|
@@ -873,10 +902,10 @@ function
|
|
873
902
|
</td></tr>
|
874
903
|
</table>
|
875
904
|
<p><a class="source-toggle" href="#"
|
876
|
-
onclick="toggleCode('
|
877
|
-
<div class="method-source-code" id="
|
905
|
+
onclick="toggleCode('M000187-source');return false;">[Source]</a></p>
|
906
|
+
<div class="method-source-code" id="M000187-source">
|
878
907
|
<pre>
|
879
|
-
<span class="ruby-comment cmt"># File lib/pho/store.rb, line
|
908
|
+
<span class="ruby-comment cmt"># File lib/pho/store.rb, line 492</span>
|
880
909
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">put_query_profile</span>(<span class="ruby-identifier">data</span>)
|
881
910
|
<span class="ruby-identifier">u</span> = <span class="ruby-identifier">build_uri</span>(<span class="ruby-value str">"/config/queryprofiles/1"</span>)
|
882
911
|
<span class="ruby-identifier">headers</span> = {<span class="ruby-value str">"Content-Type"</span> =<span class="ruby-operator">></span> <span class="ruby-value str">"application/rdf+xml"</span>}
|
@@ -887,21 +916,21 @@ function
|
|
887
916
|
</div>
|
888
917
|
</div>
|
889
918
|
|
890
|
-
<div id="method-
|
891
|
-
<a name="
|
919
|
+
<div id="method-M000174" class="method-detail">
|
920
|
+
<a name="M000174"></a>
|
892
921
|
|
893
922
|
<div class="method-heading">
|
894
|
-
<a href="#
|
923
|
+
<a href="#M000174" class="method-signature">
|
895
924
|
<span class="method-name">record_etags</span><span class="method-args">(u, etags, response)</span>
|
896
925
|
</a>
|
897
926
|
</div>
|
898
927
|
|
899
928
|
<div class="method-description">
|
900
929
|
<p><a class="source-toggle" href="#"
|
901
|
-
onclick="toggleCode('
|
902
|
-
<div class="method-source-code" id="
|
930
|
+
onclick="toggleCode('M000174-source');return false;">[Source]</a></p>
|
931
|
+
<div class="method-source-code" id="M000174-source">
|
903
932
|
<pre>
|
904
|
-
<span class="ruby-comment cmt"># File lib/pho/store.rb, line
|
933
|
+
<span class="ruby-comment cmt"># File lib/pho/store.rb, line 325</span>
|
905
934
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">record_etags</span>(<span class="ruby-identifier">u</span>, <span class="ruby-identifier">etags</span>, <span class="ruby-identifier">response</span>)
|
906
935
|
<span class="ruby-keyword kw">if</span> (<span class="ruby-identifier">etags</span> <span class="ruby-operator">!=</span> <span class="ruby-keyword kw">nil</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">response</span>.<span class="ruby-identifier">status</span> = <span class="ruby-value">200</span>)
|
907
936
|
<span class="ruby-identifier">etags</span>.<span class="ruby-identifier">add_from_response</span>(<span class="ruby-identifier">u</span>, <span class="ruby-identifier">response</span>)
|
@@ -912,11 +941,11 @@ function
|
|
912
941
|
</div>
|
913
942
|
</div>
|
914
943
|
|
915
|
-
<div id="method-
|
916
|
-
<a name="
|
944
|
+
<div id="method-M000168" class="method-detail">
|
945
|
+
<a name="M000168"></a>
|
917
946
|
|
918
947
|
<div class="method-heading">
|
919
|
-
<a href="#
|
948
|
+
<a href="#M000168" class="method-signature">
|
920
949
|
<span class="method-name">search</span><span class="method-args">(query, params=nil)</span>
|
921
950
|
</a>
|
922
951
|
</div>
|
@@ -963,10 +992,10 @@ transformation is being applied, in which case they will be provided as
|
|
963
992
|
parameters to the stylesheet.
|
964
993
|
</p>
|
965
994
|
<p><a class="source-toggle" href="#"
|
966
|
-
onclick="toggleCode('
|
967
|
-
<div class="method-source-code" id="
|
995
|
+
onclick="toggleCode('M000168-source');return false;">[Source]</a></p>
|
996
|
+
<div class="method-source-code" id="M000168-source">
|
968
997
|
<pre>
|
969
|
-
<span class="ruby-comment cmt"># File lib/pho/store.rb, line
|
998
|
+
<span class="ruby-comment cmt"># File lib/pho/store.rb, line 256</span>
|
970
999
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">search</span>(<span class="ruby-identifier">query</span>, <span class="ruby-identifier">params</span>=<span class="ruby-keyword kw">nil</span>)
|
971
1000
|
<span class="ruby-identifier">u</span> = <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">build_uri</span>(<span class="ruby-value str">"/items"</span>)
|
972
1001
|
<span class="ruby-identifier">search_params</span> = <span class="ruby-identifier">get_search_params</span>(<span class="ruby-identifier">u</span>, <span class="ruby-identifier">query</span>, <span class="ruby-identifier">params</span>)
|
@@ -979,11 +1008,11 @@ parameters to the stylesheet.
|
|
979
1008
|
</div>
|
980
1009
|
</div>
|
981
1010
|
|
982
|
-
<div id="method-
|
983
|
-
<a name="
|
1011
|
+
<div id="method-M000155" class="method-detail">
|
1012
|
+
<a name="M000155"></a>
|
984
1013
|
|
985
1014
|
<div class="method-heading">
|
986
|
-
<a href="#
|
1015
|
+
<a href="#M000155" class="method-signature">
|
987
1016
|
<span class="method-name">set_credentials</span><span class="method-args">(username, password)</span>
|
988
1017
|
</a>
|
989
1018
|
</div>
|
@@ -1001,8 +1030,8 @@ Set credentials that this store will use when carrying out authorization
|
|
1001
1030
|
</td></tr>
|
1002
1031
|
</table>
|
1003
1032
|
<p><a class="source-toggle" href="#"
|
1004
|
-
onclick="toggleCode('
|
1005
|
-
<div class="method-source-code" id="
|
1033
|
+
onclick="toggleCode('M000155-source');return false;">[Source]</a></p>
|
1034
|
+
<div class="method-source-code" id="M000155-source">
|
1006
1035
|
<pre>
|
1007
1036
|
<span class="ruby-comment cmt"># File lib/pho/store.rb, line 55</span>
|
1008
1037
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">set_credentials</span>(<span class="ruby-identifier">username</span>, <span class="ruby-identifier">password</span>)
|
@@ -1013,11 +1042,11 @@ Set credentials that this store will use when carrying out authorization
|
|
1013
1042
|
</div>
|
1014
1043
|
</div>
|
1015
1044
|
|
1016
|
-
<div id="method-
|
1017
|
-
<a name="
|
1045
|
+
<div id="method-M000167" class="method-detail">
|
1046
|
+
<a name="M000167"></a>
|
1018
1047
|
|
1019
1048
|
<div class="method-heading">
|
1020
|
-
<a href="#
|
1049
|
+
<a href="#M000167" class="method-signature">
|
1021
1050
|
<span class="method-name">sparql</span><span class="method-args">(query, format=nil, multisparql=false)</span>
|
1022
1051
|
</a>
|
1023
1052
|
</div>
|
@@ -1032,10 +1061,10 @@ Perform a SPARQL query
|
|
1032
1061
|
multisparql:: use default sparql service or multisparql service
|
1033
1062
|
</pre>
|
1034
1063
|
<p><a class="source-toggle" href="#"
|
1035
|
-
onclick="toggleCode('
|
1036
|
-
<div class="method-source-code" id="
|
1064
|
+
onclick="toggleCode('M000167-source');return false;">[Source]</a></p>
|
1065
|
+
<div class="method-source-code" id="M000167-source">
|
1037
1066
|
<pre>
|
1038
|
-
<span class="ruby-comment cmt"># File lib/pho/store.rb, line
|
1067
|
+
<span class="ruby-comment cmt"># File lib/pho/store.rb, line 237</span>
|
1039
1068
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">sparql</span>(<span class="ruby-identifier">query</span>, <span class="ruby-identifier">format</span>=<span class="ruby-keyword kw">nil</span>, <span class="ruby-identifier">multisparql</span>=<span class="ruby-keyword kw">false</span>)
|
1040
1069
|
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">sparql_client</span>(<span class="ruby-identifier">multisparql</span>).<span class="ruby-identifier">query</span>(<span class="ruby-identifier">query</span>, <span class="ruby-identifier">format</span>)
|
1041
1070
|
<span class="ruby-keyword kw">end</span>
|
@@ -1044,11 +1073,11 @@ Perform a SPARQL query
|
|
1044
1073
|
</div>
|
1045
1074
|
</div>
|
1046
1075
|
|
1047
|
-
<div id="method-
|
1048
|
-
<a name="
|
1076
|
+
<div id="method-M000165" class="method-detail">
|
1077
|
+
<a name="M000165"></a>
|
1049
1078
|
|
1050
1079
|
<div class="method-heading">
|
1051
|
-
<a href="#
|
1080
|
+
<a href="#M000165" class="method-signature">
|
1052
1081
|
<span class="method-name">sparql_ask</span><span class="method-args">(query, format="application/sparql-results+xml", multisparql=false)</span>
|
1053
1082
|
</a>
|
1054
1083
|
</div>
|
@@ -1062,10 +1091,10 @@ Perform a SPARQL ASK query.
|
|
1062
1091
|
format:: the preferred response format
|
1063
1092
|
</pre>
|
1064
1093
|
<p><a class="source-toggle" href="#"
|
1065
|
-
onclick="toggleCode('
|
1066
|
-
<div class="method-source-code" id="
|
1094
|
+
onclick="toggleCode('M000165-source');return false;">[Source]</a></p>
|
1095
|
+
<div class="method-source-code" id="M000165-source">
|
1067
1096
|
<pre>
|
1068
|
-
<span class="ruby-comment cmt"># File lib/pho/store.rb, line
|
1097
|
+
<span class="ruby-comment cmt"># File lib/pho/store.rb, line 220</span>
|
1069
1098
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">sparql_ask</span>(<span class="ruby-identifier">query</span>, <span class="ruby-identifier">format</span>=<span class="ruby-value str">"application/sparql-results+xml"</span>, <span class="ruby-identifier">multisparql</span>=<span class="ruby-keyword kw">false</span>)
|
1070
1099
|
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">sparql</span>(<span class="ruby-identifier">query</span>, <span class="ruby-identifier">format</span>, <span class="ruby-identifier">multisparql</span>)
|
1071
1100
|
<span class="ruby-keyword kw">end</span>
|
@@ -1074,11 +1103,11 @@ Perform a SPARQL ASK query.
|
|
1074
1103
|
</div>
|
1075
1104
|
</div>
|
1076
1105
|
|
1077
|
-
<div id="method-
|
1078
|
-
<a name="
|
1106
|
+
<div id="method-M000162" class="method-detail">
|
1107
|
+
<a name="M000162"></a>
|
1079
1108
|
|
1080
1109
|
<div class="method-heading">
|
1081
|
-
<a href="#
|
1110
|
+
<a href="#M000162" class="method-signature">
|
1082
1111
|
<span class="method-name">sparql_client</span><span class="method-args">(multisparql=false)</span>
|
1083
1112
|
</a>
|
1084
1113
|
</div>
|
@@ -1092,10 +1121,10 @@ store
|
|
1092
1121
|
multisparql:: optional, set to true to retrieve client for multisparql endpoint
|
1093
1122
|
</pre>
|
1094
1123
|
<p><a class="source-toggle" href="#"
|
1095
|
-
onclick="toggleCode('
|
1096
|
-
<div class="method-source-code" id="
|
1124
|
+
onclick="toggleCode('M000162-source');return false;">[Source]</a></p>
|
1125
|
+
<div class="method-source-code" id="M000162-source">
|
1097
1126
|
<pre>
|
1098
|
-
<span class="ruby-comment cmt"># File lib/pho/store.rb, line
|
1127
|
+
<span class="ruby-comment cmt"># File lib/pho/store.rb, line 186</span>
|
1099
1128
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">sparql_client</span>(<span class="ruby-identifier">multisparql</span>=<span class="ruby-keyword kw">false</span>)
|
1100
1129
|
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">multisparql</span>
|
1101
1130
|
<span class="ruby-identifier">u</span> = <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">build_uri</span>(<span class="ruby-value str">"/services/multisparql"</span>)
|
@@ -1114,11 +1143,11 @@ store
|
|
1114
1143
|
</div>
|
1115
1144
|
</div>
|
1116
1145
|
|
1117
|
-
<div id="method-
|
1118
|
-
<a name="
|
1146
|
+
<div id="method-M000164" class="method-detail">
|
1147
|
+
<a name="M000164"></a>
|
1119
1148
|
|
1120
1149
|
<div class="method-heading">
|
1121
|
-
<a href="#
|
1150
|
+
<a href="#M000164" class="method-signature">
|
1122
1151
|
<span class="method-name">sparql_construct</span><span class="method-args">(query, format="application/rdf+xml", multisparql=false)</span>
|
1123
1152
|
</a>
|
1124
1153
|
</div>
|
@@ -1132,10 +1161,10 @@ Perform a SPARQL CONSTRUCT query.
|
|
1132
1161
|
format:: the preferred response format
|
1133
1162
|
</pre>
|
1134
1163
|
<p><a class="source-toggle" href="#"
|
1135
|
-
onclick="toggleCode('
|
1136
|
-
<div class="method-source-code" id="
|
1164
|
+
onclick="toggleCode('M000164-source');return false;">[Source]</a></p>
|
1165
|
+
<div class="method-source-code" id="M000164-source">
|
1137
1166
|
<pre>
|
1138
|
-
<span class="ruby-comment cmt"># File lib/pho/store.rb, line
|
1167
|
+
<span class="ruby-comment cmt"># File lib/pho/store.rb, line 212</span>
|
1139
1168
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">sparql_construct</span>(<span class="ruby-identifier">query</span>, <span class="ruby-identifier">format</span>=<span class="ruby-value str">"application/rdf+xml"</span>, <span class="ruby-identifier">multisparql</span>=<span class="ruby-keyword kw">false</span>)
|
1140
1169
|
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">sparql</span>(<span class="ruby-identifier">query</span>, <span class="ruby-identifier">format</span>, <span class="ruby-identifier">multisparql</span>)
|
1141
1170
|
<span class="ruby-keyword kw">end</span>
|
@@ -1144,11 +1173,11 @@ Perform a SPARQL CONSTRUCT query.
|
|
1144
1173
|
</div>
|
1145
1174
|
</div>
|
1146
1175
|
|
1147
|
-
<div id="method-
|
1148
|
-
<a name="
|
1176
|
+
<div id="method-M000163" class="method-detail">
|
1177
|
+
<a name="M000163"></a>
|
1149
1178
|
|
1150
1179
|
<div class="method-heading">
|
1151
|
-
<a href="#
|
1180
|
+
<a href="#M000163" class="method-signature">
|
1152
1181
|
<span class="method-name">sparql_describe</span><span class="method-args">(query, format="application/rdf+xml", multisparql=false)</span>
|
1153
1182
|
</a>
|
1154
1183
|
</div>
|
@@ -1162,10 +1191,10 @@ Perform a SPARQL DESCRIBE query.
|
|
1162
1191
|
format:: the preferred response format
|
1163
1192
|
</pre>
|
1164
1193
|
<p><a class="source-toggle" href="#"
|
1165
|
-
onclick="toggleCode('
|
1166
|
-
<div class="method-source-code" id="
|
1194
|
+
onclick="toggleCode('M000163-source');return false;">[Source]</a></p>
|
1195
|
+
<div class="method-source-code" id="M000163-source">
|
1167
1196
|
<pre>
|
1168
|
-
<span class="ruby-comment cmt"># File lib/pho/store.rb, line
|
1197
|
+
<span class="ruby-comment cmt"># File lib/pho/store.rb, line 204</span>
|
1169
1198
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">sparql_describe</span>(<span class="ruby-identifier">query</span>, <span class="ruby-identifier">format</span>=<span class="ruby-value str">"application/rdf+xml"</span>, <span class="ruby-identifier">multisparql</span>=<span class="ruby-keyword kw">false</span>)
|
1170
1199
|
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">sparql</span>(<span class="ruby-identifier">query</span>, <span class="ruby-identifier">format</span>, <span class="ruby-identifier">multisparql</span>)
|
1171
1200
|
<span class="ruby-keyword kw">end</span>
|
@@ -1174,11 +1203,11 @@ Perform a SPARQL DESCRIBE query.
|
|
1174
1203
|
</div>
|
1175
1204
|
</div>
|
1176
1205
|
|
1177
|
-
<div id="method-
|
1178
|
-
<a name="
|
1206
|
+
<div id="method-M000166" class="method-detail">
|
1207
|
+
<a name="M000166"></a>
|
1179
1208
|
|
1180
1209
|
<div class="method-heading">
|
1181
|
-
<a href="#
|
1210
|
+
<a href="#M000166" class="method-signature">
|
1182
1211
|
<span class="method-name">sparql_select</span><span class="method-args">(query, format="application/sparql-results+xml", multisparql=false)</span>
|
1183
1212
|
</a>
|
1184
1213
|
</div>
|
@@ -1192,10 +1221,10 @@ Perform a SPARQL SELECT query.
|
|
1192
1221
|
format:: the preferred response format
|
1193
1222
|
</pre>
|
1194
1223
|
<p><a class="source-toggle" href="#"
|
1195
|
-
onclick="toggleCode('
|
1196
|
-
<div class="method-source-code" id="
|
1224
|
+
onclick="toggleCode('M000166-source');return false;">[Source]</a></p>
|
1225
|
+
<div class="method-source-code" id="M000166-source">
|
1197
1226
|
<pre>
|
1198
|
-
<span class="ruby-comment cmt"># File lib/pho/store.rb, line
|
1227
|
+
<span class="ruby-comment cmt"># File lib/pho/store.rb, line 228</span>
|
1199
1228
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">sparql_select</span>(<span class="ruby-identifier">query</span>, <span class="ruby-identifier">format</span>=<span class="ruby-value str">"application/sparql-results+xml"</span>, <span class="ruby-identifier">multisparql</span>=<span class="ruby-keyword kw">false</span>)
|
1200
1229
|
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">sparql</span>(<span class="ruby-identifier">query</span>, <span class="ruby-identifier">format</span>, <span class="ruby-identifier">multisparql</span>)
|
1201
1230
|
<span class="ruby-keyword kw">end</span>
|
@@ -1204,12 +1233,12 @@ Perform a SPARQL SELECT query.
|
|
1204
1233
|
</div>
|
1205
1234
|
</div>
|
1206
1235
|
|
1207
|
-
<div id="method-
|
1208
|
-
<a name="
|
1236
|
+
<div id="method-M000157" class="method-detail">
|
1237
|
+
<a name="M000157"></a>
|
1209
1238
|
|
1210
1239
|
<div class="method-heading">
|
1211
|
-
<a href="#
|
1212
|
-
<span class="method-name">store_data</span><span class="method-args">(data, graph_name=nil)</span>
|
1240
|
+
<a href="#M000157" class="method-signature">
|
1241
|
+
<span class="method-name">store_data</span><span class="method-args">(data, graph_name=nil, format="application/rdf+xml")</span>
|
1213
1242
|
</a>
|
1214
1243
|
</div>
|
1215
1244
|
|
@@ -1221,14 +1250,17 @@ Perform a SPARQL SELECT query.
|
|
1221
1250
|
<tr><td valign="top">graph_name:</td><td>name of a private graph in which to store the data. E.g. "1" or
|
1222
1251
|
"private". Resolves to /meta/graphs/graph_name
|
1223
1252
|
|
1253
|
+
</td></tr>
|
1254
|
+
<tr><td valign="top">format:</td><td>mimetype of <a href="RDF.html">RDF</a> serialization
|
1255
|
+
|
1224
1256
|
</td></tr>
|
1225
1257
|
</table>
|
1226
1258
|
<p><a class="source-toggle" href="#"
|
1227
|
-
onclick="toggleCode('
|
1228
|
-
<div class="method-source-code" id="
|
1259
|
+
onclick="toggleCode('M000157-source');return false;">[Source]</a></p>
|
1260
|
+
<div class="method-source-code" id="M000157-source">
|
1229
1261
|
<pre>
|
1230
|
-
<span class="ruby-comment cmt"># File lib/pho/store.rb, line
|
1231
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">store_data</span>(<span class="ruby-identifier">data</span>, <span class="ruby-identifier">graph_name</span>=<span class="ruby-keyword kw">nil</span>)
|
1262
|
+
<span class="ruby-comment cmt"># File lib/pho/store.rb, line 82</span>
|
1263
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">store_data</span>(<span class="ruby-identifier">data</span>, <span class="ruby-identifier">graph_name</span>=<span class="ruby-keyword kw">nil</span>, <span class="ruby-identifier">format</span>=<span class="ruby-value str">"application/rdf+xml"</span>)
|
1232
1264
|
<span class="ruby-identifier">u</span> = <span class="ruby-keyword kw">nil</span>
|
1233
1265
|
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">graph_name</span> <span class="ruby-operator">==</span> <span class="ruby-keyword kw">nil</span>
|
1234
1266
|
<span class="ruby-identifier">u</span> = <span class="ruby-identifier">build_uri</span>(<span class="ruby-value str">"/meta"</span>)
|
@@ -1236,7 +1268,12 @@ Perform a SPARQL SELECT query.
|
|
1236
1268
|
<span class="ruby-identifier">u</span> = <span class="ruby-identifier">build_uri</span>(<span class="ruby-node">"/meta/graphs/#{graph_name}"</span>)
|
1237
1269
|
<span class="ruby-keyword kw">end</span>
|
1238
1270
|
|
1239
|
-
<span class="ruby-
|
1271
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">format</span> <span class="ruby-operator">==</span> <span class="ruby-value str">"text/plain"</span>
|
1272
|
+
<span class="ruby-identifier">format</span> = <span class="ruby-value str">"text/turtle"</span>
|
1273
|
+
<span class="ruby-keyword kw">end</span>
|
1274
|
+
|
1275
|
+
<span class="ruby-identifier">content_type</span> = {<span class="ruby-value str">"Content-Type"</span>=<span class="ruby-operator">></span> <span class="ruby-identifier">format</span> }
|
1276
|
+
<span class="ruby-identifier">response</span> = <span class="ruby-ivar">@client</span>.<span class="ruby-identifier">post</span>(<span class="ruby-identifier">u</span>, <span class="ruby-identifier">data</span>, <span class="ruby-identifier">content_type</span> )
|
1240
1277
|
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">response</span>
|
1241
1278
|
<span class="ruby-keyword kw">end</span>
|
1242
1279
|
</pre>
|
@@ -1244,12 +1281,12 @@ Perform a SPARQL SELECT query.
|
|
1244
1281
|
</div>
|
1245
1282
|
</div>
|
1246
1283
|
|
1247
|
-
<div id="method-
|
1248
|
-
<a name="
|
1284
|
+
<div id="method-M000158" class="method-detail">
|
1285
|
+
<a name="M000158"></a>
|
1249
1286
|
|
1250
1287
|
<div class="method-heading">
|
1251
|
-
<a href="#
|
1252
|
-
<span class="method-name">store_file</span><span class="method-args">(file)</span>
|
1288
|
+
<a href="#M000158" class="method-signature">
|
1289
|
+
<span class="method-name">store_file</span><span class="method-args">(file, graph_name=nil, format="application/rdf+xml")</span>
|
1253
1290
|
</a>
|
1254
1291
|
</div>
|
1255
1292
|
|
@@ -1263,28 +1300,35 @@ is submitted to the platform
|
|
1263
1300
|
<table>
|
1264
1301
|
<tr><td valign="top">file:</td><td>an IO object
|
1265
1302
|
|
1303
|
+
</td></tr>
|
1304
|
+
<tr><td valign="top">graph_name:</td><td>name of a private graph in which to store teh data. E.g. "1" or
|
1305
|
+
"private". Resolves to /meta/graphs/graph_name
|
1306
|
+
|
1307
|
+
</td></tr>
|
1308
|
+
<tr><td valign="top">format:</td><td>mimetype of <a href="RDF.html">RDF</a> serialization
|
1309
|
+
|
1266
1310
|
</td></tr>
|
1267
1311
|
</table>
|
1268
1312
|
<p><a class="source-toggle" href="#"
|
1269
|
-
onclick="toggleCode('
|
1270
|
-
<div class="method-source-code" id="
|
1313
|
+
onclick="toggleCode('M000158-source');return false;">[Source]</a></p>
|
1314
|
+
<div class="method-source-code" id="M000158-source">
|
1271
1315
|
<pre>
|
1272
|
-
<span class="ruby-comment cmt"># File lib/pho/store.rb, line
|
1273
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">store_file</span>(<span class="ruby-identifier">file</span>)
|
1316
|
+
<span class="ruby-comment cmt"># File lib/pho/store.rb, line 104</span>
|
1317
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">store_file</span>(<span class="ruby-identifier">file</span>, <span class="ruby-identifier">graph_name</span>=<span class="ruby-keyword kw">nil</span>, <span class="ruby-identifier">format</span>=<span class="ruby-value str">"application/rdf+xml"</span>)
|
1274
1318
|
<span class="ruby-identifier">data</span> = <span class="ruby-identifier">file</span>.<span class="ruby-identifier">read</span>()
|
1275
1319
|
<span class="ruby-identifier">file</span>.<span class="ruby-identifier">close</span>()
|
1276
|
-
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">store_data</span>(<span class="ruby-identifier">data</span>)
|
1320
|
+
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">store_data</span>(<span class="ruby-identifier">data</span>, <span class="ruby-identifier">graph_name</span>, <span class="ruby-identifier">format</span>)
|
1277
1321
|
<span class="ruby-keyword kw">end</span>
|
1278
1322
|
</pre>
|
1279
1323
|
</div>
|
1280
1324
|
</div>
|
1281
1325
|
</div>
|
1282
1326
|
|
1283
|
-
<div id="method-
|
1284
|
-
<a name="
|
1327
|
+
<div id="method-M000159" class="method-detail">
|
1328
|
+
<a name="M000159"></a>
|
1285
1329
|
|
1286
1330
|
<div class="method-heading">
|
1287
|
-
<a href="#
|
1331
|
+
<a href="#M000159" class="method-signature">
|
1288
1332
|
<span class="method-name">store_url</span><span class="method-args">(u, parameters=nil, graph_name=nil)</span>
|
1289
1333
|
</a>
|
1290
1334
|
</div>
|
@@ -1322,10 +1366,10 @@ URL
|
|
1322
1366
|
</td></tr>
|
1323
1367
|
</table>
|
1324
1368
|
<p><a class="source-toggle" href="#"
|
1325
|
-
onclick="toggleCode('
|
1326
|
-
<div class="method-source-code" id="
|
1369
|
+
onclick="toggleCode('M000159-source');return false;">[Source]</a></p>
|
1370
|
+
<div class="method-source-code" id="M000159-source">
|
1327
1371
|
<pre>
|
1328
|
-
<span class="ruby-comment cmt"># File lib/pho/store.rb, line
|
1372
|
+
<span class="ruby-comment cmt"># File lib/pho/store.rb, line 122</span>
|
1329
1373
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">store_url</span>(<span class="ruby-identifier">u</span>, <span class="ruby-identifier">parameters</span>=<span class="ruby-keyword kw">nil</span>, <span class="ruby-identifier">graph_name</span>=<span class="ruby-keyword kw">nil</span>)
|
1330
1374
|
|
1331
1375
|
<span class="ruby-identifier">headers</span> = <span class="ruby-constant">ACCEPT_RDF</span>.<span class="ruby-identifier">clone</span>()
|
@@ -1344,11 +1388,11 @@ URL
|
|
1344
1388
|
</div>
|
1345
1389
|
</div>
|
1346
1390
|
|
1347
|
-
<div id="method-
|
1348
|
-
<a name="
|
1391
|
+
<div id="method-M000161" class="method-detail">
|
1392
|
+
<a name="M000161"></a>
|
1349
1393
|
|
1350
1394
|
<div class="method-heading">
|
1351
|
-
<a href="#
|
1395
|
+
<a href="#M000161" class="method-signature">
|
1352
1396
|
<span class="method-name">submit_changeset</span><span class="method-args">(rdf, versioned=false, graph_name=nil)</span>
|
1353
1397
|
</a>
|
1354
1398
|
</div>
|
@@ -1374,10 +1418,10 @@ be submitted to private graphs.
|
|
1374
1418
|
</td></tr>
|
1375
1419
|
</table>
|
1376
1420
|
<p><a class="source-toggle" href="#"
|
1377
|
-
onclick="toggleCode('
|
1378
|
-
<div class="method-source-code" id="
|
1421
|
+
onclick="toggleCode('M000161-source');return false;">[Source]</a></p>
|
1422
|
+
<div class="method-source-code" id="M000161-source">
|
1379
1423
|
<pre>
|
1380
|
-
<span class="ruby-comment cmt"># File lib/pho/store.rb, line
|
1424
|
+
<span class="ruby-comment cmt"># File lib/pho/store.rb, line 166</span>
|
1381
1425
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">submit_changeset</span>(<span class="ruby-identifier">rdf</span>, <span class="ruby-identifier">versioned</span>=<span class="ruby-keyword kw">false</span>, <span class="ruby-identifier">graph_name</span>=<span class="ruby-keyword kw">nil</span>)
|
1382
1426
|
<span class="ruby-identifier">uri</span> = <span class="ruby-value str">"/meta"</span>
|
1383
1427
|
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">graph_name</span> <span class="ruby-operator">!=</span> <span class="ruby-keyword kw">nil</span>
|
@@ -1395,11 +1439,11 @@ be submitted to private graphs.
|
|
1395
1439
|
</div>
|
1396
1440
|
</div>
|
1397
1441
|
|
1398
|
-
<div id="method-
|
1399
|
-
<a name="
|
1442
|
+
<div id="method-M000180" class="method-detail">
|
1443
|
+
<a name="M000180"></a>
|
1400
1444
|
|
1401
1445
|
<div class="method-heading">
|
1402
|
-
<a href="#
|
1446
|
+
<a href="#M000180" class="method-signature">
|
1403
1447
|
<span class="method-name">submit_job</span><span class="method-args">(data)</span>
|
1404
1448
|
</a>
|
1405
1449
|
</div>
|
@@ -1415,10 +1459,10 @@ Submit a job to the platform.
|
|
1415
1459
|
</td></tr>
|
1416
1460
|
</table>
|
1417
1461
|
<p><a class="source-toggle" href="#"
|
1418
|
-
onclick="toggleCode('
|
1419
|
-
<div class="method-source-code" id="
|
1462
|
+
onclick="toggleCode('M000180-source');return false;">[Source]</a></p>
|
1463
|
+
<div class="method-source-code" id="M000180-source">
|
1420
1464
|
<pre>
|
1421
|
-
<span class="ruby-comment cmt"># File lib/pho/store.rb, line
|
1465
|
+
<span class="ruby-comment cmt"># File lib/pho/store.rb, line 416</span>
|
1422
1466
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">submit_job</span>(<span class="ruby-identifier">data</span>)
|
1423
1467
|
<span class="ruby-identifier">u</span> = <span class="ruby-identifier">build_uri</span>(<span class="ruby-value str">"/jobs"</span>)
|
1424
1468
|
<span class="ruby-identifier">response</span> = <span class="ruby-ivar">@client</span>.<span class="ruby-identifier">post</span>(<span class="ruby-identifier">u</span>, <span class="ruby-identifier">data</span>, <span class="ruby-constant">RDF_XML</span> )
|
@@ -1429,11 +1473,11 @@ Submit a job to the platform.
|
|
1429
1473
|
</div>
|
1430
1474
|
</div>
|
1431
1475
|
|
1432
|
-
<div id="method-
|
1433
|
-
<a name="
|
1476
|
+
<div id="method-M000175" class="method-detail">
|
1477
|
+
<a name="M000175"></a>
|
1434
1478
|
|
1435
1479
|
<div class="method-heading">
|
1436
|
-
<a href="#
|
1480
|
+
<a href="#M000175" class="method-signature">
|
1437
1481
|
<span class="method-name">upload_item</span><span class="method-args">(f, mimetype, uri=nil)</span>
|
1438
1482
|
</a>
|
1439
1483
|
</div>
|
@@ -1461,10 +1505,10 @@ stored item. If a URI is specified then a successful request will result in
|
|
1461
1505
|
a 200 OK response.
|
1462
1506
|
</p>
|
1463
1507
|
<p><a class="source-toggle" href="#"
|
1464
|
-
onclick="toggleCode('
|
1465
|
-
<div class="method-source-code" id="
|
1508
|
+
onclick="toggleCode('M000175-source');return false;">[Source]</a></p>
|
1509
|
+
<div class="method-source-code" id="M000175-source">
|
1466
1510
|
<pre>
|
1467
|
-
<span class="ruby-comment cmt"># File lib/pho/store.rb, line
|
1511
|
+
<span class="ruby-comment cmt"># File lib/pho/store.rb, line 344</span>
|
1468
1512
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">upload_item</span>(<span class="ruby-identifier">f</span>, <span class="ruby-identifier">mimetype</span>, <span class="ruby-identifier">uri</span>=<span class="ruby-keyword kw">nil</span>)
|
1469
1513
|
<span class="ruby-identifier">data</span> = <span class="ruby-identifier">f</span>.<span class="ruby-identifier">read</span>()
|
1470
1514
|
<span class="ruby-identifier">f</span>.<span class="ruby-identifier">close</span>()
|