pho 0.7.7 → 0.7.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (51) hide show
  1. data/CHANGES +21 -0
  2. data/README +1 -2
  3. data/Rakefile +1 -1
  4. data/bin/talis_store +13 -22
  5. data/doc/rdoc/classes/Pho/CommandLine.html +162 -124
  6. data/doc/rdoc/classes/Pho/DatatypeProperty.html +12 -12
  7. data/doc/rdoc/classes/Pho/Enrichment/StoreEnricher.html +29 -29
  8. data/doc/rdoc/classes/Pho/Etags.html +36 -36
  9. data/doc/rdoc/classes/Pho/Facet/Results.html +19 -19
  10. data/doc/rdoc/classes/Pho/Facet/Term.html +6 -6
  11. data/doc/rdoc/classes/Pho/FieldPredicateMap.html +102 -102
  12. data/doc/rdoc/classes/Pho/FieldWeighting.html +12 -12
  13. data/doc/rdoc/classes/Pho/FileManagement/AbstractFileManager.html +262 -103
  14. data/doc/rdoc/classes/Pho/FileManagement/FileManager.html +34 -14
  15. data/doc/rdoc/classes/Pho/FileManagement/RDFManager.html +10 -5
  16. data/doc/rdoc/classes/Pho/Job.html +64 -64
  17. data/doc/rdoc/classes/Pho/Jobs.html +60 -60
  18. data/doc/rdoc/classes/Pho/OAI/Record.html +6 -6
  19. data/doc/rdoc/classes/Pho/OAI/Records.html +24 -24
  20. data/doc/rdoc/classes/Pho/OAI/Statistics.html +12 -12
  21. data/doc/rdoc/classes/Pho/QueryProfile.html +66 -66
  22. data/doc/rdoc/classes/Pho/ResourceHash/Converter.html +36 -36
  23. data/doc/rdoc/classes/Pho/ResourceHash/SetAlgebra.html +12 -12
  24. data/doc/rdoc/classes/Pho/Snapshot.html +35 -35
  25. data/doc/rdoc/classes/Pho/Sparql/SparqlClient.html +74 -74
  26. data/doc/rdoc/classes/Pho/Sparql/SparqlHelper.html +78 -78
  27. data/doc/rdoc/classes/Pho/Status.html +26 -26
  28. data/doc/rdoc/classes/Pho/Store.html +215 -215
  29. data/doc/rdoc/classes/Pho/StoreSparqlClient.html +12 -12
  30. data/doc/rdoc/classes/Pho/Update/Changeset.html +63 -63
  31. data/doc/rdoc/classes/Pho/Update/ChangesetBuilder.html +24 -24
  32. data/doc/rdoc/classes/Pho/Update/ChangesetHelper.html +6 -6
  33. data/doc/rdoc/classes/Pho/Update/Changesets.html +12 -12
  34. data/doc/rdoc/classes/Pho/Update/LiteralStatement.html +18 -18
  35. data/doc/rdoc/classes/Pho/Update/ResourceStatement.html +24 -24
  36. data/doc/rdoc/classes/Pho/Update/Statement.html +24 -24
  37. data/doc/rdoc/created.rid +1 -1
  38. data/doc/rdoc/files/CHANGES.html +34 -1
  39. data/doc/rdoc/files/README.html +3 -4
  40. data/doc/rdoc/files/lib/pho/command_line_rb.html +1 -1
  41. data/doc/rdoc/files/lib/pho/file_management_rb.html +1 -1
  42. data/doc/rdoc/files/lib/pho/file_manager_rb.html +1 -1
  43. data/doc/rdoc/files/lib/pho/rdf_collection_rb.html +1 -1
  44. data/doc/rdoc/fr_method_index.html +212 -205
  45. data/lib/pho/command_line.rb +29 -11
  46. data/lib/pho/file_management.rb +85 -29
  47. data/lib/pho/file_manager.rb +10 -11
  48. data/lib/pho/rdf_collection.rb +8 -3
  49. data/tests/tc_file_manager.rb +144 -26
  50. data/tests/tc_rdf_collection.rb +76 -68
  51. metadata +4 -4
data/CHANGES CHANGED
@@ -1,5 +1,26 @@
1
1
  Brief notes on significant changes and additions in each release
2
2
 
3
+ == Version 0.7.8
4
+
5
+ * Added --updates to allow for store/upload of only changed files
6
+
7
+ * Recursive resets of collection directories
8
+
9
+ * Fixed command-line code and RDF collection so that it supports all of the --retry,
10
+ --force, and --traverse parameters
11
+
12
+ * Added --retry parameter for file uploads to allow retrying of failed uploads
13
+
14
+ * Added --force parameter for file uploads to reset tracking files, allowing complete
15
+ resends
16
+
17
+ * Fixed bug with directory uploads mangling file names
18
+
19
+ * Fixed bug with tracking files with same root file name, e.g. foo.rdf and foo.css
20
+
21
+ * Changed FileManager code so that all .ok and .fail fails are put into a shadow
22
+ ".pho" directory, this avoids polluting directories with tracking files
23
+
3
24
  == Version 0.7.7
4
25
 
5
26
  * Included bug fixes from @kiyanwang into OAI support. Now properly handles resumption
data/README CHANGED
@@ -21,8 +21,7 @@ http://pho.rubyforge.net
21
21
 
22
22
  == Installation
23
23
 
24
- From the 0.5 release onwards, Pho is dependent on the Ruby bindings for the Redland RDF library.
25
- Ensure you have the librdf0 and librdf-ruby packages installed.
24
+ From the 0.7.7 release onwards, Pho is dependent on the RDF.rb library and plugins for RDF parsing.
26
25
 
27
26
  All other dependencies are for specific Ruby gems which should get automatically installed,
28
27
  along with the Pho gem itself, by running:
data/Rakefile CHANGED
@@ -5,7 +5,7 @@ require 'rake/testtask'
5
5
  require 'rake/clean'
6
6
 
7
7
  NAME = "pho"
8
- VER = "0.7.7"
8
+ VER = "0.7.8"
9
9
 
10
10
  RDOC_OPTS = ['--quiet', '--title', 'Pho (Talis Platform Client) Reference', '--main', 'README']
11
11
 
@@ -133,6 +133,9 @@ MODE
133
133
  #{ PROGRAM } upload -u user -p pass -s my-dev1 -d ~/files
134
134
  #{ PROGRAM } upload -u user -p pass -s my-dev1 --traverse -d ~/files
135
135
  #{ PROGRAM } upload -u user -p pass -s my-dev1 --traverse -d ~/files --base assets
136
+ #{ PROGRAM } upload -u user -p pass -s my-dev1 --force -d ~/files
137
+ #{ PROGRAM } upload -u user -p pass -s my-dev1 --updates -d ~/files
138
+ #{ PROGRAM } upload -u user -p pass -s my-dev1 --retry -d ~/files
136
139
 
137
140
  OPTIONS
138
141
 
@@ -154,6 +157,10 @@ OPTIONS
154
157
  recursively store files or RDF
155
158
  --base
156
159
  base path for uploading files to content box
160
+ --force
161
+ for directory uploads, force resending of files, removing previous tracking files
162
+ --retry
163
+ for directory uploads, triggers retry of previously failed requests only
157
164
  --raw
158
165
  output raw API response, e.g. for fpmap and queryprofile
159
166
  --field
@@ -163,7 +170,9 @@ OPTIONS
163
170
  --weight
164
171
  weighting for a field in query profile
165
172
  --analyzer
166
- name or uri of analyzer
173
+ name or uri of analyzer
174
+ --updates
175
+ for directory uploads, look for changed files and store/upload those only
167
176
  EOL
168
177
 
169
178
  mode = ARGV.shift
@@ -179,6 +188,9 @@ opts = GetoptLong::new(
179
188
  [ "--traverse" , "-t" , GetoptLong::NO_ARGUMENT ],
180
189
  [ "--base" , "-b" , GetoptLong::REQUIRED_ARGUMENT ],
181
190
  [ "--raw" , GetoptLong::NO_ARGUMENT ],
191
+ [ "--force" , GetoptLong::NO_ARGUMENT ],
192
+ [ "--retry" , GetoptLong::NO_ARGUMENT ],
193
+ [ "--updates" , GetoptLong::NO_ARGUMENT ],
182
194
  [ "--field" , GetoptLong::REQUIRED_ARGUMENT ],
183
195
  [ "--predicate" , GetoptLong::REQUIRED_ARGUMENT ],
184
196
  [ "--weight" , GetoptLong::REQUIRED_ARGUMENT ],
@@ -190,27 +202,6 @@ mode = "help" if opts["--help"]
190
202
  if mode == "help"
191
203
  USAGE.display
192
204
  else
193
-
194
-
195
- # if !opts["username"]
196
- # puts "no <username>"
197
- # abort USAGE
198
- # end
199
- # if !opts["password"]
200
- # puts "no <password>"
201
- # abort USAGE
202
- # end
203
- # if !opts["store"]
204
- # puts "no <store>"
205
- # abort USAGE
206
- # end
207
- #
208
- # storename = opts["store"]
209
- # if !storename.start_with?("http")
210
- # storename = "http://api.talis.com/stores/#{storename}"
211
- # end
212
- #
213
- # store = Pho::Store.new(storename, opts["username"], opts["password"])
214
205
 
215
206
  cmds = nil
216
207
  begin
@@ -92,24 +92,25 @@ Class that implements the command-line behaviour
92
92
  <h3 class="section-bar">Methods</h3>
93
93
 
94
94
  <div class="name-list">
95
- <a href="#M000125">add_mapping</a>&nbsp;&nbsp;
96
- <a href="#M000126">add_weight</a>&nbsp;&nbsp;
97
- <a href="#M000114">backup</a>&nbsp;&nbsp;
98
- <a href="#M000119">describe</a>&nbsp;&nbsp;
99
- <a href="#M000123">fpmap</a>&nbsp;&nbsp;
100
- <a href="#M000109">new</a>&nbsp;&nbsp;
101
- <a href="#M000111">password</a>&nbsp;&nbsp;
102
- <a href="#M000124">queryprofile</a>&nbsp;&nbsp;
103
- <a href="#M000116">reindex</a>&nbsp;&nbsp;
104
- <a href="#M000117">reset</a>&nbsp;&nbsp;
105
- <a href="#M000118">restore</a>&nbsp;&nbsp;
106
- <a href="#M000115">snapshot</a>&nbsp;&nbsp;
107
- <a href="#M000120">sparql</a>&nbsp;&nbsp;
108
- <a href="#M000113">status</a>&nbsp;&nbsp;
109
- <a href="#M000121">store</a>&nbsp;&nbsp;
110
- <a href="#M000112">storename</a>&nbsp;&nbsp;
111
- <a href="#M000122">upload</a>&nbsp;&nbsp;
112
- <a href="#M000110">username</a>&nbsp;&nbsp;
95
+ <a href="#M000132">add_mapping</a>&nbsp;&nbsp;
96
+ <a href="#M000133">add_weight</a>&nbsp;&nbsp;
97
+ <a href="#M000120">backup</a>&nbsp;&nbsp;
98
+ <a href="#M000125">describe</a>&nbsp;&nbsp;
99
+ <a href="#M000130">fpmap</a>&nbsp;&nbsp;
100
+ <a href="#M000115">new</a>&nbsp;&nbsp;
101
+ <a href="#M000117">password</a>&nbsp;&nbsp;
102
+ <a href="#M000131">queryprofile</a>&nbsp;&nbsp;
103
+ <a href="#M000122">reindex</a>&nbsp;&nbsp;
104
+ <a href="#M000123">reset</a>&nbsp;&nbsp;
105
+ <a href="#M000124">restore</a>&nbsp;&nbsp;
106
+ <a href="#M000121">snapshot</a>&nbsp;&nbsp;
107
+ <a href="#M000126">sparql</a>&nbsp;&nbsp;
108
+ <a href="#M000119">status</a>&nbsp;&nbsp;
109
+ <a href="#M000127">store</a>&nbsp;&nbsp;
110
+ <a href="#M000129">store_collection</a>&nbsp;&nbsp;
111
+ <a href="#M000118">storename</a>&nbsp;&nbsp;
112
+ <a href="#M000128">upload</a>&nbsp;&nbsp;
113
+ <a href="#M000116">username</a>&nbsp;&nbsp;
113
114
  </div>
114
115
  </div>
115
116
 
@@ -131,19 +132,19 @@ Class that implements the command-line behaviour
131
132
  <div id="methods">
132
133
  <h3 class="section-bar">Public Class methods</h3>
133
134
 
134
- <div id="method-M000109" class="method-detail">
135
- <a name="M000109"></a>
135
+ <div id="method-M000115" class="method-detail">
136
+ <a name="M000115"></a>
136
137
 
137
138
  <div class="method-heading">
138
- <a href="#M000109" class="method-signature">
139
+ <a href="#M000115" class="method-signature">
139
140
  <span class="method-name">new</span><span class="method-args">(opts, env, store=nil)</span>
140
141
  </a>
141
142
  </div>
142
143
 
143
144
  <div class="method-description">
144
145
  <p><a class="source-toggle" href="#"
145
- onclick="toggleCode('M000109-source');return false;">[Source]</a></p>
146
- <div class="method-source-code" id="M000109-source">
146
+ onclick="toggleCode('M000115-source');return false;">[Source]</a></p>
147
+ <div class="method-source-code" id="M000115-source">
147
148
  <pre>
148
149
  <span class="ruby-comment cmt"># File lib/pho/command_line.rb, line 6</span>
149
150
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">opts</span>, <span class="ruby-identifier">env</span>, <span class="ruby-identifier">store</span>=<span class="ruby-keyword kw">nil</span>)
@@ -171,21 +172,21 @@ Class that implements the command-line behaviour
171
172
 
172
173
  <h3 class="section-bar">Public Instance methods</h3>
173
174
 
174
- <div id="method-M000125" class="method-detail">
175
- <a name="M000125"></a>
175
+ <div id="method-M000132" class="method-detail">
176
+ <a name="M000132"></a>
176
177
 
177
178
  <div class="method-heading">
178
- <a href="#M000125" class="method-signature">
179
+ <a href="#M000132" class="method-signature">
179
180
  <span class="method-name">add_mapping</span><span class="method-args">(out=$stdout)</span>
180
181
  </a>
181
182
  </div>
182
183
 
183
184
  <div class="method-description">
184
185
  <p><a class="source-toggle" href="#"
185
- onclick="toggleCode('M000125-source');return false;">[Source]</a></p>
186
- <div class="method-source-code" id="M000125-source">
186
+ onclick="toggleCode('M000132-source');return false;">[Source]</a></p>
187
+ <div class="method-source-code" id="M000132-source">
187
188
  <pre>
188
- <span class="ruby-comment cmt"># File lib/pho/command_line.rb, line 252</span>
189
+ <span class="ruby-comment cmt"># File lib/pho/command_line.rb, line 270</span>
189
190
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add_mapping</span>(<span class="ruby-identifier">out</span>=<span class="ruby-identifier">$stdout</span>)
190
191
  <span class="ruby-identifier">fpmap</span> = <span class="ruby-constant">Pho</span><span class="ruby-operator">::</span><span class="ruby-constant">FieldPredicateMap</span>.<span class="ruby-identifier">read_from_store</span>(<span class="ruby-ivar">@store</span>)
191
192
  <span class="ruby-identifier">mapping</span> = <span class="ruby-constant">Pho</span><span class="ruby-operator">::</span><span class="ruby-constant">FieldPredicateMap</span>.<span class="ruby-identifier">create_mapping</span>(<span class="ruby-ivar">@store</span>, <span class="ruby-ivar">@opts</span>[<span class="ruby-value str">&quot;predicate&quot;</span>], <span class="ruby-ivar">@opts</span>[<span class="ruby-value str">&quot;field&quot;</span>], <span class="ruby-ivar">@opts</span>[<span class="ruby-value str">&quot;analyzer&quot;</span>])
@@ -207,21 +208,21 @@ Class that implements the command-line behaviour
207
208
  </div>
208
209
  </div>
209
210
 
210
- <div id="method-M000126" class="method-detail">
211
- <a name="M000126"></a>
211
+ <div id="method-M000133" class="method-detail">
212
+ <a name="M000133"></a>
212
213
 
213
214
  <div class="method-heading">
214
- <a href="#M000126" class="method-signature">
215
+ <a href="#M000133" class="method-signature">
215
216
  <span class="method-name">add_weight</span><span class="method-args">(out=$stdout)</span>
216
217
  </a>
217
218
  </div>
218
219
 
219
220
  <div class="method-description">
220
221
  <p><a class="source-toggle" href="#"
221
- onclick="toggleCode('M000126-source');return false;">[Source]</a></p>
222
- <div class="method-source-code" id="M000126-source">
222
+ onclick="toggleCode('M000133-source');return false;">[Source]</a></p>
223
+ <div class="method-source-code" id="M000133-source">
223
224
  <pre>
224
- <span class="ruby-comment cmt"># File lib/pho/command_line.rb, line 269</span>
225
+ <span class="ruby-comment cmt"># File lib/pho/command_line.rb, line 287</span>
225
226
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add_weight</span>(<span class="ruby-identifier">out</span>=<span class="ruby-identifier">$stdout</span>)
226
227
  <span class="ruby-identifier">qp</span> = <span class="ruby-constant">Pho</span><span class="ruby-operator">::</span><span class="ruby-constant">QueryProfile</span>.<span class="ruby-identifier">read_from_store</span>(<span class="ruby-ivar">@store</span>)
227
228
  <span class="ruby-identifier">weight</span> = <span class="ruby-constant">Pho</span><span class="ruby-operator">::</span><span class="ruby-constant">QueryProfile</span>.<span class="ruby-identifier">create_weighting</span>(<span class="ruby-ivar">@store</span>, <span class="ruby-ivar">@opts</span>[<span class="ruby-value str">&quot;field&quot;</span>], <span class="ruby-ivar">@opts</span>[<span class="ruby-value str">&quot;weight&quot;</span>])
@@ -243,19 +244,19 @@ Class that implements the command-line behaviour
243
244
  </div>
244
245
  </div>
245
246
 
246
- <div id="method-M000114" class="method-detail">
247
- <a name="M000114"></a>
247
+ <div id="method-M000120" class="method-detail">
248
+ <a name="M000120"></a>
248
249
 
249
250
  <div class="method-heading">
250
- <a href="#M000114" class="method-signature">
251
+ <a href="#M000120" class="method-signature">
251
252
  <span class="method-name">backup</span><span class="method-args">()</span>
252
253
  </a>
253
254
  </div>
254
255
 
255
256
  <div class="method-description">
256
257
  <p><a class="source-toggle" href="#"
257
- onclick="toggleCode('M000114-source');return false;">[Source]</a></p>
258
- <div class="method-source-code" id="M000114-source">
258
+ onclick="toggleCode('M000120-source');return false;">[Source]</a></p>
259
+ <div class="method-source-code" id="M000120-source">
259
260
  <pre>
260
261
  <span class="ruby-comment cmt"># File lib/pho/command_line.rb, line 52</span>
261
262
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">backup</span>()
@@ -277,19 +278,19 @@ Class that implements the command-line behaviour
277
278
  </div>
278
279
  </div>
279
280
 
280
- <div id="method-M000119" class="method-detail">
281
- <a name="M000119"></a>
281
+ <div id="method-M000125" class="method-detail">
282
+ <a name="M000125"></a>
282
283
 
283
284
  <div class="method-heading">
284
- <a href="#M000119" class="method-signature">
285
+ <a href="#M000125" class="method-signature">
285
286
  <span class="method-name">describe</span><span class="method-args">()</span>
286
287
  </a>
287
288
  </div>
288
289
 
289
290
  <div class="method-description">
290
291
  <p><a class="source-toggle" href="#"
291
- onclick="toggleCode('M000119-source');return false;">[Source]</a></p>
292
- <div class="method-source-code" id="M000119-source">
292
+ onclick="toggleCode('M000125-source');return false;">[Source]</a></p>
293
+ <div class="method-source-code" id="M000125-source">
293
294
  <pre>
294
295
  <span class="ruby-comment cmt"># File lib/pho/command_line.rb, line 115</span>
295
296
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">describe</span>()
@@ -306,21 +307,21 @@ Class that implements the command-line behaviour
306
307
  </div>
307
308
  </div>
308
309
 
309
- <div id="method-M000123" class="method-detail">
310
- <a name="M000123"></a>
310
+ <div id="method-M000130" class="method-detail">
311
+ <a name="M000130"></a>
311
312
 
312
313
  <div class="method-heading">
313
- <a href="#M000123" class="method-signature">
314
+ <a href="#M000130" class="method-signature">
314
315
  <span class="method-name">fpmap</span><span class="method-args">(out=$stdout)</span>
315
316
  </a>
316
317
  </div>
317
318
 
318
319
  <div class="method-description">
319
320
  <p><a class="source-toggle" href="#"
320
- onclick="toggleCode('M000123-source');return false;">[Source]</a></p>
321
- <div class="method-source-code" id="M000123-source">
321
+ onclick="toggleCode('M000130-source');return false;">[Source]</a></p>
322
+ <div class="method-source-code" id="M000130-source">
322
323
  <pre>
323
- <span class="ruby-comment cmt"># File lib/pho/command_line.rb, line 203</span>
324
+ <span class="ruby-comment cmt"># File lib/pho/command_line.rb, line 221</span>
324
325
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">fpmap</span>(<span class="ruby-identifier">out</span>=<span class="ruby-identifier">$stdout</span>)
325
326
 
326
327
  <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@opts</span>[<span class="ruby-value str">&quot;raw&quot;</span>]
@@ -354,19 +355,19 @@ Class that implements the command-line behaviour
354
355
  </div>
355
356
  </div>
356
357
 
357
- <div id="method-M000111" class="method-detail">
358
- <a name="M000111"></a>
358
+ <div id="method-M000117" class="method-detail">
359
+ <a name="M000117"></a>
359
360
 
360
361
  <div class="method-heading">
361
- <a href="#M000111" class="method-signature">
362
+ <a href="#M000117" class="method-signature">
362
363
  <span class="method-name">password</span><span class="method-args">()</span>
363
364
  </a>
364
365
  </div>
365
366
 
366
367
  <div class="method-description">
367
368
  <p><a class="source-toggle" href="#"
368
- onclick="toggleCode('M000111-source');return false;">[Source]</a></p>
369
- <div class="method-source-code" id="M000111-source">
369
+ onclick="toggleCode('M000117-source');return false;">[Source]</a></p>
370
+ <div class="method-source-code" id="M000117-source">
370
371
  <pre>
371
372
  <span class="ruby-comment cmt"># File lib/pho/command_line.rb, line 31</span>
372
373
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">password</span>()
@@ -379,21 +380,21 @@ Class that implements the command-line behaviour
379
380
  </div>
380
381
  </div>
381
382
 
382
- <div id="method-M000124" class="method-detail">
383
- <a name="M000124"></a>
383
+ <div id="method-M000131" class="method-detail">
384
+ <a name="M000131"></a>
384
385
 
385
386
  <div class="method-heading">
386
- <a href="#M000124" class="method-signature">
387
+ <a href="#M000131" class="method-signature">
387
388
  <span class="method-name">queryprofile</span><span class="method-args">(out=$stdout)</span>
388
389
  </a>
389
390
  </div>
390
391
 
391
392
  <div class="method-description">
392
393
  <p><a class="source-toggle" href="#"
393
- onclick="toggleCode('M000124-source');return false;">[Source]</a></p>
394
- <div class="method-source-code" id="M000124-source">
394
+ onclick="toggleCode('M000131-source');return false;">[Source]</a></p>
395
+ <div class="method-source-code" id="M000131-source">
395
396
  <pre>
396
- <span class="ruby-comment cmt"># File lib/pho/command_line.rb, line 232</span>
397
+ <span class="ruby-comment cmt"># File lib/pho/command_line.rb, line 250</span>
397
398
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">queryprofile</span>(<span class="ruby-identifier">out</span>=<span class="ruby-identifier">$stdout</span>)
398
399
 
399
400
  <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@opts</span>[<span class="ruby-value str">&quot;raw&quot;</span>]
@@ -418,19 +419,19 @@ Class that implements the command-line behaviour
418
419
  </div>
419
420
  </div>
420
421
 
421
- <div id="method-M000116" class="method-detail">
422
- <a name="M000116"></a>
422
+ <div id="method-M000122" class="method-detail">
423
+ <a name="M000122"></a>
423
424
 
424
425
  <div class="method-heading">
425
- <a href="#M000116" class="method-signature">
426
+ <a href="#M000122" class="method-signature">
426
427
  <span class="method-name">reindex</span><span class="method-args">()</span>
427
428
  </a>
428
429
  </div>
429
430
 
430
431
  <div class="method-description">
431
432
  <p><a class="source-toggle" href="#"
432
- onclick="toggleCode('M000116-source');return false;">[Source]</a></p>
433
- <div class="method-source-code" id="M000116-source">
433
+ onclick="toggleCode('M000122-source');return false;">[Source]</a></p>
434
+ <div class="method-source-code" id="M000122-source">
434
435
  <pre>
435
436
  <span class="ruby-comment cmt"># File lib/pho/command_line.rb, line 77</span>
436
437
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">reindex</span>()
@@ -449,19 +450,19 @@ Class that implements the command-line behaviour
449
450
  </div>
450
451
  </div>
451
452
 
452
- <div id="method-M000117" class="method-detail">
453
- <a name="M000117"></a>
453
+ <div id="method-M000123" class="method-detail">
454
+ <a name="M000123"></a>
454
455
 
455
456
  <div class="method-heading">
456
- <a href="#M000117" class="method-signature">
457
+ <a href="#M000123" class="method-signature">
457
458
  <span class="method-name">reset</span><span class="method-args">()</span>
458
459
  </a>
459
460
  </div>
460
461
 
461
462
  <div class="method-description">
462
463
  <p><a class="source-toggle" href="#"
463
- onclick="toggleCode('M000117-source');return false;">[Source]</a></p>
464
- <div class="method-source-code" id="M000117-source">
464
+ onclick="toggleCode('M000123-source');return false;">[Source]</a></p>
465
+ <div class="method-source-code" id="M000123-source">
465
466
  <pre>
466
467
  <span class="ruby-comment cmt"># File lib/pho/command_line.rb, line 89</span>
467
468
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">reset</span>()
@@ -478,19 +479,19 @@ Class that implements the command-line behaviour
478
479
  </div>
479
480
  </div>
480
481
 
481
- <div id="method-M000118" class="method-detail">
482
- <a name="M000118"></a>
482
+ <div id="method-M000124" class="method-detail">
483
+ <a name="M000124"></a>
483
484
 
484
485
  <div class="method-heading">
485
- <a href="#M000118" class="method-signature">
486
+ <a href="#M000124" class="method-signature">
486
487
  <span class="method-name">restore</span><span class="method-args">()</span>
487
488
  </a>
488
489
  </div>
489
490
 
490
491
  <div class="method-description">
491
492
  <p><a class="source-toggle" href="#"
492
- onclick="toggleCode('M000118-source');return false;">[Source]</a></p>
493
- <div class="method-source-code" id="M000118-source">
493
+ onclick="toggleCode('M000124-source');return false;">[Source]</a></p>
494
+ <div class="method-source-code" id="M000124-source">
494
495
  <pre>
495
496
  <span class="ruby-comment cmt"># File lib/pho/command_line.rb, line 99</span>
496
497
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">restore</span>()
@@ -513,19 +514,19 @@ Class that implements the command-line behaviour
513
514
  </div>
514
515
  </div>
515
516
 
516
- <div id="method-M000115" class="method-detail">
517
- <a name="M000115"></a>
517
+ <div id="method-M000121" class="method-detail">
518
+ <a name="M000121"></a>
518
519
 
519
520
  <div class="method-heading">
520
- <a href="#M000115" class="method-signature">
521
+ <a href="#M000121" class="method-signature">
521
522
  <span class="method-name">snapshot</span><span class="method-args">()</span>
522
523
  </a>
523
524
  </div>
524
525
 
525
526
  <div class="method-description">
526
527
  <p><a class="source-toggle" href="#"
527
- onclick="toggleCode('M000115-source');return false;">[Source]</a></p>
528
- <div class="method-source-code" id="M000115-source">
528
+ onclick="toggleCode('M000121-source');return false;">[Source]</a></p>
529
+ <div class="method-source-code" id="M000121-source">
529
530
  <pre>
530
531
  <span class="ruby-comment cmt"># File lib/pho/command_line.rb, line 67</span>
531
532
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">snapshot</span>()
@@ -542,19 +543,19 @@ Class that implements the command-line behaviour
542
543
  </div>
543
544
  </div>
544
545
 
545
- <div id="method-M000120" class="method-detail">
546
- <a name="M000120"></a>
546
+ <div id="method-M000126" class="method-detail">
547
+ <a name="M000126"></a>
547
548
 
548
549
  <div class="method-heading">
549
- <a href="#M000120" class="method-signature">
550
+ <a href="#M000126" class="method-signature">
550
551
  <span class="method-name">sparql</span><span class="method-args">()</span>
551
552
  </a>
552
553
  </div>
553
554
 
554
555
  <div class="method-description">
555
556
  <p><a class="source-toggle" href="#"
556
- onclick="toggleCode('M000120-source');return false;">[Source]</a></p>
557
- <div class="method-source-code" id="M000120-source">
557
+ onclick="toggleCode('M000126-source');return false;">[Source]</a></p>
558
+ <div class="method-source-code" id="M000126-source">
558
559
  <pre>
559
560
  <span class="ruby-comment cmt"># File lib/pho/command_line.rb, line 125</span>
560
561
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">sparql</span>()
@@ -572,19 +573,19 @@ Class that implements the command-line behaviour
572
573
  </div>
573
574
  </div>
574
575
 
575
- <div id="method-M000113" class="method-detail">
576
- <a name="M000113"></a>
576
+ <div id="method-M000119" class="method-detail">
577
+ <a name="M000119"></a>
577
578
 
578
579
  <div class="method-heading">
579
- <a href="#M000113" class="method-signature">
580
+ <a href="#M000119" class="method-signature">
580
581
  <span class="method-name">status</span><span class="method-args">()</span>
581
582
  </a>
582
583
  </div>
583
584
 
584
585
  <div class="method-description">
585
586
  <p><a class="source-toggle" href="#"
586
- onclick="toggleCode('M000113-source');return false;">[Source]</a></p>
587
- <div class="method-source-code" id="M000113-source">
587
+ onclick="toggleCode('M000119-source');return false;">[Source]</a></p>
588
+ <div class="method-source-code" id="M000119-source">
588
589
  <pre>
589
590
  <span class="ruby-comment cmt"># File lib/pho/command_line.rb, line 47</span>
590
591
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">status</span>()
@@ -596,19 +597,19 @@ Class that implements the command-line behaviour
596
597
  </div>
597
598
  </div>
598
599
 
599
- <div id="method-M000121" class="method-detail">
600
- <a name="M000121"></a>
600
+ <div id="method-M000127" class="method-detail">
601
+ <a name="M000127"></a>
601
602
 
602
603
  <div class="method-heading">
603
- <a href="#M000121" class="method-signature">
604
+ <a href="#M000127" class="method-signature">
604
605
  <span class="method-name">store</span><span class="method-args">()</span>
605
606
  </a>
606
607
  </div>
607
608
 
608
609
  <div class="method-description">
609
610
  <p><a class="source-toggle" href="#"
610
- onclick="toggleCode('M000121-source');return false;">[Source]</a></p>
611
- <div class="method-source-code" id="M000121-source">
611
+ onclick="toggleCode('M000127-source');return false;">[Source]</a></p>
612
+ <div class="method-source-code" id="M000127-source">
612
613
  <pre>
613
614
  <span class="ruby-comment cmt"># File lib/pho/command_line.rb, line 136</span>
614
615
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">store</span>()
@@ -627,10 +628,12 @@ Class that implements the command-line behaviour
627
628
  <span class="ruby-identifier">resp</span> = <span class="ruby-ivar">@store</span>.<span class="ruby-identifier">store_file</span>( <span class="ruby-identifier">f</span> )
628
629
  <span class="ruby-keyword kw">end</span>
629
630
  <span class="ruby-keyword kw">elsif</span> <span class="ruby-ivar">@opts</span>[<span class="ruby-value str">&quot;dir&quot;</span>]
631
+ <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@opts</span>[<span class="ruby-value str">&quot;dir&quot;</span>] = <span class="ruby-value str">&quot;.&quot;</span>
632
+ <span class="ruby-ivar">@opts</span>[<span class="ruby-value str">&quot;dir&quot;</span>] = <span class="ruby-constant">File</span>.<span class="ruby-identifier">expand_path</span>(<span class="ruby-value str">&quot;.&quot;</span>)
633
+ <span class="ruby-keyword kw">end</span>
630
634
  <span class="ruby-identifier">puts</span> <span class="ruby-node">&quot;Storing contents of directory: #{@opts[&quot;dir&quot;]}&quot;</span>
631
- <span class="ruby-identifier">collection</span> = <span class="ruby-constant">Pho</span><span class="ruby-operator">::</span><span class="ruby-constant">RDFCollection</span>.<span class="ruby-identifier">new</span>(<span class="ruby-ivar">@store</span>, <span class="ruby-ivar">@opts</span>[<span class="ruby-value str">&quot;dir&quot;</span>])
632
- <span class="ruby-identifier">collection</span>.<span class="ruby-identifier">store</span>()
633
- <span class="ruby-identifier">puts</span> <span class="ruby-identifier">collection</span>.<span class="ruby-identifier">summary</span>()
635
+ <span class="ruby-identifier">collection</span> = <span class="ruby-constant">Pho</span><span class="ruby-operator">::</span><span class="ruby-constant">RDFCollection</span>.<span class="ruby-identifier">new</span>(<span class="ruby-ivar">@store</span>, <span class="ruby-ivar">@opts</span>[<span class="ruby-value str">&quot;dir&quot;</span>])
636
+ <span class="ruby-identifier">store_collection</span>(<span class="ruby-identifier">collection</span>)
634
637
  <span class="ruby-keyword kw">else</span>
635
638
  <span class="ruby-comment cmt">#noop</span>
636
639
  <span class="ruby-keyword kw">end</span>
@@ -649,19 +652,58 @@ Class that implements the command-line behaviour
649
652
  </div>
650
653
  </div>
651
654
 
652
- <div id="method-M000112" class="method-detail">
653
- <a name="M000112"></a>
655
+ <div id="method-M000129" class="method-detail">
656
+ <a name="M000129"></a>
657
+
658
+ <div class="method-heading">
659
+ <a href="#M000129" class="method-signature">
660
+ <span class="method-name">store_collection</span><span class="method-args">(collection)</span>
661
+ </a>
662
+ </div>
663
+
664
+ <div class="method-description">
665
+ <p><a class="source-toggle" href="#"
666
+ onclick="toggleCode('M000129-source');return false;">[Source]</a></p>
667
+ <div class="method-source-code" id="M000129-source">
668
+ <pre>
669
+ <span class="ruby-comment cmt"># File lib/pho/command_line.rb, line 201</span>
670
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">store_collection</span>(<span class="ruby-identifier">collection</span>)
671
+ <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@opts</span>[<span class="ruby-value str">&quot;force&quot;</span>]
672
+ <span class="ruby-identifier">puts</span> <span class="ruby-node">&quot;Resetting tracking files for directory #{@opts[&quot;dir&quot;]}&quot;</span>
673
+ <span class="ruby-identifier">collection</span>.<span class="ruby-identifier">reset</span>( <span class="ruby-ivar">@opts</span>[<span class="ruby-value str">&quot;traverse&quot;</span>] <span class="ruby-operator">?</span> <span class="ruby-keyword kw">true</span> <span class="ruby-operator">:</span> <span class="ruby-keyword kw">false</span> )
674
+ <span class="ruby-keyword kw">end</span>
675
+ <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@opts</span>[<span class="ruby-value str">&quot;retry&quot;</span>]
676
+ <span class="ruby-identifier">puts</span> <span class="ruby-node">&quot;Retrying failures in: #{@opts[&quot;dir&quot;]}&quot;</span>
677
+ <span class="ruby-identifier">collection</span>.<span class="ruby-identifier">retry_failures</span>( <span class="ruby-ivar">@opts</span>[<span class="ruby-value str">&quot;traverse&quot;</span>] <span class="ruby-operator">?</span> <span class="ruby-keyword kw">true</span> <span class="ruby-operator">:</span> <span class="ruby-keyword kw">false</span> )
678
+ <span class="ruby-identifier">puts</span> <span class="ruby-identifier">collection</span>.<span class="ruby-identifier">summary</span>( <span class="ruby-ivar">@opts</span>[<span class="ruby-value str">&quot;traverse&quot;</span>] <span class="ruby-operator">?</span> <span class="ruby-keyword kw">true</span> <span class="ruby-operator">:</span> <span class="ruby-keyword kw">false</span> )
679
+ <span class="ruby-keyword kw">elsif</span> <span class="ruby-ivar">@opts</span>[<span class="ruby-value str">&quot;updates&quot;</span>]
680
+ <span class="ruby-identifier">puts</span> <span class="ruby-node">&quot;Uploading updates in: #{@opts[&quot;dir&quot;]}&quot;</span>
681
+ <span class="ruby-identifier">collection</span>.<span class="ruby-identifier">store_updates</span>( <span class="ruby-ivar">@opts</span>[<span class="ruby-value str">&quot;traverse&quot;</span>] <span class="ruby-operator">?</span> <span class="ruby-keyword kw">true</span> <span class="ruby-operator">:</span> <span class="ruby-keyword kw">false</span> )
682
+ <span class="ruby-identifier">puts</span> <span class="ruby-identifier">collection</span>.<span class="ruby-identifier">summary</span>( <span class="ruby-ivar">@opts</span>[<span class="ruby-value str">&quot;traverse&quot;</span>] <span class="ruby-operator">?</span> <span class="ruby-keyword kw">true</span> <span class="ruby-operator">:</span> <span class="ruby-keyword kw">false</span> )
683
+ <span class="ruby-keyword kw">else</span>
684
+ <span class="ruby-identifier">puts</span> <span class="ruby-node">&quot;Uploading contents of directory: #{@opts[&quot;dir&quot;]}&quot;</span>
685
+ <span class="ruby-identifier">collection</span>.<span class="ruby-identifier">store</span>( <span class="ruby-ivar">@opts</span>[<span class="ruby-value str">&quot;traverse&quot;</span>] <span class="ruby-operator">?</span> <span class="ruby-keyword kw">true</span> <span class="ruby-operator">:</span> <span class="ruby-keyword kw">false</span> )
686
+ <span class="ruby-identifier">puts</span> <span class="ruby-identifier">collection</span>.<span class="ruby-identifier">summary</span>( <span class="ruby-ivar">@opts</span>[<span class="ruby-value str">&quot;traverse&quot;</span>] <span class="ruby-operator">?</span> <span class="ruby-keyword kw">true</span> <span class="ruby-operator">:</span> <span class="ruby-keyword kw">false</span> )
687
+ <span class="ruby-keyword kw">end</span>
688
+ <span class="ruby-keyword kw">end</span>
689
+ </pre>
690
+ </div>
691
+ </div>
692
+ </div>
693
+
694
+ <div id="method-M000118" class="method-detail">
695
+ <a name="M000118"></a>
654
696
 
655
697
  <div class="method-heading">
656
- <a href="#M000112" class="method-signature">
698
+ <a href="#M000118" class="method-signature">
657
699
  <span class="method-name">storename</span><span class="method-args">()</span>
658
700
  </a>
659
701
  </div>
660
702
 
661
703
  <div class="method-description">
662
704
  <p><a class="source-toggle" href="#"
663
- onclick="toggleCode('M000112-source');return false;">[Source]</a></p>
664
- <div class="method-source-code" id="M000112-source">
705
+ onclick="toggleCode('M000118-source');return false;">[Source]</a></p>
706
+ <div class="method-source-code" id="M000118-source">
665
707
  <pre>
666
708
  <span class="ruby-comment cmt"># File lib/pho/command_line.rb, line 37</span>
667
709
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">storename</span>()
@@ -678,21 +720,21 @@ Class that implements the command-line behaviour
678
720
  </div>
679
721
  </div>
680
722
 
681
- <div id="method-M000122" class="method-detail">
682
- <a name="M000122"></a>
723
+ <div id="method-M000128" class="method-detail">
724
+ <a name="M000128"></a>
683
725
 
684
726
  <div class="method-heading">
685
- <a href="#M000122" class="method-signature">
727
+ <a href="#M000128" class="method-signature">
686
728
  <span class="method-name">upload</span><span class="method-args">()</span>
687
729
  </a>
688
730
  </div>
689
731
 
690
732
  <div class="method-description">
691
733
  <p><a class="source-toggle" href="#"
692
- onclick="toggleCode('M000122-source');return false;">[Source]</a></p>
693
- <div class="method-source-code" id="M000122-source">
734
+ onclick="toggleCode('M000128-source');return false;">[Source]</a></p>
735
+ <div class="method-source-code" id="M000128-source">
694
736
  <pre>
695
- <span class="ruby-comment cmt"># File lib/pho/command_line.rb, line 170</span>
737
+ <span class="ruby-comment cmt"># File lib/pho/command_line.rb, line 172</span>
696
738
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">upload</span>()
697
739
  <span class="ruby-identifier">resp</span> = <span class="ruby-keyword kw">nil</span>
698
740
  <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@opts</span>[<span class="ruby-value str">&quot;file&quot;</span>]
@@ -703,15 +745,11 @@ Class that implements the command-line behaviour
703
745
  <span class="ruby-identifier">puts</span> <span class="ruby-node">&quot;Uploading file: #{ @opts[&quot;file&quot;] } to /items/#{ uri } as #{mime}&quot;</span>
704
746
  <span class="ruby-identifier">resp</span> = <span class="ruby-ivar">@store</span>.<span class="ruby-identifier">upload_item</span>( <span class="ruby-identifier">f</span> , <span class="ruby-identifier">mime</span> , <span class="ruby-identifier">uri</span> )
705
747
  <span class="ruby-keyword kw">elsif</span> <span class="ruby-ivar">@opts</span>[<span class="ruby-value str">&quot;dir&quot;</span>]
706
- <span class="ruby-identifier">puts</span> <span class="ruby-node">&quot;Uploading contents of directory: #{@opts[&quot;dir&quot;]}&quot;</span>
748
+ <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@opts</span>[<span class="ruby-value str">&quot;dir&quot;</span>] = <span class="ruby-value str">&quot;.&quot;</span>
749
+ <span class="ruby-ivar">@opts</span>[<span class="ruby-value str">&quot;dir&quot;</span>] = <span class="ruby-constant">File</span>.<span class="ruby-identifier">expand_path</span>(<span class="ruby-value str">&quot;.&quot;</span>)
750
+ <span class="ruby-keyword kw">end</span>
707
751
  <span class="ruby-identifier">collection</span> = <span class="ruby-constant">Pho</span><span class="ruby-operator">::</span><span class="ruby-constant">FileManagement</span><span class="ruby-operator">::</span><span class="ruby-constant">FileManager</span>.<span class="ruby-identifier">new</span>(<span class="ruby-ivar">@store</span>, <span class="ruby-ivar">@opts</span>[<span class="ruby-value str">&quot;dir&quot;</span>], <span class="ruby-ivar">@opts</span>[<span class="ruby-value str">&quot;base&quot;</span>])
708
- <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@opts</span>[<span class="ruby-value str">&quot;traverse&quot;</span>]
709
- <span class="ruby-identifier">collection</span>.<span class="ruby-identifier">store</span>(<span class="ruby-identifier">:traverse</span>)
710
- <span class="ruby-identifier">puts</span> <span class="ruby-identifier">collection</span>.<span class="ruby-identifier">summary</span>(<span class="ruby-identifier">:traverse</span>)
711
- <span class="ruby-keyword kw">else</span>
712
- <span class="ruby-identifier">collection</span>.<span class="ruby-identifier">store</span>()
713
- <span class="ruby-identifier">puts</span> <span class="ruby-identifier">collection</span>.<span class="ruby-identifier">summary</span>()
714
- <span class="ruby-keyword kw">end</span>
752
+ <span class="ruby-identifier">store_collection</span>(<span class="ruby-identifier">collection</span>)
715
753
  <span class="ruby-keyword kw">else</span>
716
754
  <span class="ruby-comment cmt">#noop</span>
717
755
  <span class="ruby-keyword kw">end</span>
@@ -730,19 +768,19 @@ Class that implements the command-line behaviour
730
768
  </div>
731
769
  </div>
732
770
 
733
- <div id="method-M000110" class="method-detail">
734
- <a name="M000110"></a>
771
+ <div id="method-M000116" class="method-detail">
772
+ <a name="M000116"></a>
735
773
 
736
774
  <div class="method-heading">
737
- <a href="#M000110" class="method-signature">
775
+ <a href="#M000116" class="method-signature">
738
776
  <span class="method-name">username</span><span class="method-args">()</span>
739
777
  </a>
740
778
  </div>
741
779
 
742
780
  <div class="method-description">
743
781
  <p><a class="source-toggle" href="#"
744
- onclick="toggleCode('M000110-source');return false;">[Source]</a></p>
745
- <div class="method-source-code" id="M000110-source">
782
+ onclick="toggleCode('M000116-source');return false;">[Source]</a></p>
783
+ <div class="method-source-code" id="M000116-source">
746
784
  <pre>
747
785
  <span class="ruby-comment cmt"># File lib/pho/command_line.rb, line 25</span>
748
786
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">username</span>()