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
@@ -93,8 +93,8 @@ href="QueryProfile.html">QueryProfile</a>
|
|
93
93
|
<h3 class="section-bar">Methods</h3>
|
94
94
|
|
95
95
|
<div class="name-list">
|
96
|
-
<a href="#
|
97
|
-
<a href="#
|
96
|
+
<a href="#M000203">new</a>
|
97
|
+
<a href="#M000204">to_rdf</a>
|
98
98
|
</div>
|
99
99
|
</div>
|
100
100
|
|
@@ -148,19 +148,19 @@ The weighting applied to the field
|
|
148
148
|
<div id="methods">
|
149
149
|
<h3 class="section-bar">Public Class methods</h3>
|
150
150
|
|
151
|
-
<div id="method-
|
152
|
-
<a name="
|
151
|
+
<div id="method-M000203" class="method-detail">
|
152
|
+
<a name="M000203"></a>
|
153
153
|
|
154
154
|
<div class="method-heading">
|
155
|
-
<a href="#
|
155
|
+
<a href="#M000203" class="method-signature">
|
156
156
|
<span class="method-name">new</span><span class="method-args">(uri, name, weight)</span>
|
157
157
|
</a>
|
158
158
|
</div>
|
159
159
|
|
160
160
|
<div class="method-description">
|
161
161
|
<p><a class="source-toggle" href="#"
|
162
|
-
onclick="toggleCode('
|
163
|
-
<div class="method-source-code" id="
|
162
|
+
onclick="toggleCode('M000203-source');return false;">[Source]</a></p>
|
163
|
+
<div class="method-source-code" id="M000203-source">
|
164
164
|
<pre>
|
165
165
|
<span class="ruby-comment cmt"># File lib/pho/query_profile.rb, line 15</span>
|
166
166
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">uri</span>, <span class="ruby-identifier">name</span>, <span class="ruby-identifier">weight</span>)
|
@@ -175,11 +175,11 @@ The weighting applied to the field
|
|
175
175
|
|
176
176
|
<h3 class="section-bar">Public Instance methods</h3>
|
177
177
|
|
178
|
-
<div id="method-
|
179
|
-
<a name="
|
178
|
+
<div id="method-M000204" class="method-detail">
|
179
|
+
<a name="M000204"></a>
|
180
180
|
|
181
181
|
<div class="method-heading">
|
182
|
-
<a href="#
|
182
|
+
<a href="#M000204" class="method-signature">
|
183
183
|
<span class="method-name">to_rdf</span><span class="method-args">(ns=true)</span>
|
184
184
|
</a>
|
185
185
|
</div>
|
@@ -195,8 +195,8 @@ Generates a simple rdf:Description, optionally including namespaces
|
|
195
195
|
</td></tr>
|
196
196
|
</table>
|
197
197
|
<p><a class="source-toggle" href="#"
|
198
|
-
onclick="toggleCode('
|
199
|
-
<div class="method-source-code" id="
|
198
|
+
onclick="toggleCode('M000204-source');return false;">[Source]</a></p>
|
199
|
+
<div class="method-source-code" id="M000204-source">
|
200
200
|
<pre>
|
201
201
|
<span class="ruby-comment cmt"># File lib/pho/query_profile.rb, line 23</span>
|
202
202
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_rdf</span>(<span class="ruby-identifier">ns</span>=<span class="ruby-keyword kw">true</span>)
|
@@ -122,6 +122,21 @@ Allows a collection to be mirrored into the platform
|
|
122
122
|
<td>=</td>
|
123
123
|
<td class="context-item-value">"rdf".freeze</td>
|
124
124
|
</tr>
|
125
|
+
<tr class="top-aligned-row context-row">
|
126
|
+
<td class="context-item-name">TTL</td>
|
127
|
+
<td>=</td>
|
128
|
+
<td class="context-item-value">"ttl".freeze</td>
|
129
|
+
</tr>
|
130
|
+
<tr class="top-aligned-row context-row">
|
131
|
+
<td class="context-item-name">NT</td>
|
132
|
+
<td>=</td>
|
133
|
+
<td class="context-item-value">"nt".freeze</td>
|
134
|
+
</tr>
|
135
|
+
<tr class="top-aligned-row context-row">
|
136
|
+
<td class="context-item-name">ALL_RDF</td>
|
137
|
+
<td>=</td>
|
138
|
+
<td class="context-item-value">[RDF, TTL, NT]</td>
|
139
|
+
</tr>
|
125
140
|
</table>
|
126
141
|
</div>
|
127
142
|
</div>
|
@@ -140,7 +155,7 @@ Allows a collection to be mirrored into the platform
|
|
140
155
|
|
141
156
|
<div class="method-heading">
|
142
157
|
<a href="#M000024" class="method-signature">
|
143
|
-
<span class="method-name">new</span><span class="method-args">(store, dir,
|
158
|
+
<span class="method-name">new</span><span class="method-args">(store, dir, rdf_suffixes=ALL_RDF, ok_suffix=OK, fail_suffix=FAIL, sleep=1)</span>
|
144
159
|
</a>
|
145
160
|
</div>
|
146
161
|
|
@@ -149,10 +164,10 @@ Allows a collection to be mirrored into the platform
|
|
149
164
|
onclick="toggleCode('M000024-source');return false;">[Source]</a></p>
|
150
165
|
<div class="method-source-code" id="M000024-source">
|
151
166
|
<pre>
|
152
|
-
<span class="ruby-comment cmt"># File lib/pho/rdf_collection.rb, line
|
153
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">store</span>, <span class="ruby-identifier">dir</span>, <span class="ruby-identifier">
|
167
|
+
<span class="ruby-comment cmt"># File lib/pho/rdf_collection.rb, line 17</span>
|
168
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">store</span>, <span class="ruby-identifier">dir</span>, <span class="ruby-identifier">rdf_suffixes</span>=<span class="ruby-constant">ALL_RDF</span>, <span class="ruby-identifier">ok_suffix</span>=<span class="ruby-constant">OK</span>, <span class="ruby-identifier">fail_suffix</span>=<span class="ruby-constant">FAIL</span>, <span class="ruby-identifier">sleep</span>=<span class="ruby-value">1</span>)
|
154
169
|
<span class="ruby-keyword kw">super</span>(<span class="ruby-identifier">store</span>, <span class="ruby-identifier">dir</span>, <span class="ruby-identifier">ok_suffix</span>, <span class="ruby-identifier">fail_suffix</span>, <span class="ruby-identifier">sleep</span>)
|
155
|
-
<span class="ruby-ivar">@
|
170
|
+
<span class="ruby-ivar">@rdf_suffixes</span> = <span class="ruby-identifier">rdf_suffixes</span>
|
156
171
|
<span class="ruby-keyword kw">end</span>
|
157
172
|
</pre>
|
158
173
|
</div>
|
@@ -178,9 +193,9 @@ List files being managed
|
|
178
193
|
onclick="toggleCode('M000025-source');return false;">[Source]</a></p>
|
179
194
|
<div class="method-source-code" id="M000025-source">
|
180
195
|
<pre>
|
181
|
-
<span class="ruby-comment cmt"># File lib/pho/rdf_collection.rb, line
|
196
|
+
<span class="ruby-comment cmt"># File lib/pho/rdf_collection.rb, line 23</span>
|
182
197
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">list</span>(<span class="ruby-identifier">recursive</span>=<span class="ruby-keyword kw">false</span>)
|
183
|
-
<span class="ruby-keyword kw">return</span> <span class="ruby-constant">Dir</span>.<span class="ruby-identifier">glob</span>( <span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>(<span class="ruby-ivar">@dir</span>, <span class="ruby-node">"
|
198
|
+
<span class="ruby-keyword kw">return</span> <span class="ruby-constant">Dir</span>.<span class="ruby-identifier">glob</span>( <span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>(<span class="ruby-ivar">@dir</span>, <span class="ruby-node">"*.\{#{ @rdf_suffixes.join(",") }\}"</span>) )
|
184
199
|
<span class="ruby-keyword kw">end</span>
|
185
200
|
</pre>
|
186
201
|
</div>
|
@@ -203,9 +218,17 @@ List files being managed
|
|
203
218
|
onclick="toggleCode('M000026-source');return false;">[Source]</a></p>
|
204
219
|
<div class="method-source-code" id="M000026-source">
|
205
220
|
<pre>
|
206
|
-
<span class="ruby-comment cmt"># File lib/pho/rdf_collection.rb, line
|
221
|
+
<span class="ruby-comment cmt"># File lib/pho/rdf_collection.rb, line 29</span>
|
207
222
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">store_file</span>(<span class="ruby-identifier">file</span>, <span class="ruby-identifier">filename</span>)
|
208
|
-
<span class="ruby-identifier">
|
223
|
+
<span class="ruby-identifier">ext</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">extname</span>(<span class="ruby-identifier">filename</span>)
|
224
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">ext</span> <span class="ruby-operator">==</span> <span class="ruby-value str">".ttl"</span>
|
225
|
+
<span class="ruby-identifier">response</span> = <span class="ruby-ivar">@store</span>.<span class="ruby-identifier">store_file</span>(<span class="ruby-identifier">file</span>, <span class="ruby-keyword kw">nil</span>, <span class="ruby-value str">"text/turtle"</span>)
|
226
|
+
<span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">ext</span> <span class="ruby-operator">==</span> <span class="ruby-value str">".nt"</span>
|
227
|
+
<span class="ruby-identifier">response</span> = <span class="ruby-ivar">@store</span>.<span class="ruby-identifier">store_file</span>(<span class="ruby-identifier">file</span>, <span class="ruby-keyword kw">nil</span>, <span class="ruby-value str">"text/turtle"</span>)
|
228
|
+
<span class="ruby-keyword kw">else</span>
|
229
|
+
<span class="ruby-identifier">response</span> = <span class="ruby-ivar">@store</span>.<span class="ruby-identifier">store_file</span>(<span class="ruby-identifier">file</span>)
|
230
|
+
<span class="ruby-keyword kw">end</span>
|
231
|
+
|
209
232
|
<span class="ruby-keyword kw">if</span> (<span class="ruby-identifier">response</span>.<span class="ruby-identifier">status</span> <span class="ruby-operator"><</span> <span class="ruby-value">300</span> )
|
210
233
|
<span class="ruby-constant">File</span>.<span class="ruby-identifier">open</span>(<span class="ruby-identifier">get_ok_file_for</span>(<span class="ruby-identifier">filename</span>), <span class="ruby-value str">"w"</span>) <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">file</span><span class="ruby-operator">|</span>
|
211
234
|
<span class="ruby-identifier">file</span>.<span class="ruby-identifier">print</span>( <span class="ruby-value str">"OK"</span> )
|
@@ -101,16 +101,16 @@ about a specific <a href="Job.html">Job</a> from a platform store
|
|
101
101
|
<h3 class="section-bar">Methods</h3>
|
102
102
|
|
103
103
|
<div class="name-list">
|
104
|
-
<a href="#
|
105
|
-
<a href="#
|
106
|
-
<a href="#
|
107
|
-
<a href="#
|
108
|
-
<a href="#
|
109
|
-
<a href="#
|
110
|
-
<a href="#
|
111
|
-
<a href="#
|
112
|
-
<a href="#
|
113
|
-
<a href="#
|
104
|
+
<a href="#M000198">completed?</a>
|
105
|
+
<a href="#M000193">new</a>
|
106
|
+
<a href="#M000195">parse</a>
|
107
|
+
<a href="#M000196">progress_updates</a>
|
108
|
+
<a href="#M000194">read_from_store</a>
|
109
|
+
<a href="#M000200">running?</a>
|
110
|
+
<a href="#M000197">started?</a>
|
111
|
+
<a href="#M000199">successful?</a>
|
112
|
+
<a href="#M000202">with_each</a>
|
113
|
+
<a href="#M000201">with_first</a>
|
114
114
|
</div>
|
115
115
|
</div>
|
116
116
|
|
@@ -255,11 +255,11 @@ URI of the job
|
|
255
255
|
<div id="methods">
|
256
256
|
<h3 class="section-bar">Public Class methods</h3>
|
257
257
|
|
258
|
-
<div id="method-
|
259
|
-
<a name="
|
258
|
+
<div id="method-M000193" class="method-detail">
|
259
|
+
<a name="M000193"></a>
|
260
260
|
|
261
261
|
<div class="method-heading">
|
262
|
-
<a href="#
|
262
|
+
<a href="#M000193" class="method-signature">
|
263
263
|
<span class="method-name">new</span><span class="method-args">(uri, label, type, start_time, created=nil)</span>
|
264
264
|
</a>
|
265
265
|
</div>
|
@@ -286,8 +286,8 @@ Constructor. Used in the reading/parsing code
|
|
286
286
|
</td></tr>
|
287
287
|
</table>
|
288
288
|
<p><a class="source-toggle" href="#"
|
289
|
-
onclick="toggleCode('
|
290
|
-
<div class="method-source-code" id="
|
289
|
+
onclick="toggleCode('M000193-source');return false;">[Source]</a></p>
|
290
|
+
<div class="method-source-code" id="M000193-source">
|
291
291
|
<pre>
|
292
292
|
<span class="ruby-comment cmt"># File lib/pho/job.rb, line 214</span>
|
293
293
|
<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">type</span>, <span class="ruby-identifier">start_time</span>, <span class="ruby-identifier">created</span>=<span class="ruby-keyword kw">nil</span>)
|
@@ -303,11 +303,11 @@ Constructor. Used in the reading/parsing code
|
|
303
303
|
</div>
|
304
304
|
</div>
|
305
305
|
|
306
|
-
<div id="method-
|
307
|
-
<a name="
|
306
|
+
<div id="method-M000195" class="method-detail">
|
307
|
+
<a name="M000195"></a>
|
308
308
|
|
309
309
|
<div class="method-heading">
|
310
|
-
<a href="#
|
310
|
+
<a href="#M000195" class="method-signature">
|
311
311
|
<span class="method-name">parse</span><span class="method-args">(uri, xml)</span>
|
312
312
|
</a>
|
313
313
|
</div>
|
@@ -327,8 +327,8 @@ href="Job.html">Job</a> instance
|
|
327
327
|
</td></tr>
|
328
328
|
</table>
|
329
329
|
<p><a class="source-toggle" href="#"
|
330
|
-
onclick="toggleCode('
|
331
|
-
<div class="method-source-code" id="
|
330
|
+
onclick="toggleCode('M000195-source');return false;">[Source]</a></p>
|
331
|
+
<div class="method-source-code" id="M000195-source">
|
332
332
|
<pre>
|
333
333
|
<span class="ruby-comment cmt"># File lib/pho/job.rb, line 241</span>
|
334
334
|
<span class="ruby-keyword kw">def</span> <span class="ruby-constant">Job</span>.<span class="ruby-identifier">parse</span>(<span class="ruby-identifier">uri</span>, <span class="ruby-identifier">xml</span>)
|
@@ -385,11 +385,11 @@ href="Job.html">Job</a> instance
|
|
385
385
|
</div>
|
386
386
|
</div>
|
387
387
|
|
388
|
-
<div id="method-
|
389
|
-
<a name="
|
388
|
+
<div id="method-M000194" class="method-detail">
|
389
|
+
<a name="M000194"></a>
|
390
390
|
|
391
391
|
<div class="method-heading">
|
392
|
-
<a href="#
|
392
|
+
<a href="#M000194" class="method-signature">
|
393
393
|
<span class="method-name">read_from_store</span><span class="method-args">(uri, store)</span>
|
394
394
|
</a>
|
395
395
|
</div>
|
@@ -407,8 +407,8 @@ Read a job from a store
|
|
407
407
|
</td></tr>
|
408
408
|
</table>
|
409
409
|
<p><a class="source-toggle" href="#"
|
410
|
-
onclick="toggleCode('
|
411
|
-
<div class="method-source-code" id="
|
410
|
+
onclick="toggleCode('M000194-source');return false;">[Source]</a></p>
|
411
|
+
<div class="method-source-code" id="M000194-source">
|
412
412
|
<pre>
|
413
413
|
<span class="ruby-comment cmt"># File lib/pho/job.rb, line 227</span>
|
414
414
|
<span class="ruby-keyword kw">def</span> <span class="ruby-constant">Job</span>.<span class="ruby-identifier">read_from_store</span>(<span class="ruby-identifier">uri</span>, <span class="ruby-identifier">store</span>)
|
@@ -426,19 +426,19 @@ Read a job from a store
|
|
426
426
|
|
427
427
|
<h3 class="section-bar">Protected Class methods</h3>
|
428
428
|
|
429
|
-
<div id="method-
|
430
|
-
<a name="
|
429
|
+
<div id="method-M000202" class="method-detail">
|
430
|
+
<a name="M000202"></a>
|
431
431
|
|
432
432
|
<div class="method-heading">
|
433
|
-
<a href="#
|
433
|
+
<a href="#M000202" class="method-signature">
|
434
434
|
<span class="method-name">with_each</span><span class="method-args">(el, xpath) {|ref_el| ...}</span>
|
435
435
|
</a>
|
436
436
|
</div>
|
437
437
|
|
438
438
|
<div class="method-description">
|
439
439
|
<p><a class="source-toggle" href="#"
|
440
|
-
onclick="toggleCode('
|
441
|
-
<div class="method-source-code" id="
|
440
|
+
onclick="toggleCode('M000202-source');return false;">[Source]</a></p>
|
441
|
+
<div class="method-source-code" id="M000202-source">
|
442
442
|
<pre>
|
443
443
|
<span class="ruby-comment cmt"># File lib/pho/job.rb, line 327</span>
|
444
444
|
<span class="ruby-keyword kw">def</span> <span class="ruby-constant">Job</span>.<span class="ruby-identifier">with_each</span>(<span class="ruby-identifier">el</span>, <span class="ruby-identifier">xpath</span>)
|
@@ -454,19 +454,19 @@ Read a job from a store
|
|
454
454
|
</div>
|
455
455
|
</div>
|
456
456
|
|
457
|
-
<div id="method-
|
458
|
-
<a name="
|
457
|
+
<div id="method-M000201" class="method-detail">
|
458
|
+
<a name="M000201"></a>
|
459
459
|
|
460
460
|
<div class="method-heading">
|
461
|
-
<a href="#
|
461
|
+
<a href="#M000201" class="method-signature">
|
462
462
|
<span class="method-name">with_first</span><span class="method-args">(el, xpath) {|found_el| ...}</span>
|
463
463
|
</a>
|
464
464
|
</div>
|
465
465
|
|
466
466
|
<div class="method-description">
|
467
467
|
<p><a class="source-toggle" href="#"
|
468
|
-
onclick="toggleCode('
|
469
|
-
<div class="method-source-code" id="
|
468
|
+
onclick="toggleCode('M000201-source');return false;">[Source]</a></p>
|
469
|
+
<div class="method-source-code" id="M000201-source">
|
470
470
|
<pre>
|
471
471
|
<span class="ruby-comment cmt"># File lib/pho/job.rb, line 320</span>
|
472
472
|
<span class="ruby-keyword kw">def</span> <span class="ruby-constant">Job</span>.<span class="ruby-identifier">with_first</span>(<span class="ruby-identifier">el</span>, <span class="ruby-identifier">xpath</span>)
|
@@ -482,22 +482,22 @@ Read a job from a store
|
|
482
482
|
|
483
483
|
<h3 class="section-bar">Public Instance methods</h3>
|
484
484
|
|
485
|
-
<div id="method-
|
486
|
-
<a name="
|
485
|
+
<div id="method-M000198" class="method-detail">
|
486
|
+
<a name="M000198"></a>
|
487
487
|
|
488
488
|
<div class="method-heading">
|
489
|
-
<a href="#
|
489
|
+
<a href="#M000198" class="method-signature">
|
490
490
|
<span class="method-name">completed?</span><span class="method-args">()</span>
|
491
491
|
</a>
|
492
492
|
</div>
|
493
493
|
|
494
494
|
<div class="method-description">
|
495
495
|
<p>
|
496
|
-
Has the job <a href="Job.html#
|
496
|
+
Has the job <a href="Job.html#M000198">completed?</a>
|
497
497
|
</p>
|
498
498
|
<p><a class="source-toggle" href="#"
|
499
|
-
onclick="toggleCode('
|
500
|
-
<div class="method-source-code" id="
|
499
|
+
onclick="toggleCode('M000198-source');return false;">[Source]</a></p>
|
500
|
+
<div class="method-source-code" id="M000198-source">
|
501
501
|
<pre>
|
502
502
|
<span class="ruby-comment cmt"># File lib/pho/job.rb, line 304</span>
|
503
503
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">completed?</span>
|
@@ -508,19 +508,19 @@ Has the job <a href="Job.html#M000186">completed?</a>
|
|
508
508
|
</div>
|
509
509
|
</div>
|
510
510
|
|
511
|
-
<div id="method-
|
512
|
-
<a name="
|
511
|
+
<div id="method-M000196" class="method-detail">
|
512
|
+
<a name="M000196"></a>
|
513
513
|
|
514
514
|
<div class="method-heading">
|
515
|
-
<a href="#
|
515
|
+
<a href="#M000196" class="method-signature">
|
516
516
|
<span class="method-name">progress_updates</span><span class="method-args">()</span>
|
517
517
|
</a>
|
518
518
|
</div>
|
519
519
|
|
520
520
|
<div class="method-description">
|
521
521
|
<p><a class="source-toggle" href="#"
|
522
|
-
onclick="toggleCode('
|
523
|
-
<div class="method-source-code" id="
|
522
|
+
onclick="toggleCode('M000196-source');return false;">[Source]</a></p>
|
523
|
+
<div class="method-source-code" id="M000196-source">
|
524
524
|
<pre>
|
525
525
|
<span class="ruby-comment cmt"># File lib/pho/job.rb, line 291</span>
|
526
526
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">progress_updates</span>()
|
@@ -534,22 +534,22 @@ Has the job <a href="Job.html#M000186">completed?</a>
|
|
534
534
|
</div>
|
535
535
|
</div>
|
536
536
|
|
537
|
-
<div id="method-
|
538
|
-
<a name="
|
537
|
+
<div id="method-M000200" class="method-detail">
|
538
|
+
<a name="M000200"></a>
|
539
539
|
|
540
540
|
<div class="method-heading">
|
541
|
-
<a href="#
|
541
|
+
<a href="#M000200" class="method-signature">
|
542
542
|
<span class="method-name">running?</span><span class="method-args">()</span>
|
543
543
|
</a>
|
544
544
|
</div>
|
545
545
|
|
546
546
|
<div class="method-description">
|
547
547
|
<p>
|
548
|
-
Is the job still <a href="Job.html#
|
548
|
+
Is the job still <a href="Job.html#M000200">running?</a>
|
549
549
|
</p>
|
550
550
|
<p><a class="source-toggle" href="#"
|
551
|
-
onclick="toggleCode('
|
552
|
-
<div class="method-source-code" id="
|
551
|
+
onclick="toggleCode('M000200-source');return false;">[Source]</a></p>
|
552
|
+
<div class="method-source-code" id="M000200-source">
|
553
553
|
<pre>
|
554
554
|
<span class="ruby-comment cmt"># File lib/pho/job.rb, line 314</span>
|
555
555
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">running?</span>
|
@@ -560,22 +560,22 @@ Is the job still <a href="Job.html#M000188">running?</a>
|
|
560
560
|
</div>
|
561
561
|
</div>
|
562
562
|
|
563
|
-
<div id="method-
|
564
|
-
<a name="
|
563
|
+
<div id="method-M000197" class="method-detail">
|
564
|
+
<a name="M000197"></a>
|
565
565
|
|
566
566
|
<div class="method-heading">
|
567
|
-
<a href="#
|
567
|
+
<a href="#M000197" class="method-signature">
|
568
568
|
<span class="method-name">started?</span><span class="method-args">()</span>
|
569
569
|
</a>
|
570
570
|
</div>
|
571
571
|
|
572
572
|
<div class="method-description">
|
573
573
|
<p>
|
574
|
-
Has the job <a href="Job.html#
|
574
|
+
Has the job <a href="Job.html#M000197">started?</a>
|
575
575
|
</p>
|
576
576
|
<p><a class="source-toggle" href="#"
|
577
|
-
onclick="toggleCode('
|
578
|
-
<div class="method-source-code" id="
|
577
|
+
onclick="toggleCode('M000197-source');return false;">[Source]</a></p>
|
578
|
+
<div class="method-source-code" id="M000197-source">
|
579
579
|
<pre>
|
580
580
|
<span class="ruby-comment cmt"># File lib/pho/job.rb, line 299</span>
|
581
581
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">started?</span>
|
@@ -586,22 +586,22 @@ Has the job <a href="Job.html#M000185">started?</a>
|
|
586
586
|
</div>
|
587
587
|
</div>
|
588
588
|
|
589
|
-
<div id="method-
|
590
|
-
<a name="
|
589
|
+
<div id="method-M000199" class="method-detail">
|
590
|
+
<a name="M000199"></a>
|
591
591
|
|
592
592
|
<div class="method-heading">
|
593
|
-
<a href="#
|
593
|
+
<a href="#M000199" class="method-signature">
|
594
594
|
<span class="method-name">successful?</span><span class="method-args">()</span>
|
595
595
|
</a>
|
596
596
|
</div>
|
597
597
|
|
598
598
|
<div class="method-description">
|
599
599
|
<p>
|
600
|
-
Was the job <a href="Job.html#
|
600
|
+
Was the job <a href="Job.html#M000199">successful?</a>
|
601
601
|
</p>
|
602
602
|
<p><a class="source-toggle" href="#"
|
603
|
-
onclick="toggleCode('
|
604
|
-
<div class="method-source-code" id="
|
603
|
+
onclick="toggleCode('M000199-source');return false;">[Source]</a></p>
|
604
|
+
<div class="method-source-code" id="M000199-source">
|
605
605
|
<pre>
|
606
606
|
<span class="ruby-comment cmt"># File lib/pho/job.rb, line 309</span>
|
607
607
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">successful?</span>
|
@@ -92,16 +92,16 @@ TODO job deletion
|
|
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="#
|
101
|
-
<a href="#
|
102
|
-
<a href="#
|
103
|
-
<a href="#
|
104
|
-
<a href="#
|
95
|
+
<a href="#M000146">build_job_request</a>
|
96
|
+
<a href="#M000140">read_from_store</a>
|
97
|
+
<a href="#M000145">submit_job</a>
|
98
|
+
<a href="#M000142">submit_reindex</a>
|
99
|
+
<a href="#M000141">submit_reset</a>
|
100
|
+
<a href="#M000144">submit_restore</a>
|
101
|
+
<a href="#M000143">submit_snapshot</a>
|
102
|
+
<a href="#M000148">wait_for</a>
|
103
|
+
<a href="#M000147">wait_for_submitted</a>
|
104
|
+
<a href="#M000149">yield_job_update</a>
|
105
105
|
</div>
|
106
106
|
</div>
|
107
107
|
|
@@ -151,11 +151,11 @@ TODO job deletion
|
|
151
151
|
<div id="methods">
|
152
152
|
<h3 class="section-bar">Public Class methods</h3>
|
153
153
|
|
154
|
-
<div id="method-
|
155
|
-
<a name="
|
154
|
+
<div id="method-M000146" class="method-detail">
|
155
|
+
<a name="M000146"></a>
|
156
156
|
|
157
157
|
<div class="method-heading">
|
158
|
-
<a href="#
|
158
|
+
<a href="#M000146" class="method-signature">
|
159
159
|
<span class="method-name">build_job_request</span><span class="method-args">(type, label, t=Time.now, snapshot_uri=nil)</span>
|
160
160
|
</a>
|
161
161
|
</div>
|
@@ -172,8 +172,8 @@ out
|
|
172
172
|
</td></tr>
|
173
173
|
</table>
|
174
174
|
<p><a class="source-toggle" href="#"
|
175
|
-
onclick="toggleCode('
|
176
|
-
<div class="method-source-code" id="
|
175
|
+
onclick="toggleCode('M000146-source');return false;">[Source]</a></p>
|
176
|
+
<div class="method-source-code" id="M000146-source">
|
177
177
|
<pre>
|
178
178
|
<span class="ruby-comment cmt"># File lib/pho/job.rb, line 79</span>
|
179
179
|
<span class="ruby-keyword kw">def</span> <span class="ruby-constant">Jobs</span>.<span class="ruby-identifier">build_job_request</span>(<span class="ruby-identifier">type</span>, <span class="ruby-identifier">label</span>, <span class="ruby-identifier">t</span>=<span class="ruby-constant">Time</span>.<span class="ruby-identifier">now</span>, <span class="ruby-identifier">snapshot_uri</span>=<span class="ruby-keyword kw">nil</span>)
|
@@ -200,11 +200,11 @@ out
|
|
200
200
|
</div>
|
201
201
|
</div>
|
202
202
|
|
203
|
-
<div id="method-
|
204
|
-
<a name="
|
203
|
+
<div id="method-M000140" class="method-detail">
|
204
|
+
<a name="M000140"></a>
|
205
205
|
|
206
206
|
<div class="method-heading">
|
207
|
-
<a href="#
|
207
|
+
<a href="#M000140" class="method-signature">
|
208
208
|
<span class="method-name">read_from_store</span><span class="method-args">(store)</span>
|
209
209
|
</a>
|
210
210
|
</div>
|
@@ -218,8 +218,8 @@ an array of job names
|
|
218
218
|
store:: store from which to read the scheduled job list
|
219
219
|
</pre>
|
220
220
|
<p><a class="source-toggle" href="#"
|
221
|
-
onclick="toggleCode('
|
222
|
-
<div class="method-source-code" id="
|
221
|
+
onclick="toggleCode('M000140-source');return false;">[Source]</a></p>
|
222
|
+
<div class="method-source-code" id="M000140-source">
|
223
223
|
<pre>
|
224
224
|
<span class="ruby-comment cmt"># File lib/pho/job.rb, line 16</span>
|
225
225
|
<span class="ruby-keyword kw">def</span> <span class="ruby-constant">Jobs</span>.<span class="ruby-identifier">read_from_store</span>(<span class="ruby-identifier">store</span>)
|
@@ -241,11 +241,11 @@ an array of job names
|
|
241
241
|
</div>
|
242
242
|
</div>
|
243
243
|
|
244
|
-
<div id="method-
|
245
|
-
<a name="
|
244
|
+
<div id="method-M000145" class="method-detail">
|
245
|
+
<a name="M000145"></a>
|
246
246
|
|
247
247
|
<div class="method-heading">
|
248
|
-
<a href="#
|
248
|
+
<a href="#M000145" class="method-signature">
|
249
249
|
<span class="method-name">submit_job</span><span class="method-args">(store, jobtype, label, t=Time.now, snapshot_uri=nil)</span>
|
250
250
|
</a>
|
251
251
|
</div>
|
@@ -255,8 +255,8 @@ an array of job names
|
|
255
255
|
Generic submit job method
|
256
256
|
</p>
|
257
257
|
<p><a class="source-toggle" href="#"
|
258
|
-
onclick="toggleCode('
|
259
|
-
<div class="method-source-code" id="
|
258
|
+
onclick="toggleCode('M000145-source');return false;">[Source]</a></p>
|
259
|
+
<div class="method-source-code" id="M000145-source">
|
260
260
|
<pre>
|
261
261
|
<span class="ruby-comment cmt"># File lib/pho/job.rb, line 72</span>
|
262
262
|
<span class="ruby-keyword kw">def</span> <span class="ruby-constant">Jobs</span>.<span class="ruby-identifier">submit_job</span>(<span class="ruby-identifier">store</span>, <span class="ruby-identifier">jobtype</span>, <span class="ruby-identifier">label</span>, <span class="ruby-identifier">t</span>=<span class="ruby-constant">Time</span>.<span class="ruby-identifier">now</span>, <span class="ruby-identifier">snapshot_uri</span>=<span class="ruby-keyword kw">nil</span>)
|
@@ -267,11 +267,11 @@ Generic submit job method
|
|
267
267
|
</div>
|
268
268
|
</div>
|
269
269
|
|
270
|
-
<div id="method-
|
271
|
-
<a name="
|
270
|
+
<div id="method-M000142" class="method-detail">
|
271
|
+
<a name="M000142"></a>
|
272
272
|
|
273
273
|
<div class="method-heading">
|
274
|
-
<a href="#
|
274
|
+
<a href="#M000142" class="method-signature">
|
275
275
|
<span class="method-name">submit_reindex</span><span class="method-args">(store, label="Reindex my store", t=Time.now)</span>
|
276
276
|
</a>
|
277
277
|
</div>
|
@@ -288,8 +288,8 @@ the newly created job and then monitor the jobs status if they need to wait
|
|
288
288
|
for the job to finish.
|
289
289
|
</p>
|
290
290
|
<p><a class="source-toggle" href="#"
|
291
|
-
onclick="toggleCode('
|
292
|
-
<div class="method-source-code" id="
|
291
|
+
onclick="toggleCode('M000142-source');return false;">[Source]</a></p>
|
292
|
+
<div class="method-source-code" id="M000142-source">
|
293
293
|
<pre>
|
294
294
|
<span class="ruby-comment cmt"># File lib/pho/job.rb, line 47</span>
|
295
295
|
<span class="ruby-keyword kw">def</span> <span class="ruby-constant">Jobs</span>.<span class="ruby-identifier">submit_reindex</span>(<span class="ruby-identifier">store</span>, <span class="ruby-identifier">label</span>=<span class="ruby-value str">"Reindex my store"</span>, <span class="ruby-identifier">t</span>=<span class="ruby-constant">Time</span>.<span class="ruby-identifier">now</span>)
|
@@ -300,11 +300,11 @@ for the job to finish.
|
|
300
300
|
</div>
|
301
301
|
</div>
|
302
302
|
|
303
|
-
<div id="method-
|
304
|
-
<a name="
|
303
|
+
<div id="method-M000141" class="method-detail">
|
304
|
+
<a name="M000141"></a>
|
305
305
|
|
306
306
|
<div class="method-heading">
|
307
|
-
<a href="#
|
307
|
+
<a href="#M000141" class="method-signature">
|
308
308
|
<span class="method-name">submit_reset</span><span class="method-args">(store, label="Reset my store", t=Time.now)</span>
|
309
309
|
</a>
|
310
310
|
</div>
|
@@ -321,8 +321,8 @@ the newly created job and then monitor the jobs status if they need to wait
|
|
321
321
|
for the job to finish.
|
322
322
|
</p>
|
323
323
|
<p><a class="source-toggle" href="#"
|
324
|
-
onclick="toggleCode('
|
325
|
-
<div class="method-source-code" id="
|
324
|
+
onclick="toggleCode('M000141-source');return false;">[Source]</a></p>
|
325
|
+
<div class="method-source-code" id="M000141-source">
|
326
326
|
<pre>
|
327
327
|
<span class="ruby-comment cmt"># File lib/pho/job.rb, line 37</span>
|
328
328
|
<span class="ruby-keyword kw">def</span> <span class="ruby-constant">Jobs</span>.<span class="ruby-identifier">submit_reset</span>(<span class="ruby-identifier">store</span>, <span class="ruby-identifier">label</span>=<span class="ruby-value str">"Reset my store"</span>, <span class="ruby-identifier">t</span>=<span class="ruby-constant">Time</span>.<span class="ruby-identifier">now</span>)
|
@@ -333,11 +333,11 @@ for the job to finish.
|
|
333
333
|
</div>
|
334
334
|
</div>
|
335
335
|
|
336
|
-
<div id="method-
|
337
|
-
<a name="
|
336
|
+
<div id="method-M000144" class="method-detail">
|
337
|
+
<a name="M000144"></a>
|
338
338
|
|
339
339
|
<div class="method-heading">
|
340
|
-
<a href="#
|
340
|
+
<a href="#M000144" class="method-signature">
|
341
341
|
<span class="method-name">submit_restore</span><span class="method-args">(store, snapshot_uri, label="Restore my snapshot", t=Time.now)</span>
|
342
342
|
</a>
|
343
343
|
</div>
|
@@ -354,8 +354,8 @@ the newly created job and then monitor the jobs status if they need to wait
|
|
354
354
|
for the job to finish.
|
355
355
|
</p>
|
356
356
|
<p><a class="source-toggle" href="#"
|
357
|
-
onclick="toggleCode('
|
358
|
-
<div class="method-source-code" id="
|
357
|
+
onclick="toggleCode('M000144-source');return false;">[Source]</a></p>
|
358
|
+
<div class="method-source-code" id="M000144-source">
|
359
359
|
<pre>
|
360
360
|
<span class="ruby-comment cmt"># File lib/pho/job.rb, line 67</span>
|
361
361
|
<span class="ruby-keyword kw">def</span> <span class="ruby-constant">Jobs</span>.<span class="ruby-identifier">submit_restore</span>(<span class="ruby-identifier">store</span>, <span class="ruby-identifier">snapshot_uri</span>, <span class="ruby-identifier">label</span>=<span class="ruby-value str">"Restore my snapshot"</span>, <span class="ruby-identifier">t</span>=<span class="ruby-constant">Time</span>.<span class="ruby-identifier">now</span>)
|
@@ -366,11 +366,11 @@ for the job to finish.
|
|
366
366
|
</div>
|
367
367
|
</div>
|
368
368
|
|
369
|
-
<div id="method-
|
370
|
-
<a name="
|
369
|
+
<div id="method-M000143" class="method-detail">
|
370
|
+
<a name="M000143"></a>
|
371
371
|
|
372
372
|
<div class="method-heading">
|
373
|
-
<a href="#
|
373
|
+
<a href="#M000143" class="method-signature">
|
374
374
|
<span class="method-name">submit_snapshot</span><span class="method-args">(store, label="Snapshot my store", t=Time.now)</span>
|
375
375
|
</a>
|
376
376
|
</div>
|
@@ -387,8 +387,8 @@ the newly created job and then monitor the jobs status if they need to wait
|
|
387
387
|
for the job to finish.
|
388
388
|
</p>
|
389
389
|
<p><a class="source-toggle" href="#"
|
390
|
-
onclick="toggleCode('
|
391
|
-
<div class="method-source-code" id="
|
390
|
+
onclick="toggleCode('M000143-source');return false;">[Source]</a></p>
|
391
|
+
<div class="method-source-code" id="M000143-source">
|
392
392
|
<pre>
|
393
393
|
<span class="ruby-comment cmt"># File lib/pho/job.rb, line 57</span>
|
394
394
|
<span class="ruby-keyword kw">def</span> <span class="ruby-constant">Jobs</span>.<span class="ruby-identifier">submit_snapshot</span>(<span class="ruby-identifier">store</span>, <span class="ruby-identifier">label</span>=<span class="ruby-value str">"Snapshot my store"</span>, <span class="ruby-identifier">t</span>=<span class="ruby-constant">Time</span>.<span class="ruby-identifier">now</span>)
|
@@ -399,11 +399,11 @@ for the job to finish.
|
|
399
399
|
</div>
|
400
400
|
</div>
|
401
401
|
|
402
|
-
<div id="method-
|
403
|
-
<a name="
|
402
|
+
<div id="method-M000148" class="method-detail">
|
403
|
+
<a name="M000148"></a>
|
404
404
|
|
405
405
|
<div class="method-heading">
|
406
|
-
<a href="#
|
406
|
+
<a href="#M000148" class="method-signature">
|
407
407
|
<span class="method-name">wait_for</span><span class="method-args">(uri, store, interval=1, &block)</span>
|
408
408
|
</a>
|
409
409
|
</div>
|
@@ -426,8 +426,8 @@ returned once completed.
|
|
426
426
|
interval:: the interval at which checks will be made, in minutes. Default is 1
|
427
427
|
</pre>
|
428
428
|
<p><a class="source-toggle" href="#"
|
429
|
-
onclick="toggleCode('
|
430
|
-
<div class="method-source-code" id="
|
429
|
+
onclick="toggleCode('M000148-source');return false;">[Source]</a></p>
|
430
|
+
<div class="method-source-code" id="M000148-source">
|
431
431
|
<pre>
|
432
432
|
<span class="ruby-comment cmt"># File lib/pho/job.rb, line 118</span>
|
433
433
|
<span class="ruby-keyword kw">def</span> <span class="ruby-constant">Jobs</span>.<span class="ruby-identifier">wait_for</span>(<span class="ruby-identifier">uri</span>, <span class="ruby-identifier">store</span>, <span class="ruby-identifier">interval</span>=<span class="ruby-value">1</span>, <span class="ruby-operator">&</span><span class="ruby-identifier">block</span>)
|
@@ -446,11 +446,11 @@ returned once completed.
|
|
446
446
|
</div>
|
447
447
|
</div>
|
448
448
|
|
449
|
-
<div id="method-
|
450
|
-
<a name="
|
449
|
+
<div id="method-M000147" class="method-detail">
|
450
|
+
<a name="M000147"></a>
|
451
451
|
|
452
452
|
<div class="method-heading">
|
453
|
-
<a href="#
|
453
|
+
<a href="#M000147" class="method-signature">
|
454
454
|
<span class="method-name">wait_for_submitted</span><span class="method-args">(resp, store, interval=1, &block)</span>
|
455
455
|
</a>
|
456
456
|
</div>
|
@@ -460,8 +460,8 @@ returned once completed.
|
|
460
460
|
Wait for a newly submitted job to finish
|
461
461
|
</p>
|
462
462
|
<p><a class="source-toggle" href="#"
|
463
|
-
onclick="toggleCode('
|
464
|
-
<div class="method-source-code" id="
|
463
|
+
onclick="toggleCode('M000147-source');return false;">[Source]</a></p>
|
464
|
+
<div class="method-source-code" id="M000147-source">
|
465
465
|
<pre>
|
466
466
|
<span class="ruby-comment cmt"># File lib/pho/job.rb, line 100</span>
|
467
467
|
<span class="ruby-keyword kw">def</span> <span class="ruby-constant">Jobs</span>.<span class="ruby-identifier">wait_for_submitted</span>(<span class="ruby-identifier">resp</span>, <span class="ruby-identifier">store</span>, <span class="ruby-identifier">interval</span>=<span class="ruby-value">1</span>, <span class="ruby-operator">&</span><span class="ruby-identifier">block</span>)
|
@@ -478,19 +478,19 @@ Wait for a newly submitted job to finish
|
|
478
478
|
|
479
479
|
<h3 class="section-bar">Protected Class methods</h3>
|
480
480
|
|
481
|
-
<div id="method-
|
482
|
-
<a name="
|
481
|
+
<div id="method-M000149" class="method-detail">
|
482
|
+
<a name="M000149"></a>
|
483
483
|
|
484
484
|
<div class="method-heading">
|
485
|
-
<a href="#
|
485
|
+
<a href="#M000149" class="method-signature">
|
486
486
|
<span class="method-name">yield_job_update</span><span class="method-args">(job, updates) {|job, job.start_message, job.actual_start_time| ...}</span>
|
487
487
|
</a>
|
488
488
|
</div>
|
489
489
|
|
490
490
|
<div class="method-description">
|
491
491
|
<p><a class="source-toggle" href="#"
|
492
|
-
onclick="toggleCode('
|
493
|
-
<div class="method-source-code" id="
|
492
|
+
onclick="toggleCode('M000149-source');return false;">[Source]</a></p>
|
493
|
+
<div class="method-source-code" id="M000149-source">
|
494
494
|
<pre>
|
495
495
|
<span class="ruby-comment cmt"># File lib/pho/job.rb, line 132</span>
|
496
496
|
<span class="ruby-keyword kw">def</span> <span class="ruby-constant">Jobs</span>.<span class="ruby-identifier">yield_job_update</span>(<span class="ruby-identifier">job</span>, <span class="ruby-identifier">updates</span>)
|