pho 0.3 → 0.4
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 +9 -0
- data/Rakefile +2 -1
- data/bin/talis_store +263 -0
- data/doc/rdoc/classes/Pho.html +3 -21
- data/doc/rdoc/classes/Pho/Analyzers.html +22 -0
- data/doc/rdoc/classes/Pho/DatatypeProperty.html +42 -10
- data/doc/rdoc/classes/Pho/Etags.html +102 -30
- data/doc/rdoc/classes/Pho/Facet/Results.html +81 -7
- data/doc/rdoc/classes/Pho/Facet/Term.html +13 -2
- data/doc/rdoc/classes/Pho/FieldPredicateMap.html +233 -30
- data/doc/rdoc/classes/Pho/FieldWeighting.html +38 -10
- data/doc/rdoc/classes/Pho/Job.html +488 -9
- data/doc/rdoc/classes/Pho/JobUpdate.html +141 -0
- data/doc/rdoc/classes/Pho/Jobs.html +538 -0
- data/doc/rdoc/classes/Pho/Namespaces.html +33 -2
- data/doc/rdoc/classes/Pho/QueryProfile.html +162 -20
- data/doc/rdoc/classes/Pho/RDFCollection.html +200 -60
- data/doc/rdoc/classes/Pho/Snapshot.html +162 -36
- data/doc/rdoc/classes/Pho/Status.html +59 -8
- data/doc/rdoc/classes/Pho/Store.html +589 -253
- data/doc/rdoc/created.rid +1 -1
- data/doc/rdoc/files/CHANGES.html +24 -1
- data/doc/rdoc/files/lib/pho/field_predicate_map_rb.html +1 -1
- data/doc/rdoc/files/lib/pho/job_rb.html +1 -1
- data/doc/rdoc/files/lib/pho/snapshot_rb.html +2 -1
- data/doc/rdoc/files/lib/pho/status_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 +2 -0
- data/doc/rdoc/fr_method_index.html +85 -68
- data/lib/pho.rb +18 -10
- data/lib/pho/field_predicate_map.rb +6 -1
- data/lib/pho/job.rb +326 -6
- data/lib/pho/snapshot.rb +46 -19
- data/lib/pho/store.rb +22 -56
- data/tests/tc_job.rb +262 -0
- data/tests/tc_jobcontrol.rb +159 -12
- data/tests/tc_snapshots.rb +57 -28
- data/tests/ts_pho.rb +1 -0
- metadata +9 -110
- data/doc/rdoc/classes/Pho/DatatypeProperty.src/M000034.html +0 -21
- data/doc/rdoc/classes/Pho/DatatypeProperty.src/M000035.html +0 -29
- data/doc/rdoc/classes/Pho/Etags.src/M000088.html +0 -23
- data/doc/rdoc/classes/Pho/Etags.src/M000089.html +0 -28
- data/doc/rdoc/classes/Pho/Etags.src/M000090.html +0 -21
- data/doc/rdoc/classes/Pho/Etags.src/M000091.html +0 -18
- data/doc/rdoc/classes/Pho/Etags.src/M000092.html +0 -18
- data/doc/rdoc/classes/Pho/Etags.src/M000093.html +0 -18
- data/doc/rdoc/classes/Pho/Facet/Results.src/M000001.html +0 -20
- data/doc/rdoc/classes/Pho/Facet/Results.src/M000002.html +0 -27
- data/doc/rdoc/classes/Pho/Facet/Results.src/M000003.html +0 -54
- data/doc/rdoc/classes/Pho/Facet/Term.src/M000004.html +0 -20
- data/doc/rdoc/classes/Pho/FieldPredicateMap.src/M000005.html +0 -38
- data/doc/rdoc/classes/Pho/FieldPredicateMap.src/M000006.html +0 -28
- data/doc/rdoc/classes/Pho/FieldPredicateMap.src/M000007.html +0 -20
- data/doc/rdoc/classes/Pho/FieldPredicateMap.src/M000008.html +0 -18
- data/doc/rdoc/classes/Pho/FieldPredicateMap.src/M000009.html +0 -23
- data/doc/rdoc/classes/Pho/FieldPredicateMap.src/M000010.html +0 -23
- data/doc/rdoc/classes/Pho/FieldPredicateMap.src/M000011.html +0 -18
- data/doc/rdoc/classes/Pho/FieldPredicateMap.src/M000012.html +0 -18
- data/doc/rdoc/classes/Pho/FieldPredicateMap.src/M000013.html +0 -18
- data/doc/rdoc/classes/Pho/FieldPredicateMap.src/M000014.html +0 -18
- data/doc/rdoc/classes/Pho/FieldPredicateMap.src/M000015.html +0 -18
- data/doc/rdoc/classes/Pho/FieldPredicateMap.src/M000016.html +0 -21
- data/doc/rdoc/classes/Pho/FieldPredicateMap.src/M000017.html +0 -21
- data/doc/rdoc/classes/Pho/FieldPredicateMap.src/M000018.html +0 -38
- data/doc/rdoc/classes/Pho/FieldPredicateMap.src/M000019.html +0 -18
- data/doc/rdoc/classes/Pho/FieldWeighting.src/M000075.html +0 -20
- data/doc/rdoc/classes/Pho/FieldWeighting.src/M000076.html +0 -26
- data/doc/rdoc/classes/Pho/Job.src/M000074.html +0 -21
- data/doc/rdoc/classes/Pho/QueryProfile.src/M000024.html +0 -39
- data/doc/rdoc/classes/Pho/QueryProfile.src/M000025.html +0 -24
- data/doc/rdoc/classes/Pho/QueryProfile.src/M000026.html +0 -20
- data/doc/rdoc/classes/Pho/QueryProfile.src/M000027.html +0 -18
- data/doc/rdoc/classes/Pho/QueryProfile.src/M000028.html +0 -18
- data/doc/rdoc/classes/Pho/QueryProfile.src/M000029.html +0 -21
- data/doc/rdoc/classes/Pho/QueryProfile.src/M000030.html +0 -18
- data/doc/rdoc/classes/Pho/QueryProfile.src/M000031.html +0 -18
- data/doc/rdoc/classes/Pho/QueryProfile.src/M000032.html +0 -38
- data/doc/rdoc/classes/Pho/QueryProfile.src/M000033.html +0 -18
- data/doc/rdoc/classes/Pho/RDFCollection.src/M000077.html +0 -23
- data/doc/rdoc/classes/Pho/RDFCollection.src/M000078.html +0 -22
- data/doc/rdoc/classes/Pho/RDFCollection.src/M000079.html +0 -24
- data/doc/rdoc/classes/Pho/RDFCollection.src/M000080.html +0 -23
- data/doc/rdoc/classes/Pho/RDFCollection.src/M000081.html +0 -18
- data/doc/rdoc/classes/Pho/RDFCollection.src/M000082.html +0 -22
- data/doc/rdoc/classes/Pho/RDFCollection.src/M000083.html +0 -22
- data/doc/rdoc/classes/Pho/RDFCollection.src/M000084.html +0 -26
- data/doc/rdoc/classes/Pho/RDFCollection.src/M000085.html +0 -23
- data/doc/rdoc/classes/Pho/RDFCollection.src/M000086.html +0 -18
- data/doc/rdoc/classes/Pho/RDFCollection.src/M000087.html +0 -18
- data/doc/rdoc/classes/Pho/Snapshot.src/M000070.html +0 -31
- data/doc/rdoc/classes/Pho/Snapshot.src/M000071.html +0 -21
- data/doc/rdoc/classes/Pho/Snapshot.src/M000072.html +0 -18
- data/doc/rdoc/classes/Pho/Snapshot.src/M000073.html +0 -37
- data/doc/rdoc/classes/Pho/Status.src/M000020.html +0 -20
- data/doc/rdoc/classes/Pho/Status.src/M000021.html +0 -31
- data/doc/rdoc/classes/Pho/Status.src/M000022.html +0 -18
- data/doc/rdoc/classes/Pho/Status.src/M000023.html +0 -18
- data/doc/rdoc/classes/Pho/Store.src/M000036.html +0 -22
- data/doc/rdoc/classes/Pho/Store.src/M000037.html +0 -18
- data/doc/rdoc/classes/Pho/Store.src/M000038.html +0 -25
- data/doc/rdoc/classes/Pho/Store.src/M000039.html +0 -20
- data/doc/rdoc/classes/Pho/Store.src/M000040.html +0 -20
- data/doc/rdoc/classes/Pho/Store.src/M000041.html +0 -28
- data/doc/rdoc/classes/Pho/Store.src/M000042.html +0 -23
- data/doc/rdoc/classes/Pho/Store.src/M000043.html +0 -18
- data/doc/rdoc/classes/Pho/Store.src/M000044.html +0 -18
- data/doc/rdoc/classes/Pho/Store.src/M000045.html +0 -18
- data/doc/rdoc/classes/Pho/Store.src/M000046.html +0 -18
- data/doc/rdoc/classes/Pho/Store.src/M000047.html +0 -23
- data/doc/rdoc/classes/Pho/Store.src/M000048.html +0 -22
- data/doc/rdoc/classes/Pho/Store.src/M000049.html +0 -26
- data/doc/rdoc/classes/Pho/Store.src/M000050.html +0 -24
- data/doc/rdoc/classes/Pho/Store.src/M000051.html +0 -20
- data/doc/rdoc/classes/Pho/Store.src/M000052.html +0 -20
- data/doc/rdoc/classes/Pho/Store.src/M000053.html +0 -25
- data/doc/rdoc/classes/Pho/Store.src/M000054.html +0 -20
- data/doc/rdoc/classes/Pho/Store.src/M000055.html +0 -30
- data/doc/rdoc/classes/Pho/Store.src/M000056.html +0 -21
- data/doc/rdoc/classes/Pho/Store.src/M000057.html +0 -23
- data/doc/rdoc/classes/Pho/Store.src/M000058.html +0 -28
- data/doc/rdoc/classes/Pho/Store.src/M000059.html +0 -18
- data/doc/rdoc/classes/Pho/Store.src/M000060.html +0 -18
- data/doc/rdoc/classes/Pho/Store.src/M000061.html +0 -18
- data/doc/rdoc/classes/Pho/Store.src/M000062.html +0 -31
- data/doc/rdoc/classes/Pho/Store.src/M000063.html +0 -21
- data/doc/rdoc/classes/Pho/Store.src/M000064.html +0 -20
- data/doc/rdoc/classes/Pho/Store.src/M000065.html +0 -20
- data/doc/rdoc/classes/Pho/Store.src/M000066.html +0 -20
- data/doc/rdoc/classes/Pho/Store.src/M000067.html +0 -20
- data/doc/rdoc/classes/Pho/Store.src/M000068.html +0 -20
- data/doc/rdoc/classes/Pho/Store.src/M000069.html +0 -20
|
@@ -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="#M000092">new</a>
|
|
97
|
+
<a href="#M000093">to_rdf</a>
|
|
98
98
|
</div>
|
|
99
99
|
</div>
|
|
100
100
|
|
|
@@ -148,28 +148,38 @@ 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-M000092" class="method-detail">
|
|
152
|
+
<a name="M000092"></a>
|
|
153
153
|
|
|
154
154
|
<div class="method-heading">
|
|
155
|
-
<a href="
|
|
156
|
-
onclick="popupCode('FieldWeighting.src/M000075.html');return false;">
|
|
155
|
+
<a href="#M000092" class="method-signature">
|
|
157
156
|
<span class="method-name">new</span><span class="method-args">(uri, name, weight)</span>
|
|
158
157
|
</a>
|
|
159
158
|
</div>
|
|
160
159
|
|
|
161
160
|
<div class="method-description">
|
|
161
|
+
<p><a class="source-toggle" href="#"
|
|
162
|
+
onclick="toggleCode('M000092-source');return false;">[Source]</a></p>
|
|
163
|
+
<div class="method-source-code" id="M000092-source">
|
|
164
|
+
<pre>
|
|
165
|
+
<span class="ruby-comment cmt"># File lib/pho/query_profile.rb, line 15</span>
|
|
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>)
|
|
167
|
+
<span class="ruby-ivar">@uri</span> = <span class="ruby-identifier">uri</span>
|
|
168
|
+
<span class="ruby-ivar">@name</span> = <span class="ruby-identifier">name</span>
|
|
169
|
+
<span class="ruby-ivar">@weight</span> = <span class="ruby-identifier">weight</span>
|
|
170
|
+
<span class="ruby-keyword kw">end</span>
|
|
171
|
+
</pre>
|
|
172
|
+
</div>
|
|
162
173
|
</div>
|
|
163
174
|
</div>
|
|
164
175
|
|
|
165
176
|
<h3 class="section-bar">Public Instance methods</h3>
|
|
166
177
|
|
|
167
|
-
<div id="method-
|
|
168
|
-
<a name="
|
|
178
|
+
<div id="method-M000093" class="method-detail">
|
|
179
|
+
<a name="M000093"></a>
|
|
169
180
|
|
|
170
181
|
<div class="method-heading">
|
|
171
|
-
<a href="
|
|
172
|
-
onclick="popupCode('FieldWeighting.src/M000076.html');return false;">
|
|
182
|
+
<a href="#M000093" class="method-signature">
|
|
173
183
|
<span class="method-name">to_rdf</span><span class="method-args">(ns=true)</span>
|
|
174
184
|
</a>
|
|
175
185
|
</div>
|
|
@@ -184,6 +194,24 @@ rdf:Description, optionally including namespaces
|
|
|
184
194
|
|
|
185
195
|
</td></tr>
|
|
186
196
|
</table>
|
|
197
|
+
<p><a class="source-toggle" href="#"
|
|
198
|
+
onclick="toggleCode('M000093-source');return false;">[Source]</a></p>
|
|
199
|
+
<div class="method-source-code" id="M000093-source">
|
|
200
|
+
<pre>
|
|
201
|
+
<span class="ruby-comment cmt"># File lib/pho/query_profile.rb, line 23</span>
|
|
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>)
|
|
203
|
+
<span class="ruby-identifier">rdf</span> = <span class="ruby-value str">"<rdf:Description "</span>
|
|
204
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">ns</span>
|
|
205
|
+
<span class="ruby-identifier">rdf</span> <span class="ruby-operator"><<</span> <span class="ruby-node">" xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\" xmlns:frm=\"#{Pho::Namespaces::FRAME}\" xmlns:bf=\"#{Pho::Namespaces::CONFIG}\" "</span>
|
|
206
|
+
<span class="ruby-keyword kw">end</span>
|
|
207
|
+
<span class="ruby-identifier">rdf</span> <span class="ruby-operator"><<</span> <span class="ruby-node">" rdf:about=\"#{@uri}\">"</span>
|
|
208
|
+
<span class="ruby-identifier">rdf</span> <span class="ruby-operator"><<</span> <span class="ruby-node">" <frm:name>#{@name}</frm:name>"</span>
|
|
209
|
+
<span class="ruby-identifier">rdf</span> <span class="ruby-operator"><<</span> <span class="ruby-node">" <bf:weight>#{@weight}</bf:weight>"</span>
|
|
210
|
+
<span class="ruby-identifier">rdf</span> <span class="ruby-operator"><<</span> <span class="ruby-value str">"</rdf:Description>"</span>
|
|
211
|
+
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">rdf</span>
|
|
212
|
+
<span class="ruby-keyword kw">end</span>
|
|
213
|
+
</pre>
|
|
214
|
+
</div>
|
|
187
215
|
</div>
|
|
188
216
|
</div>
|
|
189
217
|
|
|
@@ -80,7 +80,16 @@
|
|
|
80
80
|
|
|
81
81
|
<div id="description">
|
|
82
82
|
<p>
|
|
83
|
-
|
|
83
|
+
A Platform <a href="Job.html">Job</a>
|
|
84
|
+
</p>
|
|
85
|
+
<p>
|
|
86
|
+
Instances of this class encapsulate all of the core metadata relating to a
|
|
87
|
+
Platform <a href="Job.html">Job</a>. This includes not only the timing
|
|
88
|
+
information but also the completion status, etc.
|
|
89
|
+
</p>
|
|
90
|
+
<p>
|
|
91
|
+
The class provides convenience methods for retrieving and parsing data
|
|
92
|
+
about a specific <a href="Job.html">Job</a> from a platform store
|
|
84
93
|
</p>
|
|
85
94
|
|
|
86
95
|
</div>
|
|
@@ -92,7 +101,16 @@ Captures information about a Platform <a href="Job.html">Job</a>
|
|
|
92
101
|
<h3 class="section-bar">Methods</h3>
|
|
93
102
|
|
|
94
103
|
<div class="name-list">
|
|
95
|
-
<a href="#
|
|
104
|
+
<a href="#M000087">completed?</a>
|
|
105
|
+
<a href="#M000082">new</a>
|
|
106
|
+
<a href="#M000084">parse</a>
|
|
107
|
+
<a href="#M000085">progress_updates</a>
|
|
108
|
+
<a href="#M000083">read_from_store</a>
|
|
109
|
+
<a href="#M000089">running?</a>
|
|
110
|
+
<a href="#M000086">started?</a>
|
|
111
|
+
<a href="#M000088">successful?</a>
|
|
112
|
+
<a href="#M000091">with_each</a>
|
|
113
|
+
<a href="#M000090">with_first</a>
|
|
96
114
|
</div>
|
|
97
115
|
</div>
|
|
98
116
|
|
|
@@ -104,9 +122,132 @@ Captures information about a Platform <a href="Job.html">Job</a>
|
|
|
104
122
|
<div id="section">
|
|
105
123
|
|
|
106
124
|
|
|
125
|
+
<div id="constants-list">
|
|
126
|
+
<h3 class="section-bar">Constants</h3>
|
|
127
|
+
|
|
128
|
+
<div class="name-list">
|
|
129
|
+
<table summary="Constants">
|
|
130
|
+
<tr class="top-aligned-row context-row">
|
|
131
|
+
<td class="context-item-name">SUCCESS</td>
|
|
132
|
+
<td>=</td>
|
|
133
|
+
<td class="context-item-value">"http://schemas.talis.com/2006/bigfoot/configuration#success"</td>
|
|
134
|
+
</tr>
|
|
135
|
+
<tr class="top-aligned-row context-row">
|
|
136
|
+
<td class="context-item-name">ABORTED</td>
|
|
137
|
+
<td>=</td>
|
|
138
|
+
<td class="context-item-value">"http://schemas.talis.com/2006/bigfoot/configuration#aborted"</td>
|
|
139
|
+
</tr>
|
|
140
|
+
</table>
|
|
141
|
+
</div>
|
|
142
|
+
</div>
|
|
143
|
+
|
|
144
|
+
|
|
145
|
+
|
|
146
|
+
<div id="attribute-list">
|
|
147
|
+
<h3 class="section-bar">Attributes</h3>
|
|
148
|
+
|
|
149
|
+
<div class="name-list">
|
|
150
|
+
<table>
|
|
151
|
+
<tr class="top-aligned-row context-row">
|
|
152
|
+
<td class="context-item-name">actual_start_time</td>
|
|
153
|
+
<td class="context-item-value"> [RW] </td>
|
|
154
|
+
<td class="context-item-desc">
|
|
155
|
+
Date-time that the job actually started
|
|
156
|
+
|
|
157
|
+
</td>
|
|
158
|
+
</tr>
|
|
159
|
+
<tr class="top-aligned-row context-row">
|
|
160
|
+
<td class="context-item-name">completion_message</td>
|
|
161
|
+
<td class="context-item-value"> [RW] </td>
|
|
162
|
+
<td class="context-item-desc">
|
|
163
|
+
Completion message
|
|
164
|
+
|
|
165
|
+
</td>
|
|
166
|
+
</tr>
|
|
167
|
+
<tr class="top-aligned-row context-row">
|
|
168
|
+
<td class="context-item-name">completion_status</td>
|
|
169
|
+
<td class="context-item-value"> [RW] </td>
|
|
170
|
+
<td class="context-item-desc">
|
|
171
|
+
URI indicating completion status of the job
|
|
172
|
+
|
|
173
|
+
</td>
|
|
174
|
+
</tr>
|
|
175
|
+
<tr class="top-aligned-row context-row">
|
|
176
|
+
<td class="context-item-name">created</td>
|
|
177
|
+
<td class="context-item-value"> [R] </td>
|
|
178
|
+
<td class="context-item-desc">
|
|
179
|
+
Date-time that the job was created
|
|
107
180
|
|
|
181
|
+
</td>
|
|
182
|
+
</tr>
|
|
183
|
+
<tr class="top-aligned-row context-row">
|
|
184
|
+
<td class="context-item-name">end_time</td>
|
|
185
|
+
<td class="context-item-value"> [RW] </td>
|
|
186
|
+
<td class="context-item-desc">
|
|
187
|
+
Date time that the job actually completed
|
|
188
|
+
|
|
189
|
+
</td>
|
|
190
|
+
</tr>
|
|
191
|
+
<tr class="top-aligned-row context-row">
|
|
192
|
+
<td class="context-item-name">label</td>
|
|
193
|
+
<td class="context-item-value"> [R] </td>
|
|
194
|
+
<td class="context-item-desc">
|
|
195
|
+
Label associated with job
|
|
108
196
|
|
|
197
|
+
</td>
|
|
198
|
+
</tr>
|
|
199
|
+
<tr class="top-aligned-row context-row">
|
|
200
|
+
<td class="context-item-name">progress_updates</td>
|
|
201
|
+
<td class="context-item-value"> [RW] </td>
|
|
202
|
+
<td class="context-item-desc">
|
|
203
|
+
An array of <a href="JobUpdate.html">JobUpdate</a> instances. May be empty
|
|
204
|
+
if no updates have been logged
|
|
205
|
+
|
|
206
|
+
</td>
|
|
207
|
+
</tr>
|
|
208
|
+
<tr class="top-aligned-row context-row">
|
|
209
|
+
<td class="context-item-name">snapshot_uri</td>
|
|
210
|
+
<td class="context-item-value"> [RW] </td>
|
|
211
|
+
<td class="context-item-desc">
|
|
212
|
+
URI of snapshot to load. (For RestoreJob only)
|
|
213
|
+
|
|
214
|
+
</td>
|
|
215
|
+
</tr>
|
|
216
|
+
<tr class="top-aligned-row context-row">
|
|
217
|
+
<td class="context-item-name">start_message</td>
|
|
218
|
+
<td class="context-item-value"> [RW] </td>
|
|
219
|
+
<td class="context-item-desc">
|
|
220
|
+
Message recorded at the time the job started
|
|
109
221
|
|
|
222
|
+
</td>
|
|
223
|
+
</tr>
|
|
224
|
+
<tr class="top-aligned-row context-row">
|
|
225
|
+
<td class="context-item-name">start_time</td>
|
|
226
|
+
<td class="context-item-value"> [R] </td>
|
|
227
|
+
<td class="context-item-desc">
|
|
228
|
+
Date-time that the job will start
|
|
229
|
+
|
|
230
|
+
</td>
|
|
231
|
+
</tr>
|
|
232
|
+
<tr class="top-aligned-row context-row">
|
|
233
|
+
<td class="context-item-name">type</td>
|
|
234
|
+
<td class="context-item-value"> [R] </td>
|
|
235
|
+
<td class="context-item-desc">
|
|
236
|
+
Type of job
|
|
237
|
+
|
|
238
|
+
</td>
|
|
239
|
+
</tr>
|
|
240
|
+
<tr class="top-aligned-row context-row">
|
|
241
|
+
<td class="context-item-name">uri</td>
|
|
242
|
+
<td class="context-item-value"> [R] </td>
|
|
243
|
+
<td class="context-item-desc">
|
|
244
|
+
URI of the job
|
|
245
|
+
|
|
246
|
+
</td>
|
|
247
|
+
</tr>
|
|
248
|
+
</table>
|
|
249
|
+
</div>
|
|
250
|
+
</div>
|
|
110
251
|
|
|
111
252
|
|
|
112
253
|
|
|
@@ -114,21 +255,359 @@ Captures information about a Platform <a href="Job.html">Job</a>
|
|
|
114
255
|
<div id="methods">
|
|
115
256
|
<h3 class="section-bar">Public Class methods</h3>
|
|
116
257
|
|
|
117
|
-
<div id="method-
|
|
118
|
-
<a name="
|
|
258
|
+
<div id="method-M000082" class="method-detail">
|
|
259
|
+
<a name="M000082"></a>
|
|
260
|
+
|
|
261
|
+
<div class="method-heading">
|
|
262
|
+
<a href="#M000082" class="method-signature">
|
|
263
|
+
<span class="method-name">new</span><span class="method-args">(uri, label, type, start_time, created=nil)</span>
|
|
264
|
+
</a>
|
|
265
|
+
</div>
|
|
266
|
+
|
|
267
|
+
<div class="method-description">
|
|
268
|
+
<p>
|
|
269
|
+
Constructor. Used in the reading/parsing code
|
|
270
|
+
</p>
|
|
271
|
+
<table>
|
|
272
|
+
<tr><td valign="top">uri:</td><td>a unique identifier for the job
|
|
273
|
+
|
|
274
|
+
</td></tr>
|
|
275
|
+
<tr><td valign="top">label:</td><td>a description of the job
|
|
276
|
+
|
|
277
|
+
</td></tr>
|
|
278
|
+
<tr><td valign="top">type:</td><td>the type of the job, e.g. Pho::Jobs::RESTORE
|
|
279
|
+
|
|
280
|
+
</td></tr>
|
|
281
|
+
<tr><td valign="top">created:</td><td>date-time the job was created in the system
|
|
282
|
+
|
|
283
|
+
</td></tr>
|
|
284
|
+
<tr><td valign="top">start_time:</td><td>scheduled start time for the job
|
|
285
|
+
|
|
286
|
+
</td></tr>
|
|
287
|
+
</table>
|
|
288
|
+
<p><a class="source-toggle" href="#"
|
|
289
|
+
onclick="toggleCode('M000082-source');return false;">[Source]</a></p>
|
|
290
|
+
<div class="method-source-code" id="M000082-source">
|
|
291
|
+
<pre>
|
|
292
|
+
<span class="ruby-comment cmt"># File lib/pho/job.rb, line 214</span>
|
|
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>)
|
|
294
|
+
<span class="ruby-ivar">@uri</span> = <span class="ruby-identifier">uri</span>
|
|
295
|
+
<span class="ruby-ivar">@label</span> = <span class="ruby-identifier">label</span>
|
|
296
|
+
<span class="ruby-ivar">@type</span> = <span class="ruby-identifier">type</span>
|
|
297
|
+
<span class="ruby-ivar">@created</span> = <span class="ruby-identifier">created</span>
|
|
298
|
+
<span class="ruby-ivar">@start_time</span> = <span class="ruby-identifier">start_time</span>
|
|
299
|
+
<span class="ruby-ivar">@progress_updates</span> = <span class="ruby-constant">Array</span>.<span class="ruby-identifier">new</span>
|
|
300
|
+
<span class="ruby-keyword kw">end</span>
|
|
301
|
+
</pre>
|
|
302
|
+
</div>
|
|
303
|
+
</div>
|
|
304
|
+
</div>
|
|
305
|
+
|
|
306
|
+
<div id="method-M000084" class="method-detail">
|
|
307
|
+
<a name="M000084"></a>
|
|
308
|
+
|
|
309
|
+
<div class="method-heading">
|
|
310
|
+
<a href="#M000084" class="method-signature">
|
|
311
|
+
<span class="method-name">parse</span><span class="method-args">(uri, xml)</span>
|
|
312
|
+
</a>
|
|
313
|
+
</div>
|
|
314
|
+
|
|
315
|
+
<div class="method-description">
|
|
316
|
+
<p>
|
|
317
|
+
Parses job metadata returned from the platform as RDF/XML, creating a fully
|
|
318
|
+
populated <a href="Job.html">Job</a> instance
|
|
319
|
+
</p>
|
|
320
|
+
<table>
|
|
321
|
+
<tr><td valign="top">uri:</td><td>uri of the job to be parsed
|
|
322
|
+
|
|
323
|
+
</td></tr>
|
|
324
|
+
<tr><td valign="top">xml:</td><td>the RDF/XML text to be parsed
|
|
325
|
+
|
|
326
|
+
</td></tr>
|
|
327
|
+
</table>
|
|
328
|
+
<p><a class="source-toggle" href="#"
|
|
329
|
+
onclick="toggleCode('M000084-source');return false;">[Source]</a></p>
|
|
330
|
+
<div class="method-source-code" id="M000084-source">
|
|
331
|
+
<pre>
|
|
332
|
+
<span class="ruby-comment cmt"># File lib/pho/job.rb, line 241</span>
|
|
333
|
+
<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>)
|
|
334
|
+
<span class="ruby-identifier">doc</span> = <span class="ruby-constant">REXML</span><span class="ruby-operator">::</span><span class="ruby-constant">Document</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">xml</span>)
|
|
335
|
+
<span class="ruby-identifier">root</span> = <span class="ruby-identifier">doc</span>.<span class="ruby-identifier">root</span>
|
|
336
|
+
|
|
337
|
+
<span class="ruby-comment cmt">#job_el = REXML::XPath.first(root, "rdf:Description[rdf:type]", Pho::Namespaces::MAPPING ) </span>
|
|
338
|
+
<span class="ruby-identifier">job_el</span> = <span class="ruby-constant">REXML</span><span class="ruby-operator">::</span><span class="ruby-constant">XPath</span>.<span class="ruby-identifier">first</span>(<span class="ruby-identifier">root</span>, <span class="ruby-node">"//*[@rdf:about='#{uri}']"</span>, <span class="ruby-constant">Pho</span><span class="ruby-operator">::</span><span class="ruby-constant">Namespaces</span><span class="ruby-operator">::</span><span class="ruby-constant">MAPPING</span> )
|
|
339
|
+
<span class="ruby-identifier">uri</span> = <span class="ruby-identifier">job_el</span>.<span class="ruby-identifier">attributes</span>[<span class="ruby-value str">"rdf:about"</span>]
|
|
340
|
+
<span class="ruby-identifier">label</span> = <span class="ruby-constant">REXML</span><span class="ruby-operator">::</span><span class="ruby-constant">XPath</span>.<span class="ruby-identifier">first</span>(<span class="ruby-identifier">job_el</span>, <span class="ruby-value str">"rdfs:label"</span>, <span class="ruby-constant">Pho</span><span class="ruby-operator">::</span><span class="ruby-constant">Namespaces</span><span class="ruby-operator">::</span><span class="ruby-constant">MAPPING</span> ).<span class="ruby-identifier">text</span>
|
|
341
|
+
<span class="ruby-identifier">type_el</span> = <span class="ruby-constant">REXML</span><span class="ruby-operator">::</span><span class="ruby-constant">XPath</span>.<span class="ruby-identifier">first</span>(<span class="ruby-identifier">job_el</span>, <span class="ruby-value str">"rdf:type"</span>, <span class="ruby-constant">Pho</span><span class="ruby-operator">::</span><span class="ruby-constant">Namespaces</span><span class="ruby-operator">::</span><span class="ruby-constant">MAPPING</span> )
|
|
342
|
+
<span class="ruby-identifier">type</span> = <span class="ruby-identifier">type_el</span>.<span class="ruby-identifier">attributes</span>[<span class="ruby-value str">"rdf:resource"</span>]
|
|
343
|
+
<span class="ruby-identifier">created</span> = <span class="ruby-constant">REXML</span><span class="ruby-operator">::</span><span class="ruby-constant">XPath</span>.<span class="ruby-identifier">first</span>(<span class="ruby-identifier">job_el</span>, <span class="ruby-value str">"dcterms:created"</span>, <span class="ruby-constant">Pho</span><span class="ruby-operator">::</span><span class="ruby-constant">Namespaces</span><span class="ruby-operator">::</span><span class="ruby-constant">MAPPING</span> ).<span class="ruby-identifier">text</span>
|
|
344
|
+
<span class="ruby-identifier">start_time</span> = <span class="ruby-constant">REXML</span><span class="ruby-operator">::</span><span class="ruby-constant">XPath</span>.<span class="ruby-identifier">first</span>(<span class="ruby-identifier">job_el</span>, <span class="ruby-value str">"bf:startTime"</span>, <span class="ruby-constant">Pho</span><span class="ruby-operator">::</span><span class="ruby-constant">Namespaces</span><span class="ruby-operator">::</span><span class="ruby-constant">MAPPING</span> ).<span class="ruby-identifier">text</span>
|
|
345
|
+
|
|
346
|
+
<span class="ruby-identifier">job</span> = <span class="ruby-constant">Job</span>.<span class="ruby-identifier">new</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>)
|
|
347
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">type</span> <span class="ruby-operator">==</span> <span class="ruby-constant">Pho</span><span class="ruby-operator">::</span><span class="ruby-constant">Jobs</span><span class="ruby-operator">::</span><span class="ruby-constant">RESTORE</span>
|
|
348
|
+
<span class="ruby-identifier">with_first</span>(<span class="ruby-identifier">job_el</span>, <span class="ruby-value str">"bf:snapshotUri"</span>) <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">uri</span><span class="ruby-operator">|</span>
|
|
349
|
+
<span class="ruby-identifier">job</span>.<span class="ruby-identifier">snapshot_uri</span> = <span class="ruby-identifier">uri</span>.<span class="ruby-identifier">attributes</span>[<span class="ruby-value str">"rdf:resource"</span>]
|
|
350
|
+
<span class="ruby-keyword kw">end</span>
|
|
351
|
+
<span class="ruby-keyword kw">end</span>
|
|
352
|
+
|
|
353
|
+
<span class="ruby-identifier">with_first</span>(<span class="ruby-identifier">job_el</span>, <span class="ruby-value str">"bf:actualStartTime"</span>) <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">el</span><span class="ruby-operator">|</span>
|
|
354
|
+
<span class="ruby-identifier">job</span>.<span class="ruby-identifier">actual_start_time</span> = <span class="ruby-identifier">el</span>.<span class="ruby-identifier">text</span>
|
|
355
|
+
<span class="ruby-keyword kw">end</span>
|
|
356
|
+
<span class="ruby-identifier">with_first</span>(<span class="ruby-identifier">job_el</span>, <span class="ruby-value str">"bf:startMessage"</span>) <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">el</span><span class="ruby-operator">|</span>
|
|
357
|
+
<span class="ruby-identifier">job</span>.<span class="ruby-identifier">start_message</span> = <span class="ruby-identifier">el</span>.<span class="ruby-identifier">text</span>
|
|
358
|
+
<span class="ruby-keyword kw">end</span>
|
|
359
|
+
<span class="ruby-identifier">with_first</span>(<span class="ruby-identifier">job_el</span>, <span class="ruby-value str">"bf:completionMessage"</span>) <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">el</span><span class="ruby-operator">|</span>
|
|
360
|
+
<span class="ruby-identifier">job</span>.<span class="ruby-identifier">completion_message</span> = <span class="ruby-identifier">el</span>.<span class="ruby-identifier">text</span>
|
|
361
|
+
<span class="ruby-keyword kw">end</span>
|
|
362
|
+
<span class="ruby-identifier">with_first</span>(<span class="ruby-identifier">job_el</span>, <span class="ruby-value str">"bf:endTime"</span>) <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">el</span><span class="ruby-operator">|</span>
|
|
363
|
+
<span class="ruby-identifier">job</span>.<span class="ruby-identifier">end_time</span> = <span class="ruby-identifier">el</span>.<span class="ruby-identifier">text</span>
|
|
364
|
+
<span class="ruby-keyword kw">end</span>
|
|
365
|
+
<span class="ruby-identifier">with_first</span>(<span class="ruby-identifier">job_el</span>, <span class="ruby-value str">"bf:completionStatus"</span>) <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">el</span><span class="ruby-operator">|</span>
|
|
366
|
+
<span class="ruby-identifier">job</span>.<span class="ruby-identifier">completion_status</span> = <span class="ruby-identifier">el</span>.<span class="ruby-identifier">attributes</span>[<span class="ruby-value str">"rdf:resource"</span>]
|
|
367
|
+
<span class="ruby-keyword kw">end</span>
|
|
368
|
+
<span class="ruby-identifier">with_each</span>(<span class="ruby-identifier">job_el</span>, <span class="ruby-value str">"bf:progressUpdate"</span>) <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">el</span><span class="ruby-operator">|</span>
|
|
369
|
+
<span class="ruby-identifier">update</span> = <span class="ruby-constant">JobUpdate</span>.<span class="ruby-identifier">new</span>
|
|
370
|
+
<span class="ruby-identifier">with_first</span>(<span class="ruby-identifier">el</span>, <span class="ruby-value str">"bf:progressUpdateMessage"</span>) <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">msg</span><span class="ruby-operator">|</span>
|
|
371
|
+
<span class="ruby-identifier">update</span>.<span class="ruby-identifier">message</span> = <span class="ruby-identifier">msg</span>.<span class="ruby-identifier">text</span>
|
|
372
|
+
<span class="ruby-keyword kw">end</span>
|
|
373
|
+
<span class="ruby-identifier">with_first</span>(<span class="ruby-identifier">el</span>, <span class="ruby-value str">"bf:progressUpdateTime"</span>) <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">time</span><span class="ruby-operator">|</span>
|
|
374
|
+
<span class="ruby-identifier">update</span>.<span class="ruby-identifier">time</span> = <span class="ruby-identifier">time</span>.<span class="ruby-identifier">text</span>
|
|
375
|
+
<span class="ruby-keyword kw">end</span>
|
|
376
|
+
<span class="ruby-identifier">job</span>.<span class="ruby-identifier">progress_updates</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">update</span>
|
|
377
|
+
<span class="ruby-keyword kw">end</span>
|
|
378
|
+
|
|
379
|
+
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">job</span>
|
|
380
|
+
|
|
381
|
+
<span class="ruby-keyword kw">end</span>
|
|
382
|
+
</pre>
|
|
383
|
+
</div>
|
|
384
|
+
</div>
|
|
385
|
+
</div>
|
|
386
|
+
|
|
387
|
+
<div id="method-M000083" class="method-detail">
|
|
388
|
+
<a name="M000083"></a>
|
|
389
|
+
|
|
390
|
+
<div class="method-heading">
|
|
391
|
+
<a href="#M000083" class="method-signature">
|
|
392
|
+
<span class="method-name">read_from_store</span><span class="method-args">(uri, store)</span>
|
|
393
|
+
</a>
|
|
394
|
+
</div>
|
|
395
|
+
|
|
396
|
+
<div class="method-description">
|
|
397
|
+
<p>
|
|
398
|
+
Read a job from a store
|
|
399
|
+
</p>
|
|
400
|
+
<table>
|
|
401
|
+
<tr><td valign="top">uri:</td><td>uri of the job to read
|
|
402
|
+
|
|
403
|
+
</td></tr>
|
|
404
|
+
<tr><td valign="top">store:</td><td>store from which the job will be read
|
|
405
|
+
|
|
406
|
+
</td></tr>
|
|
407
|
+
</table>
|
|
408
|
+
<p><a class="source-toggle" href="#"
|
|
409
|
+
onclick="toggleCode('M000083-source');return false;">[Source]</a></p>
|
|
410
|
+
<div class="method-source-code" id="M000083-source">
|
|
411
|
+
<pre>
|
|
412
|
+
<span class="ruby-comment cmt"># File lib/pho/job.rb, line 227</span>
|
|
413
|
+
<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>)
|
|
414
|
+
<span class="ruby-identifier">resp</span> = <span class="ruby-identifier">store</span>.<span class="ruby-identifier">get_job</span>(<span class="ruby-identifier">uri</span>)
|
|
415
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">resp</span>.<span class="ruby-identifier">status</span> <span class="ruby-operator">!=</span> <span class="ruby-value">200</span>
|
|
416
|
+
<span class="ruby-identifier">raise</span> <span class="ruby-node">"Unable to read job from store. Response code was #{resp.status}"</span>
|
|
417
|
+
<span class="ruby-keyword kw">end</span>
|
|
418
|
+
|
|
419
|
+
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">parse</span>(<span class="ruby-identifier">uri</span>, <span class="ruby-identifier">resp</span>.<span class="ruby-identifier">content</span>)
|
|
420
|
+
<span class="ruby-keyword kw">end</span>
|
|
421
|
+
</pre>
|
|
422
|
+
</div>
|
|
423
|
+
</div>
|
|
424
|
+
</div>
|
|
425
|
+
|
|
426
|
+
<h3 class="section-bar">Protected Class methods</h3>
|
|
427
|
+
|
|
428
|
+
<div id="method-M000091" class="method-detail">
|
|
429
|
+
<a name="M000091"></a>
|
|
430
|
+
|
|
431
|
+
<div class="method-heading">
|
|
432
|
+
<a href="#M000091" class="method-signature">
|
|
433
|
+
<span class="method-name">with_each</span><span class="method-args">(el, xpath) {|ref_el| ...}</span>
|
|
434
|
+
</a>
|
|
435
|
+
</div>
|
|
436
|
+
|
|
437
|
+
<div class="method-description">
|
|
438
|
+
<p><a class="source-toggle" href="#"
|
|
439
|
+
onclick="toggleCode('M000091-source');return false;">[Source]</a></p>
|
|
440
|
+
<div class="method-source-code" id="M000091-source">
|
|
441
|
+
<pre>
|
|
442
|
+
<span class="ruby-comment cmt"># File lib/pho/job.rb, line 327</span>
|
|
443
|
+
<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>)
|
|
444
|
+
<span class="ruby-constant">REXML</span><span class="ruby-operator">::</span><span class="ruby-constant">XPath</span>.<span class="ruby-identifier">each</span>(<span class="ruby-identifier">el</span>, <span class="ruby-identifier">xpath</span>, <span class="ruby-constant">Pho</span><span class="ruby-operator">::</span><span class="ruby-constant">Namespaces</span><span class="ruby-operator">::</span><span class="ruby-constant">MAPPING</span>) <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">e</span><span class="ruby-operator">|</span>
|
|
445
|
+
<span class="ruby-identifier">root</span> = <span class="ruby-identifier">e</span>.<span class="ruby-identifier">document</span>.<span class="ruby-identifier">root</span>
|
|
446
|
+
<span class="ruby-identifier">uri</span> = <span class="ruby-identifier">e</span>.<span class="ruby-identifier">attributes</span>[<span class="ruby-value str">"rdf:resource"</span>]
|
|
447
|
+
<span class="ruby-identifier">ref_el</span> = <span class="ruby-constant">REXML</span><span class="ruby-operator">::</span><span class="ruby-constant">XPath</span>.<span class="ruby-identifier">first</span>(<span class="ruby-identifier">root</span>, <span class="ruby-node">"//*[@rdf:about='#{uri}']"</span>, <span class="ruby-constant">Pho</span><span class="ruby-operator">::</span><span class="ruby-constant">Namespaces</span><span class="ruby-operator">::</span><span class="ruby-constant">MAPPING</span>)
|
|
448
|
+
<span class="ruby-keyword kw">yield</span> <span class="ruby-identifier">ref_el</span>
|
|
449
|
+
<span class="ruby-keyword kw">end</span>
|
|
450
|
+
<span class="ruby-keyword kw">end</span>
|
|
451
|
+
</pre>
|
|
452
|
+
</div>
|
|
453
|
+
</div>
|
|
454
|
+
</div>
|
|
455
|
+
|
|
456
|
+
<div id="method-M000090" class="method-detail">
|
|
457
|
+
<a name="M000090"></a>
|
|
458
|
+
|
|
459
|
+
<div class="method-heading">
|
|
460
|
+
<a href="#M000090" class="method-signature">
|
|
461
|
+
<span class="method-name">with_first</span><span class="method-args">(el, xpath) {|found_el| ...}</span>
|
|
462
|
+
</a>
|
|
463
|
+
</div>
|
|
464
|
+
|
|
465
|
+
<div class="method-description">
|
|
466
|
+
<p><a class="source-toggle" href="#"
|
|
467
|
+
onclick="toggleCode('M000090-source');return false;">[Source]</a></p>
|
|
468
|
+
<div class="method-source-code" id="M000090-source">
|
|
469
|
+
<pre>
|
|
470
|
+
<span class="ruby-comment cmt"># File lib/pho/job.rb, line 320</span>
|
|
471
|
+
<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>)
|
|
472
|
+
<span class="ruby-identifier">found_el</span> = <span class="ruby-constant">REXML</span><span class="ruby-operator">::</span><span class="ruby-constant">XPath</span>.<span class="ruby-identifier">first</span>(<span class="ruby-identifier">el</span>, <span class="ruby-identifier">xpath</span>, <span class="ruby-constant">Pho</span><span class="ruby-operator">::</span><span class="ruby-constant">Namespaces</span><span class="ruby-operator">::</span><span class="ruby-constant">MAPPING</span>)
|
|
473
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">found_el</span> <span class="ruby-operator">!=</span> <span class="ruby-keyword kw">nil</span>
|
|
474
|
+
<span class="ruby-keyword kw">yield</span> <span class="ruby-identifier">found_el</span>
|
|
475
|
+
<span class="ruby-keyword kw">end</span>
|
|
476
|
+
<span class="ruby-keyword kw">end</span>
|
|
477
|
+
</pre>
|
|
478
|
+
</div>
|
|
479
|
+
</div>
|
|
480
|
+
</div>
|
|
481
|
+
|
|
482
|
+
<h3 class="section-bar">Public Instance methods</h3>
|
|
483
|
+
|
|
484
|
+
<div id="method-M000087" class="method-detail">
|
|
485
|
+
<a name="M000087"></a>
|
|
486
|
+
|
|
487
|
+
<div class="method-heading">
|
|
488
|
+
<a href="#M000087" class="method-signature">
|
|
489
|
+
<span class="method-name">completed?</span><span class="method-args">()</span>
|
|
490
|
+
</a>
|
|
491
|
+
</div>
|
|
492
|
+
|
|
493
|
+
<div class="method-description">
|
|
494
|
+
<p>
|
|
495
|
+
Has the job <a href="Job.html#M000087">completed?</a>
|
|
496
|
+
</p>
|
|
497
|
+
<p><a class="source-toggle" href="#"
|
|
498
|
+
onclick="toggleCode('M000087-source');return false;">[Source]</a></p>
|
|
499
|
+
<div class="method-source-code" id="M000087-source">
|
|
500
|
+
<pre>
|
|
501
|
+
<span class="ruby-comment cmt"># File lib/pho/job.rb, line 304</span>
|
|
502
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">completed?</span>
|
|
503
|
+
<span class="ruby-keyword kw">return</span> <span class="ruby-ivar">@completion_status</span> <span class="ruby-operator">!=</span> <span class="ruby-keyword kw">nil</span>
|
|
504
|
+
<span class="ruby-keyword kw">end</span>
|
|
505
|
+
</pre>
|
|
506
|
+
</div>
|
|
507
|
+
</div>
|
|
508
|
+
</div>
|
|
509
|
+
|
|
510
|
+
<div id="method-M000085" class="method-detail">
|
|
511
|
+
<a name="M000085"></a>
|
|
512
|
+
|
|
513
|
+
<div class="method-heading">
|
|
514
|
+
<a href="#M000085" class="method-signature">
|
|
515
|
+
<span class="method-name">progress_updates</span><span class="method-args">()</span>
|
|
516
|
+
</a>
|
|
517
|
+
</div>
|
|
518
|
+
|
|
519
|
+
<div class="method-description">
|
|
520
|
+
<p><a class="source-toggle" href="#"
|
|
521
|
+
onclick="toggleCode('M000085-source');return false;">[Source]</a></p>
|
|
522
|
+
<div class="method-source-code" id="M000085-source">
|
|
523
|
+
<pre>
|
|
524
|
+
<span class="ruby-comment cmt"># File lib/pho/job.rb, line 291</span>
|
|
525
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">progress_updates</span>()
|
|
526
|
+
<span class="ruby-ivar">@progress_updates</span>.<span class="ruby-identifier">sort!</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">x</span>,<span class="ruby-identifier">y</span><span class="ruby-operator">|</span>
|
|
527
|
+
<span class="ruby-identifier">x</span>.<span class="ruby-identifier">time</span> <span class="ruby-operator"><=></span> <span class="ruby-identifier">y</span>.<span class="ruby-identifier">time</span>
|
|
528
|
+
}
|
|
529
|
+
<span class="ruby-keyword kw">return</span> <span class="ruby-ivar">@progress_updates</span>
|
|
530
|
+
<span class="ruby-keyword kw">end</span>
|
|
531
|
+
</pre>
|
|
532
|
+
</div>
|
|
533
|
+
</div>
|
|
534
|
+
</div>
|
|
535
|
+
|
|
536
|
+
<div id="method-M000089" class="method-detail">
|
|
537
|
+
<a name="M000089"></a>
|
|
538
|
+
|
|
539
|
+
<div class="method-heading">
|
|
540
|
+
<a href="#M000089" class="method-signature">
|
|
541
|
+
<span class="method-name">running?</span><span class="method-args">()</span>
|
|
542
|
+
</a>
|
|
543
|
+
</div>
|
|
544
|
+
|
|
545
|
+
<div class="method-description">
|
|
546
|
+
<p>
|
|
547
|
+
Is the job still <a href="Job.html#M000089">running?</a>
|
|
548
|
+
</p>
|
|
549
|
+
<p><a class="source-toggle" href="#"
|
|
550
|
+
onclick="toggleCode('M000089-source');return false;">[Source]</a></p>
|
|
551
|
+
<div class="method-source-code" id="M000089-source">
|
|
552
|
+
<pre>
|
|
553
|
+
<span class="ruby-comment cmt"># File lib/pho/job.rb, line 314</span>
|
|
554
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">running?</span>
|
|
555
|
+
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">started?</span> <span class="ruby-operator">&&</span> <span class="ruby-operator">!</span><span class="ruby-identifier">completed?</span>
|
|
556
|
+
<span class="ruby-keyword kw">end</span>
|
|
557
|
+
</pre>
|
|
558
|
+
</div>
|
|
559
|
+
</div>
|
|
560
|
+
</div>
|
|
561
|
+
|
|
562
|
+
<div id="method-M000086" class="method-detail">
|
|
563
|
+
<a name="M000086"></a>
|
|
564
|
+
|
|
565
|
+
<div class="method-heading">
|
|
566
|
+
<a href="#M000086" class="method-signature">
|
|
567
|
+
<span class="method-name">started?</span><span class="method-args">()</span>
|
|
568
|
+
</a>
|
|
569
|
+
</div>
|
|
570
|
+
|
|
571
|
+
<div class="method-description">
|
|
572
|
+
<p>
|
|
573
|
+
Has the job <a href="Job.html#M000086">started?</a>
|
|
574
|
+
</p>
|
|
575
|
+
<p><a class="source-toggle" href="#"
|
|
576
|
+
onclick="toggleCode('M000086-source');return false;">[Source]</a></p>
|
|
577
|
+
<div class="method-source-code" id="M000086-source">
|
|
578
|
+
<pre>
|
|
579
|
+
<span class="ruby-comment cmt"># File lib/pho/job.rb, line 299</span>
|
|
580
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">started?</span>
|
|
581
|
+
<span class="ruby-keyword kw">return</span> <span class="ruby-ivar">@actual_start_time</span> <span class="ruby-operator">!=</span> <span class="ruby-keyword kw">nil</span>
|
|
582
|
+
<span class="ruby-keyword kw">end</span>
|
|
583
|
+
</pre>
|
|
584
|
+
</div>
|
|
585
|
+
</div>
|
|
586
|
+
</div>
|
|
587
|
+
|
|
588
|
+
<div id="method-M000088" class="method-detail">
|
|
589
|
+
<a name="M000088"></a>
|
|
119
590
|
|
|
120
591
|
<div class="method-heading">
|
|
121
|
-
<a href="
|
|
122
|
-
|
|
123
|
-
<span class="method-name">parse_jobs</span><span class="method-args">(resp)</span>
|
|
592
|
+
<a href="#M000088" class="method-signature">
|
|
593
|
+
<span class="method-name">successful?</span><span class="method-args">()</span>
|
|
124
594
|
</a>
|
|
125
595
|
</div>
|
|
126
596
|
|
|
127
597
|
<div class="method-description">
|
|
128
598
|
<p>
|
|
129
|
-
|
|
130
|
-
returned from the Platform
|
|
599
|
+
Was the job <a href="Job.html#M000088">successful?</a>
|
|
131
600
|
</p>
|
|
601
|
+
<p><a class="source-toggle" href="#"
|
|
602
|
+
onclick="toggleCode('M000088-source');return false;">[Source]</a></p>
|
|
603
|
+
<div class="method-source-code" id="M000088-source">
|
|
604
|
+
<pre>
|
|
605
|
+
<span class="ruby-comment cmt"># File lib/pho/job.rb, line 309</span>
|
|
606
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">successful?</span>
|
|
607
|
+
<span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">completed?</span> <span class="ruby-operator">&&</span> <span class="ruby-ivar">@completion_status</span> <span class="ruby-operator">==</span> <span class="ruby-constant">Pho</span><span class="ruby-operator">::</span><span class="ruby-constant">Job</span><span class="ruby-operator">::</span><span class="ruby-constant">SUCCESS</span>
|
|
608
|
+
<span class="ruby-keyword kw">end</span>
|
|
609
|
+
</pre>
|
|
610
|
+
</div>
|
|
132
611
|
</div>
|
|
133
612
|
</div>
|
|
134
613
|
|