pho 0.4.1 → 0.5
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGES +18 -1
- data/README +10 -0
- data/Rakefile +2 -1
- data/doc/rdoc/classes/Pho.html +33 -22
- data/doc/rdoc/classes/Pho/DatatypeProperty.html +12 -12
- data/doc/rdoc/classes/Pho/{RDF_JSON.html → Enrichment.html} +8 -7
- data/doc/rdoc/classes/Pho/Enrichment/ResourceEnricher.html +310 -0
- data/doc/rdoc/classes/Pho/Etags.html +42 -42
- data/doc/rdoc/classes/Pho/Facet/Results.html +19 -19
- data/doc/rdoc/classes/Pho/Facet/Term.html +6 -6
- data/doc/rdoc/classes/Pho/FieldPredicateMap.html +110 -105
- data/doc/rdoc/classes/Pho/FieldWeighting.html +12 -12
- data/doc/rdoc/classes/Pho/FileManagement.html +121 -0
- data/doc/rdoc/classes/Pho/FileManagement/AbstractFileManager.html +443 -0
- data/doc/rdoc/classes/Pho/FileManagement/FileManager.html +258 -0
- data/doc/rdoc/classes/Pho/FileManagement/RDFManager.html +271 -0
- data/doc/rdoc/classes/Pho/Job.html +64 -64
- data/doc/rdoc/classes/Pho/Jobs.html +60 -60
- data/doc/rdoc/classes/Pho/QueryProfile.html +60 -60
- data/doc/rdoc/classes/Pho/RDFCollection.html +4 -378
- data/doc/rdoc/classes/Pho/ResourceHash.html +123 -0
- data/doc/rdoc/classes/Pho/ResourceHash/Converter.html +323 -0
- data/doc/rdoc/classes/Pho/{RDF_JSON → ResourceHash}/SetAlgebra.html +18 -18
- data/doc/rdoc/classes/Pho/Snapshot.html +35 -35
- data/doc/rdoc/classes/Pho/Sparql.html +137 -0
- data/doc/rdoc/classes/Pho/Sparql/SparqlClient.html +515 -0
- data/doc/rdoc/classes/Pho/Sparql/SparqlHelper.html +575 -0
- data/doc/rdoc/classes/Pho/Status.html +26 -26
- data/doc/rdoc/classes/Pho/Store.html +271 -241
- data/doc/rdoc/classes/Pho/Update/Changeset.html +73 -73
- data/doc/rdoc/classes/Pho/Update/ChangesetBuilder.html +34 -34
- data/doc/rdoc/classes/Pho/Update/Changesets.html +14 -14
- data/doc/rdoc/classes/Pho/Update/LiteralStatement.html +31 -23
- data/doc/rdoc/classes/Pho/Update/ResourceStatement.html +45 -21
- data/doc/rdoc/classes/Pho/Update/Statement.html +29 -29
- data/doc/rdoc/classes/String.html +1 -1
- data/doc/rdoc/created.rid +1 -1
- data/doc/rdoc/files/CHANGES.html +49 -3
- data/doc/rdoc/files/README.html +15 -1
- data/doc/rdoc/files/lib/pho/changeset_builder_rb.html +1 -1
- data/doc/rdoc/files/lib/pho/changeset_rb.html +1 -1
- data/doc/rdoc/files/lib/pho/converter_rb.html +108 -0
- data/doc/rdoc/files/lib/pho/enrichment_rb.html +101 -0
- data/doc/rdoc/files/lib/pho/etags_rb.html +1 -1
- data/doc/rdoc/files/lib/pho/field_predicate_map_rb.html +1 -1
- data/doc/rdoc/files/lib/pho/file_management_rb.html +101 -0
- data/doc/rdoc/files/lib/pho/file_manager_rb.html +108 -0
- data/doc/rdoc/files/lib/pho/rdf_collection_rb.html +1 -1
- data/doc/rdoc/files/lib/pho/resource_hash_rb.html +101 -0
- data/doc/rdoc/files/lib/pho/{rdf_json_rb.html → sparql_rb.html} +4 -4
- data/doc/rdoc/files/lib/pho/store_rb.html +1 -1
- data/doc/rdoc/files/lib/pho_rb.html +7 -2
- data/doc/rdoc/fr_class_index.html +12 -2
- data/doc/rdoc/fr_file_index.html +6 -1
- data/doc/rdoc/fr_method_index.html +176 -139
- data/examples/sparql_construct_hash.rb +26 -0
- data/examples/sparql_select.rb +18 -0
- data/lib/pho.rb +6 -1
- data/lib/pho/changeset.rb +24 -9
- data/lib/pho/changeset_builder.rb +10 -10
- data/lib/pho/converter.rb +74 -0
- data/lib/pho/enrichment.rb +81 -0
- data/lib/pho/etags.rb +1 -0
- data/lib/pho/field_predicate_map.rb +6 -1
- data/lib/pho/file_management.rb +102 -0
- data/lib/pho/file_manager.rb +61 -0
- data/lib/pho/rdf_collection.rb +54 -120
- data/lib/pho/{rdf_json.rb → resource_hash.rb} +3 -4
- data/lib/pho/sparql.rb +332 -0
- data/lib/pho/store.rb +20 -14
- data/tests/tc_changeset.rb +46 -0
- data/tests/tc_changeset_builder.rb +122 -1
- data/tests/tc_converter.rb +95 -0
- data/tests/tc_enrichment.rb +83 -0
- data/tests/tc_file_manager.rb +88 -0
- data/tests/tc_rdf_collection.rb +3 -0
- data/tests/{tc_rdf_json.rb → tc_resource_hash.rb} +23 -23
- data/tests/tc_search.rb +1 -1
- data/tests/tc_sparql.rb +131 -6
- data/tests/tc_sparql_helper.rb +214 -0
- data/tests/ts_pho.rb +6 -2
- metadata +47 -8
@@ -94,8 +94,8 @@ href="Changeset.html">Changeset</a> objects
|
|
94
94
|
<h3 class="section-bar">Methods</h3>
|
95
95
|
|
96
96
|
<div class="name-list">
|
97
|
-
<a href="#
|
98
|
-
<a href="#
|
97
|
+
<a href="#M000049">all_to_rdf</a>
|
98
|
+
<a href="#M000050">submit_all</a>
|
99
99
|
</div>
|
100
100
|
</div>
|
101
101
|
|
@@ -117,11 +117,11 @@ href="Changeset.html">Changeset</a> objects
|
|
117
117
|
<div id="methods">
|
118
118
|
<h3 class="section-bar">Public Class methods</h3>
|
119
119
|
|
120
|
-
<div id="method-
|
121
|
-
<a name="
|
120
|
+
<div id="method-M000049" class="method-detail">
|
121
|
+
<a name="M000049"></a>
|
122
122
|
|
123
123
|
<div class="method-heading">
|
124
|
-
<a href="#
|
124
|
+
<a href="#M000049" class="method-signature">
|
125
125
|
<span class="method-name">all_to_rdf</span><span class="method-args">(changesets)</span>
|
126
126
|
</a>
|
127
127
|
</div>
|
@@ -134,10 +134,10 @@ Convert an array of changesets into an RDF/XML document
|
|
134
134
|
changesets:: an array of changesets
|
135
135
|
</pre>
|
136
136
|
<p><a class="source-toggle" href="#"
|
137
|
-
onclick="toggleCode('
|
138
|
-
<div class="method-source-code" id="
|
137
|
+
onclick="toggleCode('M000049-source');return false;">[Source]</a></p>
|
138
|
+
<div class="method-source-code" id="M000049-source">
|
139
139
|
<pre>
|
140
|
-
<span class="ruby-comment cmt"># File lib/pho/changeset.rb, line
|
140
|
+
<span class="ruby-comment cmt"># File lib/pho/changeset.rb, line 157</span>
|
141
141
|
<span class="ruby-keyword kw">def</span> <span class="ruby-constant">Changesets</span>.<span class="ruby-identifier">all_to_rdf</span>(<span class="ruby-identifier">changesets</span>)
|
142
142
|
<span class="ruby-identifier">rdf</span> = <span class="ruby-value str">"<rdf:RDF xmlns:cs=\"http://purl.org/vocab/changeset/schema#\" xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\">"</span>
|
143
143
|
<span class="ruby-identifier">changesets</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">cs</span><span class="ruby-operator">|</span>
|
@@ -150,11 +150,11 @@ Convert an array of changesets into an RDF/XML document
|
|
150
150
|
</div>
|
151
151
|
</div>
|
152
152
|
|
153
|
-
<div id="method-
|
154
|
-
<a name="
|
153
|
+
<div id="method-M000050" class="method-detail">
|
154
|
+
<a name="M000050"></a>
|
155
155
|
|
156
156
|
<div class="method-heading">
|
157
|
-
<a href="#
|
157
|
+
<a href="#M000050" class="method-signature">
|
158
158
|
<span class="method-name">submit_all</span><span class="method-args">(changesets, store, versioned=false)</span>
|
159
159
|
</a>
|
160
160
|
</div>
|
@@ -176,10 +176,10 @@ to an RDF/XML document.
|
|
176
176
|
change_reason and creator_name properties.
|
177
177
|
</pre>
|
178
178
|
<p><a class="source-toggle" href="#"
|
179
|
-
onclick="toggleCode('
|
180
|
-
<div class="method-source-code" id="
|
179
|
+
onclick="toggleCode('M000050-source');return false;">[Source]</a></p>
|
180
|
+
<div class="method-source-code" id="M000050-source">
|
181
181
|
<pre>
|
182
|
-
<span class="ruby-comment cmt"># File lib/pho/changeset.rb, line
|
182
|
+
<span class="ruby-comment cmt"># File lib/pho/changeset.rb, line 177</span>
|
183
183
|
<span class="ruby-keyword kw">def</span> <span class="ruby-constant">Changesets</span>.<span class="ruby-identifier">submit_all</span>(<span class="ruby-identifier">changesets</span>, <span class="ruby-identifier">store</span>, <span class="ruby-identifier">versioned</span>=<span class="ruby-keyword kw">false</span>)
|
184
184
|
<span class="ruby-identifier">rdf</span> = <span class="ruby-identifier">all_to_rdf</span>(<span class="ruby-identifier">changesets</span>)
|
185
185
|
<span class="ruby-identifier">store</span>.<span class="ruby-identifier">submit_changeset</span>(<span class="ruby-identifier">rdf</span>, <span class="ruby-identifier">versioned</span>)
|
@@ -88,9 +88,9 @@
|
|
88
88
|
<h3 class="section-bar">Methods</h3>
|
89
89
|
|
90
90
|
<div class="name-list">
|
91
|
-
<a href="#
|
92
|
-
<a href="#
|
93
|
-
<a href="#
|
91
|
+
<a href="#M000039">==</a>
|
92
|
+
<a href="#M000038">new</a>
|
93
|
+
<a href="#M000040">write_object</a>
|
94
94
|
</div>
|
95
95
|
</div>
|
96
96
|
|
@@ -136,11 +136,11 @@ Language for literals
|
|
136
136
|
<div id="methods">
|
137
137
|
<h3 class="section-bar">Public Class methods</h3>
|
138
138
|
|
139
|
-
<div id="method-
|
140
|
-
<a name="
|
139
|
+
<div id="method-M000038" class="method-detail">
|
140
|
+
<a name="M000038"></a>
|
141
141
|
|
142
142
|
<div class="method-heading">
|
143
|
-
<a href="#
|
143
|
+
<a href="#M000038" class="method-signature">
|
144
144
|
<span class="method-name">new</span><span class="method-args">(subject, predicate, object, language=nil, datatype=nil)</span>
|
145
145
|
</a>
|
146
146
|
</div>
|
@@ -158,10 +158,10 @@ have one of lang or datatype but not both
|
|
158
158
|
datatype:: datatype for literal
|
159
159
|
</pre>
|
160
160
|
<p><a class="source-toggle" href="#"
|
161
|
-
onclick="toggleCode('
|
162
|
-
<div class="method-source-code" id="
|
161
|
+
onclick="toggleCode('M000038-source');return false;">[Source]</a></p>
|
162
|
+
<div class="method-source-code" id="M000038-source">
|
163
163
|
<pre>
|
164
|
-
<span class="ruby-comment cmt"># File lib/pho/changeset.rb, line
|
164
|
+
<span class="ruby-comment cmt"># File lib/pho/changeset.rb, line 86</span>
|
165
165
|
<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>, <span class="ruby-identifier">language</span>=<span class="ruby-keyword kw">nil</span>, <span class="ruby-identifier">datatype</span>=<span class="ruby-keyword kw">nil</span>)
|
166
166
|
<span class="ruby-keyword kw">super</span>(<span class="ruby-identifier">subject</span>, <span class="ruby-identifier">predicate</span>, <span class="ruby-identifier">object</span>)
|
167
167
|
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">language</span> <span class="ruby-operator">!=</span> <span class="ruby-keyword kw">nil</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">datatype</span> <span class="ruby-operator">!=</span> <span class="ruby-keyword kw">nil</span>
|
@@ -177,21 +177,21 @@ have one of lang or datatype but not both
|
|
177
177
|
|
178
178
|
<h3 class="section-bar">Public Instance methods</h3>
|
179
179
|
|
180
|
-
<div id="method-
|
181
|
-
<a name="
|
180
|
+
<div id="method-M000039" class="method-detail">
|
181
|
+
<a name="M000039"></a>
|
182
182
|
|
183
183
|
<div class="method-heading">
|
184
|
-
<a href="#
|
184
|
+
<a href="#M000039" class="method-signature">
|
185
185
|
<span class="method-name">==</span><span class="method-args">(other)</span>
|
186
186
|
</a>
|
187
187
|
</div>
|
188
188
|
|
189
189
|
<div class="method-description">
|
190
190
|
<p><a class="source-toggle" href="#"
|
191
|
-
onclick="toggleCode('
|
192
|
-
<div class="method-source-code" id="
|
191
|
+
onclick="toggleCode('M000039-source');return false;">[Source]</a></p>
|
192
|
+
<div class="method-source-code" id="M000039-source">
|
193
193
|
<pre>
|
194
|
-
<span class="ruby-comment cmt"># File lib/pho/changeset.rb, line
|
194
|
+
<span class="ruby-comment cmt"># File lib/pho/changeset.rb, line 95</span>
|
195
195
|
<span class="ruby-keyword kw">def</span> <span class="ruby-operator">==</span>(<span class="ruby-identifier">other</span>)
|
196
196
|
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">other</span> <span class="ruby-operator">==</span> <span class="ruby-keyword kw">nil</span>
|
197
197
|
<span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span>
|
@@ -209,24 +209,32 @@ have one of lang or datatype but not both
|
|
209
209
|
|
210
210
|
<h3 class="section-bar">Protected Instance methods</h3>
|
211
211
|
|
212
|
-
<div id="method-
|
213
|
-
<a name="
|
212
|
+
<div id="method-M000040" class="method-detail">
|
213
|
+
<a name="M000040"></a>
|
214
214
|
|
215
215
|
<div class="method-heading">
|
216
|
-
<a href="#
|
216
|
+
<a href="#M000040" class="method-signature">
|
217
217
|
<span class="method-name">write_object</span><span class="method-args">()</span>
|
218
218
|
</a>
|
219
219
|
</div>
|
220
220
|
|
221
221
|
<div class="method-description">
|
222
222
|
<p><a class="source-toggle" href="#"
|
223
|
-
onclick="toggleCode('
|
224
|
-
<div class="method-source-code" id="
|
223
|
+
onclick="toggleCode('M000040-source');return false;">[Source]</a></p>
|
224
|
+
<div class="method-source-code" id="M000040-source">
|
225
225
|
<pre>
|
226
|
-
<span class="ruby-comment cmt"># File lib/pho/changeset.rb, line
|
226
|
+
<span class="ruby-comment cmt"># File lib/pho/changeset.rb, line 107</span>
|
227
227
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">write_object</span>()
|
228
|
-
<span class="ruby-
|
229
|
-
<span class="ruby-
|
228
|
+
<span class="ruby-identifier">tag</span> = <span class="ruby-value str">""</span>
|
229
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@datatype</span> <span class="ruby-operator">!=</span> <span class="ruby-keyword kw">nil</span>
|
230
|
+
<span class="ruby-identifier">tag</span> = <span class="ruby-node">"<rdf:object rdf:datatype=\"#{@datatype}\">"</span>
|
231
|
+
<span class="ruby-keyword kw">elsif</span> <span class="ruby-ivar">@language</span> <span class="ruby-operator">!=</span> <span class="ruby-keyword kw">nil</span>
|
232
|
+
<span class="ruby-identifier">tag</span> = <span class="ruby-node">"<rdf:object xml:lang=\"#{@language}\">"</span>
|
233
|
+
<span class="ruby-keyword kw">else</span>
|
234
|
+
<span class="ruby-identifier">tag</span> = <span class="ruby-value str">"<rdf:object>"</span>
|
235
|
+
<span class="ruby-keyword kw">end</span>
|
236
|
+
<span class="ruby-identifier">tag</span> <span class="ruby-operator"><<</span> <span class="ruby-node">"#{@object}</rdf:object>"</span>
|
237
|
+
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">tag</span>
|
230
238
|
<span class="ruby-keyword kw">end</span>
|
231
239
|
</pre>
|
232
240
|
</div>
|
@@ -88,9 +88,10 @@
|
|
88
88
|
<h3 class="section-bar">Methods</h3>
|
89
89
|
|
90
90
|
<div class="name-list">
|
91
|
-
<a href="#
|
92
|
-
<a href="#
|
93
|
-
<a href="#
|
91
|
+
<a href="#M000046">==</a>
|
92
|
+
<a href="#M000045">new</a>
|
93
|
+
<a href="#M000048">write_object</a>
|
94
|
+
<a href="#M000047">write_subject</a>
|
94
95
|
</div>
|
95
96
|
</div>
|
96
97
|
|
@@ -112,11 +113,11 @@
|
|
112
113
|
<div id="methods">
|
113
114
|
<h3 class="section-bar">Public Class methods</h3>
|
114
115
|
|
115
|
-
<div id="method-
|
116
|
-
<a name="
|
116
|
+
<div id="method-M000045" class="method-detail">
|
117
|
+
<a name="M000045"></a>
|
117
118
|
|
118
119
|
<div class="method-heading">
|
119
|
-
<a href="#
|
120
|
+
<a href="#M000045" class="method-signature">
|
120
121
|
<span class="method-name">new</span><span class="method-args">(subject, predicate, object)</span>
|
121
122
|
</a>
|
122
123
|
</div>
|
@@ -131,10 +132,10 @@ Create a <a href="Statement.html">Statement</a> referring to a resource
|
|
131
132
|
object:: resource uri
|
132
133
|
</pre>
|
133
134
|
<p><a class="source-toggle" href="#"
|
134
|
-
onclick="toggleCode('
|
135
|
-
<div class="method-source-code" id="
|
135
|
+
onclick="toggleCode('M000045-source');return false;">[Source]</a></p>
|
136
|
+
<div class="method-source-code" id="M000045-source">
|
136
137
|
<pre>
|
137
|
-
<span class="ruby-comment cmt"># File lib/pho/changeset.rb, line
|
138
|
+
<span class="ruby-comment cmt"># File lib/pho/changeset.rb, line 127</span>
|
138
139
|
<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>)
|
139
140
|
<span class="ruby-keyword kw">super</span>(<span class="ruby-identifier">subject</span>, <span class="ruby-identifier">predicate</span>, <span class="ruby-identifier">object</span>)
|
140
141
|
<span class="ruby-keyword kw">end</span>
|
@@ -145,21 +146,21 @@ Create a <a href="Statement.html">Statement</a> referring to a resource
|
|
145
146
|
|
146
147
|
<h3 class="section-bar">Public Instance methods</h3>
|
147
148
|
|
148
|
-
<div id="method-
|
149
|
-
<a name="
|
149
|
+
<div id="method-M000046" class="method-detail">
|
150
|
+
<a name="M000046"></a>
|
150
151
|
|
151
152
|
<div class="method-heading">
|
152
|
-
<a href="#
|
153
|
+
<a href="#M000046" class="method-signature">
|
153
154
|
<span class="method-name">==</span><span class="method-args">(other)</span>
|
154
155
|
</a>
|
155
156
|
</div>
|
156
157
|
|
157
158
|
<div class="method-description">
|
158
159
|
<p><a class="source-toggle" href="#"
|
159
|
-
onclick="toggleCode('
|
160
|
-
<div class="method-source-code" id="
|
160
|
+
onclick="toggleCode('M000046-source');return false;">[Source]</a></p>
|
161
|
+
<div class="method-source-code" id="M000046-source">
|
161
162
|
<pre>
|
162
|
-
<span class="ruby-comment cmt"># File lib/pho/changeset.rb, line
|
163
|
+
<span class="ruby-comment cmt"># File lib/pho/changeset.rb, line 131</span>
|
163
164
|
<span class="ruby-keyword kw">def</span> <span class="ruby-operator">==</span>(<span class="ruby-identifier">other</span>)
|
164
165
|
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">other</span> <span class="ruby-operator">==</span> <span class="ruby-keyword kw">nil</span>
|
165
166
|
<span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span>
|
@@ -175,21 +176,21 @@ Create a <a href="Statement.html">Statement</a> referring to a resource
|
|
175
176
|
|
176
177
|
<h3 class="section-bar">Protected Instance methods</h3>
|
177
178
|
|
178
|
-
<div id="method-
|
179
|
-
<a name="
|
179
|
+
<div id="method-M000048" class="method-detail">
|
180
|
+
<a name="M000048"></a>
|
180
181
|
|
181
182
|
<div class="method-heading">
|
182
|
-
<a href="#
|
183
|
+
<a href="#M000048" class="method-signature">
|
183
184
|
<span class="method-name">write_object</span><span class="method-args">()</span>
|
184
185
|
</a>
|
185
186
|
</div>
|
186
187
|
|
187
188
|
<div class="method-description">
|
188
189
|
<p><a class="source-toggle" href="#"
|
189
|
-
onclick="toggleCode('
|
190
|
-
<div class="method-source-code" id="
|
190
|
+
onclick="toggleCode('M000048-source');return false;">[Source]</a></p>
|
191
|
+
<div class="method-source-code" id="M000048-source">
|
191
192
|
<pre>
|
192
|
-
<span class="ruby-comment cmt"># File lib/pho/changeset.rb, line
|
193
|
+
<span class="ruby-comment cmt"># File lib/pho/changeset.rb, line 145</span>
|
193
194
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">write_object</span>()
|
194
195
|
<span class="ruby-node">"<rdf:object rdf:resource=\"#{@object}\"/>"</span>
|
195
196
|
<span class="ruby-keyword kw">end</span>
|
@@ -198,6 +199,29 @@ Create a <a href="Statement.html">Statement</a> referring to a resource
|
|
198
199
|
</div>
|
199
200
|
</div>
|
200
201
|
|
202
|
+
<div id="method-M000047" class="method-detail">
|
203
|
+
<a name="M000047"></a>
|
204
|
+
|
205
|
+
<div class="method-heading">
|
206
|
+
<a href="#M000047" class="method-signature">
|
207
|
+
<span class="method-name">write_subject</span><span class="method-args">()</span>
|
208
|
+
</a>
|
209
|
+
</div>
|
210
|
+
|
211
|
+
<div class="method-description">
|
212
|
+
<p><a class="source-toggle" href="#"
|
213
|
+
onclick="toggleCode('M000047-source');return false;">[Source]</a></p>
|
214
|
+
<div class="method-source-code" id="M000047-source">
|
215
|
+
<pre>
|
216
|
+
<span class="ruby-comment cmt"># File lib/pho/changeset.rb, line 141</span>
|
217
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">write_subject</span>()
|
218
|
+
<span class="ruby-keyword kw">return</span> <span class="ruby-node">" <rdf:subject rdf:resource=\"#{@subject}\"/>"</span>
|
219
|
+
<span class="ruby-keyword kw">end</span>
|
220
|
+
</pre>
|
221
|
+
</div>
|
222
|
+
</div>
|
223
|
+
</div>
|
224
|
+
|
201
225
|
|
202
226
|
</div>
|
203
227
|
|
@@ -93,10 +93,10 @@ Base class capturing data relating to a reified RDF triple described in a
|
|
93
93
|
<h3 class="section-bar">Methods</h3>
|
94
94
|
|
95
95
|
<div class="name-list">
|
96
|
-
<a href="#
|
97
|
-
<a href="#
|
98
|
-
<a href="#
|
99
|
-
<a href="#
|
96
|
+
<a href="#M000051">create_literal</a>
|
97
|
+
<a href="#M000052">create_resource</a>
|
98
|
+
<a href="#M000054">new</a>
|
99
|
+
<a href="#M000053">to_rdf</a>
|
100
100
|
</div>
|
101
101
|
</div>
|
102
102
|
|
@@ -150,11 +150,11 @@ URI of subject
|
|
150
150
|
<div id="methods">
|
151
151
|
<h3 class="section-bar">Public Class methods</h3>
|
152
152
|
|
153
|
-
<div id="method-
|
154
|
-
<a name="
|
153
|
+
<div id="method-M000051" class="method-detail">
|
154
|
+
<a name="M000051"></a>
|
155
155
|
|
156
156
|
<div class="method-heading">
|
157
|
-
<a href="#
|
157
|
+
<a href="#M000051" class="method-signature">
|
158
158
|
<span class="method-name">create_literal</span><span class="method-args">(subject, predicate, object, lang=nil, datatype=nil)</span>
|
159
159
|
</a>
|
160
160
|
</div>
|
@@ -172,10 +172,10 @@ have one of lang or datatype but not both
|
|
172
172
|
datatype:: datatype for literal
|
173
173
|
</pre>
|
174
174
|
<p><a class="source-toggle" href="#"
|
175
|
-
onclick="toggleCode('
|
176
|
-
<div class="method-source-code" id="
|
175
|
+
onclick="toggleCode('M000051-source');return false;">[Source]</a></p>
|
176
|
+
<div class="method-source-code" id="M000051-source">
|
177
177
|
<pre>
|
178
|
-
<span class="ruby-comment cmt"># File lib/pho/changeset.rb, line
|
178
|
+
<span class="ruby-comment cmt"># File lib/pho/changeset.rb, line 29</span>
|
179
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
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
181
|
<span class="ruby-keyword kw">end</span>
|
@@ -184,11 +184,11 @@ have one of lang or datatype but not both
|
|
184
184
|
</div>
|
185
185
|
</div>
|
186
186
|
|
187
|
-
<div id="method-
|
188
|
-
<a name="
|
187
|
+
<div id="method-M000052" class="method-detail">
|
188
|
+
<a name="M000052"></a>
|
189
189
|
|
190
190
|
<div class="method-heading">
|
191
|
-
<a href="#
|
191
|
+
<a href="#M000052" class="method-signature">
|
192
192
|
<span class="method-name">create_resource</span><span class="method-args">(subject, predicate, object)</span>
|
193
193
|
</a>
|
194
194
|
</div>
|
@@ -203,10 +203,10 @@ Create a <a href="Statement.html">Statement</a> referring to a resource
|
|
203
203
|
object:: resource uri
|
204
204
|
</pre>
|
205
205
|
<p><a class="source-toggle" href="#"
|
206
|
-
onclick="toggleCode('
|
207
|
-
<div class="method-source-code" id="
|
206
|
+
onclick="toggleCode('M000052-source');return false;">[Source]</a></p>
|
207
|
+
<div class="method-source-code" id="M000052-source">
|
208
208
|
<pre>
|
209
|
-
<span class="ruby-comment cmt"># File lib/pho/changeset.rb, line
|
209
|
+
<span class="ruby-comment cmt"># File lib/pho/changeset.rb, line 38</span>
|
210
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
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
212
|
<span class="ruby-keyword kw">end</span>
|
@@ -217,11 +217,11 @@ Create a <a href="Statement.html">Statement</a> referring to a resource
|
|
217
217
|
|
218
218
|
<h3 class="section-bar">Protected Class methods</h3>
|
219
219
|
|
220
|
-
<div id="method-
|
221
|
-
<a name="
|
220
|
+
<div id="method-M000054" class="method-detail">
|
221
|
+
<a name="M000054"></a>
|
222
222
|
|
223
223
|
<div class="method-heading">
|
224
|
-
<a href="#
|
224
|
+
<a href="#M000054" class="method-signature">
|
225
225
|
<span class="method-name">new</span><span class="method-args">(subject, predicate, object)</span>
|
226
226
|
</a>
|
227
227
|
</div>
|
@@ -239,10 +239,10 @@ Create a <a href="Statement.html">Statement</a> referring to a resource
|
|
239
239
|
</td></tr>
|
240
240
|
</table>
|
241
241
|
<p><a class="source-toggle" href="#"
|
242
|
-
onclick="toggleCode('
|
243
|
-
<div class="method-source-code" id="
|
242
|
+
onclick="toggleCode('M000054-source');return false;">[Source]</a></p>
|
243
|
+
<div class="method-source-code" id="M000054-source">
|
244
244
|
<pre>
|
245
|
-
<span class="ruby-comment cmt"># File lib/pho/changeset.rb, line
|
245
|
+
<span class="ruby-comment cmt"># File lib/pho/changeset.rb, line 61</span>
|
246
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
247
|
<span class="ruby-ivar">@subject</span> = <span class="ruby-identifier">subject</span>
|
248
248
|
<span class="ruby-ivar">@predicate</span> = <span class="ruby-identifier">predicate</span>
|
@@ -255,11 +255,11 @@ Create a <a href="Statement.html">Statement</a> referring to a resource
|
|
255
255
|
|
256
256
|
<h3 class="section-bar">Public Instance methods</h3>
|
257
257
|
|
258
|
-
<div id="method-
|
259
|
-
<a name="
|
258
|
+
<div id="method-M000053" class="method-detail">
|
259
|
+
<a name="M000053"></a>
|
260
260
|
|
261
261
|
<div class="method-heading">
|
262
|
-
<a href="#
|
262
|
+
<a href="#M000053" class="method-signature">
|
263
263
|
<span class="method-name">to_rdf</span><span class="method-args">()</span>
|
264
264
|
</a>
|
265
265
|
</div>
|
@@ -270,13 +270,13 @@ Create an RDF/XML fragment describing this <a
|
|
270
270
|
href="Statement.html">Statement</a>
|
271
271
|
</p>
|
272
272
|
<p><a class="source-toggle" href="#"
|
273
|
-
onclick="toggleCode('
|
274
|
-
<div class="method-source-code" id="
|
273
|
+
onclick="toggleCode('M000053-source');return false;">[Source]</a></p>
|
274
|
+
<div class="method-source-code" id="M000053-source">
|
275
275
|
<pre>
|
276
|
-
<span class="ruby-comment cmt"># File lib/pho/changeset.rb, line
|
276
|
+
<span class="ruby-comment cmt"># File lib/pho/changeset.rb, line 43</span>
|
277
277
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_rdf</span>()
|
278
278
|
<span class="ruby-identifier">rdf</span> = <span class="ruby-value str">"<rdf:Statement>"</span>
|
279
|
-
<span class="ruby-identifier">rdf</span> <span class="ruby-operator"><<</span> <span class="ruby-
|
279
|
+
<span class="ruby-identifier">rdf</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">write_subject</span>()
|
280
280
|
<span class="ruby-identifier">rdf</span> <span class="ruby-operator"><<</span> <span class="ruby-node">" <rdf:predicate rdf:resource=\"#{@predicate}\"/>"</span>
|
281
281
|
<span class="ruby-identifier">rdf</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">write_object</span>()
|
282
282
|
<span class="ruby-identifier">rdf</span> <span class="ruby-operator"><<</span> <span class="ruby-value str">"</rdf:Statement>"</span>
|
@@ -122,7 +122,7 @@
|
|
122
122
|
onclick="toggleCode('M000001-source');return false;">[Source]</a></p>
|
123
123
|
<div class="method-source-code" id="M000001-source">
|
124
124
|
<pre>
|
125
|
-
<span class="ruby-comment cmt"># File lib/pho.rb, line
|
125
|
+
<span class="ruby-comment cmt"># File lib/pho.rb, line 27</span>
|
126
126
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">start_with?</span>(<span class="ruby-identifier">prefix</span>)
|
127
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
128
|
<span class="ruby-keyword kw">end</span>
|
data/doc/rdoc/created.rid
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
Thu, 04 Jun 2009 10:47:51 +0100
|
data/doc/rdoc/files/CHANGES.html
CHANGED
@@ -56,7 +56,7 @@
|
|
56
56
|
</tr>
|
57
57
|
<tr class="top-aligned-row">
|
58
58
|
<td><strong>Last Update:</strong></td>
|
59
|
-
<td>
|
59
|
+
<td>Thu Jun 04 10:46:50 +0100 2009</td>
|
60
60
|
</tr>
|
61
61
|
</table>
|
62
62
|
</div>
|
@@ -73,7 +73,53 @@
|
|
73
73
|
Brief notes on significant changes and additions in each release
|
74
74
|
</p>
|
75
75
|
<h2>Version 0.5</h2>
|
76
|
+
<p>
|
77
|
+
NOTE: Released 0.4.1 version of the gem at this point to support earlier
|
78
|
+
versions of Ruby.
|
79
|
+
</p>
|
76
80
|
<ul>
|
81
|
+
<li>Added Enrichment module to support updating a store with results of simple
|
82
|
+
inference (using CONSTRUCT queries), merging data from external endpoints,
|
83
|
+
and support for parameterized lookup and enrichment of resources
|
84
|
+
|
85
|
+
</li>
|
86
|
+
<li>Added SparqlClient.multi_describe
|
87
|
+
|
88
|
+
</li>
|
89
|
+
<li>Added additional methods in SparqlHelper to support applying initial
|
90
|
+
bindings to queries, and generating initial bindings from SELECT results
|
91
|
+
|
92
|
+
</li>
|
93
|
+
<li>Added <a
|
94
|
+
href="../classes/Pho/FileManagement/FileManager.html">Pho::FileManagement::FileManager</a>
|
95
|
+
for pushing a directory of files into the content box
|
96
|
+
|
97
|
+
</li>
|
98
|
+
<li>RDFCollection is now deprecated
|
99
|
+
|
100
|
+
</li>
|
101
|
+
<li>Added <a href="../classes/Pho/FileManagement.html">Pho::FileManagement</a>
|
102
|
+
module and extracted code from RDFCollection to support creating similar
|
103
|
+
util for other files
|
104
|
+
|
105
|
+
</li>
|
106
|
+
<li>Added SparqlHelper class to simplify a few common tasks
|
107
|
+
|
108
|
+
</li>
|
109
|
+
<li>Added new Sparql module and refactored store methods to use SparqlClient
|
110
|
+
class
|
111
|
+
|
112
|
+
</li>
|
113
|
+
<li>Fixed bug in store.augment() method which was setting wrong headers on POST
|
114
|
+
|
115
|
+
</li>
|
116
|
+
<li>Added Converter class to convert between various RDF serializations and
|
117
|
+
resource hashes. This uses the Redland API.
|
118
|
+
|
119
|
+
</li>
|
120
|
+
<li>Support Ruby 1.8.5 or above (to allow installation on Centos 5)
|
121
|
+
|
122
|
+
</li>
|
77
123
|
<li>Support for storing data in private graphs as well as metabox
|
78
124
|
|
79
125
|
</li>
|
@@ -87,8 +133,8 @@ Brief notes on significant changes and additions in each release
|
|
87
133
|
hashes
|
88
134
|
|
89
135
|
</li>
|
90
|
-
<li>Addition of
|
91
|
-
hashes
|
136
|
+
<li>Addition of ResourceHash module and SetAlgebra class for working with
|
137
|
+
triple hashes
|
92
138
|
|
93
139
|
</li>
|
94
140
|
<li>Addition of Changeset, Statement classes for capturing and serializing
|