pho 0.5 → 0.6
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGES +17 -0
- data/Rakefile +10 -2
- data/bin/talis_store +37 -92
- data/doc/rdoc/classes/Pho.html +11 -0
- data/doc/rdoc/classes/Pho/CommandLine.html +508 -0
- data/doc/rdoc/classes/Pho/DatatypeProperty.html +15 -15
- data/doc/rdoc/classes/Pho/Enrichment.html +1 -1
- data/doc/rdoc/classes/Pho/Enrichment/{ResourceEnricher.html → StoreEnricher.html} +158 -58
- data/doc/rdoc/classes/Pho/Etags.html +36 -36
- 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 +94 -94
- data/doc/rdoc/classes/Pho/FieldWeighting.html +14 -14
- data/doc/rdoc/classes/Pho/FileManagement/AbstractFileManager.html +126 -91
- data/doc/rdoc/classes/Pho/FileManagement/FileManager.html +68 -62
- data/doc/rdoc/classes/Pho/FileManagement/RDFManager.html +22 -57
- data/doc/rdoc/classes/Pho/Job.html +68 -67
- data/doc/rdoc/classes/Pho/Jobs.html +62 -62
- data/doc/rdoc/classes/Pho/QueryProfile.html +64 -64
- data/doc/rdoc/classes/Pho/RDF.html +120 -0
- data/doc/rdoc/classes/Pho/RDF/Parser.html +277 -0
- data/doc/rdoc/classes/Pho/ResourceHash.html +1 -1
- data/doc/rdoc/classes/Pho/ResourceHash/Converter.html +48 -46
- data/doc/rdoc/classes/Pho/ResourceHash/SetAlgebra.html +15 -14
- data/doc/rdoc/classes/Pho/Snapshot.html +36 -36
- data/doc/rdoc/classes/Pho/Sparql.html +50 -0
- data/doc/rdoc/classes/Pho/Sparql/SparqlClient.html +147 -68
- data/doc/rdoc/classes/Pho/Sparql/SparqlHelper.html +195 -114
- data/doc/rdoc/classes/Pho/Status.html +26 -26
- data/doc/rdoc/classes/Pho/Store.html +271 -264
- data/doc/rdoc/classes/Pho/StoreSparqlClient.html +183 -0
- data/doc/rdoc/classes/Pho/Update.html +1 -0
- data/doc/rdoc/classes/Pho/Update/Changeset.html +69 -68
- data/doc/rdoc/classes/Pho/Update/ChangesetBuilder.html +24 -24
- data/doc/rdoc/classes/Pho/Update/Changesets.html +15 -14
- data/doc/rdoc/classes/Pho/Update/LiteralStatement.html +18 -18
- data/doc/rdoc/classes/Pho/Update/ResourceStatement.html +24 -24
- data/doc/rdoc/classes/Pho/Update/Statement.html +28 -27
- data/doc/rdoc/classes/String.html +1 -1
- data/doc/rdoc/created.rid +1 -1
- data/doc/rdoc/files/CHANGES.html +53 -1
- data/doc/rdoc/files/lib/pho/changeset_rb.html +1 -1
- data/doc/rdoc/files/lib/pho/command_line_rb.html +101 -0
- data/doc/rdoc/files/lib/pho/converter_rb.html +1 -1
- data/doc/rdoc/files/lib/pho/enrichment_rb.html +1 -1
- data/doc/rdoc/files/lib/pho/file_management_rb.html +1 -1
- data/doc/rdoc/files/lib/pho/file_manager_rb.html +1 -1
- data/doc/rdoc/files/lib/pho/rdf_collection_rb.html +1 -1
- data/doc/rdoc/files/lib/pho/rdf_rb.html +108 -0
- data/doc/rdoc/files/lib/pho/sparql_rb.html +1 -1
- data/doc/rdoc/files/lib/pho/store_rb.html +8 -1
- data/doc/rdoc/files/lib/pho_rb.html +4 -2
- data/doc/rdoc/fr_class_index.html +6 -1
- data/doc/rdoc/fr_file_index.html +2 -0
- data/doc/rdoc/fr_method_index.html +192 -172
- data/examples/calais/bio.txt +7 -0
- data/examples/calais/dump.rb +17 -0
- data/examples/calais/enlighten.rb +23 -0
- data/examples/calais/output.rdf +25 -0
- data/examples/sinatra/viewer.rb +20 -0
- data/lib/pho.rb +4 -1
- data/lib/pho/changeset.rb +17 -1
- data/lib/pho/command_line.rb +166 -0
- data/lib/pho/converter.rb +8 -3
- data/lib/pho/enrichment.rb +93 -28
- data/lib/pho/file_management.rb +32 -19
- data/lib/pho/file_manager.rb +22 -26
- data/lib/pho/rdf.rb +74 -0
- data/lib/pho/rdf_collection.rb +2 -17
- data/lib/pho/sparql.rb +150 -38
- data/lib/pho/store.rb +28 -2
- data/tests/tc_contentbox.rb +41 -0
- data/tests/tc_enrichment.rb +41 -4
- data/tests/tc_file_manager.rb +97 -7
- data/tests/tc_rdf_collection.rb +25 -13
- data/tests/tc_rdf_parser.rb +37 -0
- data/tests/tc_sparql.rb +72 -2
- data/tests/tc_sparql_helper.rb +16 -0
- data/tests/ts_pho.rb +2 -1
- metadata +20 -3
@@ -92,10 +92,10 @@ Captures status information relating to a store
|
|
92
92
|
<h3 class="section-bar">Methods</h3>
|
93
93
|
|
94
94
|
<div class="name-list">
|
95
|
-
<a href="#
|
96
|
-
<a href="#
|
97
|
-
<a href="#
|
98
|
-
<a href="#
|
95
|
+
<a href="#M000103">new</a>
|
96
|
+
<a href="#M000104">read_from_store</a>
|
97
|
+
<a href="#M000105">readable?</a>
|
98
|
+
<a href="#M000106">writeable?</a>
|
99
99
|
</div>
|
100
100
|
</div>
|
101
101
|
|
@@ -153,19 +153,19 @@ Interval before status should be requested again.
|
|
153
153
|
<div id="methods">
|
154
154
|
<h3 class="section-bar">Public Class methods</h3>
|
155
155
|
|
156
|
-
<div id="method-
|
157
|
-
<a name="
|
156
|
+
<div id="method-M000103" class="method-detail">
|
157
|
+
<a name="M000103"></a>
|
158
158
|
|
159
159
|
<div class="method-heading">
|
160
|
-
<a href="#
|
160
|
+
<a href="#M000103" class="method-signature">
|
161
161
|
<span class="method-name">new</span><span class="method-args">(retry_interval, status_message, access_mode)</span>
|
162
162
|
</a>
|
163
163
|
</div>
|
164
164
|
|
165
165
|
<div class="method-description">
|
166
166
|
<p><a class="source-toggle" href="#"
|
167
|
-
onclick="toggleCode('
|
168
|
-
<div class="method-source-code" id="
|
167
|
+
onclick="toggleCode('M000103-source');return false;">[Source]</a></p>
|
168
|
+
<div class="method-source-code" id="M000103-source">
|
169
169
|
<pre>
|
170
170
|
<span class="ruby-comment cmt"># File lib/pho/status.rb, line 25</span>
|
171
171
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">retry_interval</span>, <span class="ruby-identifier">status_message</span>, <span class="ruby-identifier">access_mode</span>)
|
@@ -178,11 +178,11 @@ Interval before status should be requested again.
|
|
178
178
|
</div>
|
179
179
|
</div>
|
180
180
|
|
181
|
-
<div id="method-
|
182
|
-
<a name="
|
181
|
+
<div id="method-M000104" class="method-detail">
|
182
|
+
<a name="M000104"></a>
|
183
183
|
|
184
184
|
<div class="method-heading">
|
185
|
-
<a href="#
|
185
|
+
<a href="#M000104" class="method-signature">
|
186
186
|
<span class="method-name">read_from_store</span><span class="method-args">(store)</span>
|
187
187
|
</a>
|
188
188
|
</div>
|
@@ -202,8 +202,8 @@ href="Status.html">Status</a> object.
|
|
202
202
|
</td></tr>
|
203
203
|
</table>
|
204
204
|
<p><a class="source-toggle" href="#"
|
205
|
-
onclick="toggleCode('
|
206
|
-
<div class="method-source-code" id="
|
205
|
+
onclick="toggleCode('M000104-source');return false;">[Source]</a></p>
|
206
|
+
<div class="method-source-code" id="M000104-source">
|
207
207
|
<pre>
|
208
208
|
<span class="ruby-comment cmt"># File lib/pho/status.rb, line 36</span>
|
209
209
|
<span class="ruby-keyword kw">def</span> <span class="ruby-constant">Status</span>.<span class="ruby-identifier">read_from_store</span>(<span class="ruby-identifier">store</span>)
|
@@ -229,22 +229,22 @@ href="Status.html">Status</a> object.
|
|
229
229
|
|
230
230
|
<h3 class="section-bar">Public Instance methods</h3>
|
231
231
|
|
232
|
-
<div id="method-
|
233
|
-
<a name="
|
232
|
+
<div id="method-M000105" class="method-detail">
|
233
|
+
<a name="M000105"></a>
|
234
234
|
|
235
235
|
<div class="method-heading">
|
236
|
-
<a href="#
|
236
|
+
<a href="#M000105" class="method-signature">
|
237
237
|
<span class="method-name">readable?</span><span class="method-args">()</span>
|
238
238
|
</a>
|
239
239
|
</div>
|
240
240
|
|
241
241
|
<div class="method-description">
|
242
242
|
<p>
|
243
|
-
Is the store <a href="Status.html#
|
243
|
+
Is the store <a href="Status.html#M000105">readable?</a>
|
244
244
|
</p>
|
245
245
|
<p><a class="source-toggle" href="#"
|
246
|
-
onclick="toggleCode('
|
247
|
-
<div class="method-source-code" id="
|
246
|
+
onclick="toggleCode('M000105-source');return false;">[Source]</a></p>
|
247
|
+
<div class="method-source-code" id="M000105-source">
|
248
248
|
<pre>
|
249
249
|
<span class="ruby-comment cmt"># File lib/pho/status.rb, line 54</span>
|
250
250
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">readable?</span>
|
@@ -255,22 +255,22 @@ Is the store <a href="Status.html#M000098">readable?</a>
|
|
255
255
|
</div>
|
256
256
|
</div>
|
257
257
|
|
258
|
-
<div id="method-
|
259
|
-
<a name="
|
258
|
+
<div id="method-M000106" class="method-detail">
|
259
|
+
<a name="M000106"></a>
|
260
260
|
|
261
261
|
<div class="method-heading">
|
262
|
-
<a href="#
|
262
|
+
<a href="#M000106" class="method-signature">
|
263
263
|
<span class="method-name">writeable?</span><span class="method-args">()</span>
|
264
264
|
</a>
|
265
265
|
</div>
|
266
266
|
|
267
267
|
<div class="method-description">
|
268
268
|
<p>
|
269
|
-
Is the store <a href="Status.html#
|
269
|
+
Is the store <a href="Status.html#M000106">writeable?</a>
|
270
270
|
</p>
|
271
271
|
<p><a class="source-toggle" href="#"
|
272
|
-
onclick="toggleCode('
|
273
|
-
<div class="method-source-code" id="
|
272
|
+
onclick="toggleCode('M000106-source');return false;">[Source]</a></p>
|
273
|
+
<div class="method-source-code" id="M000106-source">
|
274
274
|
<pre>
|
275
275
|
<span class="ruby-comment cmt"># File lib/pho/status.rb, line 59</span>
|
276
276
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">writeable?</span>
|
@@ -84,8 +84,8 @@ The <a href="Store.html">Store</a> class acts as a lightweight client
|
|
84
84
|
interface to the Talis Platform API (<a
|
85
85
|
href="http://n2.talis.com/wiki/Platform_API">n2.talis.com/wiki/Platform_API</a>).
|
86
86
|
The class provides methods for interacting with each of the core platform
|
87
|
-
services, e.g. retrieving and storing RDF
|
88
|
-
queries, etc.
|
87
|
+
services, e.g. retrieving and storing <a href="RDF.html">RDF</a>,
|
88
|
+
performing searches, SPARQL queries, etc.
|
89
89
|
</p>
|
90
90
|
<h2>Usage</h2>
|
91
91
|
<pre>
|
@@ -109,39 +109,39 @@ See the examples directory in the distribution
|
|
109
109
|
<h3 class="section-bar">Methods</h3>
|
110
110
|
|
111
111
|
<div class="name-list">
|
112
|
-
<a href="#
|
113
|
-
<a href="#
|
114
|
-
<a href="#
|
115
|
-
<a href="#
|
116
|
-
<a href="#
|
117
|
-
<a href="#
|
118
|
-
<a href="#
|
119
|
-
<a href="#
|
120
|
-
<a href="#
|
121
|
-
<a href="#
|
122
|
-
<a href="#
|
123
|
-
<a href="#
|
124
|
-
<a href="#
|
125
|
-
<a href="#
|
126
|
-
<a href="#
|
127
|
-
<a href="#
|
128
|
-
<a href="#
|
129
|
-
<a href="#
|
130
|
-
<a href="#
|
131
|
-
<a href="#
|
132
|
-
<a href="#
|
133
|
-
<a href="#
|
134
|
-
<a href="#
|
135
|
-
<a href="#
|
136
|
-
<a href="#
|
137
|
-
<a href="#
|
138
|
-
<a href="#
|
139
|
-
<a href="#
|
140
|
-
<a href="#
|
141
|
-
<a href="#
|
142
|
-
<a href="#
|
143
|
-
<a href="#
|
144
|
-
<a href="#
|
112
|
+
<a href="#M000160">augment</a>
|
113
|
+
<a href="#M000159">augment_uri</a>
|
114
|
+
<a href="#M000144">build_uri</a>
|
115
|
+
<a href="#M000161">configure_headers_for_conditional_get</a>
|
116
|
+
<a href="#M000164">delete_item</a>
|
117
|
+
<a href="#M000148">describe</a>
|
118
|
+
<a href="#M000157">facet</a>
|
119
|
+
<a href="#M000171">get_field_predicate_map</a>
|
120
|
+
<a href="#M000165">get_item</a>
|
121
|
+
<a href="#M000166">get_job</a>
|
122
|
+
<a href="#M000167">get_jobs</a>
|
123
|
+
<a href="#M000173">get_query_profile</a>
|
124
|
+
<a href="#M000158">get_search_params</a>
|
125
|
+
<a href="#M000170">get_snapshots</a>
|
126
|
+
<a href="#M000169">get_status</a>
|
127
|
+
<a href="#M000142">new</a>
|
128
|
+
<a href="#M000172">put_field_predicate_map</a>
|
129
|
+
<a href="#M000174">put_query_profile</a>
|
130
|
+
<a href="#M000162">record_etags</a>
|
131
|
+
<a href="#M000156">search</a>
|
132
|
+
<a href="#M000143">set_credentials</a>
|
133
|
+
<a href="#M000155">sparql</a>
|
134
|
+
<a href="#M000153">sparql_ask</a>
|
135
|
+
<a href="#M000150">sparql_client</a>
|
136
|
+
<a href="#M000152">sparql_construct</a>
|
137
|
+
<a href="#M000151">sparql_describe</a>
|
138
|
+
<a href="#M000154">sparql_select</a>
|
139
|
+
<a href="#M000145">store_data</a>
|
140
|
+
<a href="#M000146">store_file</a>
|
141
|
+
<a href="#M000147">store_url</a>
|
142
|
+
<a href="#M000149">submit_changeset</a>
|
143
|
+
<a href="#M000168">submit_job</a>
|
144
|
+
<a href="#M000163">upload_item</a>
|
145
145
|
</div>
|
146
146
|
</div>
|
147
147
|
|
@@ -195,11 +195,11 @@ Retrieve the admin username configured in this instance
|
|
195
195
|
<div id="methods">
|
196
196
|
<h3 class="section-bar">Public Class methods</h3>
|
197
197
|
|
198
|
-
<div id="method-
|
199
|
-
<a name="
|
198
|
+
<div id="method-M000142" class="method-detail">
|
199
|
+
<a name="M000142"></a>
|
200
200
|
|
201
201
|
<div class="method-heading">
|
202
|
-
<a href="#
|
202
|
+
<a href="#M000142" class="method-signature">
|
203
203
|
<span class="method-name">new</span><span class="method-args">(storeuri, username=nil, password=nil, client = HTTPClient.new() )</span>
|
204
204
|
</a>
|
205
205
|
</div>
|
@@ -223,10 +223,10 @@ Create an instance of the store class
|
|
223
223
|
</td></tr>
|
224
224
|
</table>
|
225
225
|
<p><a class="source-toggle" href="#"
|
226
|
-
onclick="toggleCode('
|
227
|
-
<div class="method-source-code" id="
|
226
|
+
onclick="toggleCode('M000142-source');return false;">[Source]</a></p>
|
227
|
+
<div class="method-source-code" id="M000142-source">
|
228
228
|
<pre>
|
229
|
-
<span class="ruby-comment cmt"># File lib/pho/store.rb, line
|
229
|
+
<span class="ruby-comment cmt"># File lib/pho/store.rb, line 43</span>
|
230
230
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">storeuri</span>, <span class="ruby-identifier">username</span>=<span class="ruby-keyword kw">nil</span>, <span class="ruby-identifier">password</span>=<span class="ruby-keyword kw">nil</span>, <span class="ruby-identifier">client</span> = <span class="ruby-constant">HTTPClient</span>.<span class="ruby-identifier">new</span>() )
|
231
231
|
<span class="ruby-ivar">@storeuri</span> = <span class="ruby-identifier">storeuri</span>.<span class="ruby-identifier">chomp</span>(<span class="ruby-value str">"/"</span>)
|
232
232
|
<span class="ruby-ivar">@username</span> = <span class="ruby-identifier">username</span>
|
@@ -241,11 +241,11 @@ Create an instance of the store class
|
|
241
241
|
|
242
242
|
<h3 class="section-bar">Public Instance methods</h3>
|
243
243
|
|
244
|
-
<div id="method-
|
245
|
-
<a name="
|
244
|
+
<div id="method-M000160" class="method-detail">
|
245
|
+
<a name="M000160"></a>
|
246
246
|
|
247
247
|
<div class="method-heading">
|
248
|
-
<a href="#
|
248
|
+
<a href="#M000160" class="method-signature">
|
249
249
|
<span class="method-name">augment</span><span class="method-args">(data)</span>
|
250
250
|
</a>
|
251
251
|
</div>
|
@@ -261,10 +261,10 @@ Platform
|
|
261
261
|
</td></tr>
|
262
262
|
</table>
|
263
263
|
<p><a class="source-toggle" href="#"
|
264
|
-
onclick="toggleCode('
|
265
|
-
<div class="method-source-code" id="
|
264
|
+
onclick="toggleCode('M000160-source');return false;">[Source]</a></p>
|
265
|
+
<div class="method-source-code" id="M000160-source">
|
266
266
|
<pre>
|
267
|
-
<span class="ruby-comment cmt"># File lib/pho/store.rb, line
|
267
|
+
<span class="ruby-comment cmt"># File lib/pho/store.rb, line 299</span>
|
268
268
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">augment</span>(<span class="ruby-identifier">data</span>)
|
269
269
|
<span class="ruby-identifier">u</span> = <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">build_uri</span>(<span class="ruby-value str">"/services/augment"</span>)
|
270
270
|
<span class="ruby-identifier">response</span> = <span class="ruby-ivar">@client</span>.<span class="ruby-identifier">post</span>(<span class="ruby-identifier">u</span>, <span class="ruby-identifier">data</span>, {<span class="ruby-value str">"Content-Type"</span> =<span class="ruby-operator">></span> <span class="ruby-value str">"application/rss+xml"</span>})
|
@@ -275,11 +275,11 @@ Platform
|
|
275
275
|
</div>
|
276
276
|
</div>
|
277
277
|
|
278
|
-
<div id="method-
|
279
|
-
<a name="
|
278
|
+
<div id="method-M000159" class="method-detail">
|
279
|
+
<a name="M000159"></a>
|
280
280
|
|
281
281
|
<div class="method-heading">
|
282
|
-
<a href="#
|
282
|
+
<a href="#M000159" class="method-signature">
|
283
283
|
<span class="method-name">augment_uri</span><span class="method-args">(uri)</span>
|
284
284
|
</a>
|
285
285
|
</div>
|
@@ -295,10 +295,10 @@ data in this store
|
|
295
295
|
</td></tr>
|
296
296
|
</table>
|
297
297
|
<p><a class="source-toggle" href="#"
|
298
|
-
onclick="toggleCode('
|
299
|
-
<div class="method-source-code" id="
|
298
|
+
onclick="toggleCode('M000159-source');return false;">[Source]</a></p>
|
299
|
+
<div class="method-source-code" id="M000159-source">
|
300
300
|
<pre>
|
301
|
-
<span class="ruby-comment cmt"># File lib/pho/store.rb, line
|
301
|
+
<span class="ruby-comment cmt"># File lib/pho/store.rb, line 290</span>
|
302
302
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">augment_uri</span>(<span class="ruby-identifier">uri</span>)
|
303
303
|
<span class="ruby-identifier">u</span> = <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">build_uri</span>(<span class="ruby-value str">"/services/augment"</span>)
|
304
304
|
<span class="ruby-identifier">response</span> = <span class="ruby-ivar">@client</span>.<span class="ruby-identifier">get</span>(<span class="ruby-identifier">u</span>, {<span class="ruby-value str">"data-uri"</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">uri</span>})
|
@@ -309,11 +309,11 @@ data in this store
|
|
309
309
|
</div>
|
310
310
|
</div>
|
311
311
|
|
312
|
-
<div id="method-
|
313
|
-
<a name="
|
312
|
+
<div id="method-M000144" class="method-detail">
|
313
|
+
<a name="M000144"></a>
|
314
314
|
|
315
315
|
<div class="method-heading">
|
316
|
-
<a href="#
|
316
|
+
<a href="#M000144" class="method-signature">
|
317
317
|
<span class="method-name">build_uri</span><span class="method-args">(uri)</span>
|
318
318
|
</a>
|
319
319
|
</div>
|
@@ -328,10 +328,10 @@ Build a request uri, by concatenating it with the base uri of the store
|
|
328
328
|
</td></tr>
|
329
329
|
</table>
|
330
330
|
<p><a class="source-toggle" href="#"
|
331
|
-
onclick="toggleCode('
|
332
|
-
<div class="method-source-code" id="
|
331
|
+
onclick="toggleCode('M000144-source');return false;">[Source]</a></p>
|
332
|
+
<div class="method-source-code" id="M000144-source">
|
333
333
|
<pre>
|
334
|
-
<span class="ruby-comment cmt"># File lib/pho/store.rb, line
|
334
|
+
<span class="ruby-comment cmt"># File lib/pho/store.rb, line 61</span>
|
335
335
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">build_uri</span>(<span class="ruby-identifier">uri</span>)
|
336
336
|
<span class="ruby-keyword kw">if</span> (<span class="ruby-identifier">uri</span>.<span class="ruby-identifier">start_with?</span>(<span class="ruby-ivar">@storeuri</span>))
|
337
337
|
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">uri</span>
|
@@ -347,11 +347,11 @@ Build a request uri, by concatenating it with the base uri of the store
|
|
347
347
|
</div>
|
348
348
|
</div>
|
349
349
|
|
350
|
-
<div id="method-
|
351
|
-
<a name="
|
350
|
+
<div id="method-M000161" class="method-detail">
|
351
|
+
<a name="M000161"></a>
|
352
352
|
|
353
353
|
<div class="method-heading">
|
354
|
-
<a href="#
|
354
|
+
<a href="#M000161" class="method-signature">
|
355
355
|
<span class="method-name">configure_headers_for_conditional_get</span><span class="method-args">(u, headers, etags, if_match)</span>
|
356
356
|
</a>
|
357
357
|
</div>
|
@@ -361,10 +361,10 @@ Build a request uri, by concatenating it with the base uri of the store
|
|
361
361
|
Added appropriate http header for conditional get requests
|
362
362
|
</p>
|
363
363
|
<p><a class="source-toggle" href="#"
|
364
|
-
onclick="toggleCode('
|
365
|
-
<div class="method-source-code" id="
|
364
|
+
onclick="toggleCode('M000161-source');return false;">[Source]</a></p>
|
365
|
+
<div class="method-source-code" id="M000161-source">
|
366
366
|
<pre>
|
367
|
-
<span class="ruby-comment cmt"># File lib/pho/store.rb, line
|
367
|
+
<span class="ruby-comment cmt"># File lib/pho/store.rb, line 306</span>
|
368
368
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">configure_headers_for_conditional_get</span>(<span class="ruby-identifier">u</span>, <span class="ruby-identifier">headers</span>, <span class="ruby-identifier">etags</span>, <span class="ruby-identifier">if_match</span>)
|
369
369
|
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">etags</span> <span class="ruby-operator">!=</span> <span class="ruby-keyword kw">nil</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">etags</span>.<span class="ruby-identifier">has_tag?</span>(<span class="ruby-identifier">u</span>)
|
370
370
|
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">if_match</span>
|
@@ -380,11 +380,11 @@ Added appropriate http header for conditional get requests
|
|
380
380
|
</div>
|
381
381
|
</div>
|
382
382
|
|
383
|
-
<div id="method-
|
384
|
-
<a name="
|
383
|
+
<div id="method-M000164" class="method-detail">
|
384
|
+
<a name="M000164"></a>
|
385
385
|
|
386
386
|
<div class="method-heading">
|
387
|
-
<a href="#
|
387
|
+
<a href="#M000164" class="method-signature">
|
388
388
|
<span class="method-name">delete_item</span><span class="method-args">(uri)</span>
|
389
389
|
</a>
|
390
390
|
</div>
|
@@ -402,10 +402,10 @@ Delete an item from the Contentbox in this <a href="Store.html">Store</a>
|
|
402
402
|
TODO: conditional deletes
|
403
403
|
</p>
|
404
404
|
<p><a class="source-toggle" href="#"
|
405
|
-
onclick="toggleCode('
|
406
|
-
<div class="method-source-code" id="
|
405
|
+
onclick="toggleCode('M000164-source');return false;">[Source]</a></p>
|
406
|
+
<div class="method-source-code" id="M000164-source">
|
407
407
|
<pre>
|
408
|
-
<span class="ruby-comment cmt"># File lib/pho/store.rb, line
|
408
|
+
<span class="ruby-comment cmt"># File lib/pho/store.rb, line 361</span>
|
409
409
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">delete_item</span>(<span class="ruby-identifier">uri</span>)
|
410
410
|
<span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">uri</span>.<span class="ruby-identifier">start_with?</span>(<span class="ruby-ivar">@storeuri</span>)
|
411
411
|
<span class="ruby-identifier">uri</span> = <span class="ruby-identifier">build_uri</span>(<span class="ruby-identifier">uri</span>)
|
@@ -417,23 +417,24 @@ TODO: conditional deletes
|
|
417
417
|
</div>
|
418
418
|
</div>
|
419
419
|
|
420
|
-
<div id="method-
|
421
|
-
<a name="
|
420
|
+
<div id="method-M000148" class="method-detail">
|
421
|
+
<a name="M000148"></a>
|
422
422
|
|
423
423
|
<div class="method-heading">
|
424
|
-
<a href="#
|
424
|
+
<a href="#M000148" class="method-signature">
|
425
425
|
<span class="method-name">describe</span><span class="method-args">(uri, format="application/rdf+xml", etags=nil, if_match=false)</span>
|
426
426
|
</a>
|
427
427
|
</div>
|
428
428
|
|
429
429
|
<div class="method-description">
|
430
430
|
<p>
|
431
|
-
Retrieve an RDF description of a specific URI. The
|
432
|
-
be to retrieve an RDF
|
433
|
-
supported by the Talis
|
431
|
+
Retrieve an <a href="RDF.html">RDF</a> description of a specific URI. The
|
432
|
+
default behaviour will be to retrieve an <a href="RDF.html">RDF</a>/XML
|
433
|
+
document, but other formats can be requested, as supported by the Talis
|
434
|
+
Platform. E.g. application/json
|
434
435
|
</p>
|
435
436
|
<table>
|
436
|
-
<tr><td valign="top">uri:</td><td>the URI of the resource to <a href="Store.html#
|
437
|
+
<tr><td valign="top">uri:</td><td>the URI of the resource to <a href="Store.html#M000148">describe</a>
|
437
438
|
|
438
439
|
</td></tr>
|
439
440
|
<tr><td valign="top">format:</td><td>the preferred response format
|
@@ -450,20 +451,20 @@ false to perform a Conditional GET
|
|
450
451
|
</table>
|
451
452
|
<p>
|
452
453
|
Note that this method is different from <a
|
453
|
-
href="Store.html#
|
454
|
+
href="Store.html#M000151">sparql_describe</a> in that it is intended to be
|
454
455
|
used to generate a description of a single URI, using an separated service
|
455
456
|
exposed by the Platform. This service is optimised for retrieval of
|
456
457
|
descriptions for single resources and supports HTTP caching and conditional
|
457
|
-
retrieval. The <a href="Store.html#
|
458
|
+
retrieval. The <a href="Store.html#M000151">sparql_describe</a> method
|
458
459
|
should be used to submit more complex DESCRIBE queries to the Platform,
|
459
460
|
e.g. to generate descriptions of resources matching a particular graph
|
460
461
|
pattern.
|
461
462
|
</p>
|
462
463
|
<p><a class="source-toggle" href="#"
|
463
|
-
onclick="toggleCode('
|
464
|
-
<div class="method-source-code" id="
|
464
|
+
onclick="toggleCode('M000148-source');return false;">[Source]</a></p>
|
465
|
+
<div class="method-source-code" id="M000148-source">
|
465
466
|
<pre>
|
466
|
-
<span class="ruby-comment cmt"># File lib/pho/store.rb, line
|
467
|
+
<span class="ruby-comment cmt"># File lib/pho/store.rb, line 140</span>
|
467
468
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">describe</span>(<span class="ruby-identifier">uri</span>, <span class="ruby-identifier">format</span>=<span class="ruby-value str">"application/rdf+xml"</span>, <span class="ruby-identifier">etags</span>=<span class="ruby-keyword kw">nil</span>, <span class="ruby-identifier">if_match</span>=<span class="ruby-keyword kw">false</span>)
|
468
469
|
<span class="ruby-identifier">u</span> = <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">build_uri</span>(<span class="ruby-value str">"/meta"</span>)
|
469
470
|
<span class="ruby-identifier">headers</span> = {<span class="ruby-value str">"Accept"</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">format</span>}
|
@@ -477,18 +478,18 @@ pattern.
|
|
477
478
|
</div>
|
478
479
|
</div>
|
479
480
|
|
480
|
-
<div id="method-
|
481
|
-
<a name="
|
481
|
+
<div id="method-M000157" class="method-detail">
|
482
|
+
<a name="M000157"></a>
|
482
483
|
|
483
484
|
<div class="method-heading">
|
484
|
-
<a href="#
|
485
|
+
<a href="#M000157" class="method-signature">
|
485
486
|
<span class="method-name">facet</span><span class="method-args">(query, facets, params=nil)</span>
|
486
487
|
</a>
|
487
488
|
</div>
|
488
489
|
|
489
490
|
<div class="method-description">
|
490
491
|
<p>
|
491
|
-
Perform a facetted <a href="Store.html#
|
492
|
+
Perform a facetted <a href="Store.html#M000156">search</a> against the
|
492
493
|
Metabox indexes.
|
493
494
|
</p>
|
494
495
|
<table>
|
@@ -507,7 +508,7 @@ The <em>params</em> hash can contain the following values:
|
|
507
508
|
</p>
|
508
509
|
<ul>
|
509
510
|
<li><b>top</b>: the maximum number of results to return for each <a
|
510
|
-
href="Store.html#
|
511
|
+
href="Store.html#M000157">facet</a>
|
511
512
|
|
512
513
|
</li>
|
513
514
|
<li><b>output</b>: the preferred response format, can be html or xml (the
|
@@ -516,10 +517,10 @@ default)
|
|
516
517
|
</li>
|
517
518
|
</ul>
|
518
519
|
<p><a class="source-toggle" href="#"
|
519
|
-
onclick="toggleCode('
|
520
|
-
<div class="method-source-code" id="
|
520
|
+
onclick="toggleCode('M000157-source');return false;">[Source]</a></p>
|
521
|
+
<div class="method-source-code" id="M000157-source">
|
521
522
|
<pre>
|
522
|
-
<span class="ruby-comment cmt"># File lib/pho/store.rb, line
|
523
|
+
<span class="ruby-comment cmt"># File lib/pho/store.rb, line 265</span>
|
523
524
|
<span class="ruby-keyword kw">def</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>=<span class="ruby-keyword kw">nil</span>)
|
524
525
|
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">facets</span> <span class="ruby-operator">==</span> <span class="ruby-keyword kw">nil</span> <span class="ruby-keyword kw">or</span> <span class="ruby-identifier">facets</span>.<span class="ruby-identifier">empty?</span>
|
525
526
|
<span class="ruby-comment cmt">#todo</span>
|
@@ -536,11 +537,11 @@ default)
|
|
536
537
|
</div>
|
537
538
|
</div>
|
538
539
|
|
539
|
-
<div id="method-
|
540
|
-
<a name="
|
540
|
+
<div id="method-M000171" class="method-detail">
|
541
|
+
<a name="M000171"></a>
|
541
542
|
|
542
543
|
<div class="method-heading">
|
543
|
-
<a href="#
|
544
|
+
<a href="#M000171" class="method-signature">
|
544
545
|
<span class="method-name">get_field_predicate_map</span><span class="method-args">(output=ACCEPT_JSON)</span>
|
545
546
|
</a>
|
546
547
|
</div>
|
@@ -550,7 +551,7 @@ default)
|
|
550
551
|
Read the field predicate map configuration for this store. The config can
|
551
552
|
be requested in any format supported by the platform, but the default will
|
552
553
|
return JSON. See <a
|
553
|
-
href="FieldPredicateMap.html#
|
554
|
+
href="FieldPredicateMap.html#M000088">FieldPredicateMap.read_from_store</a>
|
554
555
|
for a convenient way to quickly create a <a
|
555
556
|
href="FieldPredicateMap.html">FieldPredicateMap</a> object based on a
|
556
557
|
specific stores‘s configuration.
|
@@ -561,10 +562,10 @@ specific stores‘s configuration.
|
|
561
562
|
</td></tr>
|
562
563
|
</table>
|
563
564
|
<p><a class="source-toggle" href="#"
|
564
|
-
onclick="toggleCode('
|
565
|
-
<div class="method-source-code" id="
|
565
|
+
onclick="toggleCode('M000171-source');return false;">[Source]</a></p>
|
566
|
+
<div class="method-source-code" id="M000171-source">
|
566
567
|
<pre>
|
567
|
-
<span class="ruby-comment cmt"># File lib/pho/store.rb, line
|
568
|
+
<span class="ruby-comment cmt"># File lib/pho/store.rb, line 443</span>
|
568
569
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">get_field_predicate_map</span>(<span class="ruby-identifier">output</span>=<span class="ruby-constant">ACCEPT_JSON</span>)
|
569
570
|
<span class="ruby-identifier">u</span> = <span class="ruby-identifier">build_uri</span>(<span class="ruby-value str">"/config/fpmaps/1"</span>)
|
570
571
|
<span class="ruby-identifier">response</span> = <span class="ruby-ivar">@client</span>.<span class="ruby-identifier">get</span>(<span class="ruby-identifier">u</span>, <span class="ruby-keyword kw">nil</span>, <span class="ruby-identifier">output</span>)
|
@@ -575,11 +576,11 @@ specific stores‘s configuration.
|
|
575
576
|
</div>
|
576
577
|
</div>
|
577
578
|
|
578
|
-
<div id="method-
|
579
|
-
<a name="
|
579
|
+
<div id="method-M000165" class="method-detail">
|
580
|
+
<a name="M000165"></a>
|
580
581
|
|
581
582
|
<div class="method-heading">
|
582
|
-
<a href="#
|
583
|
+
<a href="#M000165" class="method-signature">
|
583
584
|
<span class="method-name">get_item</span><span class="method-args">(uri, etags=nil, if_match=false)</span>
|
584
585
|
</a>
|
585
586
|
</div>
|
@@ -595,17 +596,17 @@ Get an item from the Contebtbox.
|
|
595
596
|
</table>
|
596
597
|
<p>
|
597
598
|
If the provided URL of the item is not in the Contentbox, then the response
|
598
|
-
will be a redirect to the RDF description of this
|
599
|
-
the Metabox.
|
599
|
+
will be a redirect to the <a href="RDF.html">RDF</a> description of this
|
600
|
+
item, as available from the Metabox.
|
600
601
|
</p>
|
601
602
|
<p>
|
602
603
|
TODO: document etags, redirects
|
603
604
|
</p>
|
604
605
|
<p><a class="source-toggle" href="#"
|
605
|
-
onclick="toggleCode('
|
606
|
-
<div class="method-source-code" id="
|
606
|
+
onclick="toggleCode('M000165-source');return false;">[Source]</a></p>
|
607
|
+
<div class="method-source-code" id="M000165-source">
|
607
608
|
<pre>
|
608
|
-
<span class="ruby-comment cmt"># File lib/pho/store.rb, line
|
609
|
+
<span class="ruby-comment cmt"># File lib/pho/store.rb, line 375</span>
|
609
610
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">get_item</span>(<span class="ruby-identifier">uri</span>, <span class="ruby-identifier">etags</span>=<span class="ruby-keyword kw">nil</span>, <span class="ruby-identifier">if_match</span>=<span class="ruby-keyword kw">false</span>)
|
610
611
|
<span class="ruby-identifier">u</span> = <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">build_uri</span>(<span class="ruby-identifier">uri</span>)
|
611
612
|
<span class="ruby-identifier">headers</span> = <span class="ruby-constant">Hash</span>.<span class="ruby-identifier">new</span>
|
@@ -619,11 +620,11 @@ TODO: document etags, redirects
|
|
619
620
|
</div>
|
620
621
|
</div>
|
621
622
|
|
622
|
-
<div id="method-
|
623
|
-
<a name="
|
623
|
+
<div id="method-M000166" class="method-detail">
|
624
|
+
<a name="M000166"></a>
|
624
625
|
|
625
626
|
<div class="method-heading">
|
626
|
-
<a href="#
|
627
|
+
<a href="#M000166" class="method-signature">
|
627
628
|
<span class="method-name">get_job</span><span class="method-args">(uri)</span>
|
628
629
|
</a>
|
629
630
|
</div>
|
@@ -631,7 +632,7 @@ TODO: document etags, redirects
|
|
631
632
|
<div class="method-description">
|
632
633
|
<p>
|
633
634
|
Retrieve metadata about a single job. Use <a
|
634
|
-
href="Job.html#
|
635
|
+
href="Job.html#M000181">Job.read_from_store</a> as a convenience function
|
635
636
|
which will return a fully-populated <a href="Job.html">Job</a> object
|
636
637
|
</p>
|
637
638
|
<table>
|
@@ -640,10 +641,10 @@ which will return a fully-populated <a href="Job.html">Job</a> object
|
|
640
641
|
</td></tr>
|
641
642
|
</table>
|
642
643
|
<p><a class="source-toggle" href="#"
|
643
|
-
onclick="toggleCode('
|
644
|
-
<div class="method-source-code" id="
|
644
|
+
onclick="toggleCode('M000166-source');return false;">[Source]</a></p>
|
645
|
+
<div class="method-source-code" id="M000166-source">
|
645
646
|
<pre>
|
646
|
-
<span class="ruby-comment cmt"># File lib/pho/store.rb, line
|
647
|
+
<span class="ruby-comment cmt"># File lib/pho/store.rb, line 392</span>
|
647
648
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">get_job</span>(<span class="ruby-identifier">uri</span>)
|
648
649
|
<span class="ruby-identifier">u</span> = <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">build_uri</span>(<span class="ruby-identifier">uri</span>)
|
649
650
|
<span class="ruby-identifier">response</span> = <span class="ruby-ivar">@client</span>.<span class="ruby-identifier">get</span>(<span class="ruby-identifier">u</span>, <span class="ruby-keyword kw">nil</span>, <span class="ruby-constant">ACCEPT_RDF</span>)
|
@@ -654,11 +655,11 @@ which will return a fully-populated <a href="Job.html">Job</a> object
|
|
654
655
|
</div>
|
655
656
|
</div>
|
656
657
|
|
657
|
-
<div id="method-
|
658
|
-
<a name="
|
658
|
+
<div id="method-M000167" class="method-detail">
|
659
|
+
<a name="M000167"></a>
|
659
660
|
|
660
661
|
<div class="method-heading">
|
661
|
-
<a href="#
|
662
|
+
<a href="#M000167" class="method-signature">
|
662
663
|
<span class="method-name">get_jobs</span><span class="method-args">()</span>
|
663
664
|
</a>
|
664
665
|
</div>
|
@@ -669,10 +670,10 @@ Retrieve metadata about the Scheduled <a href="Jobs.html">Jobs</a>
|
|
669
670
|
Collection from the store
|
670
671
|
</p>
|
671
672
|
<p><a class="source-toggle" href="#"
|
672
|
-
onclick="toggleCode('
|
673
|
-
<div class="method-source-code" id="
|
673
|
+
onclick="toggleCode('M000167-source');return false;">[Source]</a></p>
|
674
|
+
<div class="method-source-code" id="M000167-source">
|
674
675
|
<pre>
|
675
|
-
<span class="ruby-comment cmt"># File lib/pho/store.rb, line
|
676
|
+
<span class="ruby-comment cmt"># File lib/pho/store.rb, line 399</span>
|
676
677
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">get_jobs</span>()
|
677
678
|
<span class="ruby-identifier">u</span> = <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">build_uri</span>(<span class="ruby-value str">"/jobs"</span>)
|
678
679
|
<span class="ruby-identifier">response</span> = <span class="ruby-ivar">@client</span>.<span class="ruby-identifier">get</span>(<span class="ruby-identifier">u</span>, <span class="ruby-keyword kw">nil</span>, <span class="ruby-constant">ACCEPT_RDF</span>)
|
@@ -683,11 +684,11 @@ Collection from the store
|
|
683
684
|
</div>
|
684
685
|
</div>
|
685
686
|
|
686
|
-
<div id="method-
|
687
|
-
<a name="
|
687
|
+
<div id="method-M000173" class="method-detail">
|
688
|
+
<a name="M000173"></a>
|
688
689
|
|
689
690
|
<div class="method-heading">
|
690
|
-
<a href="#
|
691
|
+
<a href="#M000173" class="method-signature">
|
691
692
|
<span class="method-name">get_query_profile</span><span class="method-args">(output=ACCEPT_JSON)</span>
|
692
693
|
</a>
|
693
694
|
</div>
|
@@ -697,7 +698,7 @@ Collection from the store
|
|
697
698
|
Read the query profile configuration for this store. The config can be
|
698
699
|
requested in any format supported by the platform, but the default will
|
699
700
|
return JSON. See <a
|
700
|
-
href="QueryProfile.html#
|
701
|
+
href="QueryProfile.html#M000118">QueryProfile.read_from_store</a> for a
|
701
702
|
convenient way to quickly create a <a
|
702
703
|
href="QueryProfile.html">QueryProfile</a> object based on a specific
|
703
704
|
stores‘s configuration.
|
@@ -708,10 +709,10 @@ stores‘s configuration.
|
|
708
709
|
</td></tr>
|
709
710
|
</table>
|
710
711
|
<p><a class="source-toggle" href="#"
|
711
|
-
onclick="toggleCode('
|
712
|
-
<div class="method-source-code" id="
|
712
|
+
onclick="toggleCode('M000173-source');return false;">[Source]</a></p>
|
713
|
+
<div class="method-source-code" id="M000173-source">
|
713
714
|
<pre>
|
714
|
-
<span class="ruby-comment cmt"># File lib/pho/store.rb, line
|
715
|
+
<span class="ruby-comment cmt"># File lib/pho/store.rb, line 464</span>
|
715
716
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">get_query_profile</span>(<span class="ruby-identifier">output</span>=<span class="ruby-constant">ACCEPT_JSON</span>)
|
716
717
|
<span class="ruby-identifier">u</span> = <span class="ruby-identifier">build_uri</span>(<span class="ruby-value str">"/config/queryprofiles/1"</span>)
|
717
718
|
<span class="ruby-identifier">response</span> = <span class="ruby-ivar">@client</span>.<span class="ruby-identifier">get</span>(<span class="ruby-identifier">u</span>, <span class="ruby-keyword kw">nil</span>, <span class="ruby-identifier">output</span>)
|
@@ -722,21 +723,21 @@ stores‘s configuration.
|
|
722
723
|
</div>
|
723
724
|
</div>
|
724
725
|
|
725
|
-
<div id="method-
|
726
|
-
<a name="
|
726
|
+
<div id="method-M000158" class="method-detail">
|
727
|
+
<a name="M000158"></a>
|
727
728
|
|
728
729
|
<div class="method-heading">
|
729
|
-
<a href="#
|
730
|
+
<a href="#M000158" class="method-signature">
|
730
731
|
<span class="method-name">get_search_params</span><span class="method-args">(u, query, params)</span>
|
731
732
|
</a>
|
732
733
|
</div>
|
733
734
|
|
734
735
|
<div class="method-description">
|
735
736
|
<p><a class="source-toggle" href="#"
|
736
|
-
onclick="toggleCode('
|
737
|
-
<div class="method-source-code" id="
|
737
|
+
onclick="toggleCode('M000158-source');return false;">[Source]</a></p>
|
738
|
+
<div class="method-source-code" id="M000158-source">
|
738
739
|
<pre>
|
739
|
-
<span class="ruby-comment cmt"># File lib/pho/store.rb, line
|
740
|
+
<span class="ruby-comment cmt"># File lib/pho/store.rb, line 277</span>
|
740
741
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">get_search_params</span>(<span class="ruby-identifier">u</span>, <span class="ruby-identifier">query</span>, <span class="ruby-identifier">params</span>)
|
741
742
|
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">params</span> <span class="ruby-operator">!=</span> <span class="ruby-keyword kw">nil</span>
|
742
743
|
<span class="ruby-identifier">search_params</span> = <span class="ruby-identifier">params</span>.<span class="ruby-identifier">clone</span>()
|
@@ -751,11 +752,11 @@ stores‘s configuration.
|
|
751
752
|
</div>
|
752
753
|
</div>
|
753
754
|
|
754
|
-
<div id="method-
|
755
|
-
<a name="
|
755
|
+
<div id="method-M000170" class="method-detail">
|
756
|
+
<a name="M000170"></a>
|
756
757
|
|
757
758
|
<div class="method-heading">
|
758
|
-
<a href="#
|
759
|
+
<a href="#M000170" class="method-signature">
|
759
760
|
<span class="method-name">get_snapshots</span><span class="method-args">()</span>
|
760
761
|
</a>
|
761
762
|
</div>
|
@@ -766,14 +767,14 @@ Retrieve the list of snapshots for this store
|
|
766
767
|
</p>
|
767
768
|
<p>
|
768
769
|
Currently the response will contain an HTML document. Use <a
|
769
|
-
href="Snapshot.html#
|
770
|
+
href="Snapshot.html#M000176">Snapshot.parse</a> to turn this into a <a
|
770
771
|
href="Snapshot.html">Snapshot</a> object
|
771
772
|
</p>
|
772
773
|
<p><a class="source-toggle" href="#"
|
773
|
-
onclick="toggleCode('
|
774
|
-
<div class="method-source-code" id="
|
774
|
+
onclick="toggleCode('M000170-source');return false;">[Source]</a></p>
|
775
|
+
<div class="method-source-code" id="M000170-source">
|
775
776
|
<pre>
|
776
|
-
<span class="ruby-comment cmt"># File lib/pho/store.rb, line
|
777
|
+
<span class="ruby-comment cmt"># File lib/pho/store.rb, line 428</span>
|
777
778
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">get_snapshots</span>()
|
778
779
|
<span class="ruby-identifier">u</span> = <span class="ruby-identifier">build_uri</span>(<span class="ruby-value str">"/snapshots"</span>)
|
779
780
|
<span class="ruby-identifier">response</span> = <span class="ruby-ivar">@client</span>.<span class="ruby-identifier">get</span>(<span class="ruby-identifier">u</span>, <span class="ruby-keyword kw">nil</span>, <span class="ruby-constant">ACCEPT_RDF</span>)
|
@@ -784,11 +785,11 @@ href="Snapshot.html">Snapshot</a> object
|
|
784
785
|
</div>
|
785
786
|
</div>
|
786
787
|
|
787
|
-
<div id="method-
|
788
|
-
<a name="
|
788
|
+
<div id="method-M000169" class="method-detail">
|
789
|
+
<a name="M000169"></a>
|
789
790
|
|
790
791
|
<div class="method-heading">
|
791
|
-
<a href="#
|
792
|
+
<a href="#M000169" class="method-signature">
|
792
793
|
<span class="method-name">get_status</span><span class="method-args">()</span>
|
793
794
|
</a>
|
794
795
|
</div>
|
@@ -798,10 +799,10 @@ href="Snapshot.html">Snapshot</a> object
|
|
798
799
|
ADMIN
|
799
800
|
</p>
|
800
801
|
<p><a class="source-toggle" href="#"
|
801
|
-
onclick="toggleCode('
|
802
|
-
<div class="method-source-code" id="
|
802
|
+
onclick="toggleCode('M000169-source');return false;">[Source]</a></p>
|
803
|
+
<div class="method-source-code" id="M000169-source">
|
803
804
|
<pre>
|
804
|
-
<span class="ruby-comment cmt"># File lib/pho/store.rb, line
|
805
|
+
<span class="ruby-comment cmt"># File lib/pho/store.rb, line 418</span>
|
805
806
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">get_status</span>()
|
806
807
|
<span class="ruby-identifier">u</span> = <span class="ruby-identifier">build_uri</span>(<span class="ruby-value str">"/config/access-status"</span>)
|
807
808
|
<span class="ruby-identifier">response</span> = <span class="ruby-ivar">@client</span>.<span class="ruby-identifier">get</span>(<span class="ruby-identifier">u</span>, <span class="ruby-keyword kw">nil</span>, <span class="ruby-constant">ACCEPT_JSON</span> )
|
@@ -812,11 +813,11 @@ ADMIN
|
|
812
813
|
</div>
|
813
814
|
</div>
|
814
815
|
|
815
|
-
<div id="method-
|
816
|
-
<a name="
|
816
|
+
<div id="method-M000172" class="method-detail">
|
817
|
+
<a name="M000172"></a>
|
817
818
|
|
818
819
|
<div class="method-heading">
|
819
|
-
<a href="#
|
820
|
+
<a href="#M000172" class="method-signature">
|
820
821
|
<span class="method-name">put_field_predicate_map</span><span class="method-args">(data)</span>
|
821
822
|
</a>
|
822
823
|
</div>
|
@@ -824,21 +825,21 @@ ADMIN
|
|
824
825
|
<div class="method-description">
|
825
826
|
<p>
|
826
827
|
<a href="Update.html">Update</a>/replace the current Field Predicate map
|
827
|
-
configuration in the store. Assumes that the provided data is valid
|
828
|
-
RDF
|
829
|
-
href="FieldPredicateMap.html#
|
828
|
+
configuration in the store. Assumes that the provided data is valid <a
|
829
|
+
href="RDF.html">RDF</a>/XML. Use <a
|
830
|
+
href="FieldPredicateMap.html#M000102">FieldPredicateMap.upload</a> as a
|
830
831
|
convenience function
|
831
832
|
</p>
|
832
833
|
<table>
|
833
|
-
<tr><td valign="top">data:</td><td>a string containing an RDF
|
834
|
+
<tr><td valign="top">data:</td><td>a string containing an <a href="RDF.html">RDF</a>/XML document
|
834
835
|
|
835
836
|
</td></tr>
|
836
837
|
</table>
|
837
838
|
<p><a class="source-toggle" href="#"
|
838
|
-
onclick="toggleCode('
|
839
|
-
<div class="method-source-code" id="
|
839
|
+
onclick="toggleCode('M000172-source');return false;">[Source]</a></p>
|
840
|
+
<div class="method-source-code" id="M000172-source">
|
840
841
|
<pre>
|
841
|
-
<span class="ruby-comment cmt"># File lib/pho/store.rb, line
|
842
|
+
<span class="ruby-comment cmt"># File lib/pho/store.rb, line 453</span>
|
842
843
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">put_field_predicate_map</span>(<span class="ruby-identifier">data</span>)
|
843
844
|
<span class="ruby-identifier">u</span> = <span class="ruby-identifier">build_uri</span>(<span class="ruby-value str">"/config/fpmaps/1"</span>)
|
844
845
|
<span class="ruby-identifier">headers</span> = {<span class="ruby-value str">"Content-Type"</span> =<span class="ruby-operator">></span> <span class="ruby-value str">"application/rdf+xml"</span>}
|
@@ -849,11 +850,11 @@ convenience function
|
|
849
850
|
</div>
|
850
851
|
</div>
|
851
852
|
|
852
|
-
<div id="method-
|
853
|
-
<a name="
|
853
|
+
<div id="method-M000174" class="method-detail">
|
854
|
+
<a name="M000174"></a>
|
854
855
|
|
855
856
|
<div class="method-heading">
|
856
|
-
<a href="#
|
857
|
+
<a href="#M000174" class="method-signature">
|
857
858
|
<span class="method-name">put_query_profile</span><span class="method-args">(data)</span>
|
858
859
|
</a>
|
859
860
|
</div>
|
@@ -861,20 +862,21 @@ convenience function
|
|
861
862
|
<div class="method-description">
|
862
863
|
<p>
|
863
864
|
<a href="Update.html">Update</a>/replace the current Query Profile
|
864
|
-
configuration in the store. Assumes that the provided data is valid
|
865
|
-
|
866
|
-
a convenience
|
865
|
+
configuration in the store. Assumes that the provided data is valid <a
|
866
|
+
href="RDF.html">RDF</a>/XML. Use <a
|
867
|
+
href="QueryProfile.html#M000127">QueryProfile.upload</a> as a convenience
|
868
|
+
function
|
867
869
|
</p>
|
868
870
|
<table>
|
869
|
-
<tr><td valign="top">data:</td><td>a string containing an RDF
|
871
|
+
<tr><td valign="top">data:</td><td>a string containing an <a href="RDF.html">RDF</a>/XML document
|
870
872
|
|
871
873
|
</td></tr>
|
872
874
|
</table>
|
873
875
|
<p><a class="source-toggle" href="#"
|
874
|
-
onclick="toggleCode('
|
875
|
-
<div class="method-source-code" id="
|
876
|
+
onclick="toggleCode('M000174-source');return false;">[Source]</a></p>
|
877
|
+
<div class="method-source-code" id="M000174-source">
|
876
878
|
<pre>
|
877
|
-
<span class="ruby-comment cmt"># File lib/pho/store.rb, line
|
879
|
+
<span class="ruby-comment cmt"># File lib/pho/store.rb, line 474</span>
|
878
880
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">put_query_profile</span>(<span class="ruby-identifier">data</span>)
|
879
881
|
<span class="ruby-identifier">u</span> = <span class="ruby-identifier">build_uri</span>(<span class="ruby-value str">"/config/queryprofiles/1"</span>)
|
880
882
|
<span class="ruby-identifier">headers</span> = {<span class="ruby-value str">"Content-Type"</span> =<span class="ruby-operator">></span> <span class="ruby-value str">"application/rdf+xml"</span>}
|
@@ -885,21 +887,21 @@ a convenience function
|
|
885
887
|
</div>
|
886
888
|
</div>
|
887
889
|
|
888
|
-
<div id="method-
|
889
|
-
<a name="
|
890
|
+
<div id="method-M000162" class="method-detail">
|
891
|
+
<a name="M000162"></a>
|
890
892
|
|
891
893
|
<div class="method-heading">
|
892
|
-
<a href="#
|
894
|
+
<a href="#M000162" class="method-signature">
|
893
895
|
<span class="method-name">record_etags</span><span class="method-args">(u, etags, response)</span>
|
894
896
|
</a>
|
895
897
|
</div>
|
896
898
|
|
897
899
|
<div class="method-description">
|
898
900
|
<p><a class="source-toggle" href="#"
|
899
|
-
onclick="toggleCode('
|
900
|
-
<div class="method-source-code" id="
|
901
|
+
onclick="toggleCode('M000162-source');return false;">[Source]</a></p>
|
902
|
+
<div class="method-source-code" id="M000162-source">
|
901
903
|
<pre>
|
902
|
-
<span class="ruby-comment cmt"># File lib/pho/store.rb, line
|
904
|
+
<span class="ruby-comment cmt"># File lib/pho/store.rb, line 317</span>
|
903
905
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">record_etags</span>(<span class="ruby-identifier">u</span>, <span class="ruby-identifier">etags</span>, <span class="ruby-identifier">response</span>)
|
904
906
|
<span class="ruby-keyword kw">if</span> (<span class="ruby-identifier">etags</span> <span class="ruby-operator">!=</span> <span class="ruby-keyword kw">nil</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">response</span>.<span class="ruby-identifier">status</span> = <span class="ruby-value">200</span>)
|
905
907
|
<span class="ruby-identifier">etags</span>.<span class="ruby-identifier">add_from_response</span>(<span class="ruby-identifier">u</span>, <span class="ruby-identifier">response</span>)
|
@@ -910,11 +912,11 @@ a convenience function
|
|
910
912
|
</div>
|
911
913
|
</div>
|
912
914
|
|
913
|
-
<div id="method-
|
914
|
-
<a name="
|
915
|
+
<div id="method-M000156" class="method-detail">
|
916
|
+
<a name="M000156"></a>
|
915
917
|
|
916
918
|
<div class="method-heading">
|
917
|
-
<a href="#
|
919
|
+
<a href="#M000156" class="method-signature">
|
918
920
|
<span class="method-name">search</span><span class="method-args">(query, params=nil)</span>
|
919
921
|
</a>
|
920
922
|
</div>
|
@@ -961,10 +963,10 @@ transformation is being applied, in which case they will be provided as
|
|
961
963
|
parameters to the stylesheet.
|
962
964
|
</p>
|
963
965
|
<p><a class="source-toggle" href="#"
|
964
|
-
onclick="toggleCode('
|
965
|
-
<div class="method-source-code" id="
|
966
|
+
onclick="toggleCode('M000156-source');return false;">[Source]</a></p>
|
967
|
+
<div class="method-source-code" id="M000156-source">
|
966
968
|
<pre>
|
967
|
-
<span class="ruby-comment cmt"># File lib/pho/store.rb, line
|
969
|
+
<span class="ruby-comment cmt"># File lib/pho/store.rb, line 248</span>
|
968
970
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">search</span>(<span class="ruby-identifier">query</span>, <span class="ruby-identifier">params</span>=<span class="ruby-keyword kw">nil</span>)
|
969
971
|
<span class="ruby-identifier">u</span> = <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">build_uri</span>(<span class="ruby-value str">"/items"</span>)
|
970
972
|
<span class="ruby-identifier">search_params</span> = <span class="ruby-identifier">get_search_params</span>(<span class="ruby-identifier">u</span>, <span class="ruby-identifier">query</span>, <span class="ruby-identifier">params</span>)
|
@@ -977,11 +979,11 @@ parameters to the stylesheet.
|
|
977
979
|
</div>
|
978
980
|
</div>
|
979
981
|
|
980
|
-
<div id="method-
|
981
|
-
<a name="
|
982
|
+
<div id="method-M000143" class="method-detail">
|
983
|
+
<a name="M000143"></a>
|
982
984
|
|
983
985
|
<div class="method-heading">
|
984
|
-
<a href="#
|
986
|
+
<a href="#M000143" class="method-signature">
|
985
987
|
<span class="method-name">set_credentials</span><span class="method-args">(username, password)</span>
|
986
988
|
</a>
|
987
989
|
</div>
|
@@ -999,10 +1001,10 @@ Set credentials that this store will use when carrying out authorization
|
|
999
1001
|
</td></tr>
|
1000
1002
|
</table>
|
1001
1003
|
<p><a class="source-toggle" href="#"
|
1002
|
-
onclick="toggleCode('
|
1003
|
-
<div class="method-source-code" id="
|
1004
|
+
onclick="toggleCode('M000143-source');return false;">[Source]</a></p>
|
1005
|
+
<div class="method-source-code" id="M000143-source">
|
1004
1006
|
<pre>
|
1005
|
-
<span class="ruby-comment cmt"># File lib/pho/store.rb, line
|
1007
|
+
<span class="ruby-comment cmt"># File lib/pho/store.rb, line 55</span>
|
1006
1008
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">set_credentials</span>(<span class="ruby-identifier">username</span>, <span class="ruby-identifier">password</span>)
|
1007
1009
|
<span class="ruby-ivar">@client</span>.<span class="ruby-identifier">set_auth</span>(<span class="ruby-ivar">@storeuri</span>, <span class="ruby-identifier">username</span>, <span class="ruby-identifier">password</span>)
|
1008
1010
|
<span class="ruby-keyword kw">end</span>
|
@@ -1011,11 +1013,11 @@ Set credentials that this store will use when carrying out authorization
|
|
1011
1013
|
</div>
|
1012
1014
|
</div>
|
1013
1015
|
|
1014
|
-
<div id="method-
|
1015
|
-
<a name="
|
1016
|
+
<div id="method-M000155" class="method-detail">
|
1017
|
+
<a name="M000155"></a>
|
1016
1018
|
|
1017
1019
|
<div class="method-heading">
|
1018
|
-
<a href="#
|
1020
|
+
<a href="#M000155" class="method-signature">
|
1019
1021
|
<span class="method-name">sparql</span><span class="method-args">(query, format=nil, multisparql=false)</span>
|
1020
1022
|
</a>
|
1021
1023
|
</div>
|
@@ -1030,10 +1032,10 @@ Perform a SPARQL query
|
|
1030
1032
|
multisparql:: use default sparql service or multisparql service
|
1031
1033
|
</pre>
|
1032
1034
|
<p><a class="source-toggle" href="#"
|
1033
|
-
onclick="toggleCode('
|
1034
|
-
<div class="method-source-code" id="
|
1035
|
+
onclick="toggleCode('M000155-source');return false;">[Source]</a></p>
|
1036
|
+
<div class="method-source-code" id="M000155-source">
|
1035
1037
|
<pre>
|
1036
|
-
<span class="ruby-comment cmt"># File lib/pho/store.rb, line
|
1038
|
+
<span class="ruby-comment cmt"># File lib/pho/store.rb, line 229</span>
|
1037
1039
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">sparql</span>(<span class="ruby-identifier">query</span>, <span class="ruby-identifier">format</span>=<span class="ruby-keyword kw">nil</span>, <span class="ruby-identifier">multisparql</span>=<span class="ruby-keyword kw">false</span>)
|
1038
1040
|
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">sparql_client</span>(<span class="ruby-identifier">multisparql</span>).<span class="ruby-identifier">query</span>(<span class="ruby-identifier">query</span>, <span class="ruby-identifier">format</span>)
|
1039
1041
|
<span class="ruby-keyword kw">end</span>
|
@@ -1042,11 +1044,11 @@ Perform a SPARQL query
|
|
1042
1044
|
</div>
|
1043
1045
|
</div>
|
1044
1046
|
|
1045
|
-
<div id="method-
|
1046
|
-
<a name="
|
1047
|
+
<div id="method-M000153" class="method-detail">
|
1048
|
+
<a name="M000153"></a>
|
1047
1049
|
|
1048
1050
|
<div class="method-heading">
|
1049
|
-
<a href="#
|
1051
|
+
<a href="#M000153" class="method-signature">
|
1050
1052
|
<span class="method-name">sparql_ask</span><span class="method-args">(query, format="application/sparql-results+xml", multisparql=false)</span>
|
1051
1053
|
</a>
|
1052
1054
|
</div>
|
@@ -1060,10 +1062,10 @@ Perform a SPARQL ASK query.
|
|
1060
1062
|
format:: the preferred response format
|
1061
1063
|
</pre>
|
1062
1064
|
<p><a class="source-toggle" href="#"
|
1063
|
-
onclick="toggleCode('
|
1064
|
-
<div class="method-source-code" id="
|
1065
|
+
onclick="toggleCode('M000153-source');return false;">[Source]</a></p>
|
1066
|
+
<div class="method-source-code" id="M000153-source">
|
1065
1067
|
<pre>
|
1066
|
-
<span class="ruby-comment cmt"># File lib/pho/store.rb, line
|
1068
|
+
<span class="ruby-comment cmt"># File lib/pho/store.rb, line 212</span>
|
1067
1069
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">sparql_ask</span>(<span class="ruby-identifier">query</span>, <span class="ruby-identifier">format</span>=<span class="ruby-value str">"application/sparql-results+xml"</span>, <span class="ruby-identifier">multisparql</span>=<span class="ruby-keyword kw">false</span>)
|
1068
1070
|
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">sparql</span>(<span class="ruby-identifier">query</span>, <span class="ruby-identifier">format</span>, <span class="ruby-identifier">multisparql</span>)
|
1069
1071
|
<span class="ruby-keyword kw">end</span>
|
@@ -1072,11 +1074,11 @@ Perform a SPARQL ASK query.
|
|
1072
1074
|
</div>
|
1073
1075
|
</div>
|
1074
1076
|
|
1075
|
-
<div id="method-
|
1076
|
-
<a name="
|
1077
|
+
<div id="method-M000150" class="method-detail">
|
1078
|
+
<a name="M000150"></a>
|
1077
1079
|
|
1078
1080
|
<div class="method-heading">
|
1079
|
-
<a href="#
|
1081
|
+
<a href="#M000150" class="method-signature">
|
1080
1082
|
<span class="method-name">sparql_client</span><span class="method-args">(multisparql=false)</span>
|
1081
1083
|
</a>
|
1082
1084
|
</div>
|
@@ -1090,10 +1092,10 @@ store
|
|
1090
1092
|
multisparql:: optional, set to true to retrieve client for multisparql endpoint
|
1091
1093
|
</pre>
|
1092
1094
|
<p><a class="source-toggle" href="#"
|
1093
|
-
onclick="toggleCode('
|
1094
|
-
<div class="method-source-code" id="
|
1095
|
+
onclick="toggleCode('M000150-source');return false;">[Source]</a></p>
|
1096
|
+
<div class="method-source-code" id="M000150-source">
|
1095
1097
|
<pre>
|
1096
|
-
<span class="ruby-comment cmt"># File lib/pho/store.rb, line
|
1098
|
+
<span class="ruby-comment cmt"># File lib/pho/store.rb, line 178</span>
|
1097
1099
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">sparql_client</span>(<span class="ruby-identifier">multisparql</span>=<span class="ruby-keyword kw">false</span>)
|
1098
1100
|
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">multisparql</span>
|
1099
1101
|
<span class="ruby-identifier">u</span> = <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">build_uri</span>(<span class="ruby-value str">"/services/multisparql"</span>)
|
@@ -1101,7 +1103,7 @@ store
|
|
1101
1103
|
<span class="ruby-identifier">u</span> = <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">build_uri</span>(<span class="ruby-value str">"/services/sparql"</span>)
|
1102
1104
|
<span class="ruby-keyword kw">end</span>
|
1103
1105
|
|
1104
|
-
<span class="ruby-identifier">sparql_client</span> = <span class="ruby-constant">
|
1106
|
+
<span class="ruby-identifier">sparql_client</span> = <span class="ruby-constant">StoreSparqlClient</span>.<span class="ruby-identifier">new</span>(<span class="ruby-ivar">@self</span>, <span class="ruby-identifier">u</span>, <span class="ruby-ivar">@client</span>)
|
1105
1107
|
<span class="ruby-identifier">sparql_client</span>.<span class="ruby-identifier">supports_rdf_json</span> = <span class="ruby-keyword kw">true</span>
|
1106
1108
|
<span class="ruby-identifier">sparql_client</span>.<span class="ruby-identifier">supports_sparql_json</span> = <span class="ruby-keyword kw">true</span>
|
1107
1109
|
|
@@ -1112,11 +1114,11 @@ store
|
|
1112
1114
|
</div>
|
1113
1115
|
</div>
|
1114
1116
|
|
1115
|
-
<div id="method-
|
1116
|
-
<a name="
|
1117
|
+
<div id="method-M000152" class="method-detail">
|
1118
|
+
<a name="M000152"></a>
|
1117
1119
|
|
1118
1120
|
<div class="method-heading">
|
1119
|
-
<a href="#
|
1121
|
+
<a href="#M000152" class="method-signature">
|
1120
1122
|
<span class="method-name">sparql_construct</span><span class="method-args">(query, format="application/rdf+xml", multisparql=false)</span>
|
1121
1123
|
</a>
|
1122
1124
|
</div>
|
@@ -1130,10 +1132,10 @@ Perform a SPARQL CONSTRUCT query.
|
|
1130
1132
|
format:: the preferred response format
|
1131
1133
|
</pre>
|
1132
1134
|
<p><a class="source-toggle" href="#"
|
1133
|
-
onclick="toggleCode('
|
1134
|
-
<div class="method-source-code" id="
|
1135
|
+
onclick="toggleCode('M000152-source');return false;">[Source]</a></p>
|
1136
|
+
<div class="method-source-code" id="M000152-source">
|
1135
1137
|
<pre>
|
1136
|
-
<span class="ruby-comment cmt"># File lib/pho/store.rb, line
|
1138
|
+
<span class="ruby-comment cmt"># File lib/pho/store.rb, line 204</span>
|
1137
1139
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">sparql_construct</span>(<span class="ruby-identifier">query</span>, <span class="ruby-identifier">format</span>=<span class="ruby-value str">"application/rdf+xml"</span>, <span class="ruby-identifier">multisparql</span>=<span class="ruby-keyword kw">false</span>)
|
1138
1140
|
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">sparql</span>(<span class="ruby-identifier">query</span>, <span class="ruby-identifier">format</span>, <span class="ruby-identifier">multisparql</span>)
|
1139
1141
|
<span class="ruby-keyword kw">end</span>
|
@@ -1142,11 +1144,11 @@ Perform a SPARQL CONSTRUCT query.
|
|
1142
1144
|
</div>
|
1143
1145
|
</div>
|
1144
1146
|
|
1145
|
-
<div id="method-
|
1146
|
-
<a name="
|
1147
|
+
<div id="method-M000151" class="method-detail">
|
1148
|
+
<a name="M000151"></a>
|
1147
1149
|
|
1148
1150
|
<div class="method-heading">
|
1149
|
-
<a href="#
|
1151
|
+
<a href="#M000151" class="method-signature">
|
1150
1152
|
<span class="method-name">sparql_describe</span><span class="method-args">(query, format="application/rdf+xml", multisparql=false)</span>
|
1151
1153
|
</a>
|
1152
1154
|
</div>
|
@@ -1160,10 +1162,10 @@ Perform a SPARQL DESCRIBE query.
|
|
1160
1162
|
format:: the preferred response format
|
1161
1163
|
</pre>
|
1162
1164
|
<p><a class="source-toggle" href="#"
|
1163
|
-
onclick="toggleCode('
|
1164
|
-
<div class="method-source-code" id="
|
1165
|
+
onclick="toggleCode('M000151-source');return false;">[Source]</a></p>
|
1166
|
+
<div class="method-source-code" id="M000151-source">
|
1165
1167
|
<pre>
|
1166
|
-
<span class="ruby-comment cmt"># File lib/pho/store.rb, line
|
1168
|
+
<span class="ruby-comment cmt"># File lib/pho/store.rb, line 196</span>
|
1167
1169
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">sparql_describe</span>(<span class="ruby-identifier">query</span>, <span class="ruby-identifier">format</span>=<span class="ruby-value str">"application/rdf+xml"</span>, <span class="ruby-identifier">multisparql</span>=<span class="ruby-keyword kw">false</span>)
|
1168
1170
|
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">sparql</span>(<span class="ruby-identifier">query</span>, <span class="ruby-identifier">format</span>, <span class="ruby-identifier">multisparql</span>)
|
1169
1171
|
<span class="ruby-keyword kw">end</span>
|
@@ -1172,11 +1174,11 @@ Perform a SPARQL DESCRIBE query.
|
|
1172
1174
|
</div>
|
1173
1175
|
</div>
|
1174
1176
|
|
1175
|
-
<div id="method-
|
1176
|
-
<a name="
|
1177
|
+
<div id="method-M000154" class="method-detail">
|
1178
|
+
<a name="M000154"></a>
|
1177
1179
|
|
1178
1180
|
<div class="method-heading">
|
1179
|
-
<a href="#
|
1181
|
+
<a href="#M000154" class="method-signature">
|
1180
1182
|
<span class="method-name">sparql_select</span><span class="method-args">(query, format="application/sparql-results+xml", multisparql=false)</span>
|
1181
1183
|
</a>
|
1182
1184
|
</div>
|
@@ -1190,10 +1192,10 @@ Perform a SPARQL SELECT query.
|
|
1190
1192
|
format:: the preferred response format
|
1191
1193
|
</pre>
|
1192
1194
|
<p><a class="source-toggle" href="#"
|
1193
|
-
onclick="toggleCode('
|
1194
|
-
<div class="method-source-code" id="
|
1195
|
+
onclick="toggleCode('M000154-source');return false;">[Source]</a></p>
|
1196
|
+
<div class="method-source-code" id="M000154-source">
|
1195
1197
|
<pre>
|
1196
|
-
<span class="ruby-comment cmt"># File lib/pho/store.rb, line
|
1198
|
+
<span class="ruby-comment cmt"># File lib/pho/store.rb, line 220</span>
|
1197
1199
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">sparql_select</span>(<span class="ruby-identifier">query</span>, <span class="ruby-identifier">format</span>=<span class="ruby-value str">"application/sparql-results+xml"</span>, <span class="ruby-identifier">multisparql</span>=<span class="ruby-keyword kw">false</span>)
|
1198
1200
|
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">sparql</span>(<span class="ruby-identifier">query</span>, <span class="ruby-identifier">format</span>, <span class="ruby-identifier">multisparql</span>)
|
1199
1201
|
<span class="ruby-keyword kw">end</span>
|
@@ -1202,11 +1204,11 @@ Perform a SPARQL SELECT query.
|
|
1202
1204
|
</div>
|
1203
1205
|
</div>
|
1204
1206
|
|
1205
|
-
<div id="method-
|
1206
|
-
<a name="
|
1207
|
+
<div id="method-M000145" class="method-detail">
|
1208
|
+
<a name="M000145"></a>
|
1207
1209
|
|
1208
1210
|
<div class="method-heading">
|
1209
|
-
<a href="#
|
1211
|
+
<a href="#M000145" class="method-signature">
|
1210
1212
|
<span class="method-name">store_data</span><span class="method-args">(data, graph_name=nil)</span>
|
1211
1213
|
</a>
|
1212
1214
|
</div>
|
@@ -1222,10 +1224,10 @@ Perform a SPARQL SELECT query.
|
|
1222
1224
|
</td></tr>
|
1223
1225
|
</table>
|
1224
1226
|
<p><a class="source-toggle" href="#"
|
1225
|
-
onclick="toggleCode('
|
1226
|
-
<div class="method-source-code" id="
|
1227
|
+
onclick="toggleCode('M000145-source');return false;">[Source]</a></p>
|
1228
|
+
<div class="method-source-code" id="M000145-source">
|
1227
1229
|
<pre>
|
1228
|
-
<span class="ruby-comment cmt"># File lib/pho/store.rb, line
|
1230
|
+
<span class="ruby-comment cmt"># File lib/pho/store.rb, line 81</span>
|
1229
1231
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">store_data</span>(<span class="ruby-identifier">data</span>, <span class="ruby-identifier">graph_name</span>=<span class="ruby-keyword kw">nil</span>)
|
1230
1232
|
<span class="ruby-identifier">u</span> = <span class="ruby-keyword kw">nil</span>
|
1231
1233
|
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">graph_name</span> <span class="ruby-operator">==</span> <span class="ruby-keyword kw">nil</span>
|
@@ -1242,11 +1244,11 @@ Perform a SPARQL SELECT query.
|
|
1242
1244
|
</div>
|
1243
1245
|
</div>
|
1244
1246
|
|
1245
|
-
<div id="method-
|
1246
|
-
<a name="
|
1247
|
+
<div id="method-M000146" class="method-detail">
|
1248
|
+
<a name="M000146"></a>
|
1247
1249
|
|
1248
1250
|
<div class="method-heading">
|
1249
|
-
<a href="#
|
1251
|
+
<a href="#M000146" class="method-signature">
|
1250
1252
|
<span class="method-name">store_file</span><span class="method-args">(file)</span>
|
1251
1253
|
</a>
|
1252
1254
|
</div>
|
@@ -1264,10 +1266,10 @@ is submitted to the platform
|
|
1264
1266
|
</td></tr>
|
1265
1267
|
</table>
|
1266
1268
|
<p><a class="source-toggle" href="#"
|
1267
|
-
onclick="toggleCode('
|
1268
|
-
<div class="method-source-code" id="
|
1269
|
+
onclick="toggleCode('M000146-source');return false;">[Source]</a></p>
|
1270
|
+
<div class="method-source-code" id="M000146-source">
|
1269
1271
|
<pre>
|
1270
|
-
<span class="ruby-comment cmt"># File lib/pho/store.rb, line
|
1272
|
+
<span class="ruby-comment cmt"># File lib/pho/store.rb, line 96</span>
|
1271
1273
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">store_file</span>(<span class="ruby-identifier">file</span>)
|
1272
1274
|
<span class="ruby-identifier">data</span> = <span class="ruby-identifier">file</span>.<span class="ruby-identifier">read</span>()
|
1273
1275
|
<span class="ruby-identifier">file</span>.<span class="ruby-identifier">close</span>()
|
@@ -1278,24 +1280,24 @@ is submitted to the platform
|
|
1278
1280
|
</div>
|
1279
1281
|
</div>
|
1280
1282
|
|
1281
|
-
<div id="method-
|
1282
|
-
<a name="
|
1283
|
+
<div id="method-M000147" class="method-detail">
|
1284
|
+
<a name="M000147"></a>
|
1283
1285
|
|
1284
1286
|
<div class="method-heading">
|
1285
|
-
<a href="#
|
1287
|
+
<a href="#M000147" class="method-signature">
|
1286
1288
|
<span class="method-name">store_url</span><span class="method-args">(u, parameters=nil, graph_name=nil)</span>
|
1287
1289
|
</a>
|
1288
1290
|
</div>
|
1289
1291
|
|
1290
1292
|
<div class="method-description">
|
1291
1293
|
<p>
|
1292
|
-
Retrieve RDF data from the specified URL and store
|
1293
|
-
href="Store.html">Store</a> Metabox
|
1294
|
+
Retrieve <a href="RDF.html">RDF</a> data from the specified URL and store
|
1295
|
+
it in the <a href="Store.html">Store</a> Metabox
|
1294
1296
|
</p>
|
1295
1297
|
<p>
|
1296
1298
|
An Accept header of "application/rdf+xml" will be sent in the
|
1297
|
-
request to support retrieval of RDF from URLs that
|
1298
|
-
Negotiation.
|
1299
|
+
request to support retrieval of <a href="RDF.html">RDF</a> from URLs that
|
1300
|
+
support Content Negotiation.
|
1299
1301
|
</p>
|
1300
1302
|
<p>
|
1301
1303
|
NOTE: Currently this method doesn‘t properly handle base uris of
|
@@ -1320,10 +1322,10 @@ URL
|
|
1320
1322
|
</td></tr>
|
1321
1323
|
</table>
|
1322
1324
|
<p><a class="source-toggle" href="#"
|
1323
|
-
onclick="toggleCode('
|
1324
|
-
<div class="method-source-code" id="
|
1325
|
+
onclick="toggleCode('M000147-source');return false;">[Source]</a></p>
|
1326
|
+
<div class="method-source-code" id="M000147-source">
|
1325
1327
|
<pre>
|
1326
|
-
<span class="ruby-comment cmt"># File lib/pho/store.rb, line
|
1328
|
+
<span class="ruby-comment cmt"># File lib/pho/store.rb, line 114</span>
|
1327
1329
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">store_url</span>(<span class="ruby-identifier">u</span>, <span class="ruby-identifier">parameters</span>=<span class="ruby-keyword kw">nil</span>, <span class="ruby-identifier">graph_name</span>=<span class="ruby-keyword kw">nil</span>)
|
1328
1330
|
|
1329
1331
|
<span class="ruby-identifier">headers</span> = <span class="ruby-constant">ACCEPT_RDF</span>.<span class="ruby-identifier">clone</span>()
|
@@ -1342,11 +1344,11 @@ URL
|
|
1342
1344
|
</div>
|
1343
1345
|
</div>
|
1344
1346
|
|
1345
|
-
<div id="method-
|
1346
|
-
<a name="
|
1347
|
+
<div id="method-M000149" class="method-detail">
|
1348
|
+
<a name="M000149"></a>
|
1347
1349
|
|
1348
1350
|
<div class="method-heading">
|
1349
|
-
<a href="#
|
1351
|
+
<a href="#M000149" class="method-signature">
|
1350
1352
|
<span class="method-name">submit_changeset</span><span class="method-args">(rdf, versioned=false, graph_name=nil)</span>
|
1351
1353
|
</a>
|
1352
1354
|
</div>
|
@@ -1361,7 +1363,7 @@ using the optional parameters, changes can be made versioned, and can also
|
|
1361
1363
|
be submitted to private graphs.
|
1362
1364
|
</p>
|
1363
1365
|
<table>
|
1364
|
-
<tr><td valign="top">rdf:</td><td>the RDF
|
1366
|
+
<tr><td valign="top">rdf:</td><td>the <a href="RDF.html">RDF</a>/XML describing the changes
|
1365
1367
|
|
1366
1368
|
</td></tr>
|
1367
1369
|
<tr><td valign="top">versioned:</td><td>true or false to indicate this is a versioned change
|
@@ -1372,10 +1374,10 @@ be submitted to private graphs.
|
|
1372
1374
|
</td></tr>
|
1373
1375
|
</table>
|
1374
1376
|
<p><a class="source-toggle" href="#"
|
1375
|
-
onclick="toggleCode('
|
1376
|
-
<div class="method-source-code" id="
|
1377
|
+
onclick="toggleCode('M000149-source');return false;">[Source]</a></p>
|
1378
|
+
<div class="method-source-code" id="M000149-source">
|
1377
1379
|
<pre>
|
1378
|
-
<span class="ruby-comment cmt"># File lib/pho/store.rb, line
|
1380
|
+
<span class="ruby-comment cmt"># File lib/pho/store.rb, line 158</span>
|
1379
1381
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">submit_changeset</span>(<span class="ruby-identifier">rdf</span>, <span class="ruby-identifier">versioned</span>=<span class="ruby-keyword kw">false</span>, <span class="ruby-identifier">graph_name</span>=<span class="ruby-keyword kw">nil</span>)
|
1380
1382
|
<span class="ruby-identifier">uri</span> = <span class="ruby-value str">"/meta"</span>
|
1381
1383
|
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">graph_name</span> <span class="ruby-operator">!=</span> <span class="ruby-keyword kw">nil</span>
|
@@ -1393,11 +1395,11 @@ be submitted to private graphs.
|
|
1393
1395
|
</div>
|
1394
1396
|
</div>
|
1395
1397
|
|
1396
|
-
<div id="method-
|
1397
|
-
<a name="
|
1398
|
+
<div id="method-M000168" class="method-detail">
|
1399
|
+
<a name="M000168"></a>
|
1398
1400
|
|
1399
1401
|
<div class="method-heading">
|
1400
|
-
<a href="#
|
1402
|
+
<a href="#M000168" class="method-signature">
|
1401
1403
|
<span class="method-name">submit_job</span><span class="method-args">(data)</span>
|
1402
1404
|
</a>
|
1403
1405
|
</div>
|
@@ -1407,16 +1409,16 @@ be submitted to private graphs.
|
|
1407
1409
|
Submit a job to the platform.
|
1408
1410
|
</p>
|
1409
1411
|
<table>
|
1410
|
-
<tr><td valign="top">data:</td><td>RDF
|
1411
|
-
href="Jobs.html">Jobs</a> class
|
1412
|
+
<tr><td valign="top">data:</td><td><a href="RDF.html">RDF</a>/XML representing the job request. See methods on
|
1413
|
+
<a href="Jobs.html">Jobs</a> class
|
1412
1414
|
|
1413
1415
|
</td></tr>
|
1414
1416
|
</table>
|
1415
1417
|
<p><a class="source-toggle" href="#"
|
1416
|
-
onclick="toggleCode('
|
1417
|
-
<div class="method-source-code" id="
|
1418
|
+
onclick="toggleCode('M000168-source');return false;">[Source]</a></p>
|
1419
|
+
<div class="method-source-code" id="M000168-source">
|
1418
1420
|
<pre>
|
1419
|
-
<span class="ruby-comment cmt"># File lib/pho/store.rb, line
|
1421
|
+
<span class="ruby-comment cmt"># File lib/pho/store.rb, line 408</span>
|
1420
1422
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">submit_job</span>(<span class="ruby-identifier">data</span>)
|
1421
1423
|
<span class="ruby-identifier">u</span> = <span class="ruby-identifier">build_uri</span>(<span class="ruby-value str">"/jobs"</span>)
|
1422
1424
|
<span class="ruby-identifier">response</span> = <span class="ruby-ivar">@client</span>.<span class="ruby-identifier">post</span>(<span class="ruby-identifier">u</span>, <span class="ruby-identifier">data</span>, <span class="ruby-constant">RDF_XML</span> )
|
@@ -1427,11 +1429,11 @@ href="Jobs.html">Jobs</a> class
|
|
1427
1429
|
</div>
|
1428
1430
|
</div>
|
1429
1431
|
|
1430
|
-
<div id="method-
|
1431
|
-
<a name="
|
1432
|
+
<div id="method-M000163" class="method-detail">
|
1433
|
+
<a name="M000163"></a>
|
1432
1434
|
|
1433
1435
|
<div class="method-heading">
|
1434
|
-
<a href="#
|
1436
|
+
<a href="#M000163" class="method-signature">
|
1435
1437
|
<span class="method-name">upload_item</span><span class="method-args">(f, mimetype, uri=nil)</span>
|
1436
1438
|
</a>
|
1437
1439
|
</div>
|
@@ -1459,10 +1461,10 @@ stored item. If a URI is specified then a successful request will result in
|
|
1459
1461
|
a 200 OK response.
|
1460
1462
|
</p>
|
1461
1463
|
<p><a class="source-toggle" href="#"
|
1462
|
-
onclick="toggleCode('
|
1463
|
-
<div class="method-source-code" id="
|
1464
|
+
onclick="toggleCode('M000163-source');return false;">[Source]</a></p>
|
1465
|
+
<div class="method-source-code" id="M000163-source">
|
1464
1466
|
<pre>
|
1465
|
-
<span class="ruby-comment cmt"># File lib/pho/store.rb, line
|
1467
|
+
<span class="ruby-comment cmt"># File lib/pho/store.rb, line 336</span>
|
1466
1468
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">upload_item</span>(<span class="ruby-identifier">f</span>, <span class="ruby-identifier">mimetype</span>, <span class="ruby-identifier">uri</span>=<span class="ruby-keyword kw">nil</span>)
|
1467
1469
|
<span class="ruby-identifier">data</span> = <span class="ruby-identifier">f</span>.<span class="ruby-identifier">read</span>()
|
1468
1470
|
<span class="ruby-identifier">f</span>.<span class="ruby-identifier">close</span>()
|
@@ -1473,7 +1475,12 @@ a 200 OK response.
|
|
1473
1475
|
<span class="ruby-identifier">response</span> = <span class="ruby-ivar">@client</span>.<span class="ruby-identifier">post</span>(<span class="ruby-identifier">u</span>, <span class="ruby-identifier">data</span>, <span class="ruby-identifier">headers</span>)
|
1474
1476
|
<span class="ruby-keyword kw">else</span>
|
1475
1477
|
<span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">uri</span>.<span class="ruby-identifier">start_with?</span>(<span class="ruby-ivar">@storeuri</span>)
|
1476
|
-
<span class="ruby-
|
1478
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">uri</span>.<span class="ruby-identifier">start_with?</span>(<span class="ruby-value str">"/"</span>)
|
1479
|
+
<span class="ruby-identifier">uri</span> = <span class="ruby-identifier">build_uri</span>(<span class="ruby-node">"/items#{uri}"</span>)
|
1480
|
+
<span class="ruby-keyword kw">else</span>
|
1481
|
+
<span class="ruby-identifier">uri</span> = <span class="ruby-identifier">build_uri</span>(<span class="ruby-node">"/items/#{uri}"</span>)
|
1482
|
+
<span class="ruby-keyword kw">end</span>
|
1483
|
+
|
1477
1484
|
<span class="ruby-keyword kw">end</span>
|
1478
1485
|
<span class="ruby-identifier">response</span> = <span class="ruby-ivar">@client</span>.<span class="ruby-identifier">put</span>(<span class="ruby-identifier">uri</span>, <span class="ruby-identifier">data</span>, <span class="ruby-identifier">headers</span>)
|
1479
1486
|
<span class="ruby-keyword kw">end</span>
|