pho 0.7.3 → 0.7.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (87) hide show
  1. data/CHANGES +6 -0
  2. data/README +9 -1
  3. data/Rakefile +1 -1
  4. data/doc/index.html +3 -1
  5. data/doc/rdoc/classes/Pho/Analyzers.html +310 -0
  6. data/doc/rdoc/classes/Pho/CommandLine.html +770 -0
  7. data/doc/rdoc/classes/Pho/DatatypeProperty.html +241 -0
  8. data/doc/rdoc/classes/Pho/Enrichment/StoreEnricher.html +410 -0
  9. data/doc/rdoc/classes/Pho/Enrichment.html +119 -0
  10. data/doc/rdoc/classes/Pho/Etags.html +310 -0
  11. data/doc/rdoc/classes/Pho/Facet/Results.html +299 -0
  12. data/doc/rdoc/classes/Pho/Facet/Term.html +177 -0
  13. data/doc/rdoc/classes/Pho/Facet.html +119 -0
  14. data/doc/rdoc/classes/Pho/FieldPredicateMap.html +695 -0
  15. data/doc/rdoc/classes/Pho/FieldWeighting.html +230 -0
  16. data/doc/rdoc/classes/Pho/FileManagement/AbstractFileManager.html +478 -0
  17. data/doc/rdoc/classes/Pho/FileManagement/FileManager.html +264 -0
  18. data/doc/rdoc/classes/Pho/FileManagement/RDFManager.html +259 -0
  19. data/doc/rdoc/classes/Pho/FileManagement.html +121 -0
  20. data/doc/rdoc/classes/Pho/Job.html +627 -0
  21. data/doc/rdoc/classes/Pho/JobUpdate.html +141 -0
  22. data/doc/rdoc/classes/Pho/Jobs.html +538 -0
  23. data/doc/rdoc/classes/Pho/Namespaces.html +164 -0
  24. data/doc/rdoc/classes/Pho/OAI/Record.html +165 -0
  25. data/doc/rdoc/classes/Pho/OAI/Records.html +331 -0
  26. data/doc/rdoc/classes/Pho/OAI.html +118 -0
  27. data/doc/rdoc/classes/Pho/QueryProfile.html +524 -0
  28. data/doc/rdoc/classes/Pho/RDF/Parser.html +279 -0
  29. data/doc/rdoc/classes/Pho/RDF.html +120 -0
  30. data/doc/rdoc/classes/Pho/RDFCollection.html +119 -0
  31. data/doc/rdoc/classes/Pho/ResourceHash/Converter.html +325 -0
  32. data/doc/rdoc/classes/Pho/ResourceHash/SetAlgebra.html +241 -0
  33. data/doc/rdoc/classes/Pho/ResourceHash.html +123 -0
  34. data/doc/rdoc/classes/Pho/Snapshot.html +402 -0
  35. data/doc/rdoc/classes/Pho/Sparql/SparqlClient.html +594 -0
  36. data/doc/rdoc/classes/Pho/Sparql/SparqlHelper.html +696 -0
  37. data/doc/rdoc/classes/Pho/Sparql.html +187 -0
  38. data/doc/rdoc/classes/Pho/Status.html +296 -0
  39. data/doc/rdoc/classes/Pho/Store.html +1569 -0
  40. data/doc/rdoc/classes/Pho/StoreSparqlClient.html +183 -0
  41. data/doc/rdoc/classes/Pho/Update/Changeset.html +521 -0
  42. data/doc/rdoc/classes/Pho/Update/ChangesetBuilder.html +330 -0
  43. data/doc/rdoc/classes/Pho/Update/ChangesetHelper.html +159 -0
  44. data/doc/rdoc/classes/Pho/Update/Changesets.html +205 -0
  45. data/doc/rdoc/classes/Pho/Update/LiteralStatement.html +257 -0
  46. data/doc/rdoc/classes/Pho/Update/ResourceStatement.html +237 -0
  47. data/doc/rdoc/classes/Pho/Update/Statement.html +303 -0
  48. data/doc/rdoc/classes/Pho/Update.html +128 -0
  49. data/doc/rdoc/classes/Pho.html +283 -0
  50. data/doc/rdoc/classes/String.html +146 -0
  51. data/doc/rdoc/created.rid +1 -0
  52. data/doc/rdoc/files/CHANGES.html +373 -0
  53. data/doc/rdoc/files/README.html +204 -0
  54. data/doc/rdoc/files/lib/pho/changeset_builder_rb.html +108 -0
  55. data/doc/rdoc/files/lib/pho/changeset_rb.html +108 -0
  56. data/doc/rdoc/files/lib/pho/command_line_rb.html +101 -0
  57. data/doc/rdoc/files/lib/pho/converter_rb.html +108 -0
  58. data/doc/rdoc/files/lib/pho/enrichment_rb.html +101 -0
  59. data/doc/rdoc/files/lib/pho/etags_rb.html +108 -0
  60. data/doc/rdoc/files/lib/pho/facet_rb.html +101 -0
  61. data/doc/rdoc/files/lib/pho/field_predicate_map_rb.html +101 -0
  62. data/doc/rdoc/files/lib/pho/file_management_rb.html +101 -0
  63. data/doc/rdoc/files/lib/pho/file_manager_rb.html +108 -0
  64. data/doc/rdoc/files/lib/pho/job_rb.html +101 -0
  65. data/doc/rdoc/files/lib/pho/oai_rb.html +101 -0
  66. data/doc/rdoc/files/lib/pho/query_profile_rb.html +101 -0
  67. data/doc/rdoc/files/lib/pho/rdf_collection_rb.html +101 -0
  68. data/doc/rdoc/files/lib/pho/rdf_rb.html +108 -0
  69. data/doc/rdoc/files/lib/pho/resource_hash_rb.html +101 -0
  70. data/doc/rdoc/files/lib/pho/snapshot_rb.html +109 -0
  71. data/doc/rdoc/files/lib/pho/sparql_rb.html +101 -0
  72. data/doc/rdoc/files/lib/pho/status_rb.html +101 -0
  73. data/doc/rdoc/files/lib/pho/store_rb.html +108 -0
  74. data/doc/rdoc/files/lib/pho_rb.html +133 -0
  75. data/doc/rdoc/fr_class_index.html +72 -0
  76. data/doc/rdoc/fr_file_index.html +49 -0
  77. data/doc/rdoc/fr_method_index.html +239 -0
  78. data/doc/rdoc/index.html +24 -0
  79. data/doc/rdoc/rdoc-style.css +208 -0
  80. data/lib/pho/enrichment.rb +1 -0
  81. data/lib/pho/field_predicate_map.rb +5 -0
  82. data/lib/pho/query_profile.rb +5 -0
  83. data/lib/pho/store.rb +4 -1
  84. data/tests/tc_field_predicate_map.rb +7 -1
  85. data/tests/tc_query_profile.rb +6 -0
  86. data/tests/tc_store_util.rb +7 -0
  87. metadata +134 -21
@@ -0,0 +1,478 @@
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <!DOCTYPE html
3
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
+
6
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
7
+ <head>
8
+ <title>Class: Pho::FileManagement::AbstractFileManager</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
+ <meta http-equiv="Content-Script-Type" content="text/javascript" />
11
+ <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
12
+ <script type="text/javascript">
13
+ // <![CDATA[
14
+
15
+ function popupCode( url ) {
16
+ window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
17
+ }
18
+
19
+ function toggleCode( id ) {
20
+ if ( document.getElementById )
21
+ elem = document.getElementById( id );
22
+ else if ( document.all )
23
+ elem = eval( "document.all." + id );
24
+ else
25
+ return false;
26
+
27
+ elemStyle = elem.style;
28
+
29
+ if ( elemStyle.display != "block" ) {
30
+ elemStyle.display = "block"
31
+ } else {
32
+ elemStyle.display = "none"
33
+ }
34
+
35
+ return true;
36
+ }
37
+
38
+ // Make codeblocks hidden by default
39
+ document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
40
+
41
+ // ]]>
42
+ </script>
43
+
44
+ </head>
45
+ <body>
46
+
47
+
48
+
49
+ <div id="classHeader">
50
+ <table class="header-table">
51
+ <tr class="top-aligned-row">
52
+ <td><strong>Class</strong></td>
53
+ <td class="class-name-in-header">Pho::FileManagement::AbstractFileManager</td>
54
+ </tr>
55
+ <tr class="top-aligned-row">
56
+ <td><strong>In:</strong></td>
57
+ <td>
58
+ <a href="../../../files/lib/pho/file_management_rb.html">
59
+ lib/pho/file_management.rb
60
+ </a>
61
+ <br />
62
+ </td>
63
+ </tr>
64
+
65
+ <tr class="top-aligned-row">
66
+ <td><strong>Parent:</strong></td>
67
+ <td>
68
+ Object
69
+ </td>
70
+ </tr>
71
+ </table>
72
+ </div>
73
+ <!-- banner header -->
74
+
75
+ <div id="bodyContent">
76
+
77
+
78
+
79
+ <div id="contextContent">
80
+
81
+ <div id="description">
82
+ <p>
83
+ TODO: move files into hidden directory
84
+ </p>
85
+
86
+ </div>
87
+
88
+
89
+ </div>
90
+
91
+ <div id="method-list">
92
+ <h3 class="section-bar">Methods</h3>
93
+
94
+ <div class="name-list">
95
+ <a href="#M000014">failures</a>&nbsp;&nbsp;
96
+ <a href="#M000017">get_fail_file_for</a>&nbsp;&nbsp;
97
+ <a href="#M000018">get_ok_file_for</a>&nbsp;&nbsp;
98
+ <a href="#M000009">new</a>&nbsp;&nbsp;
99
+ <a href="#M000013">new_files</a>&nbsp;&nbsp;
100
+ <a href="#M000012">reset</a>&nbsp;&nbsp;
101
+ <a href="#M000011">retry_failures</a>&nbsp;&nbsp;
102
+ <a href="#M000010">store</a>&nbsp;&nbsp;
103
+ <a href="#M000015">successes</a>&nbsp;&nbsp;
104
+ <a href="#M000016">summary</a>&nbsp;&nbsp;
105
+ </div>
106
+ </div>
107
+
108
+ </div>
109
+
110
+
111
+ <!-- if includes -->
112
+
113
+ <div id="section">
114
+
115
+
116
+ <div id="constants-list">
117
+ <h3 class="section-bar">Constants</h3>
118
+
119
+ <div class="name-list">
120
+ <table summary="Constants">
121
+ <tr class="top-aligned-row context-row">
122
+ <td class="context-item-name">OK</td>
123
+ <td>=</td>
124
+ <td class="context-item-value">&quot;ok&quot;.freeze</td>
125
+ </tr>
126
+ <tr class="top-aligned-row context-row">
127
+ <td class="context-item-name">FAIL</td>
128
+ <td>=</td>
129
+ <td class="context-item-value">&quot;fail&quot;.freeze</td>
130
+ </tr>
131
+ </table>
132
+ </div>
133
+ </div>
134
+
135
+
136
+
137
+ <div id="attribute-list">
138
+ <h3 class="section-bar">Attributes</h3>
139
+
140
+ <div class="name-list">
141
+ <table>
142
+ <tr class="top-aligned-row context-row">
143
+ <td class="context-item-name">dir</td>
144
+ <td class="context-item-value">&nbsp;[R]&nbsp;</td>
145
+ <td class="context-item-desc"></td>
146
+ </tr>
147
+ <tr class="top-aligned-row context-row">
148
+ <td class="context-item-name">store</td>
149
+ <td class="context-item-value">&nbsp;[R]&nbsp;</td>
150
+ <td class="context-item-desc"></td>
151
+ </tr>
152
+ </table>
153
+ </div>
154
+ </div>
155
+
156
+
157
+
158
+ <!-- if method_list -->
159
+ <div id="methods">
160
+ <h3 class="section-bar">Public Class methods</h3>
161
+
162
+ <div id="method-M000009" class="method-detail">
163
+ <a name="M000009"></a>
164
+
165
+ <div class="method-heading">
166
+ <a href="#M000009" class="method-signature">
167
+ <span class="method-name">new</span><span class="method-args">(store, dir, ok_suffix=OK, fail_suffix=FAIL, sleep=1)</span>
168
+ </a>
169
+ </div>
170
+
171
+ <div class="method-description">
172
+ <p><a class="source-toggle" href="#"
173
+ onclick="toggleCode('M000009-source');return false;">[Source]</a></p>
174
+ <div class="method-source-code" id="M000009-source">
175
+ <pre>
176
+ <span class="ruby-comment cmt"># File lib/pho/file_management.rb, line 14</span>
177
+ <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">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>)
178
+ <span class="ruby-ivar">@store</span> = <span class="ruby-identifier">store</span>
179
+ <span class="ruby-ivar">@dir</span> = <span class="ruby-identifier">dir</span>
180
+ <span class="ruby-ivar">@sleep</span> = <span class="ruby-identifier">sleep</span>
181
+ <span class="ruby-ivar">@ok_suffix</span> = <span class="ruby-identifier">ok_suffix</span>
182
+ <span class="ruby-ivar">@fail_suffix</span> = <span class="ruby-identifier">fail_suffix</span>
183
+ <span class="ruby-keyword kw">end</span>
184
+ </pre>
185
+ </div>
186
+ </div>
187
+ </div>
188
+
189
+ <h3 class="section-bar">Public Instance methods</h3>
190
+
191
+ <div id="method-M000014" class="method-detail">
192
+ <a name="M000014"></a>
193
+
194
+ <div class="method-heading">
195
+ <a href="#M000014" class="method-signature">
196
+ <span class="method-name">failures</span><span class="method-args">(recursive=false)</span>
197
+ </a>
198
+ </div>
199
+
200
+ <div class="method-description">
201
+ <p>
202
+ List <a href="AbstractFileManager.html#M000014">failures</a>
203
+ </p>
204
+ <p><a class="source-toggle" href="#"
205
+ onclick="toggleCode('M000014-source');return false;">[Source]</a></p>
206
+ <div class="method-source-code" id="M000014-source">
207
+ <pre>
208
+ <span class="ruby-comment cmt"># File lib/pho/file_management.rb, line 68</span>
209
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">failures</span>(<span class="ruby-identifier">recursive</span>=<span class="ruby-keyword kw">false</span>)
210
+ <span class="ruby-identifier">fails</span> = <span class="ruby-constant">Array</span>.<span class="ruby-identifier">new</span>
211
+ <span class="ruby-identifier">list</span>(<span class="ruby-identifier">recursive</span>).<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">file</span><span class="ruby-operator">|</span>
212
+ <span class="ruby-keyword kw">if</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">extname</span>(<span class="ruby-identifier">file</span>) <span class="ruby-operator">!=</span> <span class="ruby-node">&quot;.#{@fail_suffix}&quot;</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">extname</span>(<span class="ruby-identifier">file</span>) <span class="ruby-operator">!=</span> <span class="ruby-node">&quot;.#{@ok_suffix}&quot;</span>
213
+ <span class="ruby-identifier">fails</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">file</span> <span class="ruby-keyword kw">if</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">exists?</span>( <span class="ruby-identifier">get_fail_file_for</span>(<span class="ruby-identifier">file</span>) )
214
+ <span class="ruby-keyword kw">end</span>
215
+ <span class="ruby-keyword kw">end</span>
216
+ <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">fails</span>
217
+ <span class="ruby-keyword kw">end</span>
218
+ </pre>
219
+ </div>
220
+ </div>
221
+ </div>
222
+
223
+ <div id="method-M000017" class="method-detail">
224
+ <a name="M000017"></a>
225
+
226
+ <div class="method-heading">
227
+ <a href="#M000017" class="method-signature">
228
+ <span class="method-name">get_fail_file_for</span><span class="method-args">(filename)</span>
229
+ </a>
230
+ </div>
231
+
232
+ <div class="method-description">
233
+ <p><a class="source-toggle" href="#"
234
+ onclick="toggleCode('M000017-source');return false;">[Source]</a></p>
235
+ <div class="method-source-code" id="M000017-source">
236
+ <pre>
237
+ <span class="ruby-comment cmt"># File lib/pho/file_management.rb, line 100</span>
238
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">get_fail_file_for</span>(<span class="ruby-identifier">filename</span>)
239
+ <span class="ruby-identifier">ext</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">extname</span>(<span class="ruby-identifier">filename</span>)
240
+ <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">filename</span>.<span class="ruby-identifier">gsub</span>(<span class="ruby-node">/#{ext}$/</span>, <span class="ruby-node">&quot;.#{@fail_suffix}&quot;</span>)
241
+ <span class="ruby-keyword kw">end</span>
242
+ </pre>
243
+ </div>
244
+ </div>
245
+ </div>
246
+
247
+ <div id="method-M000018" class="method-detail">
248
+ <a name="M000018"></a>
249
+
250
+ <div class="method-heading">
251
+ <a href="#M000018" class="method-signature">
252
+ <span class="method-name">get_ok_file_for</span><span class="method-args">(filename)</span>
253
+ </a>
254
+ </div>
255
+
256
+ <div class="method-description">
257
+ <p><a class="source-toggle" href="#"
258
+ onclick="toggleCode('M000018-source');return false;">[Source]</a></p>
259
+ <div class="method-source-code" id="M000018-source">
260
+ <pre>
261
+ <span class="ruby-comment cmt"># File lib/pho/file_management.rb, line 105</span>
262
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">get_ok_file_for</span>(<span class="ruby-identifier">filename</span>)
263
+ <span class="ruby-identifier">ext</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">extname</span>(<span class="ruby-identifier">filename</span>)
264
+ <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">filename</span>.<span class="ruby-identifier">gsub</span>(<span class="ruby-node">/#{ext}$/</span>, <span class="ruby-node">&quot;.#{@ok_suffix}&quot;</span>)
265
+ <span class="ruby-keyword kw">end</span>
266
+ </pre>
267
+ </div>
268
+ </div>
269
+ </div>
270
+
271
+ <div id="method-M000013" class="method-detail">
272
+ <a name="M000013"></a>
273
+
274
+ <div class="method-heading">
275
+ <a href="#M000013" class="method-signature">
276
+ <span class="method-name">new_files</span><span class="method-args">(recursive=false)</span>
277
+ </a>
278
+ </div>
279
+
280
+ <div class="method-description">
281
+ <p>
282
+ List any <a href="AbstractFileManager.html#M000009">new</a> files in the
283
+ directory
284
+ </p>
285
+ <p><a class="source-toggle" href="#"
286
+ onclick="toggleCode('M000013-source');return false;">[Source]</a></p>
287
+ <div class="method-source-code" id="M000013-source">
288
+ <pre>
289
+ <span class="ruby-comment cmt"># File lib/pho/file_management.rb, line 53</span>
290
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">new_files</span>(<span class="ruby-identifier">recursive</span>=<span class="ruby-keyword kw">false</span>)
291
+ <span class="ruby-identifier">newfiles</span> = <span class="ruby-constant">Array</span>.<span class="ruby-identifier">new</span>
292
+ <span class="ruby-identifier">list</span>(<span class="ruby-identifier">recursive</span>).<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">file</span><span class="ruby-operator">|</span>
293
+
294
+ <span class="ruby-identifier">ok_file</span> = <span class="ruby-identifier">get_ok_file_for</span>(<span class="ruby-identifier">file</span>)
295
+ <span class="ruby-identifier">fail_file</span> = <span class="ruby-identifier">get_fail_file_for</span>(<span class="ruby-identifier">file</span>)
296
+ <span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span>( <span class="ruby-constant">File</span>.<span class="ruby-identifier">exists?</span>(<span class="ruby-identifier">ok_file</span>) <span class="ruby-keyword kw">or</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">exists?</span>(<span class="ruby-identifier">fail_file</span>) )
297
+ <span class="ruby-identifier">newfiles</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">file</span>
298
+ <span class="ruby-keyword kw">end</span>
299
+
300
+ <span class="ruby-keyword kw">end</span>
301
+ <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">newfiles</span>
302
+ <span class="ruby-keyword kw">end</span>
303
+ </pre>
304
+ </div>
305
+ </div>
306
+ </div>
307
+
308
+ <div id="method-M000012" class="method-detail">
309
+ <a name="M000012"></a>
310
+
311
+ <div class="method-heading">
312
+ <a href="#M000012" class="method-signature">
313
+ <span class="method-name">reset</span><span class="method-args">()</span>
314
+ </a>
315
+ </div>
316
+
317
+ <div class="method-description">
318
+ <p>
319
+ Reset the directory to clear out any previous statuses
320
+ </p>
321
+ <p><a class="source-toggle" href="#"
322
+ onclick="toggleCode('M000012-source');return false;">[Source]</a></p>
323
+ <div class="method-source-code" id="M000012-source">
324
+ <pre>
325
+ <span class="ruby-comment cmt"># File lib/pho/file_management.rb, line 43</span>
326
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">reset</span>()
327
+ <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">&quot;*.#{@fail_suffix}&quot;</span>) ).<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">file</span><span class="ruby-operator">|</span>
328
+ <span class="ruby-constant">File</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-identifier">file</span>)
329
+ <span class="ruby-keyword kw">end</span>
330
+ <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">&quot;*.#{@ok_suffix}&quot;</span>) ).<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">file</span><span class="ruby-operator">|</span>
331
+ <span class="ruby-constant">File</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-identifier">file</span>)
332
+ <span class="ruby-keyword kw">end</span>
333
+ <span class="ruby-keyword kw">end</span>
334
+ </pre>
335
+ </div>
336
+ </div>
337
+ </div>
338
+
339
+ <div id="method-M000011" class="method-detail">
340
+ <a name="M000011"></a>
341
+
342
+ <div class="method-heading">
343
+ <a href="#M000011" class="method-signature">
344
+ <span class="method-name">retry_failures</span><span class="method-args">()</span>
345
+ </a>
346
+ </div>
347
+
348
+ <div class="method-description">
349
+ <p>
350
+ Retry anything known to have failed
351
+ </p>
352
+ <p><a class="source-toggle" href="#"
353
+ onclick="toggleCode('M000011-source');return false;">[Source]</a></p>
354
+ <div class="method-source-code" id="M000011-source">
355
+ <pre>
356
+ <span class="ruby-comment cmt"># File lib/pho/file_management.rb, line 32</span>
357
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">retry_failures</span>()
358
+ <span class="ruby-identifier">retries</span> = <span class="ruby-identifier">failures</span>()
359
+ <span class="ruby-identifier">retries</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">filename</span><span class="ruby-operator">|</span>
360
+ <span class="ruby-constant">File</span>.<span class="ruby-identifier">delete</span>( <span class="ruby-identifier">get_fail_file_for</span>(<span class="ruby-identifier">filename</span>) )
361
+ <span class="ruby-comment cmt">#store it</span>
362
+ <span class="ruby-identifier">file</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">filename</span>)
363
+ <span class="ruby-identifier">store_file</span>(<span class="ruby-identifier">file</span>, <span class="ruby-identifier">filename</span>)
364
+ <span class="ruby-keyword kw">end</span>
365
+ <span class="ruby-keyword kw">end</span>
366
+ </pre>
367
+ </div>
368
+ </div>
369
+ </div>
370
+
371
+ <div id="method-M000010" class="method-detail">
372
+ <a name="M000010"></a>
373
+
374
+ <div class="method-heading">
375
+ <a href="#M000010" class="method-signature">
376
+ <span class="method-name">store</span><span class="method-args">(recursive=false)</span>
377
+ </a>
378
+ </div>
379
+
380
+ <div class="method-description">
381
+ <p>
382
+ <a href="../Store.html">Store</a> all files that match the file name in
383
+ directory
384
+ </p>
385
+ <p><a class="source-toggle" href="#"
386
+ onclick="toggleCode('M000010-source');return false;">[Source]</a></p>
387
+ <div class="method-source-code" id="M000010-source">
388
+ <pre>
389
+ <span class="ruby-comment cmt"># File lib/pho/file_management.rb, line 23</span>
390
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">store</span>(<span class="ruby-identifier">recursive</span>=<span class="ruby-keyword kw">false</span>)
391
+ <span class="ruby-identifier">files_to_store</span> = <span class="ruby-identifier">new_files</span>(<span class="ruby-identifier">recursive</span>)
392
+ <span class="ruby-identifier">files_to_store</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">filename</span><span class="ruby-operator">|</span>
393
+ <span class="ruby-identifier">file</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">filename</span>)
394
+ <span class="ruby-identifier">store_file</span>(<span class="ruby-identifier">file</span>, <span class="ruby-identifier">filename</span>)
395
+ <span class="ruby-keyword kw">end</span>
396
+ <span class="ruby-keyword kw">end</span>
397
+ </pre>
398
+ </div>
399
+ </div>
400
+ </div>
401
+
402
+ <div id="method-M000015" class="method-detail">
403
+ <a name="M000015"></a>
404
+
405
+ <div class="method-heading">
406
+ <a href="#M000015" class="method-signature">
407
+ <span class="method-name">successes</span><span class="method-args">(recursive=false)</span>
408
+ </a>
409
+ </div>
410
+
411
+ <div class="method-description">
412
+ <p>
413
+ List <a href="AbstractFileManager.html#M000015">successes</a>
414
+ </p>
415
+ <p><a class="source-toggle" href="#"
416
+ onclick="toggleCode('M000015-source');return false;">[Source]</a></p>
417
+ <div class="method-source-code" id="M000015-source">
418
+ <pre>
419
+ <span class="ruby-comment cmt"># File lib/pho/file_management.rb, line 79</span>
420
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">successes</span>(<span class="ruby-identifier">recursive</span>=<span class="ruby-keyword kw">false</span>)
421
+ <span class="ruby-identifier">successes</span> = <span class="ruby-constant">Array</span>.<span class="ruby-identifier">new</span>
422
+ <span class="ruby-identifier">list</span>(<span class="ruby-identifier">recursive</span>).<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">file</span><span class="ruby-operator">|</span>
423
+ <span class="ruby-keyword kw">if</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">extname</span>(<span class="ruby-identifier">file</span>) <span class="ruby-operator">!=</span> <span class="ruby-node">&quot;.#{@fail_suffix}&quot;</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">extname</span>(<span class="ruby-identifier">file</span>) <span class="ruby-operator">!=</span> <span class="ruby-node">&quot;.#{@ok_suffix}&quot;</span>
424
+ <span class="ruby-identifier">successes</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">file</span> <span class="ruby-keyword kw">if</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">exists?</span>( <span class="ruby-identifier">get_ok_file_for</span>(<span class="ruby-identifier">file</span>) )
425
+ <span class="ruby-keyword kw">end</span>
426
+ <span class="ruby-keyword kw">end</span>
427
+ <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">successes</span>
428
+ <span class="ruby-keyword kw">end</span>
429
+ </pre>
430
+ </div>
431
+ </div>
432
+ </div>
433
+
434
+ <div id="method-M000016" class="method-detail">
435
+ <a name="M000016"></a>
436
+
437
+ <div class="method-heading">
438
+ <a href="#M000016" class="method-signature">
439
+ <span class="method-name">summary</span><span class="method-args">(recursive=false)</span>
440
+ </a>
441
+ </div>
442
+
443
+ <div class="method-description">
444
+ <p>
445
+ Summarize the state of the collection to the provided IO object Creates a
446
+ simple report
447
+ </p>
448
+ <p><a class="source-toggle" href="#"
449
+ onclick="toggleCode('M000016-source');return false;">[Source]</a></p>
450
+ <div class="method-source-code" id="M000016-source">
451
+ <pre>
452
+ <span class="ruby-comment cmt"># File lib/pho/file_management.rb, line 91</span>
453
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">summary</span>(<span class="ruby-identifier">recursive</span>=<span class="ruby-keyword kw">false</span>)
454
+ <span class="ruby-identifier">failures</span> = <span class="ruby-identifier">failures</span>(<span class="ruby-identifier">recursive</span>)
455
+ <span class="ruby-identifier">successes</span> = <span class="ruby-identifier">successes</span>(<span class="ruby-identifier">recursive</span>)
456
+ <span class="ruby-identifier">newfiles</span> = <span class="ruby-identifier">new_files</span>(<span class="ruby-identifier">recursive</span>)
457
+ <span class="ruby-identifier">total</span> = <span class="ruby-identifier">failures</span>.<span class="ruby-identifier">size</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">successes</span>.<span class="ruby-identifier">size</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">newfiles</span>.<span class="ruby-identifier">size</span>
458
+ <span class="ruby-identifier">summary</span> = <span class="ruby-node">&quot;#{@dir} #{recursive ? &quot; and sub-directories&quot; : &quot;&quot;} contains #{total} files: #{successes.size} stored, #{failures.size} failed, #{newfiles.size} new&quot;</span>
459
+ <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">summary</span>
460
+ <span class="ruby-keyword kw">end</span>
461
+ </pre>
462
+ </div>
463
+ </div>
464
+ </div>
465
+
466
+
467
+ </div>
468
+
469
+
470
+ </div>
471
+
472
+
473
+ <div id="validator-badges">
474
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
475
+ </div>
476
+
477
+ </body>
478
+ </html>