pho 0.3 → 0.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (133) hide show
  1. data/CHANGES +9 -0
  2. data/Rakefile +2 -1
  3. data/bin/talis_store +263 -0
  4. data/doc/rdoc/classes/Pho.html +3 -21
  5. data/doc/rdoc/classes/Pho/Analyzers.html +22 -0
  6. data/doc/rdoc/classes/Pho/DatatypeProperty.html +42 -10
  7. data/doc/rdoc/classes/Pho/Etags.html +102 -30
  8. data/doc/rdoc/classes/Pho/Facet/Results.html +81 -7
  9. data/doc/rdoc/classes/Pho/Facet/Term.html +13 -2
  10. data/doc/rdoc/classes/Pho/FieldPredicateMap.html +233 -30
  11. data/doc/rdoc/classes/Pho/FieldWeighting.html +38 -10
  12. data/doc/rdoc/classes/Pho/Job.html +488 -9
  13. data/doc/rdoc/classes/Pho/JobUpdate.html +141 -0
  14. data/doc/rdoc/classes/Pho/Jobs.html +538 -0
  15. data/doc/rdoc/classes/Pho/Namespaces.html +33 -2
  16. data/doc/rdoc/classes/Pho/QueryProfile.html +162 -20
  17. data/doc/rdoc/classes/Pho/RDFCollection.html +200 -60
  18. data/doc/rdoc/classes/Pho/Snapshot.html +162 -36
  19. data/doc/rdoc/classes/Pho/Status.html +59 -8
  20. data/doc/rdoc/classes/Pho/Store.html +589 -253
  21. data/doc/rdoc/created.rid +1 -1
  22. data/doc/rdoc/files/CHANGES.html +24 -1
  23. data/doc/rdoc/files/lib/pho/field_predicate_map_rb.html +1 -1
  24. data/doc/rdoc/files/lib/pho/job_rb.html +1 -1
  25. data/doc/rdoc/files/lib/pho/snapshot_rb.html +2 -1
  26. data/doc/rdoc/files/lib/pho/status_rb.html +1 -1
  27. data/doc/rdoc/files/lib/pho/store_rb.html +1 -1
  28. data/doc/rdoc/files/lib/pho_rb.html +2 -1
  29. data/doc/rdoc/fr_class_index.html +2 -0
  30. data/doc/rdoc/fr_method_index.html +85 -68
  31. data/lib/pho.rb +18 -10
  32. data/lib/pho/field_predicate_map.rb +6 -1
  33. data/lib/pho/job.rb +326 -6
  34. data/lib/pho/snapshot.rb +46 -19
  35. data/lib/pho/store.rb +22 -56
  36. data/tests/tc_job.rb +262 -0
  37. data/tests/tc_jobcontrol.rb +159 -12
  38. data/tests/tc_snapshots.rb +57 -28
  39. data/tests/ts_pho.rb +1 -0
  40. metadata +9 -110
  41. data/doc/rdoc/classes/Pho/DatatypeProperty.src/M000034.html +0 -21
  42. data/doc/rdoc/classes/Pho/DatatypeProperty.src/M000035.html +0 -29
  43. data/doc/rdoc/classes/Pho/Etags.src/M000088.html +0 -23
  44. data/doc/rdoc/classes/Pho/Etags.src/M000089.html +0 -28
  45. data/doc/rdoc/classes/Pho/Etags.src/M000090.html +0 -21
  46. data/doc/rdoc/classes/Pho/Etags.src/M000091.html +0 -18
  47. data/doc/rdoc/classes/Pho/Etags.src/M000092.html +0 -18
  48. data/doc/rdoc/classes/Pho/Etags.src/M000093.html +0 -18
  49. data/doc/rdoc/classes/Pho/Facet/Results.src/M000001.html +0 -20
  50. data/doc/rdoc/classes/Pho/Facet/Results.src/M000002.html +0 -27
  51. data/doc/rdoc/classes/Pho/Facet/Results.src/M000003.html +0 -54
  52. data/doc/rdoc/classes/Pho/Facet/Term.src/M000004.html +0 -20
  53. data/doc/rdoc/classes/Pho/FieldPredicateMap.src/M000005.html +0 -38
  54. data/doc/rdoc/classes/Pho/FieldPredicateMap.src/M000006.html +0 -28
  55. data/doc/rdoc/classes/Pho/FieldPredicateMap.src/M000007.html +0 -20
  56. data/doc/rdoc/classes/Pho/FieldPredicateMap.src/M000008.html +0 -18
  57. data/doc/rdoc/classes/Pho/FieldPredicateMap.src/M000009.html +0 -23
  58. data/doc/rdoc/classes/Pho/FieldPredicateMap.src/M000010.html +0 -23
  59. data/doc/rdoc/classes/Pho/FieldPredicateMap.src/M000011.html +0 -18
  60. data/doc/rdoc/classes/Pho/FieldPredicateMap.src/M000012.html +0 -18
  61. data/doc/rdoc/classes/Pho/FieldPredicateMap.src/M000013.html +0 -18
  62. data/doc/rdoc/classes/Pho/FieldPredicateMap.src/M000014.html +0 -18
  63. data/doc/rdoc/classes/Pho/FieldPredicateMap.src/M000015.html +0 -18
  64. data/doc/rdoc/classes/Pho/FieldPredicateMap.src/M000016.html +0 -21
  65. data/doc/rdoc/classes/Pho/FieldPredicateMap.src/M000017.html +0 -21
  66. data/doc/rdoc/classes/Pho/FieldPredicateMap.src/M000018.html +0 -38
  67. data/doc/rdoc/classes/Pho/FieldPredicateMap.src/M000019.html +0 -18
  68. data/doc/rdoc/classes/Pho/FieldWeighting.src/M000075.html +0 -20
  69. data/doc/rdoc/classes/Pho/FieldWeighting.src/M000076.html +0 -26
  70. data/doc/rdoc/classes/Pho/Job.src/M000074.html +0 -21
  71. data/doc/rdoc/classes/Pho/QueryProfile.src/M000024.html +0 -39
  72. data/doc/rdoc/classes/Pho/QueryProfile.src/M000025.html +0 -24
  73. data/doc/rdoc/classes/Pho/QueryProfile.src/M000026.html +0 -20
  74. data/doc/rdoc/classes/Pho/QueryProfile.src/M000027.html +0 -18
  75. data/doc/rdoc/classes/Pho/QueryProfile.src/M000028.html +0 -18
  76. data/doc/rdoc/classes/Pho/QueryProfile.src/M000029.html +0 -21
  77. data/doc/rdoc/classes/Pho/QueryProfile.src/M000030.html +0 -18
  78. data/doc/rdoc/classes/Pho/QueryProfile.src/M000031.html +0 -18
  79. data/doc/rdoc/classes/Pho/QueryProfile.src/M000032.html +0 -38
  80. data/doc/rdoc/classes/Pho/QueryProfile.src/M000033.html +0 -18
  81. data/doc/rdoc/classes/Pho/RDFCollection.src/M000077.html +0 -23
  82. data/doc/rdoc/classes/Pho/RDFCollection.src/M000078.html +0 -22
  83. data/doc/rdoc/classes/Pho/RDFCollection.src/M000079.html +0 -24
  84. data/doc/rdoc/classes/Pho/RDFCollection.src/M000080.html +0 -23
  85. data/doc/rdoc/classes/Pho/RDFCollection.src/M000081.html +0 -18
  86. data/doc/rdoc/classes/Pho/RDFCollection.src/M000082.html +0 -22
  87. data/doc/rdoc/classes/Pho/RDFCollection.src/M000083.html +0 -22
  88. data/doc/rdoc/classes/Pho/RDFCollection.src/M000084.html +0 -26
  89. data/doc/rdoc/classes/Pho/RDFCollection.src/M000085.html +0 -23
  90. data/doc/rdoc/classes/Pho/RDFCollection.src/M000086.html +0 -18
  91. data/doc/rdoc/classes/Pho/RDFCollection.src/M000087.html +0 -18
  92. data/doc/rdoc/classes/Pho/Snapshot.src/M000070.html +0 -31
  93. data/doc/rdoc/classes/Pho/Snapshot.src/M000071.html +0 -21
  94. data/doc/rdoc/classes/Pho/Snapshot.src/M000072.html +0 -18
  95. data/doc/rdoc/classes/Pho/Snapshot.src/M000073.html +0 -37
  96. data/doc/rdoc/classes/Pho/Status.src/M000020.html +0 -20
  97. data/doc/rdoc/classes/Pho/Status.src/M000021.html +0 -31
  98. data/doc/rdoc/classes/Pho/Status.src/M000022.html +0 -18
  99. data/doc/rdoc/classes/Pho/Status.src/M000023.html +0 -18
  100. data/doc/rdoc/classes/Pho/Store.src/M000036.html +0 -22
  101. data/doc/rdoc/classes/Pho/Store.src/M000037.html +0 -18
  102. data/doc/rdoc/classes/Pho/Store.src/M000038.html +0 -25
  103. data/doc/rdoc/classes/Pho/Store.src/M000039.html +0 -20
  104. data/doc/rdoc/classes/Pho/Store.src/M000040.html +0 -20
  105. data/doc/rdoc/classes/Pho/Store.src/M000041.html +0 -28
  106. data/doc/rdoc/classes/Pho/Store.src/M000042.html +0 -23
  107. data/doc/rdoc/classes/Pho/Store.src/M000043.html +0 -18
  108. data/doc/rdoc/classes/Pho/Store.src/M000044.html +0 -18
  109. data/doc/rdoc/classes/Pho/Store.src/M000045.html +0 -18
  110. data/doc/rdoc/classes/Pho/Store.src/M000046.html +0 -18
  111. data/doc/rdoc/classes/Pho/Store.src/M000047.html +0 -23
  112. data/doc/rdoc/classes/Pho/Store.src/M000048.html +0 -22
  113. data/doc/rdoc/classes/Pho/Store.src/M000049.html +0 -26
  114. data/doc/rdoc/classes/Pho/Store.src/M000050.html +0 -24
  115. data/doc/rdoc/classes/Pho/Store.src/M000051.html +0 -20
  116. data/doc/rdoc/classes/Pho/Store.src/M000052.html +0 -20
  117. data/doc/rdoc/classes/Pho/Store.src/M000053.html +0 -25
  118. data/doc/rdoc/classes/Pho/Store.src/M000054.html +0 -20
  119. data/doc/rdoc/classes/Pho/Store.src/M000055.html +0 -30
  120. data/doc/rdoc/classes/Pho/Store.src/M000056.html +0 -21
  121. data/doc/rdoc/classes/Pho/Store.src/M000057.html +0 -23
  122. data/doc/rdoc/classes/Pho/Store.src/M000058.html +0 -28
  123. data/doc/rdoc/classes/Pho/Store.src/M000059.html +0 -18
  124. data/doc/rdoc/classes/Pho/Store.src/M000060.html +0 -18
  125. data/doc/rdoc/classes/Pho/Store.src/M000061.html +0 -18
  126. data/doc/rdoc/classes/Pho/Store.src/M000062.html +0 -31
  127. data/doc/rdoc/classes/Pho/Store.src/M000063.html +0 -21
  128. data/doc/rdoc/classes/Pho/Store.src/M000064.html +0 -20
  129. data/doc/rdoc/classes/Pho/Store.src/M000065.html +0 -20
  130. data/doc/rdoc/classes/Pho/Store.src/M000066.html +0 -20
  131. data/doc/rdoc/classes/Pho/Store.src/M000067.html +0 -20
  132. data/doc/rdoc/classes/Pho/Store.src/M000068.html +0 -20
  133. data/doc/rdoc/classes/Pho/Store.src/M000069.html +0 -20
@@ -5,7 +5,7 @@
5
5
 
6
6
  <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
7
7
  <head>
8
- <title>Module: Pho::Namespaces</title>
8
+ <title>Class: Pho::Namespaces</title>
9
9
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
10
  <meta http-equiv="Content-Script-Type" content="text/javascript" />
11
11
  <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
@@ -49,7 +49,7 @@
49
49
  <div id="classHeader">
50
50
  <table class="header-table">
51
51
  <tr class="top-aligned-row">
52
- <td><strong>Module</strong></td>
52
+ <td><strong>Class</strong></td>
53
53
  <td class="class-name-in-header">Pho::Namespaces</td>
54
54
  </tr>
55
55
  <tr class="top-aligned-row">
@@ -62,6 +62,12 @@
62
62
  </td>
63
63
  </tr>
64
64
 
65
+ <tr class="top-aligned-row">
66
+ <td><strong>Parent:</strong></td>
67
+ <td>
68
+ Object
69
+ </td>
70
+ </tr>
65
71
  </table>
66
72
  </div>
67
73
  <!-- banner header -->
@@ -105,6 +111,31 @@
105
111
  <td>=</td>
106
112
  <td class="context-item-value">&quot;http://schemas.talis.com/2007/facet-results#&quot;</td>
107
113
  </tr>
114
+ <tr class="top-aligned-row context-row">
115
+ <td class="context-item-name">RDF</td>
116
+ <td>=</td>
117
+ <td class="context-item-value">&quot;http://www.w3.org/1999/02/22-rdf-syntax-ns#&quot;</td>
118
+ </tr>
119
+ <tr class="top-aligned-row context-row">
120
+ <td class="context-item-name">RDFS</td>
121
+ <td>=</td>
122
+ <td class="context-item-value">&quot;http://www.w3.org/2000/01/rdf-schema#&quot;</td>
123
+ </tr>
124
+ <tr class="top-aligned-row context-row">
125
+ <td class="context-item-name">DC</td>
126
+ <td>=</td>
127
+ <td class="context-item-value">&quot;http://purl.org/dc/elements/1.1/&quot;</td>
128
+ </tr>
129
+ <tr class="top-aligned-row context-row">
130
+ <td class="context-item-name">DC_TERMS</td>
131
+ <td>=</td>
132
+ <td class="context-item-value">&quot;http://purl.org/dc/terms/&quot;</td>
133
+ </tr>
134
+ <tr class="top-aligned-row context-row">
135
+ <td class="context-item-name">MAPPING</td>
136
+ <td>=</td>
137
+ <td class="context-item-value">{ &quot;bf&quot; =&gt; CONFIG, &quot;frm&quot; =&gt; FRAME, &quot;rdf&quot; =&gt; RDF, &quot;rdfs&quot; =&gt; RDFS, &quot;dc&quot; =&gt; DC, &quot;dcterms&quot; =&gt; DC_TERMS</td>
138
+ </tr>
108
139
  </table>
109
140
  </div>
110
141
  </div>
@@ -165,8 +165,7 @@ URI for this resource
165
165
  <a name="M000025"></a>
166
166
 
167
167
  <div class="method-heading">
168
- <a href="QueryProfile.src/M000025.html" target="Code" class="method-signature"
169
- onclick="popupCode('QueryProfile.src/M000025.html');return false;">
168
+ <a href="#M000025" class="method-signature">
170
169
  <span class="method-name">create_weighting</span><span class="method-args">(store, name, weight)</span>
171
170
  </a>
172
171
  </div>
@@ -188,6 +187,22 @@ according to the Platform naming rules
188
187
 
189
188
  </td></tr>
190
189
  </table>
190
+ <p><a class="source-toggle" href="#"
191
+ onclick="toggleCode('M000025-source');return false;">[Source]</a></p>
192
+ <div class="method-source-code" id="M000025-source">
193
+ <pre>
194
+ <span class="ruby-comment cmt"># File lib/pho/query_profile.rb, line 84</span>
195
+ <span class="ruby-keyword kw">def</span> <span class="ruby-constant">QueryProfile</span>.<span class="ruby-identifier">create_weighting</span>(<span class="ruby-identifier">store</span>, <span class="ruby-identifier">name</span>, <span class="ruby-identifier">weight</span>)
196
+ <span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">name</span>.<span class="ruby-identifier">match</span>(<span class="ruby-regexp re">/^[a-zA-Z][a-zA-Z0-9]*$/</span>)
197
+ <span class="ruby-identifier">raise</span> <span class="ruby-value str">&quot;Name does not conform to regular expression: ^[a-zA-Z][a-zA-Z0-9]*$&quot;</span>
198
+ <span class="ruby-keyword kw">end</span>
199
+
200
+ <span class="ruby-identifier">weight_uri</span> = <span class="ruby-identifier">store</span>.<span class="ruby-identifier">build_uri</span>(<span class="ruby-node">&quot;/config/queryprofiles/1##{name}&quot;</span>)
201
+ <span class="ruby-keyword kw">return</span> <span class="ruby-constant">FieldWeighting</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">weight_uri</span>, <span class="ruby-identifier">name</span>, <span class="ruby-identifier">weight</span>)
202
+
203
+ <span class="ruby-keyword kw">end</span>
204
+ </pre>
205
+ </div>
191
206
  </div>
192
207
  </div>
193
208
 
@@ -195,13 +210,24 @@ according to the Platform naming rules
195
210
  <a name="M000026"></a>
196
211
 
197
212
  <div class="method-heading">
198
- <a href="QueryProfile.src/M000026.html" target="Code" class="method-signature"
199
- onclick="popupCode('QueryProfile.src/M000026.html');return false;">
213
+ <a href="#M000026" class="method-signature">
200
214
  <span class="method-name">new</span><span class="method-args">(uri, label, field_weights=Array.new)</span>
201
215
  </a>
202
216
  </div>
203
217
 
204
218
  <div class="method-description">
219
+ <p><a class="source-toggle" href="#"
220
+ onclick="toggleCode('M000026-source');return false;">[Source]</a></p>
221
+ <div class="method-source-code" id="M000026-source">
222
+ <pre>
223
+ <span class="ruby-comment cmt"># File lib/pho/query_profile.rb, line 94</span>
224
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">uri</span>, <span class="ruby-identifier">label</span>, <span class="ruby-identifier">field_weights</span>=<span class="ruby-constant">Array</span>.<span class="ruby-identifier">new</span>)
225
+ <span class="ruby-ivar">@uri</span> = <span class="ruby-identifier">uri</span>
226
+ <span class="ruby-ivar">@label</span> = <span class="ruby-identifier">label</span>
227
+ <span class="ruby-ivar">@field_weights</span> = <span class="ruby-identifier">field_weights</span>
228
+ <span class="ruby-keyword kw">end</span>
229
+ </pre>
230
+ </div>
205
231
  </div>
206
232
  </div>
207
233
 
@@ -209,13 +235,43 @@ according to the Platform naming rules
209
235
  <a name="M000024"></a>
210
236
 
211
237
  <div class="method-heading">
212
- <a href="QueryProfile.src/M000024.html" target="Code" class="method-signature"
213
- onclick="popupCode('QueryProfile.src/M000024.html');return false;">
238
+ <a href="#M000024" class="method-signature">
214
239
  <span class="method-name">read_from_store</span><span class="method-args">(store)</span>
215
240
  </a>
216
241
  </div>
217
242
 
218
243
  <div class="method-description">
244
+ <p><a class="source-toggle" href="#"
245
+ onclick="toggleCode('M000024-source');return false;">[Source]</a></p>
246
+ <div class="method-source-code" id="M000024-source">
247
+ <pre>
248
+ <span class="ruby-comment cmt"># File lib/pho/query_profile.rb, line 53</span>
249
+ <span class="ruby-keyword kw">def</span> <span class="ruby-constant">QueryProfile</span>.<span class="ruby-identifier">read_from_store</span>(<span class="ruby-identifier">store</span>)
250
+ <span class="ruby-identifier">resp</span> = <span class="ruby-identifier">store</span>.<span class="ruby-identifier">get_query_profile</span>(<span class="ruby-constant">Pho</span><span class="ruby-operator">::</span><span class="ruby-constant">ACCEPT_JSON</span>)
251
+ <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>
252
+ <span class="ruby-identifier">raise</span> <span class="ruby-node">&quot;Unable to read Query Profile from store. Response code was #{resp.status}&quot;</span>
253
+ <span class="ruby-keyword kw">end</span>
254
+
255
+ <span class="ruby-identifier">qp_uri</span> = <span class="ruby-identifier">store</span>.<span class="ruby-identifier">build_uri</span>(<span class="ruby-value str">&quot;/config/queryprofiles/1&quot;</span>)
256
+
257
+ <span class="ruby-identifier">json</span> = <span class="ruby-constant">JSON</span>.<span class="ruby-identifier">parse</span>( <span class="ruby-identifier">resp</span>.<span class="ruby-identifier">content</span> )
258
+
259
+ <span class="ruby-identifier">label</span> = <span class="ruby-identifier">json</span>[<span class="ruby-identifier">qp_uri</span>][<span class="ruby-value str">&quot;http:\/\/www.w3.org\/2000\/01\/rdf-schema#label&quot;</span>][<span class="ruby-value">0</span>][<span class="ruby-value str">&quot;value&quot;</span>]
260
+ <span class="ruby-identifier">qp</span> = <span class="ruby-constant">QueryProfile</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">qp_uri</span>, <span class="ruby-identifier">label</span>)
261
+
262
+ <span class="ruby-identifier">field_weights</span> = <span class="ruby-identifier">json</span>[<span class="ruby-identifier">qp_uri</span>][<span class="ruby-value str">&quot;http:\/\/schemas.talis.com\/2006\/bigfoot\/configuration#fieldWeight&quot;</span>]
263
+ <span class="ruby-identifier">field_weights</span>.<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">uri</span><span class="ruby-operator">|</span>
264
+ <span class="ruby-identifier">property</span> = <span class="ruby-identifier">json</span>[<span class="ruby-identifier">uri</span>[<span class="ruby-value str">&quot;value&quot;</span>]]
265
+ <span class="ruby-identifier">name</span> = <span class="ruby-identifier">property</span>[<span class="ruby-value str">&quot;http:\/\/schemas.talis.com\/2006\/frame\/schema#name&quot;</span>][<span class="ruby-value">0</span>][<span class="ruby-value str">&quot;value&quot;</span>]
266
+ <span class="ruby-identifier">weight</span> = <span class="ruby-identifier">property</span>[<span class="ruby-value str">&quot;http:\/\/schemas.talis.com\/2006\/bigfoot\/configuration#weight&quot;</span>][<span class="ruby-value">0</span>][<span class="ruby-value str">&quot;value&quot;</span>]
267
+ <span class="ruby-identifier">qp</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-constant">FieldWeighting</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">uri</span>[<span class="ruby-value str">&quot;value&quot;</span>], <span class="ruby-identifier">name</span>, <span class="ruby-identifier">weight</span>)
268
+ }
269
+
270
+ <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">qp</span>
271
+
272
+ <span class="ruby-keyword kw">end</span>
273
+ </pre>
274
+ </div>
219
275
  </div>
220
276
  </div>
221
277
 
@@ -225,13 +281,22 @@ according to the Platform naming rules
225
281
  <a name="M000027"></a>
226
282
 
227
283
  <div class="method-heading">
228
- <a href="QueryProfile.src/M000027.html" target="Code" class="method-signature"
229
- onclick="popupCode('QueryProfile.src/M000027.html');return false;">
284
+ <a href="#M000027" class="method-signature">
230
285
  <span class="method-name">&lt;&lt;</span><span class="method-args">(weight)</span>
231
286
  </a>
232
287
  </div>
233
288
 
234
289
  <div class="method-description">
290
+ <p><a class="source-toggle" href="#"
291
+ onclick="toggleCode('M000027-source');return false;">[Source]</a></p>
292
+ <div class="method-source-code" id="M000027-source">
293
+ <pre>
294
+ <span class="ruby-comment cmt"># File lib/pho/query_profile.rb, line 100</span>
295
+ <span class="ruby-keyword kw">def</span> <span class="ruby-operator">&lt;&lt;</span>(<span class="ruby-identifier">weight</span>)
296
+ <span class="ruby-ivar">@field_weights</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">weight</span>
297
+ <span class="ruby-keyword kw">end</span>
298
+ </pre>
299
+ </div>
235
300
  </div>
236
301
  </div>
237
302
 
@@ -239,8 +304,7 @@ according to the Platform naming rules
239
304
  <a name="M000028"></a>
240
305
 
241
306
  <div class="method-heading">
242
- <a href="QueryProfile.src/M000028.html" target="Code" class="method-signature"
243
- onclick="popupCode('QueryProfile.src/M000028.html');return false;">
307
+ <a href="#M000028" class="method-signature">
244
308
  <span class="method-name">get_by_name</span><span class="method-args">(name)</span>
245
309
  </a>
246
310
  </div>
@@ -249,6 +313,16 @@ according to the Platform naming rules
249
313
  <p>
250
314
  Retrieve a FieldWeighing by name
251
315
  </p>
316
+ <p><a class="source-toggle" href="#"
317
+ onclick="toggleCode('M000028-source');return false;">[Source]</a></p>
318
+ <div class="method-source-code" id="M000028-source">
319
+ <pre>
320
+ <span class="ruby-comment cmt"># File lib/pho/query_profile.rb, line 105</span>
321
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">get_by_name</span>(<span class="ruby-identifier">name</span>)
322
+ <span class="ruby-keyword kw">return</span> <span class="ruby-ivar">@field_weights</span>.<span class="ruby-identifier">detect</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">field</span><span class="ruby-operator">|</span> <span class="ruby-identifier">field</span>.<span class="ruby-identifier">name</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">name</span> }
323
+ <span class="ruby-keyword kw">end</span>
324
+ </pre>
325
+ </div>
252
326
  </div>
253
327
  </div>
254
328
 
@@ -256,8 +330,7 @@ Retrieve a FieldWeighing by name
256
330
  <a name="M000031"></a>
257
331
 
258
332
  <div class="method-heading">
259
- <a href="QueryProfile.src/M000031.html" target="Code" class="method-signature"
260
- onclick="popupCode('QueryProfile.src/M000031.html');return false;">
333
+ <a href="#M000031" class="method-signature">
261
334
  <span class="method-name">mapped_name?</span><span class="method-args">(name)</span>
262
335
  </a>
263
336
  </div>
@@ -266,6 +339,16 @@ Retrieve a FieldWeighing by name
266
339
  <p>
267
340
  Is there a field weighting for a property with this name?
268
341
  </p>
342
+ <p><a class="source-toggle" href="#"
343
+ onclick="toggleCode('M000031-source');return false;">[Source]</a></p>
344
+ <div class="method-source-code" id="M000031-source">
345
+ <pre>
346
+ <span class="ruby-comment cmt"># File lib/pho/query_profile.rb, line 123</span>
347
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">mapped_name?</span>(<span class="ruby-identifier">name</span>)
348
+ <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">get_by_name</span>(<span class="ruby-identifier">name</span>) <span class="ruby-operator">!=</span> <span class="ruby-keyword kw">nil</span>
349
+ <span class="ruby-keyword kw">end</span>
350
+ </pre>
351
+ </div>
269
352
  </div>
270
353
  </div>
271
354
 
@@ -273,8 +356,7 @@ Is there a field weighting for a property with this name?
273
356
  <a name="M000030"></a>
274
357
 
275
358
  <div class="method-heading">
276
- <a href="QueryProfile.src/M000030.html" target="Code" class="method-signature"
277
- onclick="popupCode('QueryProfile.src/M000030.html');return false;">
359
+ <a href="#M000030" class="method-signature">
278
360
  <span class="method-name">remove</span><span class="method-args">(fw)</span>
279
361
  </a>
280
362
  </div>
@@ -284,6 +366,16 @@ Is there a field weighting for a property with this name?
284
366
  Remove a <a href="FieldWeighting.html">FieldWeighting</a> from the
285
367
  collection
286
368
  </p>
369
+ <p><a class="source-toggle" href="#"
370
+ onclick="toggleCode('M000030-source');return false;">[Source]</a></p>
371
+ <div class="method-source-code" id="M000030-source">
372
+ <pre>
373
+ <span class="ruby-comment cmt"># File lib/pho/query_profile.rb, line 118</span>
374
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">remove</span>(<span class="ruby-identifier">fw</span>)
375
+ <span class="ruby-keyword kw">return</span> <span class="ruby-ivar">@field_weights</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-identifier">fw</span>)
376
+ <span class="ruby-keyword kw">end</span>
377
+ </pre>
378
+ </div>
287
379
  </div>
288
380
  </div>
289
381
 
@@ -291,8 +383,7 @@ collection
291
383
  <a name="M000029"></a>
292
384
 
293
385
  <div class="method-heading">
294
- <a href="QueryProfile.src/M000029.html" target="Code" class="method-signature"
295
- onclick="popupCode('QueryProfile.src/M000029.html');return false;">
386
+ <a href="#M000029" class="method-signature">
296
387
  <span class="method-name">remove_by_name</span><span class="method-args">(name)</span>
297
388
  </a>
298
389
  </div>
@@ -301,6 +392,19 @@ collection
301
392
  <p>
302
393
  Remove a <a href="FieldWeighting.html">FieldWeighting</a> by name
303
394
  </p>
395
+ <p><a class="source-toggle" href="#"
396
+ onclick="toggleCode('M000029-source');return false;">[Source]</a></p>
397
+ <div class="method-source-code" id="M000029-source">
398
+ <pre>
399
+ <span class="ruby-comment cmt"># File lib/pho/query_profile.rb, line 110</span>
400
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">remove_by_name</span>(<span class="ruby-identifier">name</span>)
401
+ <span class="ruby-identifier">fw</span> = <span class="ruby-identifier">get_by_name</span>(<span class="ruby-identifier">name</span>)
402
+ <span class="ruby-keyword kw">if</span> (<span class="ruby-identifier">fw</span> <span class="ruby-operator">!=</span> <span class="ruby-keyword kw">nil</span>)
403
+ <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">remove</span>(<span class="ruby-identifier">fw</span>)
404
+ <span class="ruby-keyword kw">end</span>
405
+ <span class="ruby-keyword kw">end</span>
406
+ </pre>
407
+ </div>
304
408
  </div>
305
409
  </div>
306
410
 
@@ -308,8 +412,7 @@ Remove a <a href="FieldWeighting.html">FieldWeighting</a> by name
308
412
  <a name="M000032"></a>
309
413
 
310
414
  <div class="method-heading">
311
- <a href="QueryProfile.src/M000032.html" target="Code" class="method-signature"
312
- onclick="popupCode('QueryProfile.src/M000032.html');return false;">
415
+ <a href="#M000032" class="method-signature">
313
416
  <span class="method-name">to_rdf</span><span class="method-args">()</span>
314
417
  </a>
315
418
  </div>
@@ -319,6 +422,36 @@ Remove a <a href="FieldWeighting.html">FieldWeighting</a> by name
319
422
  Dump this object to an RDF/XML representation suitable for submitting to
320
423
  the Platform
321
424
  </p>
425
+ <p><a class="source-toggle" href="#"
426
+ onclick="toggleCode('M000032-source');return false;">[Source]</a></p>
427
+ <div class="method-source-code" id="M000032-source">
428
+ <pre>
429
+ <span class="ruby-comment cmt"># File lib/pho/query_profile.rb, line 128</span>
430
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_rdf</span>
431
+ <span class="ruby-identifier">rdf</span> = <span class="ruby-node">&quot;&lt;rdf:RDF xmlns:frm=\&quot;#{Pho::Namespaces::FRAME}\&quot; &quot;</span>
432
+ <span class="ruby-identifier">rdf</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-value str">&quot; xmlns:rdf=\&quot;http://www.w3.org/1999/02/22-rdf-syntax-ns#\&quot; &quot;</span>
433
+ <span class="ruby-identifier">rdf</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-value str">&quot; xmlns:rdfs=\&quot;http://www.w3.org/2000/01/rdf-schema#\&quot; &quot;</span>
434
+ <span class="ruby-identifier">rdf</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-node">&quot; xmlns:bf=\&quot;#{Pho::Namespaces::CONFIG}\&quot; &gt; &quot;</span>
435
+
436
+ <span class="ruby-identifier">rdf</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-node">&quot; &lt;rdf:Description rdf:about=\&quot;#{@uri}\&quot;&gt; &quot;</span>
437
+
438
+ <span class="ruby-identifier">rdf</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-node">&quot; &lt;rdf:type rdf:resource=\&quot;#{Pho::Namespaces::CONFIG}QueryProfile\&quot;/&gt; &quot;</span>
439
+ <span class="ruby-identifier">rdf</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-node">&quot; &lt;rdfs:label&gt;#{@label}&lt;/rdfs:label&gt; &quot;</span>
440
+
441
+ <span class="ruby-ivar">@field_weights</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">property</span><span class="ruby-operator">|</span>
442
+ <span class="ruby-identifier">rdf</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-node">&quot; &lt;frm:fieldWeight rdf:resource=\&quot;#{property.uri}\&quot;/&gt; &quot;</span>
443
+ <span class="ruby-keyword kw">end</span>
444
+
445
+ <span class="ruby-identifier">rdf</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-value str">&quot; &lt;/rdf:Description&gt;&quot;</span>
446
+
447
+ <span class="ruby-ivar">@field_weights</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">property</span><span class="ruby-operator">|</span>
448
+ <span class="ruby-identifier">rdf</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">property</span>.<span class="ruby-identifier">to_rdf</span>(<span class="ruby-keyword kw">false</span>)
449
+ <span class="ruby-keyword kw">end</span>
450
+
451
+ <span class="ruby-identifier">rdf</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-value str">&quot;&lt;/rdf:RDF&gt;&quot;</span>
452
+ <span class="ruby-keyword kw">end</span>
453
+ </pre>
454
+ </div>
322
455
  </div>
323
456
  </div>
324
457
 
@@ -326,8 +459,7 @@ the Platform
326
459
  <a name="M000033"></a>
327
460
 
328
461
  <div class="method-heading">
329
- <a href="QueryProfile.src/M000033.html" target="Code" class="method-signature"
330
- onclick="popupCode('QueryProfile.src/M000033.html');return false;">
462
+ <a href="#M000033" class="method-signature">
331
463
  <span class="method-name">upload</span><span class="method-args">(store)</span>
332
464
  </a>
333
465
  </div>
@@ -337,6 +469,16 @@ the Platform
337
469
  Upload an RDF/XML presentation of this object to the provided Platform <a
338
470
  href="Store.html">Store</a>
339
471
  </p>
472
+ <p><a class="source-toggle" href="#"
473
+ onclick="toggleCode('M000033-source');return false;">[Source]</a></p>
474
+ <div class="method-source-code" id="M000033-source">
475
+ <pre>
476
+ <span class="ruby-comment cmt"># File lib/pho/query_profile.rb, line 153</span>
477
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">upload</span>(<span class="ruby-identifier">store</span>)
478
+ <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">store</span>.<span class="ruby-identifier">put_query_profile</span>(<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">to_rdf</span>)
479
+ <span class="ruby-keyword kw">end</span>
480
+ </pre>
481
+ </div>
340
482
  </div>
341
483
  </div>
342
484
 
@@ -82,7 +82,7 @@
82
82
  <p>
83
83
  Provides a simple mechanism for managing a directory of RDF/XML documents
84
84
  and uploading them to platform <a
85
- href="RDFCollection.html#M000078">store</a>.
85
+ href="RDFCollection.html#M000095">store</a>.
86
86
  </p>
87
87
  <p>
88
88
  Allows a collection to be mirrored into the platform
@@ -97,17 +97,17 @@ Allows a collection to be mirrored into the platform
97
97
  <h3 class="section-bar">Methods</h3>
98
98
 
99
99
  <div class="name-list">
100
- <a href="#M000082">failures</a>&nbsp;&nbsp;
101
- <a href="#M000086">get_fail_file_for</a>&nbsp;&nbsp;
102
- <a href="#M000087">get_ok_file_for</a>&nbsp;&nbsp;
103
- <a href="#M000081">list</a>&nbsp;&nbsp;
104
- <a href="#M000077">new</a>&nbsp;&nbsp;
105
- <a href="#M000084">new_files</a>&nbsp;&nbsp;
106
- <a href="#M000080">reset</a>&nbsp;&nbsp;
107
- <a href="#M000079">retry_failures</a>&nbsp;&nbsp;
108
- <a href="#M000078">store</a>&nbsp;&nbsp;
109
- <a href="#M000083">successes</a>&nbsp;&nbsp;
110
- <a href="#M000085">summary</a>&nbsp;&nbsp;
100
+ <a href="#M000099">failures</a>&nbsp;&nbsp;
101
+ <a href="#M000103">get_fail_file_for</a>&nbsp;&nbsp;
102
+ <a href="#M000104">get_ok_file_for</a>&nbsp;&nbsp;
103
+ <a href="#M000098">list</a>&nbsp;&nbsp;
104
+ <a href="#M000094">new</a>&nbsp;&nbsp;
105
+ <a href="#M000101">new_files</a>&nbsp;&nbsp;
106
+ <a href="#M000097">reset</a>&nbsp;&nbsp;
107
+ <a href="#M000096">retry_failures</a>&nbsp;&nbsp;
108
+ <a href="#M000095">store</a>&nbsp;&nbsp;
109
+ <a href="#M000100">successes</a>&nbsp;&nbsp;
110
+ <a href="#M000102">summary</a>&nbsp;&nbsp;
111
111
  </div>
112
112
  </div>
113
113
 
@@ -152,73 +152,117 @@ Allows a collection to be mirrored into the platform
152
152
  <div id="methods">
153
153
  <h3 class="section-bar">Public Class methods</h3>
154
154
 
155
- <div id="method-M000077" class="method-detail">
156
- <a name="M000077"></a>
155
+ <div id="method-M000094" class="method-detail">
156
+ <a name="M000094"></a>
157
157
 
158
158
  <div class="method-heading">
159
- <a href="RDFCollection.src/M000077.html" target="Code" class="method-signature"
160
- onclick="popupCode('RDFCollection.src/M000077.html');return false;">
159
+ <a href="#M000094" class="method-signature">
161
160
  <span class="method-name">new</span><span class="method-args">(store, dir, rdf_suffix=RDF, ok_suffix=OK, fail_suffix=FAIL, sleep=1)</span>
162
161
  </a>
163
162
  </div>
164
163
 
165
164
  <div class="method-description">
165
+ <p><a class="source-toggle" href="#"
166
+ onclick="toggleCode('M000094-source');return false;">[Source]</a></p>
167
+ <div class="method-source-code" id="M000094-source">
168
+ <pre>
169
+ <span class="ruby-comment cmt"># File lib/pho/rdf_collection.rb, line 16</span>
170
+ <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_suffix</span>=<span class="ruby-constant">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>)
171
+ <span class="ruby-ivar">@store</span> = <span class="ruby-identifier">store</span>
172
+ <span class="ruby-ivar">@dir</span> = <span class="ruby-identifier">dir</span>
173
+ <span class="ruby-ivar">@sleep</span> = <span class="ruby-identifier">sleep</span>
174
+ <span class="ruby-ivar">@rdf_suffix</span> = <span class="ruby-identifier">rdf_suffix</span>
175
+ <span class="ruby-ivar">@ok_suffix</span> = <span class="ruby-identifier">ok_suffix</span>
176
+ <span class="ruby-ivar">@fail_suffix</span> = <span class="ruby-identifier">fail_suffix</span>
177
+ <span class="ruby-keyword kw">end</span>
178
+ </pre>
179
+ </div>
166
180
  </div>
167
181
  </div>
168
182
 
169
183
  <h3 class="section-bar">Public Instance methods</h3>
170
184
 
171
- <div id="method-M000082" class="method-detail">
172
- <a name="M000082"></a>
185
+ <div id="method-M000099" class="method-detail">
186
+ <a name="M000099"></a>
173
187
 
174
188
  <div class="method-heading">
175
- <a href="RDFCollection.src/M000082.html" target="Code" class="method-signature"
176
- onclick="popupCode('RDFCollection.src/M000082.html');return false;">
189
+ <a href="#M000099" class="method-signature">
177
190
  <span class="method-name">failures</span><span class="method-args">()</span>
178
191
  </a>
179
192
  </div>
180
193
 
181
194
  <div class="method-description">
182
195
  <p>
183
- List <a href="RDFCollection.html#M000082">failures</a>
196
+ List <a href="RDFCollection.html#M000099">failures</a>
184
197
  </p>
198
+ <p><a class="source-toggle" href="#"
199
+ onclick="toggleCode('M000099-source');return false;">[Source]</a></p>
200
+ <div class="method-source-code" id="M000099-source">
201
+ <pre>
202
+ <span class="ruby-comment cmt"># File lib/pho/rdf_collection.rb, line 62</span>
203
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">failures</span>()
204
+ <span class="ruby-identifier">fails</span> = <span class="ruby-constant">Array</span>.<span class="ruby-identifier">new</span>
205
+ <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>
206
+ <span class="ruby-identifier">fails</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">file</span>.<span class="ruby-identifier">gsub</span>(<span class="ruby-node">/\.#{@fail_suffix}/</span>, <span class="ruby-node">&quot;.#{@rdf_suffix}&quot;</span>)
207
+ <span class="ruby-keyword kw">end</span>
208
+ <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">fails</span>
209
+ <span class="ruby-keyword kw">end</span>
210
+ </pre>
211
+ </div>
185
212
  </div>
186
213
  </div>
187
214
 
188
- <div id="method-M000086" class="method-detail">
189
- <a name="M000086"></a>
215
+ <div id="method-M000103" class="method-detail">
216
+ <a name="M000103"></a>
190
217
 
191
218
  <div class="method-heading">
192
- <a href="RDFCollection.src/M000086.html" target="Code" class="method-signature"
193
- onclick="popupCode('RDFCollection.src/M000086.html');return false;">
219
+ <a href="#M000103" class="method-signature">
194
220
  <span class="method-name">get_fail_file_for</span><span class="method-args">(filename)</span>
195
221
  </a>
196
222
  </div>
197
223
 
198
224
  <div class="method-description">
225
+ <p><a class="source-toggle" href="#"
226
+ onclick="toggleCode('M000103-source');return false;">[Source]</a></p>
227
+ <div class="method-source-code" id="M000103-source">
228
+ <pre>
229
+ <span class="ruby-comment cmt"># File lib/pho/rdf_collection.rb, line 103</span>
230
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">get_fail_file_for</span>(<span class="ruby-identifier">filename</span>)
231
+ <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">filename</span>.<span class="ruby-identifier">gsub</span>(<span class="ruby-node">/\.#{@rdf_suffix}/</span>, <span class="ruby-node">&quot;.#{@fail_suffix}&quot;</span>)
232
+ <span class="ruby-keyword kw">end</span>
233
+ </pre>
234
+ </div>
199
235
  </div>
200
236
  </div>
201
237
 
202
- <div id="method-M000087" class="method-detail">
203
- <a name="M000087"></a>
238
+ <div id="method-M000104" class="method-detail">
239
+ <a name="M000104"></a>
204
240
 
205
241
  <div class="method-heading">
206
- <a href="RDFCollection.src/M000087.html" target="Code" class="method-signature"
207
- onclick="popupCode('RDFCollection.src/M000087.html');return false;">
242
+ <a href="#M000104" class="method-signature">
208
243
  <span class="method-name">get_ok_file_for</span><span class="method-args">(filename)</span>
209
244
  </a>
210
245
  </div>
211
246
 
212
247
  <div class="method-description">
248
+ <p><a class="source-toggle" href="#"
249
+ onclick="toggleCode('M000104-source');return false;">[Source]</a></p>
250
+ <div class="method-source-code" id="M000104-source">
251
+ <pre>
252
+ <span class="ruby-comment cmt"># File lib/pho/rdf_collection.rb, line 107</span>
253
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">get_ok_file_for</span>(<span class="ruby-identifier">filename</span>)
254
+ <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">filename</span>.<span class="ruby-identifier">gsub</span>(<span class="ruby-node">/\.#{@rdf_suffix}/</span>, <span class="ruby-node">&quot;.#{@ok_suffix}&quot;</span>)
255
+ <span class="ruby-keyword kw">end</span>
256
+ </pre>
257
+ </div>
213
258
  </div>
214
259
  </div>
215
260
 
216
- <div id="method-M000081" class="method-detail">
217
- <a name="M000081"></a>
261
+ <div id="method-M000098" class="method-detail">
262
+ <a name="M000098"></a>
218
263
 
219
264
  <div class="method-heading">
220
- <a href="RDFCollection.src/M000081.html" target="Code" class="method-signature"
221
- onclick="popupCode('RDFCollection.src/M000081.html');return false;">
265
+ <a href="#M000098" class="method-signature">
222
266
  <span class="method-name">list</span><span class="method-args">()</span>
223
267
  </a>
224
268
  </div>
@@ -227,33 +271,59 @@ List <a href="RDFCollection.html#M000082">failures</a>
227
271
  <p>
228
272
  List files being managed
229
273
  </p>
274
+ <p><a class="source-toggle" href="#"
275
+ onclick="toggleCode('M000098-source');return false;">[Source]</a></p>
276
+ <div class="method-source-code" id="M000098-source">
277
+ <pre>
278
+ <span class="ruby-comment cmt"># File lib/pho/rdf_collection.rb, line 57</span>
279
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">list</span>()
280
+ <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">&quot;*.#{@rdf_suffix}&quot;</span>) )
281
+ <span class="ruby-keyword kw">end</span>
282
+ </pre>
283
+ </div>
230
284
  </div>
231
285
  </div>
232
286
 
233
- <div id="method-M000084" class="method-detail">
234
- <a name="M000084"></a>
287
+ <div id="method-M000101" class="method-detail">
288
+ <a name="M000101"></a>
235
289
 
236
290
  <div class="method-heading">
237
- <a href="RDFCollection.src/M000084.html" target="Code" class="method-signature"
238
- onclick="popupCode('RDFCollection.src/M000084.html');return false;">
291
+ <a href="#M000101" class="method-signature">
239
292
  <span class="method-name">new_files</span><span class="method-args">()</span>
240
293
  </a>
241
294
  </div>
242
295
 
243
296
  <div class="method-description">
244
297
  <p>
245
- List any <a href="RDFCollection.html#M000077">new</a> files in the
298
+ List any <a href="RDFCollection.html#M000094">new</a> files in the
246
299
  directory
247
300
  </p>
301
+ <p><a class="source-toggle" href="#"
302
+ onclick="toggleCode('M000101-source');return false;">[Source]</a></p>
303
+ <div class="method-source-code" id="M000101-source">
304
+ <pre>
305
+ <span class="ruby-comment cmt"># File lib/pho/rdf_collection.rb, line 80</span>
306
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">new_files</span>()
307
+ <span class="ruby-identifier">newfiles</span> = <span class="ruby-constant">Array</span>.<span class="ruby-identifier">new</span>
308
+ <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;*.#{@rdf_suffix}&quot;</span>) ) <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">file</span><span class="ruby-operator">|</span>
309
+ <span class="ruby-identifier">ok_file</span> = <span class="ruby-identifier">get_ok_file_for</span>(<span class="ruby-identifier">file</span>)
310
+ <span class="ruby-identifier">fail_file</span> = <span class="ruby-identifier">get_fail_file_for</span>(<span class="ruby-identifier">file</span>)
311
+ <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>) )
312
+ <span class="ruby-identifier">newfiles</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">file</span>
313
+ <span class="ruby-keyword kw">end</span>
314
+ <span class="ruby-keyword kw">end</span>
315
+ <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">newfiles</span>
316
+ <span class="ruby-keyword kw">end</span>
317
+ </pre>
318
+ </div>
248
319
  </div>
249
320
  </div>
250
321
 
251
- <div id="method-M000080" class="method-detail">
252
- <a name="M000080"></a>
322
+ <div id="method-M000097" class="method-detail">
323
+ <a name="M000097"></a>
253
324
 
254
325
  <div class="method-heading">
255
- <a href="RDFCollection.src/M000080.html" target="Code" class="method-signature"
256
- onclick="popupCode('RDFCollection.src/M000080.html');return false;">
326
+ <a href="#M000097" class="method-signature">
257
327
  <span class="method-name">reset</span><span class="method-args">(reset_store=false)</span>
258
328
  </a>
259
329
  </div>
@@ -262,18 +332,32 @@ directory
262
332
  <p>
263
333
  Reset the directory to clear out any previous statuses <a
264
334
  href="Store.html">Store</a> can also be <a
265
- href="RDFCollection.html#M000080">reset</a> at the same time: use with
335
+ href="RDFCollection.html#M000097">reset</a> at the same time: use with
266
336
  care!
267
337
  </p>
338
+ <p><a class="source-toggle" href="#"
339
+ onclick="toggleCode('M000097-source');return false;">[Source]</a></p>
340
+ <div class="method-source-code" id="M000097-source">
341
+ <pre>
342
+ <span class="ruby-comment cmt"># File lib/pho/rdf_collection.rb, line 47</span>
343
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">reset</span>(<span class="ruby-identifier">reset_store</span>=<span class="ruby-keyword kw">false</span>)
344
+ <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>
345
+ <span class="ruby-constant">File</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-identifier">file</span>)
346
+ <span class="ruby-keyword kw">end</span>
347
+ <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>
348
+ <span class="ruby-constant">File</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-identifier">file</span>)
349
+ <span class="ruby-keyword kw">end</span>
350
+ <span class="ruby-keyword kw">end</span>
351
+ </pre>
352
+ </div>
268
353
  </div>
269
354
  </div>
270
355
 
271
- <div id="method-M000079" class="method-detail">
272
- <a name="M000079"></a>
356
+ <div id="method-M000096" class="method-detail">
357
+ <a name="M000096"></a>
273
358
 
274
359
  <div class="method-heading">
275
- <a href="RDFCollection.src/M000079.html" target="Code" class="method-signature"
276
- onclick="popupCode('RDFCollection.src/M000079.html');return false;">
360
+ <a href="#M000096" class="method-signature">
277
361
  <span class="method-name">retry_failures</span><span class="method-args">()</span>
278
362
  </a>
279
363
  </div>
@@ -282,15 +366,30 @@ care!
282
366
  <p>
283
367
  Retry anything known to have failed
284
368
  </p>
369
+ <p><a class="source-toggle" href="#"
370
+ onclick="toggleCode('M000096-source');return false;">[Source]</a></p>
371
+ <div class="method-source-code" id="M000096-source">
372
+ <pre>
373
+ <span class="ruby-comment cmt"># File lib/pho/rdf_collection.rb, line 35</span>
374
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">retry_failures</span>()
375
+ <span class="ruby-identifier">retries</span> = <span class="ruby-identifier">failures</span>()
376
+ <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>
377
+ <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>) )
378
+ <span class="ruby-comment cmt">#store it</span>
379
+ <span class="ruby-identifier">file</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">filename</span>)
380
+ <span class="ruby-identifier">store_file</span>(<span class="ruby-identifier">file</span>, <span class="ruby-identifier">filename</span>)
381
+ <span class="ruby-keyword kw">end</span>
382
+ <span class="ruby-keyword kw">end</span>
383
+ </pre>
384
+ </div>
285
385
  </div>
286
386
  </div>
287
387
 
288
- <div id="method-M000078" class="method-detail">
289
- <a name="M000078"></a>
388
+ <div id="method-M000095" class="method-detail">
389
+ <a name="M000095"></a>
290
390
 
291
391
  <div class="method-heading">
292
- <a href="RDFCollection.src/M000078.html" target="Code" class="method-signature"
293
- onclick="popupCode('RDFCollection.src/M000078.html');return false;">
392
+ <a href="#M000095" class="method-signature">
294
393
  <span class="method-name">store</span><span class="method-args">()</span>
295
394
  </a>
296
395
  </div>
@@ -300,32 +399,58 @@ Retry anything known to have failed
300
399
  <a href="Store.html">Store</a> all files that match the file name in
301
400
  directory
302
401
  </p>
402
+ <p><a class="source-toggle" href="#"
403
+ onclick="toggleCode('M000095-source');return false;">[Source]</a></p>
404
+ <div class="method-source-code" id="M000095-source">
405
+ <pre>
406
+ <span class="ruby-comment cmt"># File lib/pho/rdf_collection.rb, line 26</span>
407
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">store</span>()
408
+ <span class="ruby-identifier">files_to_store</span> = <span class="ruby-identifier">new_files</span>()
409
+ <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>
410
+ <span class="ruby-identifier">file</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">filename</span>)
411
+ <span class="ruby-identifier">store_file</span>(<span class="ruby-identifier">file</span>, <span class="ruby-identifier">filename</span>)
412
+ <span class="ruby-keyword kw">end</span>
413
+ <span class="ruby-keyword kw">end</span>
414
+ </pre>
415
+ </div>
303
416
  </div>
304
417
  </div>
305
418
 
306
- <div id="method-M000083" class="method-detail">
307
- <a name="M000083"></a>
419
+ <div id="method-M000100" class="method-detail">
420
+ <a name="M000100"></a>
308
421
 
309
422
  <div class="method-heading">
310
- <a href="RDFCollection.src/M000083.html" target="Code" class="method-signature"
311
- onclick="popupCode('RDFCollection.src/M000083.html');return false;">
423
+ <a href="#M000100" class="method-signature">
312
424
  <span class="method-name">successes</span><span class="method-args">()</span>
313
425
  </a>
314
426
  </div>
315
427
 
316
428
  <div class="method-description">
317
429
  <p>
318
- List <a href="RDFCollection.html#M000083">successes</a>
430
+ List <a href="RDFCollection.html#M000100">successes</a>
319
431
  </p>
432
+ <p><a class="source-toggle" href="#"
433
+ onclick="toggleCode('M000100-source');return false;">[Source]</a></p>
434
+ <div class="method-source-code" id="M000100-source">
435
+ <pre>
436
+ <span class="ruby-comment cmt"># File lib/pho/rdf_collection.rb, line 71</span>
437
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">successes</span>()
438
+ <span class="ruby-identifier">successes</span> = <span class="ruby-constant">Array</span>.<span class="ruby-identifier">new</span>
439
+ <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>
440
+ <span class="ruby-identifier">successes</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">file</span>.<span class="ruby-identifier">gsub</span>(<span class="ruby-node">/\.#{@ok_suffix}/</span>, <span class="ruby-node">&quot;.#{@rdf_suffix}&quot;</span>)
441
+ <span class="ruby-keyword kw">end</span>
442
+ <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">successes</span>
443
+ <span class="ruby-keyword kw">end</span>
444
+ </pre>
445
+ </div>
320
446
  </div>
321
447
  </div>
322
448
 
323
- <div id="method-M000085" class="method-detail">
324
- <a name="M000085"></a>
449
+ <div id="method-M000102" class="method-detail">
450
+ <a name="M000102"></a>
325
451
 
326
452
  <div class="method-heading">
327
- <a href="RDFCollection.src/M000085.html" target="Code" class="method-signature"
328
- onclick="popupCode('RDFCollection.src/M000085.html');return false;">
453
+ <a href="#M000102" class="method-signature">
329
454
  <span class="method-name">summary</span><span class="method-args">()</span>
330
455
  </a>
331
456
  </div>
@@ -335,6 +460,21 @@ List <a href="RDFCollection.html#M000083">successes</a>
335
460
  Summarize the state of the collection to the provied IO object Creates a
336
461
  simple report
337
462
  </p>
463
+ <p><a class="source-toggle" href="#"
464
+ onclick="toggleCode('M000102-source');return false;">[Source]</a></p>
465
+ <div class="method-source-code" id="M000102-source">
466
+ <pre>
467
+ <span class="ruby-comment cmt"># File lib/pho/rdf_collection.rb, line 94</span>
468
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">summary</span>()
469
+ <span class="ruby-identifier">failures</span> = <span class="ruby-identifier">failures</span>()
470
+ <span class="ruby-identifier">successes</span> = <span class="ruby-identifier">successes</span>()
471
+ <span class="ruby-identifier">newfiles</span> = <span class="ruby-identifier">new_files</span>()
472
+ <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>
473
+ <span class="ruby-identifier">summary</span> = <span class="ruby-node">&quot;#{@dir} contains #{total} files: #{successes.size} stored, #{failures.size} failed, #{newfiles.size} new&quot;</span>
474
+ <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">summary</span>
475
+ <span class="ruby-keyword kw">end</span>
476
+ </pre>
477
+ </div>
338
478
  </div>
339
479
  </div>
340
480