pho 0.7.3 → 0.7.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (87) hide show
  1. data/CHANGES +6 -0
  2. data/README +9 -1
  3. data/Rakefile +1 -1
  4. data/doc/index.html +3 -1
  5. data/doc/rdoc/classes/Pho/Analyzers.html +310 -0
  6. data/doc/rdoc/classes/Pho/CommandLine.html +770 -0
  7. data/doc/rdoc/classes/Pho/DatatypeProperty.html +241 -0
  8. data/doc/rdoc/classes/Pho/Enrichment/StoreEnricher.html +410 -0
  9. data/doc/rdoc/classes/Pho/Enrichment.html +119 -0
  10. data/doc/rdoc/classes/Pho/Etags.html +310 -0
  11. data/doc/rdoc/classes/Pho/Facet/Results.html +299 -0
  12. data/doc/rdoc/classes/Pho/Facet/Term.html +177 -0
  13. data/doc/rdoc/classes/Pho/Facet.html +119 -0
  14. data/doc/rdoc/classes/Pho/FieldPredicateMap.html +695 -0
  15. data/doc/rdoc/classes/Pho/FieldWeighting.html +230 -0
  16. data/doc/rdoc/classes/Pho/FileManagement/AbstractFileManager.html +478 -0
  17. data/doc/rdoc/classes/Pho/FileManagement/FileManager.html +264 -0
  18. data/doc/rdoc/classes/Pho/FileManagement/RDFManager.html +259 -0
  19. data/doc/rdoc/classes/Pho/FileManagement.html +121 -0
  20. data/doc/rdoc/classes/Pho/Job.html +627 -0
  21. data/doc/rdoc/classes/Pho/JobUpdate.html +141 -0
  22. data/doc/rdoc/classes/Pho/Jobs.html +538 -0
  23. data/doc/rdoc/classes/Pho/Namespaces.html +164 -0
  24. data/doc/rdoc/classes/Pho/OAI/Record.html +165 -0
  25. data/doc/rdoc/classes/Pho/OAI/Records.html +331 -0
  26. data/doc/rdoc/classes/Pho/OAI.html +118 -0
  27. data/doc/rdoc/classes/Pho/QueryProfile.html +524 -0
  28. data/doc/rdoc/classes/Pho/RDF/Parser.html +279 -0
  29. data/doc/rdoc/classes/Pho/RDF.html +120 -0
  30. data/doc/rdoc/classes/Pho/RDFCollection.html +119 -0
  31. data/doc/rdoc/classes/Pho/ResourceHash/Converter.html +325 -0
  32. data/doc/rdoc/classes/Pho/ResourceHash/SetAlgebra.html +241 -0
  33. data/doc/rdoc/classes/Pho/ResourceHash.html +123 -0
  34. data/doc/rdoc/classes/Pho/Snapshot.html +402 -0
  35. data/doc/rdoc/classes/Pho/Sparql/SparqlClient.html +594 -0
  36. data/doc/rdoc/classes/Pho/Sparql/SparqlHelper.html +696 -0
  37. data/doc/rdoc/classes/Pho/Sparql.html +187 -0
  38. data/doc/rdoc/classes/Pho/Status.html +296 -0
  39. data/doc/rdoc/classes/Pho/Store.html +1569 -0
  40. data/doc/rdoc/classes/Pho/StoreSparqlClient.html +183 -0
  41. data/doc/rdoc/classes/Pho/Update/Changeset.html +521 -0
  42. data/doc/rdoc/classes/Pho/Update/ChangesetBuilder.html +330 -0
  43. data/doc/rdoc/classes/Pho/Update/ChangesetHelper.html +159 -0
  44. data/doc/rdoc/classes/Pho/Update/Changesets.html +205 -0
  45. data/doc/rdoc/classes/Pho/Update/LiteralStatement.html +257 -0
  46. data/doc/rdoc/classes/Pho/Update/ResourceStatement.html +237 -0
  47. data/doc/rdoc/classes/Pho/Update/Statement.html +303 -0
  48. data/doc/rdoc/classes/Pho/Update.html +128 -0
  49. data/doc/rdoc/classes/Pho.html +283 -0
  50. data/doc/rdoc/classes/String.html +146 -0
  51. data/doc/rdoc/created.rid +1 -0
  52. data/doc/rdoc/files/CHANGES.html +373 -0
  53. data/doc/rdoc/files/README.html +204 -0
  54. data/doc/rdoc/files/lib/pho/changeset_builder_rb.html +108 -0
  55. data/doc/rdoc/files/lib/pho/changeset_rb.html +108 -0
  56. data/doc/rdoc/files/lib/pho/command_line_rb.html +101 -0
  57. data/doc/rdoc/files/lib/pho/converter_rb.html +108 -0
  58. data/doc/rdoc/files/lib/pho/enrichment_rb.html +101 -0
  59. data/doc/rdoc/files/lib/pho/etags_rb.html +108 -0
  60. data/doc/rdoc/files/lib/pho/facet_rb.html +101 -0
  61. data/doc/rdoc/files/lib/pho/field_predicate_map_rb.html +101 -0
  62. data/doc/rdoc/files/lib/pho/file_management_rb.html +101 -0
  63. data/doc/rdoc/files/lib/pho/file_manager_rb.html +108 -0
  64. data/doc/rdoc/files/lib/pho/job_rb.html +101 -0
  65. data/doc/rdoc/files/lib/pho/oai_rb.html +101 -0
  66. data/doc/rdoc/files/lib/pho/query_profile_rb.html +101 -0
  67. data/doc/rdoc/files/lib/pho/rdf_collection_rb.html +101 -0
  68. data/doc/rdoc/files/lib/pho/rdf_rb.html +108 -0
  69. data/doc/rdoc/files/lib/pho/resource_hash_rb.html +101 -0
  70. data/doc/rdoc/files/lib/pho/snapshot_rb.html +109 -0
  71. data/doc/rdoc/files/lib/pho/sparql_rb.html +101 -0
  72. data/doc/rdoc/files/lib/pho/status_rb.html +101 -0
  73. data/doc/rdoc/files/lib/pho/store_rb.html +108 -0
  74. data/doc/rdoc/files/lib/pho_rb.html +133 -0
  75. data/doc/rdoc/fr_class_index.html +72 -0
  76. data/doc/rdoc/fr_file_index.html +49 -0
  77. data/doc/rdoc/fr_method_index.html +239 -0
  78. data/doc/rdoc/index.html +24 -0
  79. data/doc/rdoc/rdoc-style.css +208 -0
  80. data/lib/pho/enrichment.rb +1 -0
  81. data/lib/pho/field_predicate_map.rb +5 -0
  82. data/lib/pho/query_profile.rb +5 -0
  83. data/lib/pho/store.rb +4 -1
  84. data/tests/tc_field_predicate_map.rb +7 -1
  85. data/tests/tc_query_profile.rb +6 -0
  86. data/tests/tc_store_util.rb +7 -0
  87. metadata +134 -21
@@ -0,0 +1,264 @@
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="#M000006">list</a>&nbsp;&nbsp;
92
+ <a href="#M000007">name_for_file</a>&nbsp;&nbsp;
93
+ <a href="#M000005">new</a>&nbsp;&nbsp;
94
+ <a href="#M000008">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-M000007" class="method-detail">
130
+ <a name="M000007"></a>
131
+
132
+ <div class="method-heading">
133
+ <a href="#M000007" 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('M000007-source');return false;">[Source]</a></p>
141
+ <div class="method-source-code" id="M000007-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-M000005" class="method-detail">
155
+ <a name="M000005"></a>
156
+
157
+ <div class="method-heading">
158
+ <a href="#M000005" 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('M000005-source');return false;">[Source]</a></p>
166
+ <div class="method-source-code" id="M000005-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-M000006" class="method-detail">
181
+ <a name="M000006"></a>
182
+
183
+ <div class="method-heading">
184
+ <a href="#M000006" 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('M000006-source');return false;">[Source]</a></p>
195
+ <div class="method-source-code" id="M000006-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-M000008" class="method-detail">
220
+ <a name="M000008"></a>
221
+
222
+ <div class="method-heading">
223
+ <a href="#M000008" 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('M000008-source');return false;">[Source]</a></p>
231
+ <div class="method-source-code" id="M000008-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>
@@ -0,0 +1,259 @@
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="#M000003">list</a>&nbsp;&nbsp;
102
+ <a href="#M000002">new</a>&nbsp;&nbsp;
103
+ <a href="#M000004">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-M000002" class="method-detail">
154
+ <a name="M000002"></a>
155
+
156
+ <div class="method-heading">
157
+ <a href="#M000002" 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('M000002-source');return false;">[Source]</a></p>
165
+ <div class="method-source-code" id="M000002-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-M000003" class="method-detail">
180
+ <a name="M000003"></a>
181
+
182
+ <div class="method-heading">
183
+ <a href="#M000003" 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('M000003-source');return false;">[Source]</a></p>
194
+ <div class="method-source-code" id="M000003-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-M000004" class="method-detail">
208
+ <a name="M000004"></a>
209
+
210
+ <div class="method-heading">
211
+ <a href="#M000004" 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('M000004-source');return false;">[Source]</a></p>
219
+ <div class="method-source-code" id="M000004-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>
@@ -0,0 +1,121 @@
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_management_rb.html">
59
+ lib/pho/file_management.rb
60
+ </a>
61
+ <br />
62
+ <a href="../../files/lib/pho/file_manager_rb.html">
63
+ lib/pho/file_manager.rb
64
+ </a>
65
+ <br />
66
+ <a href="../../files/lib/pho/rdf_collection_rb.html">
67
+ lib/pho/rdf_collection.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>