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,20 @@
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::Facet::Results)</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/facet.rb, line 32</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">query</span>, <span class="ruby-identifier">fields</span>, <span class="ruby-identifier">facets</span>=<span class="ruby-constant">Hash</span>.<span class="ruby-identifier">new</span>)
15
+ <span class="ruby-ivar">@query</span> = <span class="ruby-identifier">query</span>
16
+ <span class="ruby-ivar">@fields</span> = <span class="ruby-identifier">fields</span>
17
+ <span class="ruby-ivar">@facets</span> = <span class="ruby-identifier">facets</span>
18
+ <span class="ruby-keyword kw">end</span></pre>
19
+ </body>
20
+ </html>
@@ -0,0 +1,27 @@
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>read_from_store (Pho::Facet::Results)</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/facet.rb, line 45</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-constant">Results</span>.<span class="ruby-identifier">read_from_store</span>(<span class="ruby-identifier">store</span>, <span class="ruby-identifier">query</span>, <span class="ruby-identifier">facets</span>, <span class="ruby-identifier">params</span>=<span class="ruby-constant">Hash</span>.<span class="ruby-identifier">new</span>)
15
+
16
+ <span class="ruby-identifier">params</span>[<span class="ruby-value str">&quot;output&quot;</span>] = <span class="ruby-value str">&quot;xml&quot;</span>
17
+ <span class="ruby-identifier">resp</span> = <span class="ruby-identifier">store</span>.<span class="ruby-identifier">facet</span>(<span class="ruby-identifier">query</span>, <span class="ruby-identifier">facets</span>, <span class="ruby-identifier">params</span>)
18
+
19
+ <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">resp</span>.<span class="ruby-identifier">status</span> <span class="ruby-operator">!=</span> <span class="ruby-value">200</span>
20
+ <span class="ruby-identifier">raise</span> <span class="ruby-node">&quot;Unable to do facetted search. Response code was #{resp.status}&quot;</span>
21
+ <span class="ruby-keyword kw">end</span>
22
+
23
+ <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">parse</span>(<span class="ruby-identifier">resp</span>.<span class="ruby-identifier">content</span>)
24
+
25
+ <span class="ruby-keyword kw">end</span></pre>
26
+ </body>
27
+ </html>
@@ -0,0 +1,54 @@
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>parse (Pho::Facet::Results)</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/facet.rb, line 58</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-constant">Results</span>.<span class="ruby-identifier">parse</span>(<span class="ruby-identifier">data</span>)
15
+ <span class="ruby-identifier">doc</span> = <span class="ruby-constant">REXML</span><span class="ruby-operator">::</span><span class="ruby-constant">Document</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">data</span>)
16
+ <span class="ruby-identifier">root</span> = <span class="ruby-identifier">doc</span>.<span class="ruby-identifier">root</span>
17
+ <span class="ruby-identifier">head</span> = <span class="ruby-identifier">root</span>.<span class="ruby-identifier">elements</span>[<span class="ruby-value">1</span>]
18
+
19
+ <span class="ruby-identifier">query</span> = <span class="ruby-value str">&quot;&quot;</span>
20
+ <span class="ruby-identifier">fields</span> = <span class="ruby-value str">&quot;&quot;</span>
21
+ <span class="ruby-identifier">queryEl</span> = <span class="ruby-identifier">head</span>.<span class="ruby-identifier">get_elements</span>(<span class="ruby-value str">&quot;query&quot;</span>)[<span class="ruby-value">0</span>]
22
+ <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">queryEl</span> <span class="ruby-operator">!=</span> <span class="ruby-keyword kw">nil</span>
23
+ <span class="ruby-identifier">query</span> = <span class="ruby-identifier">queryEl</span>.<span class="ruby-identifier">text</span>
24
+ <span class="ruby-keyword kw">end</span>
25
+ <span class="ruby-identifier">fieldsEl</span> = <span class="ruby-identifier">head</span>.<span class="ruby-identifier">get_elements</span>(<span class="ruby-value str">&quot;fields&quot;</span>)[<span class="ruby-value">0</span>]
26
+ <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">fieldsEl</span> <span class="ruby-operator">!=</span> <span class="ruby-keyword kw">nil</span>
27
+ <span class="ruby-identifier">fields</span> = <span class="ruby-identifier">fieldsEl</span>.<span class="ruby-identifier">text</span>
28
+ <span class="ruby-keyword kw">end</span>
29
+
30
+ <span class="ruby-identifier">results</span> = <span class="ruby-constant">Results</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">query</span>, <span class="ruby-identifier">fields</span>)
31
+
32
+ <span class="ruby-identifier">fields</span> = <span class="ruby-identifier">root</span>.<span class="ruby-identifier">get_elements</span>(<span class="ruby-value str">&quot;fields&quot;</span>)[<span class="ruby-value">0</span>]
33
+ <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">fields</span> <span class="ruby-operator">==</span> <span class="ruby-keyword kw">nil</span>
34
+ <span class="ruby-identifier">raise</span> <span class="ruby-value str">&quot;No fields in document!&quot;</span>
35
+ <span class="ruby-keyword kw">end</span>
36
+
37
+ <span class="ruby-identifier">fields</span>.<span class="ruby-identifier">get_elements</span>(<span class="ruby-value str">&quot;field&quot;</span>).<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">field</span><span class="ruby-operator">|</span>
38
+ <span class="ruby-identifier">field_name</span> = <span class="ruby-identifier">field</span>.<span class="ruby-identifier">attribute</span>(<span class="ruby-value str">&quot;name&quot;</span>).<span class="ruby-identifier">value</span>
39
+ <span class="ruby-identifier">results</span>.<span class="ruby-identifier">facets</span>[<span class="ruby-identifier">field_name</span>] = <span class="ruby-constant">Array</span>.<span class="ruby-identifier">new</span>
40
+
41
+ <span class="ruby-identifier">field</span>.<span class="ruby-identifier">get_elements</span>(<span class="ruby-value str">&quot;term&quot;</span>).<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">term</span><span class="ruby-operator">|</span>
42
+ <span class="ruby-identifier">term</span> = <span class="ruby-constant">Term</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">term</span>.<span class="ruby-identifier">attribute</span>(<span class="ruby-value str">&quot;number&quot;</span>).<span class="ruby-identifier">value</span>.<span class="ruby-identifier">to_i</span>,
43
+ <span class="ruby-identifier">term</span>.<span class="ruby-identifier">attribute</span>(<span class="ruby-value str">&quot;search-uri&quot;</span>).<span class="ruby-identifier">value</span>,
44
+ <span class="ruby-identifier">term</span>.<span class="ruby-identifier">text</span>() )
45
+
46
+ <span class="ruby-identifier">results</span>.<span class="ruby-identifier">facets</span>[<span class="ruby-identifier">field_name</span>] <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">term</span>
47
+ <span class="ruby-keyword kw">end</span>
48
+
49
+ <span class="ruby-keyword kw">end</span>
50
+
51
+ <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">results</span>
52
+ <span class="ruby-keyword kw">end</span></pre>
53
+ </body>
54
+ </html>
@@ -0,0 +1,166 @@
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::Facet::Term</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::Facet::Term</td>
54
+ </tr>
55
+ <tr class="top-aligned-row">
56
+ <td><strong>In:</strong></td>
57
+ <td>
58
+ <a href="../../../files/lib/pho/facet_rb.html">
59
+ lib/pho/facet.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
+ Captures the information about a specific term
84
+ </p>
85
+
86
+ </div>
87
+
88
+
89
+ </div>
90
+
91
+ <div id="method-list">
92
+ <h3 class="section-bar">Methods</h3>
93
+
94
+ <div class="name-list">
95
+ <a href="#M000004">new</a>&nbsp;&nbsp;
96
+ </div>
97
+ </div>
98
+
99
+ </div>
100
+
101
+
102
+ <!-- if includes -->
103
+
104
+ <div id="section">
105
+
106
+
107
+
108
+
109
+
110
+ <div id="attribute-list">
111
+ <h3 class="section-bar">Attributes</h3>
112
+
113
+ <div class="name-list">
114
+ <table>
115
+ <tr class="top-aligned-row context-row">
116
+ <td class="context-item-name">hits</td>
117
+ <td class="context-item-value">&nbsp;[R]&nbsp;</td>
118
+ <td class="context-item-desc"></td>
119
+ </tr>
120
+ <tr class="top-aligned-row context-row">
121
+ <td class="context-item-name">search_uri</td>
122
+ <td class="context-item-value">&nbsp;[R]&nbsp;</td>
123
+ <td class="context-item-desc"></td>
124
+ </tr>
125
+ <tr class="top-aligned-row context-row">
126
+ <td class="context-item-name">value</td>
127
+ <td class="context-item-value">&nbsp;[R]&nbsp;</td>
128
+ <td class="context-item-desc"></td>
129
+ </tr>
130
+ </table>
131
+ </div>
132
+ </div>
133
+
134
+
135
+
136
+ <!-- if method_list -->
137
+ <div id="methods">
138
+ <h3 class="section-bar">Public Class methods</h3>
139
+
140
+ <div id="method-M000004" class="method-detail">
141
+ <a name="M000004"></a>
142
+
143
+ <div class="method-heading">
144
+ <a href="Term.src/M000004.html" target="Code" class="method-signature"
145
+ onclick="popupCode('Term.src/M000004.html');return false;">
146
+ <span class="method-name">new</span><span class="method-args">(hits, search_uri, value)</span>
147
+ </a>
148
+ </div>
149
+
150
+ <div class="method-description">
151
+ </div>
152
+ </div>
153
+
154
+
155
+ </div>
156
+
157
+
158
+ </div>
159
+
160
+
161
+ <div id="validator-badges">
162
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
163
+ </div>
164
+
165
+ </body>
166
+ </html>
@@ -0,0 +1,20 @@
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::Facet::Term)</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/facet.rb, line 12</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">hits</span>, <span class="ruby-identifier">search_uri</span>, <span class="ruby-identifier">value</span>)
15
+ <span class="ruby-ivar">@hits</span> = <span class="ruby-identifier">hits</span>
16
+ <span class="ruby-ivar">@search_uri</span> = <span class="ruby-identifier">search_uri</span>
17
+ <span class="ruby-ivar">@value</span> = <span class="ruby-identifier">value</span>
18
+ <span class="ruby-keyword kw">end</span></pre>
19
+ </body>
20
+ </html>
@@ -0,0 +1,461 @@
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::FieldPredicateMap</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::FieldPredicateMap</td>
54
+ </tr>
55
+ <tr class="top-aligned-row">
56
+ <td><strong>In:</strong></td>
57
+ <td>
58
+ <a href="../../files/lib/pho/field_predicate_map_rb.html">
59
+ lib/pho/field_predicate_map.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
+ Models a the Field Predicate Map configuration associated with a Platform
84
+ <a href="Store.html">Store</a>.
85
+ </p>
86
+ <p>
87
+ Class methods exist to create a <a
88
+ href="FieldPredicateMap.html">FieldPredicateMap</a> instance by reading
89
+ from a store, and to create <a
90
+ href="DatatypeProperty.html">DatatypeProperty</a> instances checking that
91
+ the supplied data is valid according to the same logic as used by the
92
+ Platform API.
93
+ </p>
94
+
95
+ </div>
96
+
97
+
98
+ </div>
99
+
100
+ <div id="method-list">
101
+ <h3 class="section-bar">Methods</h3>
102
+
103
+ <div class="name-list">
104
+ <a href="#M000008">&lt;&lt;</a>&nbsp;&nbsp;
105
+ <a href="#M000006">create_mapping</a>&nbsp;&nbsp;
106
+ <a href="#M000013">get_by_name</a>&nbsp;&nbsp;
107
+ <a href="#M000014">get_by_uri</a>&nbsp;&nbsp;
108
+ <a href="#M000009">get_name</a>&nbsp;&nbsp;
109
+ <a href="#M000010">get_property_uri</a>&nbsp;&nbsp;
110
+ <a href="#M000011">mapped_name?</a>&nbsp;&nbsp;
111
+ <a href="#M000012">mapped_uri?</a>&nbsp;&nbsp;
112
+ <a href="#M000007">new</a>&nbsp;&nbsp;
113
+ <a href="#M000005">read_from_store</a>&nbsp;&nbsp;
114
+ <a href="#M000015">remove</a>&nbsp;&nbsp;
115
+ <a href="#M000016">remove_by_name</a>&nbsp;&nbsp;
116
+ <a href="#M000017">remove_by_uri</a>&nbsp;&nbsp;
117
+ <a href="#M000018">to_rdf</a>&nbsp;&nbsp;
118
+ <a href="#M000019">upload</a>&nbsp;&nbsp;
119
+ </div>
120
+ </div>
121
+
122
+ </div>
123
+
124
+
125
+ <!-- if includes -->
126
+
127
+ <div id="section">
128
+
129
+
130
+
131
+
132
+
133
+ <div id="attribute-list">
134
+ <h3 class="section-bar">Attributes</h3>
135
+
136
+ <div class="name-list">
137
+ <table>
138
+ <tr class="top-aligned-row context-row">
139
+ <td class="context-item-name">datatype_properties</td>
140
+ <td class="context-item-value">&nbsp;[R]&nbsp;</td>
141
+ <td class="context-item-desc">
142
+ An array of <a href="DatatypeProperty.html">DatatypeProperty</a> instances
143
+
144
+ </td>
145
+ </tr>
146
+ <tr class="top-aligned-row context-row">
147
+ <td class="context-item-name">label</td>
148
+ <td class="context-item-value">&nbsp;[R]&nbsp;</td>
149
+ <td class="context-item-desc">
150
+ Label associated with the resource in the Platform config
151
+
152
+ </td>
153
+ </tr>
154
+ <tr class="top-aligned-row context-row">
155
+ <td class="context-item-name">uri</td>
156
+ <td class="context-item-value">&nbsp;[R]&nbsp;</td>
157
+ <td class="context-item-desc">
158
+ URI for this resource
159
+
160
+ </td>
161
+ </tr>
162
+ </table>
163
+ </div>
164
+ </div>
165
+
166
+
167
+
168
+ <!-- if method_list -->
169
+ <div id="methods">
170
+ <h3 class="section-bar">Public Class methods</h3>
171
+
172
+ <div id="method-M000006" class="method-detail">
173
+ <a name="M000006"></a>
174
+
175
+ <div class="method-heading">
176
+ <a href="FieldPredicateMap.src/M000006.html" target="Code" class="method-signature"
177
+ onclick="popupCode('FieldPredicateMap.src/M000006.html');return false;">
178
+ <span class="method-name">create_mapping</span><span class="method-args">(store, property_uri, name, analyzer=nil)</span>
179
+ </a>
180
+ </div>
181
+
182
+ <div class="method-description">
183
+ <p>
184
+ Create a <a href="DatatypeProperty.html">DatatypeProperty</a> instance,
185
+ automatically assigning a unique identifier to it, and adding validating
186
+ the supplied data to ensure it matches the platform rules
187
+ </p>
188
+ </div>
189
+ </div>
190
+
191
+ <div id="method-M000007" class="method-detail">
192
+ <a name="M000007"></a>
193
+
194
+ <div class="method-heading">
195
+ <a href="FieldPredicateMap.src/M000007.html" target="Code" class="method-signature"
196
+ onclick="popupCode('FieldPredicateMap.src/M000007.html');return false;">
197
+ <span class="method-name">new</span><span class="method-args">(uri, label, datatype_properties = [])</span>
198
+ </a>
199
+ </div>
200
+
201
+ <div class="method-description">
202
+ </div>
203
+ </div>
204
+
205
+ <div id="method-M000005" class="method-detail">
206
+ <a name="M000005"></a>
207
+
208
+ <div class="method-heading">
209
+ <a href="FieldPredicateMap.src/M000005.html" target="Code" class="method-signature"
210
+ onclick="popupCode('FieldPredicateMap.src/M000005.html');return false;">
211
+ <span class="method-name">read_from_store</span><span class="method-args">(store)</span>
212
+ </a>
213
+ </div>
214
+
215
+ <div class="method-description">
216
+ <p>
217
+ Read a <a href="FieldPredicateMap.html">FieldPredicateMap</a> instance from
218
+ the provided store. The method will retrieve the config as JSON, and parse
219
+ it to create an object instance.
220
+ </p>
221
+ </div>
222
+ </div>
223
+
224
+ <h3 class="section-bar">Public Instance methods</h3>
225
+
226
+ <div id="method-M000008" class="method-detail">
227
+ <a name="M000008"></a>
228
+
229
+ <div class="method-heading">
230
+ <a href="FieldPredicateMap.src/M000008.html" target="Code" class="method-signature"
231
+ onclick="popupCode('FieldPredicateMap.src/M000008.html');return false;">
232
+ <span class="method-name">&lt;&lt;</span><span class="method-args">(obj)</span>
233
+ </a>
234
+ </div>
235
+
236
+ <div class="method-description">
237
+ <p>
238
+ Append a <a href="DatatypeProperty.html">DatatypeProperty</a> object to
239
+ this map. Note that the method does not validate the object, and neither
240
+ does it check for duplicate mappings.
241
+ </p>
242
+ </div>
243
+ </div>
244
+
245
+ <div id="method-M000013" class="method-detail">
246
+ <a name="M000013"></a>
247
+
248
+ <div class="method-heading">
249
+ <a href="FieldPredicateMap.src/M000013.html" target="Code" class="method-signature"
250
+ onclick="popupCode('FieldPredicateMap.src/M000013.html');return false;">
251
+ <span class="method-name">get_by_name</span><span class="method-args">(name)</span>
252
+ </a>
253
+ </div>
254
+
255
+ <div class="method-description">
256
+ <p>
257
+ Find the <a href="DatatypeProperty.html">DatatypeProperty</a> (if any) with
258
+ the following name mapping
259
+ </p>
260
+ </div>
261
+ </div>
262
+
263
+ <div id="method-M000014" class="method-detail">
264
+ <a name="M000014"></a>
265
+
266
+ <div class="method-heading">
267
+ <a href="FieldPredicateMap.src/M000014.html" target="Code" class="method-signature"
268
+ onclick="popupCode('FieldPredicateMap.src/M000014.html');return false;">
269
+ <span class="method-name">get_by_uri</span><span class="method-args">(uri)</span>
270
+ </a>
271
+ </div>
272
+
273
+ <div class="method-description">
274
+ <p>
275
+ Find the <a href="DatatypeProperty.html">DatatypeProperty</a> using a
276
+ property uri
277
+ </p>
278
+ </div>
279
+ </div>
280
+
281
+ <div id="method-M000009" class="method-detail">
282
+ <a name="M000009"></a>
283
+
284
+ <div class="method-heading">
285
+ <a href="FieldPredicateMap.src/M000009.html" target="Code" class="method-signature"
286
+ onclick="popupCode('FieldPredicateMap.src/M000009.html');return false;">
287
+ <span class="method-name">get_name</span><span class="method-args">(uri)</span>
288
+ </a>
289
+ </div>
290
+
291
+ <div class="method-description">
292
+ <p>
293
+ Lookup the name mapped to the specified uri
294
+ </p>
295
+ <table>
296
+ <tr><td valign="top">uri:</td><td>the property uri to search for
297
+
298
+ </td></tr>
299
+ </table>
300
+ </div>
301
+ </div>
302
+
303
+ <div id="method-M000010" class="method-detail">
304
+ <a name="M000010"></a>
305
+
306
+ <div class="method-heading">
307
+ <a href="FieldPredicateMap.src/M000010.html" target="Code" class="method-signature"
308
+ onclick="popupCode('FieldPredicateMap.src/M000010.html');return false;">
309
+ <span class="method-name">get_property_uri</span><span class="method-args">(name)</span>
310
+ </a>
311
+ </div>
312
+
313
+ <div class="method-description">
314
+ <p>
315
+ Lookup the property mapped to the specified name
316
+ </p>
317
+ <table>
318
+ <tr><td valign="top">name:</td><td>the name to search for
319
+
320
+ </td></tr>
321
+ </table>
322
+ </div>
323
+ </div>
324
+
325
+ <div id="method-M000011" class="method-detail">
326
+ <a name="M000011"></a>
327
+
328
+ <div class="method-heading">
329
+ <a href="FieldPredicateMap.src/M000011.html" target="Code" class="method-signature"
330
+ onclick="popupCode('FieldPredicateMap.src/M000011.html');return false;">
331
+ <span class="method-name">mapped_name?</span><span class="method-args">(name)</span>
332
+ </a>
333
+ </div>
334
+
335
+ <div class="method-description">
336
+ <p>
337
+ Is there a mapping for a property with this name?
338
+ </p>
339
+ </div>
340
+ </div>
341
+
342
+ <div id="method-M000012" class="method-detail">
343
+ <a name="M000012"></a>
344
+
345
+ <div class="method-heading">
346
+ <a href="FieldPredicateMap.src/M000012.html" target="Code" class="method-signature"
347
+ onclick="popupCode('FieldPredicateMap.src/M000012.html');return false;">
348
+ <span class="method-name">mapped_uri?</span><span class="method-args">(uri)</span>
349
+ </a>
350
+ </div>
351
+
352
+ <div class="method-description">
353
+ <p>
354
+ Is there a mapping for this uri?
355
+ </p>
356
+ </div>
357
+ </div>
358
+
359
+ <div id="method-M000015" class="method-detail">
360
+ <a name="M000015"></a>
361
+
362
+ <div class="method-heading">
363
+ <a href="FieldPredicateMap.src/M000015.html" target="Code" class="method-signature"
364
+ onclick="popupCode('FieldPredicateMap.src/M000015.html');return false;">
365
+ <span class="method-name">remove</span><span class="method-args">(datatype_property)</span>
366
+ </a>
367
+ </div>
368
+
369
+ <div class="method-description">
370
+ <p>
371
+ Remove a <a href="DatatypeProperty.html">DatatypeProperty</a> from the
372
+ collection
373
+ </p>
374
+ </div>
375
+ </div>
376
+
377
+ <div id="method-M000016" class="method-detail">
378
+ <a name="M000016"></a>
379
+
380
+ <div class="method-heading">
381
+ <a href="FieldPredicateMap.src/M000016.html" target="Code" class="method-signature"
382
+ onclick="popupCode('FieldPredicateMap.src/M000016.html');return false;">
383
+ <span class="method-name">remove_by_name</span><span class="method-args">(name)</span>
384
+ </a>
385
+ </div>
386
+
387
+ <div class="method-description">
388
+ <p>
389
+ Remove a <a href="DatatypeProperty.html">DatatypeProperty</a> by its mapped
390
+ name
391
+ </p>
392
+ </div>
393
+ </div>
394
+
395
+ <div id="method-M000017" class="method-detail">
396
+ <a name="M000017"></a>
397
+
398
+ <div class="method-heading">
399
+ <a href="FieldPredicateMap.src/M000017.html" target="Code" class="method-signature"
400
+ onclick="popupCode('FieldPredicateMap.src/M000017.html');return false;">
401
+ <span class="method-name">remove_by_uri</span><span class="method-args">(uri)</span>
402
+ </a>
403
+ </div>
404
+
405
+ <div class="method-description">
406
+ <p>
407
+ Remove a <a href="DatatypeProperty.html">DatatypeProperty</a> by its mapped
408
+ uri
409
+ </p>
410
+ </div>
411
+ </div>
412
+
413
+ <div id="method-M000018" class="method-detail">
414
+ <a name="M000018"></a>
415
+
416
+ <div class="method-heading">
417
+ <a href="FieldPredicateMap.src/M000018.html" target="Code" class="method-signature"
418
+ onclick="popupCode('FieldPredicateMap.src/M000018.html');return false;">
419
+ <span class="method-name">to_rdf</span><span class="method-args">()</span>
420
+ </a>
421
+ </div>
422
+
423
+ <div class="method-description">
424
+ <p>
425
+ Dump this object to an RDF/XML representation suitable for submitting to
426
+ the Platform
427
+ </p>
428
+ </div>
429
+ </div>
430
+
431
+ <div id="method-M000019" class="method-detail">
432
+ <a name="M000019"></a>
433
+
434
+ <div class="method-heading">
435
+ <a href="FieldPredicateMap.src/M000019.html" target="Code" class="method-signature"
436
+ onclick="popupCode('FieldPredicateMap.src/M000019.html');return false;">
437
+ <span class="method-name">upload</span><span class="method-args">(store)</span>
438
+ </a>
439
+ </div>
440
+
441
+ <div class="method-description">
442
+ <p>
443
+ Upload an RDF/XML presentation of this object to the provided Platform <a
444
+ href="Store.html">Store</a>
445
+ </p>
446
+ </div>
447
+ </div>
448
+
449
+
450
+ </div>
451
+
452
+
453
+ </div>
454
+
455
+
456
+ <div id="validator-badges">
457
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
458
+ </div>
459
+
460
+ </body>
461
+ </html>