pho 0.4 → 0.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (57) hide show
  1. data/CHANGES +12 -1
  2. data/Rakefile +2 -2
  3. data/doc/index.html +15 -1
  4. data/doc/rdoc/classes/Pho.html +14 -0
  5. data/doc/rdoc/classes/Pho/DatatypeProperty.html +12 -12
  6. data/doc/rdoc/classes/Pho/Etags.html +36 -36
  7. data/doc/rdoc/classes/Pho/Facet/Results.html +19 -19
  8. data/doc/rdoc/classes/Pho/Facet/Term.html +6 -6
  9. data/doc/rdoc/classes/Pho/FieldPredicateMap.html +90 -90
  10. data/doc/rdoc/classes/Pho/FieldWeighting.html +12 -12
  11. data/doc/rdoc/classes/Pho/Job.html +64 -64
  12. data/doc/rdoc/classes/Pho/Jobs.html +61 -61
  13. data/doc/rdoc/classes/Pho/Namespaces.html +6 -1
  14. data/doc/rdoc/classes/Pho/QueryProfile.html +61 -61
  15. data/doc/rdoc/classes/Pho/RDFCollection.html +71 -71
  16. data/doc/rdoc/classes/Pho/RDF_JSON.html +118 -0
  17. data/doc/rdoc/classes/Pho/RDF_JSON/SetAlgebra.html +240 -0
  18. data/doc/rdoc/classes/Pho/Snapshot.html +35 -35
  19. data/doc/rdoc/classes/Pho/Status.html +26 -26
  20. data/doc/rdoc/classes/Pho/Store.html +342 -264
  21. data/doc/rdoc/classes/Pho/Update.html +127 -0
  22. data/doc/rdoc/classes/Pho/Update/Changeset.html +520 -0
  23. data/doc/rdoc/classes/Pho/Update/ChangesetBuilder.html +330 -0
  24. data/doc/rdoc/classes/Pho/Update/Changesets.html +204 -0
  25. data/doc/rdoc/classes/Pho/Update/LiteralStatement.html +248 -0
  26. data/doc/rdoc/classes/Pho/Update/ResourceStatement.html +213 -0
  27. data/doc/rdoc/classes/Pho/Update/Statement.html +302 -0
  28. data/doc/rdoc/classes/String.html +146 -0
  29. data/doc/rdoc/created.rid +1 -1
  30. data/doc/rdoc/files/CHANGES.html +33 -2
  31. data/doc/rdoc/files/lib/pho/changeset_builder_rb.html +108 -0
  32. data/doc/rdoc/files/lib/pho/changeset_rb.html +108 -0
  33. data/doc/rdoc/files/lib/pho/job_rb.html +1 -1
  34. data/doc/rdoc/files/lib/pho/query_profile_rb.html +1 -1
  35. data/doc/rdoc/files/lib/pho/rdf_json_rb.html +101 -0
  36. data/doc/rdoc/files/lib/pho/store_rb.html +1 -1
  37. data/doc/rdoc/files/lib/pho_rb.html +4 -1
  38. data/doc/rdoc/fr_class_index.html +10 -0
  39. data/doc/rdoc/fr_file_index.html +3 -0
  40. data/doc/rdoc/fr_method_index.html +140 -110
  41. data/lib/pho.rb +14 -1
  42. data/lib/pho/changeset.rb +312 -0
  43. data/lib/pho/changeset_builder.rb +118 -0
  44. data/lib/pho/job.rb +1 -1
  45. data/lib/pho/query_profile.rb +1 -1
  46. data/lib/pho/rdf_json.rb +81 -0
  47. data/lib/pho/store.rb +63 -25
  48. data/tests/tc_changeset.rb +273 -0
  49. data/tests/tc_changeset_builder.rb +151 -0
  50. data/tests/tc_changesets.rb +96 -0
  51. data/tests/tc_metabox.rb +20 -2
  52. data/tests/tc_query_profile.rb +4 -2
  53. data/tests/tc_rdf_json.rb +273 -0
  54. data/tests/tc_search.rb +5 -5
  55. data/tests/tc_sparql.rb +12 -0
  56. data/tests/ts_pho.rb +5 -1
  57. metadata +25 -3
@@ -0,0 +1,302 @@
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::Update::Statement</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::Update::Statement</td>
54
+ </tr>
55
+ <tr class="top-aligned-row">
56
+ <td><strong>In:</strong></td>
57
+ <td>
58
+ <a href="../../../files/lib/pho/changeset_rb.html">
59
+ lib/pho/changeset.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
+ Base class capturing data relating to a reified RDF triple described in a
84
+ <a href="Changeset.html">Changeset</a>
85
+ </p>
86
+
87
+ </div>
88
+
89
+
90
+ </div>
91
+
92
+ <div id="method-list">
93
+ <h3 class="section-bar">Methods</h3>
94
+
95
+ <div class="name-list">
96
+ <a href="#M000014">create_literal</a>&nbsp;&nbsp;
97
+ <a href="#M000015">create_resource</a>&nbsp;&nbsp;
98
+ <a href="#M000017">new</a>&nbsp;&nbsp;
99
+ <a href="#M000016">to_rdf</a>&nbsp;&nbsp;
100
+ </div>
101
+ </div>
102
+
103
+ </div>
104
+
105
+
106
+ <!-- if includes -->
107
+
108
+ <div id="section">
109
+
110
+
111
+
112
+
113
+
114
+ <div id="attribute-list">
115
+ <h3 class="section-bar">Attributes</h3>
116
+
117
+ <div class="name-list">
118
+ <table>
119
+ <tr class="top-aligned-row context-row">
120
+ <td class="context-item-name">object</td>
121
+ <td class="context-item-value">&nbsp;[R]&nbsp;</td>
122
+ <td class="context-item-desc">
123
+ Object value. May be uri or literal
124
+
125
+ </td>
126
+ </tr>
127
+ <tr class="top-aligned-row context-row">
128
+ <td class="context-item-name">predicate</td>
129
+ <td class="context-item-value">&nbsp;[R]&nbsp;</td>
130
+ <td class="context-item-desc">
131
+ URI of predicate
132
+
133
+ </td>
134
+ </tr>
135
+ <tr class="top-aligned-row context-row">
136
+ <td class="context-item-name">subject</td>
137
+ <td class="context-item-value">&nbsp;[R]&nbsp;</td>
138
+ <td class="context-item-desc">
139
+ URI of subject
140
+
141
+ </td>
142
+ </tr>
143
+ </table>
144
+ </div>
145
+ </div>
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-M000014" class="method-detail">
154
+ <a name="M000014"></a>
155
+
156
+ <div class="method-heading">
157
+ <a href="#M000014" class="method-signature">
158
+ <span class="method-name">create_literal</span><span class="method-args">(subject, predicate, object, lang=nil, datatype=nil)</span>
159
+ </a>
160
+ </div>
161
+
162
+ <div class="method-description">
163
+ <p>
164
+ Create a <a href="Statement.html">Statement</a> referring to a literal. Can
165
+ have one of lang or datatype but not both
166
+ </p>
167
+ <pre>
168
+ subject:: URI of subject of triple
169
+ predicate:: URI of predicate of triple
170
+ object:: literal value
171
+ lang:: language for literal
172
+ datatype:: datatype for literal
173
+ </pre>
174
+ <p><a class="source-toggle" href="#"
175
+ onclick="toggleCode('M000014-source');return false;">[Source]</a></p>
176
+ <div class="method-source-code" id="M000014-source">
177
+ <pre>
178
+ <span class="ruby-comment cmt"># File lib/pho/changeset.rb, line 30</span>
179
+ <span class="ruby-keyword kw">def</span> <span class="ruby-constant">Statement</span>.<span class="ruby-identifier">create_literal</span>(<span class="ruby-identifier">subject</span>, <span class="ruby-identifier">predicate</span>, <span class="ruby-identifier">object</span>, <span class="ruby-identifier">lang</span>=<span class="ruby-keyword kw">nil</span>, <span class="ruby-identifier">datatype</span>=<span class="ruby-keyword kw">nil</span>)
180
+ <span class="ruby-keyword kw">return</span> <span class="ruby-constant">LiteralStatement</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">subject</span>, <span class="ruby-identifier">predicate</span>, <span class="ruby-identifier">object</span>, <span class="ruby-identifier">lang</span>, <span class="ruby-identifier">datatype</span>)
181
+ <span class="ruby-keyword kw">end</span>
182
+ </pre>
183
+ </div>
184
+ </div>
185
+ </div>
186
+
187
+ <div id="method-M000015" class="method-detail">
188
+ <a name="M000015"></a>
189
+
190
+ <div class="method-heading">
191
+ <a href="#M000015" class="method-signature">
192
+ <span class="method-name">create_resource</span><span class="method-args">(subject, predicate, object)</span>
193
+ </a>
194
+ </div>
195
+
196
+ <div class="method-description">
197
+ <p>
198
+ Create a <a href="Statement.html">Statement</a> referring to a resource
199
+ </p>
200
+ <pre>
201
+ subject:: URI of subject of triple
202
+ predicate:: URI of predicate of triple
203
+ object:: resource uri
204
+ </pre>
205
+ <p><a class="source-toggle" href="#"
206
+ onclick="toggleCode('M000015-source');return false;">[Source]</a></p>
207
+ <div class="method-source-code" id="M000015-source">
208
+ <pre>
209
+ <span class="ruby-comment cmt"># File lib/pho/changeset.rb, line 39</span>
210
+ <span class="ruby-keyword kw">def</span> <span class="ruby-constant">Statement</span>.<span class="ruby-identifier">create_resource</span>(<span class="ruby-identifier">subject</span>, <span class="ruby-identifier">predicate</span>, <span class="ruby-identifier">object</span>)
211
+ <span class="ruby-keyword kw">return</span> <span class="ruby-constant">ResourceStatement</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">subject</span>, <span class="ruby-identifier">predicate</span>, <span class="ruby-identifier">object</span>)
212
+ <span class="ruby-keyword kw">end</span>
213
+ </pre>
214
+ </div>
215
+ </div>
216
+ </div>
217
+
218
+ <h3 class="section-bar">Protected Class methods</h3>
219
+
220
+ <div id="method-M000017" class="method-detail">
221
+ <a name="M000017"></a>
222
+
223
+ <div class="method-heading">
224
+ <a href="#M000017" class="method-signature">
225
+ <span class="method-name">new</span><span class="method-args">(subject, predicate, object)</span>
226
+ </a>
227
+ </div>
228
+
229
+ <div class="method-description">
230
+ <table>
231
+ <tr><td valign="top">subject:</td><td>URI of subject of triple
232
+
233
+ </td></tr>
234
+ <tr><td valign="top">predicate:</td><td>URI of predicate of triple
235
+
236
+ </td></tr>
237
+ <tr><td valign="top">object:</td><td>object value of triple (may be URI or literal)
238
+
239
+ </td></tr>
240
+ </table>
241
+ <p><a class="source-toggle" href="#"
242
+ onclick="toggleCode('M000017-source');return false;">[Source]</a></p>
243
+ <div class="method-source-code" id="M000017-source">
244
+ <pre>
245
+ <span class="ruby-comment cmt"># File lib/pho/changeset.rb, line 58</span>
246
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">subject</span>, <span class="ruby-identifier">predicate</span>, <span class="ruby-identifier">object</span>)
247
+ <span class="ruby-ivar">@subject</span> = <span class="ruby-identifier">subject</span>
248
+ <span class="ruby-ivar">@predicate</span> = <span class="ruby-identifier">predicate</span>
249
+ <span class="ruby-ivar">@object</span> = <span class="ruby-identifier">object</span>
250
+ <span class="ruby-keyword kw">end</span>
251
+ </pre>
252
+ </div>
253
+ </div>
254
+ </div>
255
+
256
+ <h3 class="section-bar">Public Instance methods</h3>
257
+
258
+ <div id="method-M000016" class="method-detail">
259
+ <a name="M000016"></a>
260
+
261
+ <div class="method-heading">
262
+ <a href="#M000016" class="method-signature">
263
+ <span class="method-name">to_rdf</span><span class="method-args">()</span>
264
+ </a>
265
+ </div>
266
+
267
+ <div class="method-description">
268
+ <p>
269
+ Create an RDF/XML fragment describing this <a
270
+ href="Statement.html">Statement</a>
271
+ </p>
272
+ <p><a class="source-toggle" href="#"
273
+ onclick="toggleCode('M000016-source');return false;">[Source]</a></p>
274
+ <div class="method-source-code" id="M000016-source">
275
+ <pre>
276
+ <span class="ruby-comment cmt"># File lib/pho/changeset.rb, line 44</span>
277
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_rdf</span>()
278
+ <span class="ruby-identifier">rdf</span> = <span class="ruby-value str">&quot;&lt;rdf:Statement&gt;&quot;</span>
279
+ <span class="ruby-identifier">rdf</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-node">&quot; &lt;rdf:subject rdf:resource=\&quot;#{@subject}\&quot;/&gt;&quot;</span>
280
+ <span class="ruby-identifier">rdf</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-node">&quot; &lt;rdf:predicate rdf:resource=\&quot;#{@predicate}\&quot;/&gt;&quot;</span>
281
+ <span class="ruby-identifier">rdf</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">write_object</span>()
282
+ <span class="ruby-identifier">rdf</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-value str">&quot;&lt;/rdf:Statement&gt;&quot;</span>
283
+ <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">rdf</span>
284
+ <span class="ruby-keyword kw">end</span>
285
+ </pre>
286
+ </div>
287
+ </div>
288
+ </div>
289
+
290
+
291
+ </div>
292
+
293
+
294
+ </div>
295
+
296
+
297
+ <div id="validator-badges">
298
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
299
+ </div>
300
+
301
+ </body>
302
+ </html>
@@ -0,0 +1,146 @@
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: String</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">String</td>
54
+ </tr>
55
+ <tr class="top-aligned-row">
56
+ <td><strong>In:</strong></td>
57
+ <td>
58
+ <a href="../files/lib/pho_rb.html">
59
+ lib/pho.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
+
82
+
83
+ </div>
84
+
85
+ <div id="method-list">
86
+ <h3 class="section-bar">Methods</h3>
87
+
88
+ <div class="name-list">
89
+ <a href="#M000001">start_with?</a>&nbsp;&nbsp;
90
+ </div>
91
+ </div>
92
+
93
+ </div>
94
+
95
+
96
+ <!-- if includes -->
97
+
98
+ <div id="section">
99
+
100
+
101
+
102
+
103
+
104
+
105
+
106
+
107
+ <!-- if method_list -->
108
+ <div id="methods">
109
+ <h3 class="section-bar">Public Instance methods</h3>
110
+
111
+ <div id="method-M000001" class="method-detail">
112
+ <a name="M000001"></a>
113
+
114
+ <div class="method-heading">
115
+ <a href="#M000001" class="method-signature">
116
+ <span class="method-name">start_with?</span><span class="method-args">(prefix)</span>
117
+ </a>
118
+ </div>
119
+
120
+ <div class="method-description">
121
+ <p><a class="source-toggle" href="#"
122
+ onclick="toggleCode('M000001-source');return false;">[Source]</a></p>
123
+ <div class="method-source-code" id="M000001-source">
124
+ <pre>
125
+ <span class="ruby-comment cmt"># File lib/pho.rb, line 22</span>
126
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">start_with?</span>(<span class="ruby-identifier">prefix</span>)
127
+ <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">index</span>(<span class="ruby-identifier">prefix</span>) <span class="ruby-operator">==</span> <span class="ruby-value">0</span>
128
+ <span class="ruby-keyword kw">end</span>
129
+ </pre>
130
+ </div>
131
+ </div>
132
+ </div>
133
+
134
+
135
+ </div>
136
+
137
+
138
+ </div>
139
+
140
+
141
+ <div id="validator-badges">
142
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
143
+ </div>
144
+
145
+ </body>
146
+ </html>
@@ -1 +1 @@
1
- Mon, 06 Apr 2009 16:00:04 +0100
1
+ Wed, 22 Apr 2009 14:20:05 +0100