pho 0.2 → 0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (140) hide show
  1. data/CHANGES +19 -0
  2. data/Rakefile +6 -4
  3. data/doc/index.html +6 -0
  4. data/doc/rdoc/classes/Pho.html +250 -0
  5. data/doc/rdoc/classes/Pho/Analyzers.html +288 -0
  6. data/doc/rdoc/classes/Pho/DatatypeProperty.html +209 -0
  7. data/doc/rdoc/classes/Pho/DatatypeProperty.src/M000034.html +21 -0
  8. data/doc/rdoc/classes/Pho/DatatypeProperty.src/M000035.html +29 -0
  9. data/doc/rdoc/classes/Pho/Etags.html +238 -0
  10. data/doc/rdoc/classes/Pho/Etags.src/M000088.html +23 -0
  11. data/doc/rdoc/classes/Pho/Etags.src/M000089.html +28 -0
  12. data/doc/rdoc/classes/Pho/Etags.src/M000090.html +21 -0
  13. data/doc/rdoc/classes/Pho/Etags.src/M000091.html +18 -0
  14. data/doc/rdoc/classes/Pho/Etags.src/M000092.html +18 -0
  15. data/doc/rdoc/classes/Pho/Etags.src/M000093.html +18 -0
  16. data/doc/rdoc/classes/Pho/Facet.html +119 -0
  17. data/doc/rdoc/classes/Pho/Facet/Results.html +225 -0
  18. data/doc/rdoc/classes/Pho/Facet/Results.src/M000001.html +20 -0
  19. data/doc/rdoc/classes/Pho/Facet/Results.src/M000002.html +27 -0
  20. data/doc/rdoc/classes/Pho/Facet/Results.src/M000003.html +54 -0
  21. data/doc/rdoc/classes/Pho/Facet/Term.html +166 -0
  22. data/doc/rdoc/classes/Pho/Facet/Term.src/M000004.html +20 -0
  23. data/doc/rdoc/classes/Pho/FieldPredicateMap.html +461 -0
  24. data/doc/rdoc/classes/Pho/FieldPredicateMap.src/M000005.html +38 -0
  25. data/doc/rdoc/classes/Pho/FieldPredicateMap.src/M000006.html +28 -0
  26. data/doc/rdoc/classes/Pho/FieldPredicateMap.src/M000007.html +20 -0
  27. data/doc/rdoc/classes/Pho/FieldPredicateMap.src/M000008.html +18 -0
  28. data/doc/rdoc/classes/Pho/FieldPredicateMap.src/M000009.html +23 -0
  29. data/doc/rdoc/classes/Pho/FieldPredicateMap.src/M000010.html +23 -0
  30. data/doc/rdoc/classes/Pho/FieldPredicateMap.src/M000011.html +18 -0
  31. data/doc/rdoc/classes/Pho/FieldPredicateMap.src/M000012.html +18 -0
  32. data/doc/rdoc/classes/Pho/FieldPredicateMap.src/M000013.html +18 -0
  33. data/doc/rdoc/classes/Pho/FieldPredicateMap.src/M000014.html +18 -0
  34. data/doc/rdoc/classes/Pho/FieldPredicateMap.src/M000015.html +18 -0
  35. data/doc/rdoc/classes/Pho/FieldPredicateMap.src/M000016.html +21 -0
  36. data/doc/rdoc/classes/Pho/FieldPredicateMap.src/M000017.html +21 -0
  37. data/doc/rdoc/classes/Pho/FieldPredicateMap.src/M000018.html +38 -0
  38. data/doc/rdoc/classes/Pho/FieldPredicateMap.src/M000019.html +18 -0
  39. data/doc/rdoc/classes/Pho/FieldWeighting.html +202 -0
  40. data/doc/rdoc/classes/Pho/FieldWeighting.src/M000075.html +20 -0
  41. data/doc/rdoc/classes/Pho/FieldWeighting.src/M000076.html +26 -0
  42. data/doc/rdoc/classes/Pho/Job.html +147 -0
  43. data/doc/rdoc/classes/Pho/Job.src/M000074.html +21 -0
  44. data/doc/rdoc/classes/Pho/Namespaces.html +128 -0
  45. data/doc/rdoc/classes/Pho/QueryProfile.html +355 -0
  46. data/doc/rdoc/classes/Pho/QueryProfile.src/M000024.html +39 -0
  47. data/doc/rdoc/classes/Pho/QueryProfile.src/M000025.html +24 -0
  48. data/doc/rdoc/classes/Pho/QueryProfile.src/M000026.html +20 -0
  49. data/doc/rdoc/classes/Pho/QueryProfile.src/M000027.html +18 -0
  50. data/doc/rdoc/classes/Pho/QueryProfile.src/M000028.html +18 -0
  51. data/doc/rdoc/classes/Pho/QueryProfile.src/M000029.html +21 -0
  52. data/doc/rdoc/classes/Pho/QueryProfile.src/M000030.html +18 -0
  53. data/doc/rdoc/classes/Pho/QueryProfile.src/M000031.html +18 -0
  54. data/doc/rdoc/classes/Pho/QueryProfile.src/M000032.html +38 -0
  55. data/doc/rdoc/classes/Pho/QueryProfile.src/M000033.html +18 -0
  56. data/doc/rdoc/classes/Pho/RDFCollection.html +353 -0
  57. data/doc/rdoc/classes/Pho/RDFCollection.src/M000077.html +23 -0
  58. data/doc/rdoc/classes/Pho/RDFCollection.src/M000078.html +22 -0
  59. data/doc/rdoc/classes/Pho/RDFCollection.src/M000079.html +24 -0
  60. data/doc/rdoc/classes/Pho/RDFCollection.src/M000080.html +23 -0
  61. data/doc/rdoc/classes/Pho/RDFCollection.src/M000081.html +18 -0
  62. data/doc/rdoc/classes/Pho/RDFCollection.src/M000082.html +22 -0
  63. data/doc/rdoc/classes/Pho/RDFCollection.src/M000083.html +22 -0
  64. data/doc/rdoc/classes/Pho/RDFCollection.src/M000084.html +26 -0
  65. data/doc/rdoc/classes/Pho/RDFCollection.src/M000085.html +23 -0
  66. data/doc/rdoc/classes/Pho/RDFCollection.src/M000086.html +18 -0
  67. data/doc/rdoc/classes/Pho/RDFCollection.src/M000087.html +18 -0
  68. data/doc/rdoc/classes/Pho/Snapshot.html +271 -0
  69. data/doc/rdoc/classes/Pho/Snapshot.src/M000070.html +31 -0
  70. data/doc/rdoc/classes/Pho/Snapshot.src/M000071.html +21 -0
  71. data/doc/rdoc/classes/Pho/Snapshot.src/M000072.html +18 -0
  72. data/doc/rdoc/classes/Pho/Snapshot.src/M000073.html +37 -0
  73. data/doc/rdoc/classes/Pho/Status.html +245 -0
  74. data/doc/rdoc/classes/Pho/Status.src/M000020.html +20 -0
  75. data/doc/rdoc/classes/Pho/Status.src/M000021.html +31 -0
  76. data/doc/rdoc/classes/Pho/Status.src/M000022.html +18 -0
  77. data/doc/rdoc/classes/Pho/Status.src/M000023.html +18 -0
  78. data/doc/rdoc/classes/Pho/Store.html +1055 -0
  79. data/doc/rdoc/classes/Pho/Store.src/M000036.html +22 -0
  80. data/doc/rdoc/classes/Pho/Store.src/M000037.html +18 -0
  81. data/doc/rdoc/classes/Pho/Store.src/M000038.html +25 -0
  82. data/doc/rdoc/classes/Pho/Store.src/M000039.html +20 -0
  83. data/doc/rdoc/classes/Pho/Store.src/M000040.html +20 -0
  84. data/doc/rdoc/classes/Pho/Store.src/M000041.html +28 -0
  85. data/doc/rdoc/classes/Pho/Store.src/M000042.html +23 -0
  86. data/doc/rdoc/classes/Pho/Store.src/M000043.html +18 -0
  87. data/doc/rdoc/classes/Pho/Store.src/M000044.html +18 -0
  88. data/doc/rdoc/classes/Pho/Store.src/M000045.html +18 -0
  89. data/doc/rdoc/classes/Pho/Store.src/M000046.html +18 -0
  90. data/doc/rdoc/classes/Pho/Store.src/M000047.html +23 -0
  91. data/doc/rdoc/classes/Pho/Store.src/M000048.html +22 -0
  92. data/doc/rdoc/classes/Pho/Store.src/M000049.html +26 -0
  93. data/doc/rdoc/classes/Pho/Store.src/M000050.html +24 -0
  94. data/doc/rdoc/classes/Pho/Store.src/M000051.html +20 -0
  95. data/doc/rdoc/classes/Pho/Store.src/M000052.html +20 -0
  96. data/doc/rdoc/classes/Pho/Store.src/M000053.html +25 -0
  97. data/doc/rdoc/classes/Pho/Store.src/M000054.html +20 -0
  98. data/doc/rdoc/classes/Pho/Store.src/M000055.html +30 -0
  99. data/doc/rdoc/classes/Pho/Store.src/M000056.html +21 -0
  100. data/doc/rdoc/classes/Pho/Store.src/M000057.html +23 -0
  101. data/doc/rdoc/classes/Pho/Store.src/M000058.html +28 -0
  102. data/doc/rdoc/classes/Pho/Store.src/M000059.html +18 -0
  103. data/doc/rdoc/classes/Pho/Store.src/M000060.html +18 -0
  104. data/doc/rdoc/classes/Pho/Store.src/M000061.html +18 -0
  105. data/doc/rdoc/classes/Pho/Store.src/M000062.html +31 -0
  106. data/doc/rdoc/classes/Pho/Store.src/M000063.html +21 -0
  107. data/doc/rdoc/classes/Pho/Store.src/M000064.html +20 -0
  108. data/doc/rdoc/classes/Pho/Store.src/M000065.html +20 -0
  109. data/doc/rdoc/classes/Pho/Store.src/M000066.html +20 -0
  110. data/doc/rdoc/classes/Pho/Store.src/M000067.html +20 -0
  111. data/doc/rdoc/classes/Pho/Store.src/M000068.html +20 -0
  112. data/doc/rdoc/classes/Pho/Store.src/M000069.html +20 -0
  113. data/doc/rdoc/created.rid +1 -1
  114. data/doc/rdoc/files/CHANGES.html +140 -0
  115. data/doc/rdoc/files/README.html +9 -8
  116. data/doc/rdoc/files/lib/pho/etags_rb.html +108 -0
  117. data/doc/rdoc/files/lib/pho/facet_rb.html +101 -0
  118. data/doc/rdoc/files/lib/pho/field_predicate_map_rb.html +101 -0
  119. data/doc/rdoc/files/lib/pho/job_rb.html +101 -0
  120. data/doc/rdoc/files/lib/pho/query_profile_rb.html +101 -0
  121. data/doc/rdoc/files/lib/pho/rdf_collection_rb.html +101 -0
  122. data/doc/rdoc/files/lib/pho/snapshot_rb.html +108 -0
  123. data/doc/rdoc/files/lib/pho/status_rb.html +101 -0
  124. data/doc/rdoc/files/lib/pho/store_rb.html +101 -0
  125. data/doc/rdoc/files/lib/pho_rb.html +120 -0
  126. data/doc/rdoc/fr_class_index.html +16 -0
  127. data/doc/rdoc/fr_file_index.html +11 -0
  128. data/doc/rdoc/fr_method_index.html +93 -0
  129. data/examples/status.rb +3 -3
  130. data/lib/pho.rb +11 -2
  131. data/lib/pho/facet.rb +101 -0
  132. data/lib/pho/field_predicate_map.rb +4 -4
  133. data/lib/pho/query_profile.rb +170 -0
  134. data/lib/pho/status.rb +65 -0
  135. data/lib/pho/store.rb +26 -13
  136. data/tests/tc_facet.rb +91 -0
  137. data/tests/tc_query_profile.rb +196 -0
  138. data/tests/tc_status.rb +56 -0
  139. data/tests/ts_pho.rb +3 -0
  140. metadata +148 -3
@@ -0,0 +1,23 @@
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>
7
+ <head>
8
+ <title>new (Pho::RDFCollection)</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
+ <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
11
+ </head>
12
+ <body class="standalone-code">
13
+ <pre><span class="ruby-comment cmt"># File lib/pho/rdf_collection.rb, line 16</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">store</span>, <span class="ruby-identifier">dir</span>, <span class="ruby-identifier">rdf_suffix</span>=<span class="ruby-constant">RDF</span>, <span class="ruby-identifier">ok_suffix</span>=<span class="ruby-constant">OK</span>, <span class="ruby-identifier">fail_suffix</span>=<span class="ruby-constant">FAIL</span>, <span class="ruby-identifier">sleep</span>=<span class="ruby-value">1</span>)
15
+ <span class="ruby-ivar">@store</span> = <span class="ruby-identifier">store</span>
16
+ <span class="ruby-ivar">@dir</span> = <span class="ruby-identifier">dir</span>
17
+ <span class="ruby-ivar">@sleep</span> = <span class="ruby-identifier">sleep</span>
18
+ <span class="ruby-ivar">@rdf_suffix</span> = <span class="ruby-identifier">rdf_suffix</span>
19
+ <span class="ruby-ivar">@ok_suffix</span> = <span class="ruby-identifier">ok_suffix</span>
20
+ <span class="ruby-ivar">@fail_suffix</span> = <span class="ruby-identifier">fail_suffix</span>
21
+ <span class="ruby-keyword kw">end</span></pre>
22
+ </body>
23
+ </html>
@@ -0,0 +1,22 @@
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>
7
+ <head>
8
+ <title>store (Pho::RDFCollection)</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
+ <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
11
+ </head>
12
+ <body class="standalone-code">
13
+ <pre><span class="ruby-comment cmt"># File lib/pho/rdf_collection.rb, line 26</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">store</span>()
15
+ <span class="ruby-identifier">files_to_store</span> = <span class="ruby-identifier">new_files</span>()
16
+ <span class="ruby-identifier">files_to_store</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">filename</span><span class="ruby-operator">|</span>
17
+ <span class="ruby-identifier">file</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">filename</span>)
18
+ <span class="ruby-identifier">store_file</span>(<span class="ruby-identifier">file</span>, <span class="ruby-identifier">filename</span>)
19
+ <span class="ruby-keyword kw">end</span>
20
+ <span class="ruby-keyword kw">end</span></pre>
21
+ </body>
22
+ </html>
@@ -0,0 +1,24 @@
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>
7
+ <head>
8
+ <title>retry_failures (Pho::RDFCollection)</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
+ <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
11
+ </head>
12
+ <body class="standalone-code">
13
+ <pre><span class="ruby-comment cmt"># File lib/pho/rdf_collection.rb, line 35</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">retry_failures</span>()
15
+ <span class="ruby-identifier">retries</span> = <span class="ruby-identifier">failures</span>()
16
+ <span class="ruby-identifier">retries</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">filename</span><span class="ruby-operator">|</span>
17
+ <span class="ruby-constant">File</span>.<span class="ruby-identifier">delete</span>( <span class="ruby-identifier">get_fail_file_for</span>(<span class="ruby-identifier">filename</span>) )
18
+ <span class="ruby-comment cmt">#store it</span>
19
+ <span class="ruby-identifier">file</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">filename</span>)
20
+ <span class="ruby-identifier">store_file</span>(<span class="ruby-identifier">file</span>, <span class="ruby-identifier">filename</span>)
21
+ <span class="ruby-keyword kw">end</span>
22
+ <span class="ruby-keyword kw">end</span></pre>
23
+ </body>
24
+ </html>
@@ -0,0 +1,23 @@
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>
7
+ <head>
8
+ <title>reset (Pho::RDFCollection)</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
+ <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
11
+ </head>
12
+ <body class="standalone-code">
13
+ <pre><span class="ruby-comment cmt"># File lib/pho/rdf_collection.rb, line 47</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">reset</span>(<span class="ruby-identifier">reset_store</span>=<span class="ruby-keyword kw">false</span>)
15
+ <span class="ruby-constant">Dir</span>.<span class="ruby-identifier">glob</span>( <span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>(<span class="ruby-ivar">@dir</span>, <span class="ruby-node">&quot;*.#{@fail_suffix}&quot;</span>) ).<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">file</span><span class="ruby-operator">|</span>
16
+ <span class="ruby-constant">File</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-identifier">file</span>)
17
+ <span class="ruby-keyword kw">end</span>
18
+ <span class="ruby-constant">Dir</span>.<span class="ruby-identifier">glob</span>( <span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>(<span class="ruby-ivar">@dir</span>, <span class="ruby-node">&quot;*.#{@ok_suffix}&quot;</span>) ).<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">file</span><span class="ruby-operator">|</span>
19
+ <span class="ruby-constant">File</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-identifier">file</span>)
20
+ <span class="ruby-keyword kw">end</span>
21
+ <span class="ruby-keyword kw">end</span></pre>
22
+ </body>
23
+ </html>
@@ -0,0 +1,18 @@
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>
7
+ <head>
8
+ <title>list (Pho::RDFCollection)</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
+ <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
11
+ </head>
12
+ <body class="standalone-code">
13
+ <pre><span class="ruby-comment cmt"># File lib/pho/rdf_collection.rb, line 57</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">list</span>()
15
+ <span class="ruby-keyword kw">return</span> <span class="ruby-constant">Dir</span>.<span class="ruby-identifier">glob</span>( <span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>(<span class="ruby-ivar">@dir</span>, <span class="ruby-node">&quot;*.#{@rdf_suffix}&quot;</span>) )
16
+ <span class="ruby-keyword kw">end</span></pre>
17
+ </body>
18
+ </html>
@@ -0,0 +1,22 @@
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>
7
+ <head>
8
+ <title>failures (Pho::RDFCollection)</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
+ <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
11
+ </head>
12
+ <body class="standalone-code">
13
+ <pre><span class="ruby-comment cmt"># File lib/pho/rdf_collection.rb, line 62</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">failures</span>()
15
+ <span class="ruby-identifier">fails</span> = <span class="ruby-constant">Array</span>.<span class="ruby-identifier">new</span>
16
+ <span class="ruby-constant">Dir</span>.<span class="ruby-identifier">glob</span>( <span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>(<span class="ruby-ivar">@dir</span>, <span class="ruby-node">&quot;*.#{@fail_suffix}&quot;</span>) ).<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">file</span><span class="ruby-operator">|</span>
17
+ <span class="ruby-identifier">fails</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">file</span>.<span class="ruby-identifier">gsub</span>(<span class="ruby-node">/\.#{@fail_suffix}/</span>, <span class="ruby-node">&quot;.#{@rdf_suffix}&quot;</span>)
18
+ <span class="ruby-keyword kw">end</span>
19
+ <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">fails</span>
20
+ <span class="ruby-keyword kw">end</span></pre>
21
+ </body>
22
+ </html>
@@ -0,0 +1,22 @@
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>
7
+ <head>
8
+ <title>successes (Pho::RDFCollection)</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
+ <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
11
+ </head>
12
+ <body class="standalone-code">
13
+ <pre><span class="ruby-comment cmt"># File lib/pho/rdf_collection.rb, line 71</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">successes</span>()
15
+ <span class="ruby-identifier">successes</span> = <span class="ruby-constant">Array</span>.<span class="ruby-identifier">new</span>
16
+ <span class="ruby-constant">Dir</span>.<span class="ruby-identifier">glob</span>( <span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>(<span class="ruby-ivar">@dir</span>, <span class="ruby-node">&quot;*.#{@ok_suffix}&quot;</span>) ).<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">file</span><span class="ruby-operator">|</span>
17
+ <span class="ruby-identifier">successes</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">file</span>.<span class="ruby-identifier">gsub</span>(<span class="ruby-node">/\.#{@ok_suffix}/</span>, <span class="ruby-node">&quot;.#{@rdf_suffix}&quot;</span>)
18
+ <span class="ruby-keyword kw">end</span>
19
+ <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">successes</span>
20
+ <span class="ruby-keyword kw">end</span></pre>
21
+ </body>
22
+ </html>
@@ -0,0 +1,26 @@
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>
7
+ <head>
8
+ <title>new_files (Pho::RDFCollection)</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
+ <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
11
+ </head>
12
+ <body class="standalone-code">
13
+ <pre><span class="ruby-comment cmt"># File lib/pho/rdf_collection.rb, line 80</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">new_files</span>()
15
+ <span class="ruby-identifier">newfiles</span> = <span class="ruby-constant">Array</span>.<span class="ruby-identifier">new</span>
16
+ <span class="ruby-constant">Dir</span>.<span class="ruby-identifier">glob</span>( <span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>(<span class="ruby-ivar">@dir</span>, <span class="ruby-node">&quot;*.#{@rdf_suffix}&quot;</span>) ) <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">file</span><span class="ruby-operator">|</span>
17
+ <span class="ruby-identifier">ok_file</span> = <span class="ruby-identifier">get_ok_file_for</span>(<span class="ruby-identifier">file</span>)
18
+ <span class="ruby-identifier">fail_file</span> = <span class="ruby-identifier">get_fail_file_for</span>(<span class="ruby-identifier">file</span>)
19
+ <span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span>( <span class="ruby-constant">File</span>.<span class="ruby-identifier">exists?</span>(<span class="ruby-identifier">ok_file</span>) <span class="ruby-keyword kw">or</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">exists?</span>(<span class="ruby-identifier">fail_file</span>) )
20
+ <span class="ruby-identifier">newfiles</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">file</span>
21
+ <span class="ruby-keyword kw">end</span>
22
+ <span class="ruby-keyword kw">end</span>
23
+ <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">newfiles</span>
24
+ <span class="ruby-keyword kw">end</span></pre>
25
+ </body>
26
+ </html>
@@ -0,0 +1,23 @@
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>
7
+ <head>
8
+ <title>summary (Pho::RDFCollection)</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
+ <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
11
+ </head>
12
+ <body class="standalone-code">
13
+ <pre><span class="ruby-comment cmt"># File lib/pho/rdf_collection.rb, line 94</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">summary</span>()
15
+ <span class="ruby-identifier">failures</span> = <span class="ruby-identifier">failures</span>()
16
+ <span class="ruby-identifier">successes</span> = <span class="ruby-identifier">successes</span>()
17
+ <span class="ruby-identifier">newfiles</span> = <span class="ruby-identifier">new_files</span>()
18
+ <span class="ruby-identifier">total</span> = <span class="ruby-identifier">failures</span>.<span class="ruby-identifier">size</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">successes</span>.<span class="ruby-identifier">size</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">newfiles</span>.<span class="ruby-identifier">size</span>
19
+ <span class="ruby-identifier">summary</span> = <span class="ruby-node">&quot;#{@dir} contains #{total} files: #{successes.size} stored, #{failures.size} failed, #{newfiles.size} new&quot;</span>
20
+ <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">summary</span>
21
+ <span class="ruby-keyword kw">end</span></pre>
22
+ </body>
23
+ </html>
@@ -0,0 +1,18 @@
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>
7
+ <head>
8
+ <title>get_fail_file_for (Pho::RDFCollection)</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
+ <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
11
+ </head>
12
+ <body class="standalone-code">
13
+ <pre><span class="ruby-comment cmt"># File lib/pho/rdf_collection.rb, line 103</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">get_fail_file_for</span>(<span class="ruby-identifier">filename</span>)
15
+ <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">filename</span>.<span class="ruby-identifier">gsub</span>(<span class="ruby-node">/\.#{@rdf_suffix}/</span>, <span class="ruby-node">&quot;.#{@fail_suffix}&quot;</span>)
16
+ <span class="ruby-keyword kw">end</span></pre>
17
+ </body>
18
+ </html>
@@ -0,0 +1,18 @@
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>
7
+ <head>
8
+ <title>get_ok_file_for (Pho::RDFCollection)</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
+ <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
11
+ </head>
12
+ <body class="standalone-code">
13
+ <pre><span class="ruby-comment cmt"># File lib/pho/rdf_collection.rb, line 107</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">get_ok_file_for</span>(<span class="ruby-identifier">filename</span>)
15
+ <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">filename</span>.<span class="ruby-identifier">gsub</span>(<span class="ruby-node">/\.#{@rdf_suffix}/</span>, <span class="ruby-node">&quot;.#{@ok_suffix}&quot;</span>)
16
+ <span class="ruby-keyword kw">end</span></pre>
17
+ </body>
18
+ </html>
@@ -0,0 +1,271 @@
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::Snapshot</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::Snapshot</td>
54
+ </tr>
55
+ <tr class="top-aligned-row">
56
+ <td><strong>In:</strong></td>
57
+ <td>
58
+ <a href="../../files/lib/pho/snapshot_rb.html">
59
+ lib/pho/snapshot.rb
60
+ </a>
61
+ <br />
62
+ </td>
63
+ </tr>
64
+
65
+ <tr class="top-aligned-row">
66
+ <td><strong>Parent:</strong></td>
67
+ <td>
68
+ Object
69
+ </td>
70
+ </tr>
71
+ </table>
72
+ </div>
73
+ <!-- banner header -->
74
+
75
+ <div id="bodyContent">
76
+
77
+
78
+
79
+ <div id="contextContent">
80
+
81
+ <div id="description">
82
+ <p>
83
+ In the Talis Platform a &quot;snapshot&quot; is an backup of the contents
84
+ of a <a href="Store.html">Store</a>
85
+ </p>
86
+ <p>
87
+ A snapshot consists of a tar file that contains all data (contentbox and
88
+ metabox) in the store. The snapshot also contains the store configuration
89
+ but this is encrypted and not intended for reuse.
90
+ </p>
91
+ <p>
92
+ A snapshot can be generated (or scheduled) using the <a
93
+ href="Store.html#M000061">Store.snapshot</a> method.
94
+ </p>
95
+
96
+ </div>
97
+
98
+
99
+ </div>
100
+
101
+ <div id="method-list">
102
+ <h3 class="section-bar">Methods</h3>
103
+
104
+ <div class="name-list">
105
+ <a href="#M000073">download</a>&nbsp;&nbsp;
106
+ <a href="#M000071">new</a>&nbsp;&nbsp;
107
+ <a href="#M000070">parse</a>&nbsp;&nbsp;
108
+ <a href="#M000072">read_md5</a>&nbsp;&nbsp;
109
+ </div>
110
+ </div>
111
+
112
+ </div>
113
+
114
+
115
+ <!-- if includes -->
116
+
117
+ <div id="section">
118
+
119
+
120
+
121
+
122
+
123
+ <div id="attribute-list">
124
+ <h3 class="section-bar">Attributes</h3>
125
+
126
+ <div class="name-list">
127
+ <table>
128
+ <tr class="top-aligned-row context-row">
129
+ <td class="context-item-name">md5_url</td>
130
+ <td class="context-item-value">&nbsp;[R]&nbsp;</td>
131
+ <td class="context-item-desc">
132
+ The URL from which the MD5 for the snapshot can be retrieved
133
+
134
+ </td>
135
+ </tr>
136
+ <tr class="top-aligned-row context-row">
137
+ <td class="context-item-name">size</td>
138
+ <td class="context-item-value">&nbsp;[R]&nbsp;</td>
139
+ <td class="context-item-desc">
140
+ Size of the snapshot
141
+
142
+ </td>
143
+ </tr>
144
+ <tr class="top-aligned-row context-row">
145
+ <td class="context-item-name">units</td>
146
+ <td class="context-item-value">&nbsp;[R]&nbsp;</td>
147
+ <td class="context-item-desc">
148
+ Units for Size, e.g. KB
149
+
150
+ </td>
151
+ </tr>
152
+ <tr class="top-aligned-row context-row">
153
+ <td class="context-item-name">url</td>
154
+ <td class="context-item-value">&nbsp;[R]&nbsp;</td>
155
+ <td class="context-item-desc">
156
+ The URL from which the snapshot can be retrieved
157
+
158
+ </td>
159
+ </tr>
160
+ </table>
161
+ </div>
162
+ </div>
163
+
164
+
165
+
166
+ <!-- if method_list -->
167
+ <div id="methods">
168
+ <h3 class="section-bar">Public Class methods</h3>
169
+
170
+ <div id="method-M000071" class="method-detail">
171
+ <a name="M000071"></a>
172
+
173
+ <div class="method-heading">
174
+ <a href="Snapshot.src/M000071.html" target="Code" class="method-signature"
175
+ onclick="popupCode('Snapshot.src/M000071.html');return false;">
176
+ <span class="method-name">new</span><span class="method-args">(url, md5_url, size, units)</span>
177
+ </a>
178
+ </div>
179
+
180
+ <div class="method-description">
181
+ </div>
182
+ </div>
183
+
184
+ <div id="method-M000070" class="method-detail">
185
+ <a name="M000070"></a>
186
+
187
+ <div class="method-heading">
188
+ <a href="Snapshot.src/M000070.html" target="Code" class="method-signature"
189
+ onclick="popupCode('Snapshot.src/M000070.html');return false;">
190
+ <span class="method-name">parse</span><span class="method-args">(resp)</span>
191
+ </a>
192
+ </div>
193
+
194
+ <div class="method-description">
195
+ <p>
196
+ Class method to <a href="Snapshot.html#M000070">parse</a> the HTML response
197
+ from API, e.g. as produced by the <a
198
+ href="Store.html#M000065">Store.get_snapshots</a> method and create a <a
199
+ href="Snapshot.html#M000071">new</a> <a href="Snapshot.html">Snapshot</a>
200
+ object. At the moment the Platform only supports single snapshot.
201
+ </p>
202
+ <p>
203
+ If the response was an error, then an exception will be thrown
204
+ </p>
205
+ <pre>
206
+ resp:: HTTP response generated by the Store.get_snapshots method
207
+ </pre>
208
+ </div>
209
+ </div>
210
+
211
+ <h3 class="section-bar">Public Instance methods</h3>
212
+
213
+ <div id="method-M000073" class="method-detail">
214
+ <a name="M000073"></a>
215
+
216
+ <div class="method-heading">
217
+ <a href="Snapshot.src/M000073.html" target="Code" class="method-signature"
218
+ onclick="popupCode('Snapshot.src/M000073.html');return false;">
219
+ <span class="method-name">download</span><span class="method-args">(dir, client=HTTPClient.new())</span>
220
+ </a>
221
+ </div>
222
+
223
+ <div class="method-description">
224
+ <p>
225
+ Download this snapshot to the specified directory. Will automatically
226
+ calculate an MD5 checksum for the <a
227
+ href="Snapshot.html#M000073">download</a> and compare it against the
228
+ published value. If they don&#8216;t match then a RuntimeError will be
229
+ raised
230
+ </p>
231
+ <table>
232
+ <tr><td valign="top">dir:</td><td>directory in which snapshot will be stored
233
+
234
+ </td></tr>
235
+ <tr><td valign="top">client:</td><td>specify a preconfigured client, e.g. to configure proxy servers, etc
236
+
237
+ </td></tr>
238
+ </table>
239
+ </div>
240
+ </div>
241
+
242
+ <div id="method-M000072" class="method-detail">
243
+ <a name="M000072"></a>
244
+
245
+ <div class="method-heading">
246
+ <a href="Snapshot.src/M000072.html" target="Code" class="method-signature"
247
+ onclick="popupCode('Snapshot.src/M000072.html');return false;">
248
+ <span class="method-name">read_md5</span><span class="method-args">(client=HttpClient.new())</span>
249
+ </a>
250
+ </div>
251
+
252
+ <div class="method-description">
253
+ <p>
254
+ Read the published MD5 value
255
+ </p>
256
+ </div>
257
+ </div>
258
+
259
+
260
+ </div>
261
+
262
+
263
+ </div>
264
+
265
+
266
+ <div id="validator-badges">
267
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
268
+ </div>
269
+
270
+ </body>
271
+ </html>