pho 0.7.2 → 0.7.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (82) hide show
  1. data/CHANGES +5 -0
  2. data/Rakefile +1 -1
  3. data/lib/pho/snapshot.rb +6 -1
  4. data/lib/pho/sparql.rb +4 -1
  5. data/tests/tc_snapshots.rb +14 -1
  6. data/tests/tc_sparql_helper.rb +23 -0
  7. metadata +60 -160
  8. data/doc/rdoc/classes/Pho/Analyzers.html +0 -310
  9. data/doc/rdoc/classes/Pho/CommandLine.html +0 -770
  10. data/doc/rdoc/classes/Pho/DatatypeProperty.html +0 -241
  11. data/doc/rdoc/classes/Pho/Enrichment/StoreEnricher.html +0 -410
  12. data/doc/rdoc/classes/Pho/Enrichment.html +0 -119
  13. data/doc/rdoc/classes/Pho/Etags.html +0 -310
  14. data/doc/rdoc/classes/Pho/Facet/Results.html +0 -299
  15. data/doc/rdoc/classes/Pho/Facet/Term.html +0 -177
  16. data/doc/rdoc/classes/Pho/Facet.html +0 -119
  17. data/doc/rdoc/classes/Pho/FieldPredicateMap.html +0 -668
  18. data/doc/rdoc/classes/Pho/FieldWeighting.html +0 -230
  19. data/doc/rdoc/classes/Pho/FileManagement/AbstractFileManager.html +0 -478
  20. data/doc/rdoc/classes/Pho/FileManagement/FileManager.html +0 -264
  21. data/doc/rdoc/classes/Pho/FileManagement/RDFManager.html +0 -259
  22. data/doc/rdoc/classes/Pho/FileManagement.html +0 -121
  23. data/doc/rdoc/classes/Pho/Job.html +0 -627
  24. data/doc/rdoc/classes/Pho/JobUpdate.html +0 -141
  25. data/doc/rdoc/classes/Pho/Jobs.html +0 -538
  26. data/doc/rdoc/classes/Pho/Namespaces.html +0 -164
  27. data/doc/rdoc/classes/Pho/OAI/Record.html +0 -165
  28. data/doc/rdoc/classes/Pho/OAI/Records.html +0 -331
  29. data/doc/rdoc/classes/Pho/OAI.html +0 -118
  30. data/doc/rdoc/classes/Pho/QueryProfile.html +0 -497
  31. data/doc/rdoc/classes/Pho/RDF/Parser.html +0 -279
  32. data/doc/rdoc/classes/Pho/RDF.html +0 -120
  33. data/doc/rdoc/classes/Pho/RDFCollection.html +0 -119
  34. data/doc/rdoc/classes/Pho/ResourceHash/Converter.html +0 -325
  35. data/doc/rdoc/classes/Pho/ResourceHash/SetAlgebra.html +0 -241
  36. data/doc/rdoc/classes/Pho/ResourceHash.html +0 -123
  37. data/doc/rdoc/classes/Pho/Snapshot.html +0 -397
  38. data/doc/rdoc/classes/Pho/Sparql/SparqlClient.html +0 -594
  39. data/doc/rdoc/classes/Pho/Sparql/SparqlHelper.html +0 -692
  40. data/doc/rdoc/classes/Pho/Sparql.html +0 -187
  41. data/doc/rdoc/classes/Pho/Status.html +0 -296
  42. data/doc/rdoc/classes/Pho/Store.html +0 -1560
  43. data/doc/rdoc/classes/Pho/StoreSparqlClient.html +0 -183
  44. data/doc/rdoc/classes/Pho/Update/Changeset.html +0 -521
  45. data/doc/rdoc/classes/Pho/Update/ChangesetBuilder.html +0 -330
  46. data/doc/rdoc/classes/Pho/Update/ChangesetHelper.html +0 -159
  47. data/doc/rdoc/classes/Pho/Update/Changesets.html +0 -205
  48. data/doc/rdoc/classes/Pho/Update/LiteralStatement.html +0 -257
  49. data/doc/rdoc/classes/Pho/Update/ResourceStatement.html +0 -237
  50. data/doc/rdoc/classes/Pho/Update/Statement.html +0 -303
  51. data/doc/rdoc/classes/Pho/Update.html +0 -128
  52. data/doc/rdoc/classes/Pho.html +0 -283
  53. data/doc/rdoc/classes/String.html +0 -146
  54. data/doc/rdoc/created.rid +0 -1
  55. data/doc/rdoc/files/CHANGES.html +0 -351
  56. data/doc/rdoc/files/README.html +0 -191
  57. data/doc/rdoc/files/lib/pho/changeset_builder_rb.html +0 -108
  58. data/doc/rdoc/files/lib/pho/changeset_rb.html +0 -108
  59. data/doc/rdoc/files/lib/pho/command_line_rb.html +0 -101
  60. data/doc/rdoc/files/lib/pho/converter_rb.html +0 -108
  61. data/doc/rdoc/files/lib/pho/enrichment_rb.html +0 -101
  62. data/doc/rdoc/files/lib/pho/etags_rb.html +0 -108
  63. data/doc/rdoc/files/lib/pho/facet_rb.html +0 -101
  64. data/doc/rdoc/files/lib/pho/field_predicate_map_rb.html +0 -101
  65. data/doc/rdoc/files/lib/pho/file_management_rb.html +0 -101
  66. data/doc/rdoc/files/lib/pho/file_manager_rb.html +0 -108
  67. data/doc/rdoc/files/lib/pho/job_rb.html +0 -101
  68. data/doc/rdoc/files/lib/pho/oai_rb.html +0 -101
  69. data/doc/rdoc/files/lib/pho/query_profile_rb.html +0 -101
  70. data/doc/rdoc/files/lib/pho/rdf_collection_rb.html +0 -101
  71. data/doc/rdoc/files/lib/pho/rdf_rb.html +0 -108
  72. data/doc/rdoc/files/lib/pho/resource_hash_rb.html +0 -101
  73. data/doc/rdoc/files/lib/pho/snapshot_rb.html +0 -109
  74. data/doc/rdoc/files/lib/pho/sparql_rb.html +0 -101
  75. data/doc/rdoc/files/lib/pho/status_rb.html +0 -101
  76. data/doc/rdoc/files/lib/pho/store_rb.html +0 -108
  77. data/doc/rdoc/files/lib/pho_rb.html +0 -133
  78. data/doc/rdoc/fr_class_index.html +0 -72
  79. data/doc/rdoc/fr_file_index.html +0 -49
  80. data/doc/rdoc/fr_method_index.html +0 -237
  81. data/doc/rdoc/index.html +0 -24
  82. data/doc/rdoc/rdoc-style.css +0 -208
@@ -1,264 +0,0 @@
1
- <?xml version="1.0" encoding="iso-8859-1"?>
2
- <!DOCTYPE html
3
- PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
-
6
- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
7
- <head>
8
- <title>Class: Pho::FileManagement::FileManager</title>
9
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
- <meta http-equiv="Content-Script-Type" content="text/javascript" />
11
- <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
12
- <script type="text/javascript">
13
- // <![CDATA[
14
-
15
- function popupCode( url ) {
16
- window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
17
- }
18
-
19
- function toggleCode( id ) {
20
- if ( document.getElementById )
21
- elem = document.getElementById( id );
22
- else if ( document.all )
23
- elem = eval( "document.all." + id );
24
- else
25
- return false;
26
-
27
- elemStyle = elem.style;
28
-
29
- if ( elemStyle.display != "block" ) {
30
- elemStyle.display = "block"
31
- } else {
32
- elemStyle.display = "none"
33
- }
34
-
35
- return true;
36
- }
37
-
38
- // Make codeblocks hidden by default
39
- document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
40
-
41
- // ]]>
42
- </script>
43
-
44
- </head>
45
- <body>
46
-
47
-
48
-
49
- <div id="classHeader">
50
- <table class="header-table">
51
- <tr class="top-aligned-row">
52
- <td><strong>Class</strong></td>
53
- <td class="class-name-in-header">Pho::FileManagement::FileManager</td>
54
- </tr>
55
- <tr class="top-aligned-row">
56
- <td><strong>In:</strong></td>
57
- <td>
58
- <a href="../../../files/lib/pho/file_manager_rb.html">
59
- lib/pho/file_manager.rb
60
- </a>
61
- <br />
62
- </td>
63
- </tr>
64
-
65
- <tr class="top-aligned-row">
66
- <td><strong>Parent:</strong></td>
67
- <td>
68
- <a href="AbstractFileManager.html">
69
- AbstractFileManager
70
- </a>
71
- </td>
72
- </tr>
73
- </table>
74
- </div>
75
- <!-- banner header -->
76
-
77
- <div id="bodyContent">
78
-
79
-
80
-
81
- <div id="contextContent">
82
-
83
-
84
-
85
- </div>
86
-
87
- <div id="method-list">
88
- <h3 class="section-bar">Methods</h3>
89
-
90
- <div class="name-list">
91
- <a href="#M000038">list</a>&nbsp;&nbsp;
92
- <a href="#M000039">name_for_file</a>&nbsp;&nbsp;
93
- <a href="#M000037">new</a>&nbsp;&nbsp;
94
- <a href="#M000040">store_file</a>&nbsp;&nbsp;
95
- </div>
96
- </div>
97
-
98
- </div>
99
-
100
-
101
- <!-- if includes -->
102
-
103
- <div id="section">
104
-
105
-
106
-
107
-
108
-
109
- <div id="attribute-list">
110
- <h3 class="section-bar">Attributes</h3>
111
-
112
- <div class="name-list">
113
- <table>
114
- <tr class="top-aligned-row context-row">
115
- <td class="context-item-name">base</td>
116
- <td class="context-item-value">&nbsp;[R]&nbsp;</td>
117
- <td class="context-item-desc"></td>
118
- </tr>
119
- </table>
120
- </div>
121
- </div>
122
-
123
-
124
-
125
- <!-- if method_list -->
126
- <div id="methods">
127
- <h3 class="section-bar">Public Class methods</h3>
128
-
129
- <div id="method-M000039" class="method-detail">
130
- <a name="M000039"></a>
131
-
132
- <div class="method-heading">
133
- <a href="#M000039" class="method-signature">
134
- <span class="method-name">name_for_file</span><span class="method-args">(dir, file, base=nil)</span>
135
- </a>
136
- </div>
137
-
138
- <div class="method-description">
139
- <p><a class="source-toggle" href="#"
140
- onclick="toggleCode('M000039-source');return false;">[Source]</a></p>
141
- <div class="method-source-code" id="M000039-source">
142
- <pre>
143
- <span class="ruby-comment cmt"># File lib/pho/file_manager.rb, line 32</span>
144
- <span class="ruby-keyword kw">def</span> <span class="ruby-constant">FileManager</span>.<span class="ruby-identifier">name_for_file</span>(<span class="ruby-identifier">dir</span>, <span class="ruby-identifier">file</span>, <span class="ruby-identifier">base</span>=<span class="ruby-keyword kw">nil</span>)
145
- <span class="ruby-identifier">uri</span> = <span class="ruby-identifier">file</span>.<span class="ruby-identifier">path</span>.<span class="ruby-identifier">gsub</span>(<span class="ruby-identifier">dir</span>, <span class="ruby-value str">&quot;&quot;</span>)
146
- <span class="ruby-identifier">uri</span> = <span class="ruby-node">&quot;#{base}#{uri}&quot;</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">base</span> <span class="ruby-operator">!=</span> <span class="ruby-keyword kw">nil</span>
147
- <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">uri</span>
148
- <span class="ruby-keyword kw">end</span>
149
- </pre>
150
- </div>
151
- </div>
152
- </div>
153
-
154
- <div id="method-M000037" class="method-detail">
155
- <a name="M000037"></a>
156
-
157
- <div class="method-heading">
158
- <a href="#M000037" class="method-signature">
159
- <span class="method-name">new</span><span class="method-args">(store, dir, base = nil, ok_suffix=OK, fail_suffix=FAIL, sleep=1)</span>
160
- </a>
161
- </div>
162
-
163
- <div class="method-description">
164
- <p><a class="source-toggle" href="#"
165
- onclick="toggleCode('M000037-source');return false;">[Source]</a></p>
166
- <div class="method-source-code" id="M000037-source">
167
- <pre>
168
- <span class="ruby-comment cmt"># File lib/pho/file_manager.rb, line 11</span>
169
- <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">base</span> = <span class="ruby-keyword kw">nil</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>)
170
- <span class="ruby-keyword kw">super</span>(<span class="ruby-identifier">store</span>, <span class="ruby-identifier">dir</span>, <span class="ruby-identifier">ok_suffix</span>, <span class="ruby-identifier">fail_suffix</span>, <span class="ruby-identifier">sleep</span>)
171
- <span class="ruby-ivar">@base</span> = <span class="ruby-identifier">base</span>
172
- <span class="ruby-keyword kw">end</span>
173
- </pre>
174
- </div>
175
- </div>
176
- </div>
177
-
178
- <h3 class="section-bar">Public Instance methods</h3>
179
-
180
- <div id="method-M000038" class="method-detail">
181
- <a name="M000038"></a>
182
-
183
- <div class="method-heading">
184
- <a href="#M000038" class="method-signature">
185
- <span class="method-name">list</span><span class="method-args">(recursive=false)</span>
186
- </a>
187
- </div>
188
-
189
- <div class="method-description">
190
- <p>
191
- List files being managed, i.e. everything not .ok or .fail
192
- </p>
193
- <p><a class="source-toggle" href="#"
194
- onclick="toggleCode('M000038-source');return false;">[Source]</a></p>
195
- <div class="method-source-code" id="M000038-source">
196
- <pre>
197
- <span class="ruby-comment cmt"># File lib/pho/file_manager.rb, line 17</span>
198
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">list</span>(<span class="ruby-identifier">recursive</span>=<span class="ruby-keyword kw">false</span>)
199
- <span class="ruby-identifier">files</span> = []
200
- <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">recursive</span>
201
- <span class="ruby-identifier">pattern</span> = <span class="ruby-value str">&quot;**/*&quot;</span>
202
- <span class="ruby-keyword kw">else</span>
203
- <span class="ruby-identifier">pattern</span> = <span class="ruby-value str">&quot;*&quot;</span>
204
- <span class="ruby-keyword kw">end</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-identifier">pattern</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-keyword kw">if</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">extname</span>(<span class="ruby-identifier">file</span>) <span class="ruby-operator">!=</span> <span class="ruby-node">&quot;.#{@ok_suffix}&quot;</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">extname</span>(<span class="ruby-identifier">file</span>) <span class="ruby-operator">!=</span> <span class="ruby-node">&quot;.#{@fail_suffix}&quot;</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-operator">!</span><span class="ruby-constant">File</span>.<span class="ruby-identifier">directory?</span>(<span class="ruby-identifier">file</span>)
207
- <span class="ruby-identifier">files</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">file</span>
208
- <span class="ruby-keyword kw">end</span>
209
- <span class="ruby-keyword kw">end</span>
210
- <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">files</span>
211
- <span class="ruby-keyword kw">end</span>
212
- </pre>
213
- </div>
214
- </div>
215
- </div>
216
-
217
- <h3 class="section-bar">Protected Instance methods</h3>
218
-
219
- <div id="method-M000040" class="method-detail">
220
- <a name="M000040"></a>
221
-
222
- <div class="method-heading">
223
- <a href="#M000040" class="method-signature">
224
- <span class="method-name">store_file</span><span class="method-args">(file, filename)</span>
225
- </a>
226
- </div>
227
-
228
- <div class="method-description">
229
- <p><a class="source-toggle" href="#"
230
- onclick="toggleCode('M000040-source');return false;">[Source]</a></p>
231
- <div class="method-source-code" id="M000040-source">
232
- <pre>
233
- <span class="ruby-comment cmt"># File lib/pho/file_manager.rb, line 40</span>
234
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">store_file</span>(<span class="ruby-identifier">file</span>, <span class="ruby-identifier">filename</span>)
235
- <span class="ruby-identifier">uri</span> = <span class="ruby-constant">FileManager</span>.<span class="ruby-identifier">name_for_file</span>(<span class="ruby-ivar">@dir</span>, <span class="ruby-identifier">file</span>, <span class="ruby-ivar">@base</span>)
236
- <span class="ruby-identifier">response</span> = <span class="ruby-ivar">@store</span>.<span class="ruby-identifier">upload_item</span>(<span class="ruby-identifier">file</span>, <span class="ruby-constant">MIME</span><span class="ruby-operator">::</span><span class="ruby-constant">Types</span>.<span class="ruby-identifier">type_for</span>(<span class="ruby-identifier">filename</span>)[<span class="ruby-value">0</span>].<span class="ruby-identifier">to_s</span>, <span class="ruby-identifier">uri</span> )
237
- <span class="ruby-keyword kw">if</span> (<span class="ruby-identifier">response</span>.<span class="ruby-identifier">status</span> <span class="ruby-operator">&lt;</span> <span class="ruby-value">300</span> )
238
- <span class="ruby-constant">File</span>.<span class="ruby-identifier">open</span>(<span class="ruby-identifier">get_ok_file_for</span>(<span class="ruby-identifier">filename</span>), <span class="ruby-value str">&quot;w&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>
239
- <span class="ruby-identifier">file</span>.<span class="ruby-identifier">print</span>( <span class="ruby-value str">&quot;OK&quot;</span> )
240
- <span class="ruby-keyword kw">end</span>
241
- <span class="ruby-keyword kw">else</span>
242
- <span class="ruby-constant">File</span>.<span class="ruby-identifier">open</span>(<span class="ruby-identifier">get_fail_file_for</span>(<span class="ruby-identifier">filename</span>), <span class="ruby-value str">&quot;w&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>
243
- <span class="ruby-constant">YAML</span><span class="ruby-operator">::</span><span class="ruby-identifier">dump</span>(<span class="ruby-identifier">response</span>, <span class="ruby-identifier">file</span>)
244
- <span class="ruby-keyword kw">end</span>
245
- <span class="ruby-keyword kw">end</span>
246
- <span class="ruby-keyword kw">end</span>
247
- </pre>
248
- </div>
249
- </div>
250
- </div>
251
-
252
-
253
- </div>
254
-
255
-
256
- </div>
257
-
258
-
259
- <div id="validator-badges">
260
- <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
261
- </div>
262
-
263
- </body>
264
- </html>
@@ -1,259 +0,0 @@
1
- <?xml version="1.0" encoding="iso-8859-1"?>
2
- <!DOCTYPE html
3
- PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
-
6
- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
7
- <head>
8
- <title>Class: Pho::FileManagement::RDFManager</title>
9
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
- <meta http-equiv="Content-Script-Type" content="text/javascript" />
11
- <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
12
- <script type="text/javascript">
13
- // <![CDATA[
14
-
15
- function popupCode( url ) {
16
- window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
17
- }
18
-
19
- function toggleCode( id ) {
20
- if ( document.getElementById )
21
- elem = document.getElementById( id );
22
- else if ( document.all )
23
- elem = eval( "document.all." + id );
24
- else
25
- return false;
26
-
27
- elemStyle = elem.style;
28
-
29
- if ( elemStyle.display != "block" ) {
30
- elemStyle.display = "block"
31
- } else {
32
- elemStyle.display = "none"
33
- }
34
-
35
- return true;
36
- }
37
-
38
- // Make codeblocks hidden by default
39
- document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
40
-
41
- // ]]>
42
- </script>
43
-
44
- </head>
45
- <body>
46
-
47
-
48
-
49
- <div id="classHeader">
50
- <table class="header-table">
51
- <tr class="top-aligned-row">
52
- <td><strong>Class</strong></td>
53
- <td class="class-name-in-header">Pho::FileManagement::RDFManager</td>
54
- </tr>
55
- <tr class="top-aligned-row">
56
- <td><strong>In:</strong></td>
57
- <td>
58
- <a href="../../../files/lib/pho/rdf_collection_rb.html">
59
- lib/pho/rdf_collection.rb
60
- </a>
61
- <br />
62
- </td>
63
- </tr>
64
-
65
- <tr class="top-aligned-row">
66
- <td><strong>Parent:</strong></td>
67
- <td>
68
- <a href="AbstractFileManager.html">
69
- AbstractFileManager
70
- </a>
71
- </td>
72
- </tr>
73
- </table>
74
- </div>
75
- <!-- banner header -->
76
-
77
- <div id="bodyContent">
78
-
79
-
80
-
81
- <div id="contextContent">
82
-
83
- <div id="description">
84
- <p>
85
- Provides a simple mechanism for managing a directory of RDF/XML documents
86
- and uploading them to platform store.
87
- </p>
88
- <p>
89
- Allows a collection to be mirrored into the platform
90
- </p>
91
-
92
- </div>
93
-
94
-
95
- </div>
96
-
97
- <div id="method-list">
98
- <h3 class="section-bar">Methods</h3>
99
-
100
- <div class="name-list">
101
- <a href="#M000025">list</a>&nbsp;&nbsp;
102
- <a href="#M000024">new</a>&nbsp;&nbsp;
103
- <a href="#M000026">store_file</a>&nbsp;&nbsp;
104
- </div>
105
- </div>
106
-
107
- </div>
108
-
109
-
110
- <!-- if includes -->
111
-
112
- <div id="section">
113
-
114
-
115
- <div id="constants-list">
116
- <h3 class="section-bar">Constants</h3>
117
-
118
- <div class="name-list">
119
- <table summary="Constants">
120
- <tr class="top-aligned-row context-row">
121
- <td class="context-item-name">RDF</td>
122
- <td>=</td>
123
- <td class="context-item-value">&quot;rdf&quot;.freeze</td>
124
- </tr>
125
- <tr class="top-aligned-row context-row">
126
- <td class="context-item-name">TTL</td>
127
- <td>=</td>
128
- <td class="context-item-value">&quot;ttl&quot;.freeze</td>
129
- </tr>
130
- <tr class="top-aligned-row context-row">
131
- <td class="context-item-name">NT</td>
132
- <td>=</td>
133
- <td class="context-item-value">&quot;nt&quot;.freeze</td>
134
- </tr>
135
- <tr class="top-aligned-row context-row">
136
- <td class="context-item-name">ALL_RDF</td>
137
- <td>=</td>
138
- <td class="context-item-value">[RDF, TTL, NT]</td>
139
- </tr>
140
- </table>
141
- </div>
142
- </div>
143
-
144
-
145
-
146
-
147
-
148
-
149
- <!-- if method_list -->
150
- <div id="methods">
151
- <h3 class="section-bar">Public Class methods</h3>
152
-
153
- <div id="method-M000024" class="method-detail">
154
- <a name="M000024"></a>
155
-
156
- <div class="method-heading">
157
- <a href="#M000024" class="method-signature">
158
- <span class="method-name">new</span><span class="method-args">(store, dir, rdf_suffixes=ALL_RDF, ok_suffix=OK, fail_suffix=FAIL, sleep=1)</span>
159
- </a>
160
- </div>
161
-
162
- <div class="method-description">
163
- <p><a class="source-toggle" href="#"
164
- onclick="toggleCode('M000024-source');return false;">[Source]</a></p>
165
- <div class="method-source-code" id="M000024-source">
166
- <pre>
167
- <span class="ruby-comment cmt"># File lib/pho/rdf_collection.rb, line 17</span>
168
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">store</span>, <span class="ruby-identifier">dir</span>, <span class="ruby-identifier">rdf_suffixes</span>=<span class="ruby-constant">ALL_RDF</span>, <span class="ruby-identifier">ok_suffix</span>=<span class="ruby-constant">OK</span>, <span class="ruby-identifier">fail_suffix</span>=<span class="ruby-constant">FAIL</span>, <span class="ruby-identifier">sleep</span>=<span class="ruby-value">1</span>)
169
- <span class="ruby-keyword kw">super</span>(<span class="ruby-identifier">store</span>, <span class="ruby-identifier">dir</span>, <span class="ruby-identifier">ok_suffix</span>, <span class="ruby-identifier">fail_suffix</span>, <span class="ruby-identifier">sleep</span>)
170
- <span class="ruby-ivar">@rdf_suffixes</span> = <span class="ruby-identifier">rdf_suffixes</span>
171
- <span class="ruby-keyword kw">end</span>
172
- </pre>
173
- </div>
174
- </div>
175
- </div>
176
-
177
- <h3 class="section-bar">Public Instance methods</h3>
178
-
179
- <div id="method-M000025" class="method-detail">
180
- <a name="M000025"></a>
181
-
182
- <div class="method-heading">
183
- <a href="#M000025" class="method-signature">
184
- <span class="method-name">list</span><span class="method-args">(recursive=false)</span>
185
- </a>
186
- </div>
187
-
188
- <div class="method-description">
189
- <p>
190
- List files being managed
191
- </p>
192
- <p><a class="source-toggle" href="#"
193
- onclick="toggleCode('M000025-source');return false;">[Source]</a></p>
194
- <div class="method-source-code" id="M000025-source">
195
- <pre>
196
- <span class="ruby-comment cmt"># File lib/pho/rdf_collection.rb, line 23</span>
197
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">list</span>(<span class="ruby-identifier">recursive</span>=<span class="ruby-keyword kw">false</span>)
198
- <span class="ruby-keyword kw">return</span> <span class="ruby-constant">Dir</span>.<span class="ruby-identifier">glob</span>( <span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>(<span class="ruby-ivar">@dir</span>, <span class="ruby-node">&quot;*.\{#{ @rdf_suffixes.join(&quot;,&quot;) }\}&quot;</span>) )
199
- <span class="ruby-keyword kw">end</span>
200
- </pre>
201
- </div>
202
- </div>
203
- </div>
204
-
205
- <h3 class="section-bar">Protected Instance methods</h3>
206
-
207
- <div id="method-M000026" class="method-detail">
208
- <a name="M000026"></a>
209
-
210
- <div class="method-heading">
211
- <a href="#M000026" class="method-signature">
212
- <span class="method-name">store_file</span><span class="method-args">(file, filename)</span>
213
- </a>
214
- </div>
215
-
216
- <div class="method-description">
217
- <p><a class="source-toggle" href="#"
218
- onclick="toggleCode('M000026-source');return false;">[Source]</a></p>
219
- <div class="method-source-code" id="M000026-source">
220
- <pre>
221
- <span class="ruby-comment cmt"># File lib/pho/rdf_collection.rb, line 29</span>
222
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">store_file</span>(<span class="ruby-identifier">file</span>, <span class="ruby-identifier">filename</span>)
223
- <span class="ruby-identifier">ext</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">extname</span>(<span class="ruby-identifier">filename</span>)
224
- <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">ext</span> <span class="ruby-operator">==</span> <span class="ruby-value str">&quot;.ttl&quot;</span>
225
- <span class="ruby-identifier">response</span> = <span class="ruby-ivar">@store</span>.<span class="ruby-identifier">store_file</span>(<span class="ruby-identifier">file</span>, <span class="ruby-keyword kw">nil</span>, <span class="ruby-value str">&quot;text/turtle&quot;</span>)
226
- <span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">ext</span> <span class="ruby-operator">==</span> <span class="ruby-value str">&quot;.nt&quot;</span>
227
- <span class="ruby-identifier">response</span> = <span class="ruby-ivar">@store</span>.<span class="ruby-identifier">store_file</span>(<span class="ruby-identifier">file</span>, <span class="ruby-keyword kw">nil</span>, <span class="ruby-value str">&quot;text/turtle&quot;</span>)
228
- <span class="ruby-keyword kw">else</span>
229
- <span class="ruby-identifier">response</span> = <span class="ruby-ivar">@store</span>.<span class="ruby-identifier">store_file</span>(<span class="ruby-identifier">file</span>)
230
- <span class="ruby-keyword kw">end</span>
231
-
232
- <span class="ruby-keyword kw">if</span> (<span class="ruby-identifier">response</span>.<span class="ruby-identifier">status</span> <span class="ruby-operator">&lt;</span> <span class="ruby-value">300</span> )
233
- <span class="ruby-constant">File</span>.<span class="ruby-identifier">open</span>(<span class="ruby-identifier">get_ok_file_for</span>(<span class="ruby-identifier">filename</span>), <span class="ruby-value str">&quot;w&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>
234
- <span class="ruby-identifier">file</span>.<span class="ruby-identifier">print</span>( <span class="ruby-value str">&quot;OK&quot;</span> )
235
- <span class="ruby-keyword kw">end</span>
236
- <span class="ruby-keyword kw">else</span>
237
- <span class="ruby-constant">File</span>.<span class="ruby-identifier">open</span>(<span class="ruby-identifier">get_fail_file_for</span>(<span class="ruby-identifier">filename</span>), <span class="ruby-value str">&quot;w&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>
238
- <span class="ruby-constant">YAML</span><span class="ruby-operator">::</span><span class="ruby-identifier">dump</span>(<span class="ruby-identifier">response</span>, <span class="ruby-identifier">file</span>)
239
- <span class="ruby-keyword kw">end</span>
240
- <span class="ruby-keyword kw">end</span>
241
- <span class="ruby-keyword kw">end</span>
242
- </pre>
243
- </div>
244
- </div>
245
- </div>
246
-
247
-
248
- </div>
249
-
250
-
251
- </div>
252
-
253
-
254
- <div id="validator-badges">
255
- <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
256
- </div>
257
-
258
- </body>
259
- </html>
@@ -1,121 +0,0 @@
1
- <?xml version="1.0" encoding="iso-8859-1"?>
2
- <!DOCTYPE html
3
- PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
-
6
- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
7
- <head>
8
- <title>Module: Pho::FileManagement</title>
9
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
- <meta http-equiv="Content-Script-Type" content="text/javascript" />
11
- <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
12
- <script type="text/javascript">
13
- // <![CDATA[
14
-
15
- function popupCode( url ) {
16
- window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
17
- }
18
-
19
- function toggleCode( id ) {
20
- if ( document.getElementById )
21
- elem = document.getElementById( id );
22
- else if ( document.all )
23
- elem = eval( "document.all." + id );
24
- else
25
- return false;
26
-
27
- elemStyle = elem.style;
28
-
29
- if ( elemStyle.display != "block" ) {
30
- elemStyle.display = "block"
31
- } else {
32
- elemStyle.display = "none"
33
- }
34
-
35
- return true;
36
- }
37
-
38
- // Make codeblocks hidden by default
39
- document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
40
-
41
- // ]]>
42
- </script>
43
-
44
- </head>
45
- <body>
46
-
47
-
48
-
49
- <div id="classHeader">
50
- <table class="header-table">
51
- <tr class="top-aligned-row">
52
- <td><strong>Module</strong></td>
53
- <td class="class-name-in-header">Pho::FileManagement</td>
54
- </tr>
55
- <tr class="top-aligned-row">
56
- <td><strong>In:</strong></td>
57
- <td>
58
- <a href="../../files/lib/pho/file_manager_rb.html">
59
- lib/pho/file_manager.rb
60
- </a>
61
- <br />
62
- <a href="../../files/lib/pho/rdf_collection_rb.html">
63
- lib/pho/rdf_collection.rb
64
- </a>
65
- <br />
66
- <a href="../../files/lib/pho/file_management_rb.html">
67
- lib/pho/file_management.rb
68
- </a>
69
- <br />
70
- </td>
71
- </tr>
72
-
73
- </table>
74
- </div>
75
- <!-- banner header -->
76
-
77
- <div id="bodyContent">
78
-
79
-
80
-
81
- <div id="contextContent">
82
-
83
-
84
-
85
- </div>
86
-
87
-
88
- </div>
89
-
90
-
91
- <!-- if includes -->
92
-
93
- <div id="section">
94
-
95
- <div id="class-list">
96
- <h3 class="section-bar">Classes and Modules</h3>
97
-
98
- Class <a href="FileManagement/AbstractFileManager.html" class="link">Pho::FileManagement::AbstractFileManager</a><br />
99
- Class <a href="FileManagement/FileManager.html" class="link">Pho::FileManagement::FileManager</a><br />
100
- Class <a href="FileManagement/RDFManager.html" class="link">Pho::FileManagement::RDFManager</a><br />
101
-
102
- </div>
103
-
104
-
105
-
106
-
107
-
108
-
109
-
110
- <!-- if method_list -->
111
-
112
-
113
- </div>
114
-
115
-
116
- <div id="validator-badges">
117
- <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
118
- </div>
119
-
120
- </body>
121
- </html>