pho 0.4.1 → 0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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
|
@@ -92,12 +92,12 @@ Simple mechanism for managing etags
|
|
|
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="#
|
|
99
|
-
<a href="#
|
|
100
|
-
<a href="#
|
|
95
|
+
<a href="#M000174">add</a>
|
|
96
|
+
<a href="#M000175">add_from_response</a>
|
|
97
|
+
<a href="#M000176">get</a>
|
|
98
|
+
<a href="#M000177">has_tag?</a>
|
|
99
|
+
<a href="#M000172">new</a>
|
|
100
|
+
<a href="#M000173">save</a>
|
|
101
101
|
</div>
|
|
102
102
|
</div>
|
|
103
103
|
|
|
@@ -137,21 +137,21 @@ Simple mechanism for managing etags
|
|
|
137
137
|
<div id="methods">
|
|
138
138
|
<h3 class="section-bar">Public Class methods</h3>
|
|
139
139
|
|
|
140
|
-
<div id="method-
|
|
141
|
-
<a name="
|
|
140
|
+
<div id="method-M000172" class="method-detail">
|
|
141
|
+
<a name="M000172"></a>
|
|
142
142
|
|
|
143
143
|
<div class="method-heading">
|
|
144
|
-
<a href="#
|
|
144
|
+
<a href="#M000172" class="method-signature">
|
|
145
145
|
<span class="method-name">new</span><span class="method-args">(file = nil)</span>
|
|
146
146
|
</a>
|
|
147
147
|
</div>
|
|
148
148
|
|
|
149
149
|
<div class="method-description">
|
|
150
150
|
<p><a class="source-toggle" href="#"
|
|
151
|
-
onclick="toggleCode('
|
|
152
|
-
<div class="method-source-code" id="
|
|
151
|
+
onclick="toggleCode('M000172-source');return false;">[Source]</a></p>
|
|
152
|
+
<div class="method-source-code" id="M000172-source">
|
|
153
153
|
<pre>
|
|
154
|
-
<span class="ruby-comment cmt"># File lib/pho/etags.rb, line
|
|
154
|
+
<span class="ruby-comment cmt"># File lib/pho/etags.rb, line 11</span>
|
|
155
155
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">file</span> = <span class="ruby-keyword kw">nil</span>)
|
|
156
156
|
<span class="ruby-ivar">@file</span> = <span class="ruby-identifier">file</span>
|
|
157
157
|
<span class="ruby-ivar">@saved</span> = <span class="ruby-keyword kw">true</span>
|
|
@@ -167,21 +167,21 @@ Simple mechanism for managing etags
|
|
|
167
167
|
|
|
168
168
|
<h3 class="section-bar">Public Instance methods</h3>
|
|
169
169
|
|
|
170
|
-
<div id="method-
|
|
171
|
-
<a name="
|
|
170
|
+
<div id="method-M000174" class="method-detail">
|
|
171
|
+
<a name="M000174"></a>
|
|
172
172
|
|
|
173
173
|
<div class="method-heading">
|
|
174
|
-
<a href="#
|
|
174
|
+
<a href="#M000174" class="method-signature">
|
|
175
175
|
<span class="method-name">add</span><span class="method-args">(uri, tag)</span>
|
|
176
176
|
</a>
|
|
177
177
|
</div>
|
|
178
178
|
|
|
179
179
|
<div class="method-description">
|
|
180
180
|
<p><a class="source-toggle" href="#"
|
|
181
|
-
onclick="toggleCode('
|
|
182
|
-
<div class="method-source-code" id="
|
|
181
|
+
onclick="toggleCode('M000174-source');return false;">[Source]</a></p>
|
|
182
|
+
<div class="method-source-code" id="M000174-source">
|
|
183
183
|
<pre>
|
|
184
|
-
<span class="ruby-comment cmt"># File lib/pho/etags.rb, line
|
|
184
|
+
<span class="ruby-comment cmt"># File lib/pho/etags.rb, line 34</span>
|
|
185
185
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add</span>(<span class="ruby-identifier">uri</span>, <span class="ruby-identifier">tag</span>)
|
|
186
186
|
<span class="ruby-keyword kw">if</span> (<span class="ruby-identifier">uri</span> <span class="ruby-operator">!=</span> <span class="ruby-keyword kw">nil</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">tag</span> <span class="ruby-operator">!=</span> <span class="ruby-keyword kw">nil</span>)
|
|
187
187
|
<span class="ruby-ivar">@tags</span>[<span class="ruby-identifier">uri</span>] = <span class="ruby-identifier">tag</span>
|
|
@@ -193,21 +193,21 @@ Simple mechanism for managing etags
|
|
|
193
193
|
</div>
|
|
194
194
|
</div>
|
|
195
195
|
|
|
196
|
-
<div id="method-
|
|
197
|
-
<a name="
|
|
196
|
+
<div id="method-M000175" class="method-detail">
|
|
197
|
+
<a name="M000175"></a>
|
|
198
198
|
|
|
199
199
|
<div class="method-heading">
|
|
200
|
-
<a href="#
|
|
200
|
+
<a href="#M000175" class="method-signature">
|
|
201
201
|
<span class="method-name">add_from_response</span><span class="method-args">(uri, response)</span>
|
|
202
202
|
</a>
|
|
203
203
|
</div>
|
|
204
204
|
|
|
205
205
|
<div class="method-description">
|
|
206
206
|
<p><a class="source-toggle" href="#"
|
|
207
|
-
onclick="toggleCode('
|
|
208
|
-
<div class="method-source-code" id="
|
|
207
|
+
onclick="toggleCode('M000175-source');return false;">[Source]</a></p>
|
|
208
|
+
<div class="method-source-code" id="M000175-source">
|
|
209
209
|
<pre>
|
|
210
|
-
<span class="ruby-comment cmt"># File lib/pho/etags.rb, line
|
|
210
|
+
<span class="ruby-comment cmt"># File lib/pho/etags.rb, line 41</span>
|
|
211
211
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add_from_response</span>(<span class="ruby-identifier">uri</span>, <span class="ruby-identifier">response</span>)
|
|
212
212
|
<span class="ruby-identifier">add</span>(<span class="ruby-identifier">uri</span>, <span class="ruby-identifier">response</span>.<span class="ruby-identifier">header</span>[<span class="ruby-value str">"ETag"</span>][<span class="ruby-value">0</span>])
|
|
213
213
|
<span class="ruby-keyword kw">end</span>
|
|
@@ -216,21 +216,21 @@ Simple mechanism for managing etags
|
|
|
216
216
|
</div>
|
|
217
217
|
</div>
|
|
218
218
|
|
|
219
|
-
<div id="method-
|
|
220
|
-
<a name="
|
|
219
|
+
<div id="method-M000176" class="method-detail">
|
|
220
|
+
<a name="M000176"></a>
|
|
221
221
|
|
|
222
222
|
<div class="method-heading">
|
|
223
|
-
<a href="#
|
|
223
|
+
<a href="#M000176" class="method-signature">
|
|
224
224
|
<span class="method-name">get</span><span class="method-args">(uri)</span>
|
|
225
225
|
</a>
|
|
226
226
|
</div>
|
|
227
227
|
|
|
228
228
|
<div class="method-description">
|
|
229
229
|
<p><a class="source-toggle" href="#"
|
|
230
|
-
onclick="toggleCode('
|
|
231
|
-
<div class="method-source-code" id="
|
|
230
|
+
onclick="toggleCode('M000176-source');return false;">[Source]</a></p>
|
|
231
|
+
<div class="method-source-code" id="M000176-source">
|
|
232
232
|
<pre>
|
|
233
|
-
<span class="ruby-comment cmt"># File lib/pho/etags.rb, line
|
|
233
|
+
<span class="ruby-comment cmt"># File lib/pho/etags.rb, line 45</span>
|
|
234
234
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">get</span>(<span class="ruby-identifier">uri</span>)
|
|
235
235
|
<span class="ruby-keyword kw">return</span> <span class="ruby-ivar">@tags</span>[<span class="ruby-identifier">uri</span>]
|
|
236
236
|
<span class="ruby-keyword kw">end</span>
|
|
@@ -239,21 +239,21 @@ Simple mechanism for managing etags
|
|
|
239
239
|
</div>
|
|
240
240
|
</div>
|
|
241
241
|
|
|
242
|
-
<div id="method-
|
|
243
|
-
<a name="
|
|
242
|
+
<div id="method-M000177" class="method-detail">
|
|
243
|
+
<a name="M000177"></a>
|
|
244
244
|
|
|
245
245
|
<div class="method-heading">
|
|
246
|
-
<a href="#
|
|
246
|
+
<a href="#M000177" class="method-signature">
|
|
247
247
|
<span class="method-name">has_tag?</span><span class="method-args">(uri)</span>
|
|
248
248
|
</a>
|
|
249
249
|
</div>
|
|
250
250
|
|
|
251
251
|
<div class="method-description">
|
|
252
252
|
<p><a class="source-toggle" href="#"
|
|
253
|
-
onclick="toggleCode('
|
|
254
|
-
<div class="method-source-code" id="
|
|
253
|
+
onclick="toggleCode('M000177-source');return false;">[Source]</a></p>
|
|
254
|
+
<div class="method-source-code" id="M000177-source">
|
|
255
255
|
<pre>
|
|
256
|
-
<span class="ruby-comment cmt"># File lib/pho/etags.rb, line
|
|
256
|
+
<span class="ruby-comment cmt"># File lib/pho/etags.rb, line 49</span>
|
|
257
257
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">has_tag?</span>(<span class="ruby-identifier">uri</span>)
|
|
258
258
|
<span class="ruby-keyword kw">return</span> <span class="ruby-ivar">@tags</span>.<span class="ruby-identifier">has_key?</span>(<span class="ruby-identifier">uri</span>)
|
|
259
259
|
<span class="ruby-keyword kw">end</span>
|
|
@@ -262,21 +262,21 @@ Simple mechanism for managing etags
|
|
|
262
262
|
</div>
|
|
263
263
|
</div>
|
|
264
264
|
|
|
265
|
-
<div id="method-
|
|
266
|
-
<a name="
|
|
265
|
+
<div id="method-M000173" class="method-detail">
|
|
266
|
+
<a name="M000173"></a>
|
|
267
267
|
|
|
268
268
|
<div class="method-heading">
|
|
269
|
-
<a href="#
|
|
269
|
+
<a href="#M000173" class="method-signature">
|
|
270
270
|
<span class="method-name">save</span><span class="method-args">(other=nil)</span>
|
|
271
271
|
</a>
|
|
272
272
|
</div>
|
|
273
273
|
|
|
274
274
|
<div class="method-description">
|
|
275
275
|
<p><a class="source-toggle" href="#"
|
|
276
|
-
onclick="toggleCode('
|
|
277
|
-
<div class="method-source-code" id="
|
|
276
|
+
onclick="toggleCode('M000173-source');return false;">[Source]</a></p>
|
|
277
|
+
<div class="method-source-code" id="M000173-source">
|
|
278
278
|
<pre>
|
|
279
|
-
<span class="ruby-comment cmt"># File lib/pho/etags.rb, line
|
|
279
|
+
<span class="ruby-comment cmt"># File lib/pho/etags.rb, line 20</span>
|
|
280
280
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">save</span>(<span class="ruby-identifier">other</span>=<span class="ruby-keyword kw">nil</span>)
|
|
281
281
|
|
|
282
282
|
<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>)
|
|
@@ -92,9 +92,9 @@ Captures the data returned in a facetted search
|
|
|
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="#
|
|
95
|
+
<a href="#M000065">new</a>
|
|
96
|
+
<a href="#M000067">parse</a>
|
|
97
|
+
<a href="#M000066">read_from_store</a>
|
|
98
98
|
</div>
|
|
99
99
|
</div>
|
|
100
100
|
|
|
@@ -148,19 +148,19 @@ The query used to generate the facet results, as echoed in the response
|
|
|
148
148
|
<div id="methods">
|
|
149
149
|
<h3 class="section-bar">Public Class methods</h3>
|
|
150
150
|
|
|
151
|
-
<div id="method-
|
|
152
|
-
<a name="
|
|
151
|
+
<div id="method-M000065" class="method-detail">
|
|
152
|
+
<a name="M000065"></a>
|
|
153
153
|
|
|
154
154
|
<div class="method-heading">
|
|
155
|
-
<a href="#
|
|
155
|
+
<a href="#M000065" class="method-signature">
|
|
156
156
|
<span class="method-name">new</span><span class="method-args">(query, fields, facets=Hash.new)</span>
|
|
157
157
|
</a>
|
|
158
158
|
</div>
|
|
159
159
|
|
|
160
160
|
<div class="method-description">
|
|
161
161
|
<p><a class="source-toggle" href="#"
|
|
162
|
-
onclick="toggleCode('
|
|
163
|
-
<div class="method-source-code" id="
|
|
162
|
+
onclick="toggleCode('M000065-source');return false;">[Source]</a></p>
|
|
163
|
+
<div class="method-source-code" id="M000065-source">
|
|
164
164
|
<pre>
|
|
165
165
|
<span class="ruby-comment cmt"># File lib/pho/facet.rb, line 32</span>
|
|
166
166
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">query</span>, <span class="ruby-identifier">fields</span>, <span class="ruby-identifier">facets</span>=<span class="ruby-constant">Hash</span>.<span class="ruby-identifier">new</span>)
|
|
@@ -173,19 +173,19 @@ The query used to generate the facet results, as echoed in the response
|
|
|
173
173
|
</div>
|
|
174
174
|
</div>
|
|
175
175
|
|
|
176
|
-
<div id="method-
|
|
177
|
-
<a name="
|
|
176
|
+
<div id="method-M000067" class="method-detail">
|
|
177
|
+
<a name="M000067"></a>
|
|
178
178
|
|
|
179
179
|
<div class="method-heading">
|
|
180
|
-
<a href="#
|
|
180
|
+
<a href="#M000067" class="method-signature">
|
|
181
181
|
<span class="method-name">parse</span><span class="method-args">(data)</span>
|
|
182
182
|
</a>
|
|
183
183
|
</div>
|
|
184
184
|
|
|
185
185
|
<div class="method-description">
|
|
186
186
|
<p><a class="source-toggle" href="#"
|
|
187
|
-
onclick="toggleCode('
|
|
188
|
-
<div class="method-source-code" id="
|
|
187
|
+
onclick="toggleCode('M000067-source');return false;">[Source]</a></p>
|
|
188
|
+
<div class="method-source-code" id="M000067-source">
|
|
189
189
|
<pre>
|
|
190
190
|
<span class="ruby-comment cmt"># File lib/pho/facet.rb, line 58</span>
|
|
191
191
|
<span class="ruby-keyword kw">def</span> <span class="ruby-constant">Results</span>.<span class="ruby-identifier">parse</span>(<span class="ruby-identifier">data</span>)
|
|
@@ -232,11 +232,11 @@ The query used to generate the facet results, as echoed in the response
|
|
|
232
232
|
</div>
|
|
233
233
|
</div>
|
|
234
234
|
|
|
235
|
-
<div id="method-
|
|
236
|
-
<a name="
|
|
235
|
+
<div id="method-M000066" class="method-detail">
|
|
236
|
+
<a name="M000066"></a>
|
|
237
237
|
|
|
238
238
|
<div class="method-heading">
|
|
239
|
-
<a href="#
|
|
239
|
+
<a href="#M000066" class="method-signature">
|
|
240
240
|
<span class="method-name">read_from_store</span><span class="method-args">(store, query, facets, params=Hash.new)</span>
|
|
241
241
|
</a>
|
|
242
242
|
</div>
|
|
@@ -257,14 +257,14 @@ response
|
|
|
257
257
|
<tr><td valign="top">facets:</td><td>an ordered list of facets to be used
|
|
258
258
|
|
|
259
259
|
</td></tr>
|
|
260
|
-
<tr><td valign="top">params:</td><td>additional params. See <a href="../Store.html#
|
|
260
|
+
<tr><td valign="top">params:</td><td>additional params. See <a href="../Store.html#M000137">Store.facet</a> for
|
|
261
261
|
details. XML output is requested automatically
|
|
262
262
|
|
|
263
263
|
</td></tr>
|
|
264
264
|
</table>
|
|
265
265
|
<p><a class="source-toggle" href="#"
|
|
266
|
-
onclick="toggleCode('
|
|
267
|
-
<div class="method-source-code" id="
|
|
266
|
+
onclick="toggleCode('M000066-source');return false;">[Source]</a></p>
|
|
267
|
+
<div class="method-source-code" id="M000066-source">
|
|
268
268
|
<pre>
|
|
269
269
|
<span class="ruby-comment cmt"># File lib/pho/facet.rb, line 45</span>
|
|
270
270
|
<span class="ruby-keyword kw">def</span> <span class="ruby-constant">Results</span>.<span class="ruby-identifier">read_from_store</span>(<span class="ruby-identifier">store</span>, <span class="ruby-identifier">query</span>, <span class="ruby-identifier">facets</span>, <span class="ruby-identifier">params</span>=<span class="ruby-constant">Hash</span>.<span class="ruby-identifier">new</span>)
|
|
@@ -92,7 +92,7 @@ Captures the information about a specific term
|
|
|
92
92
|
<h3 class="section-bar">Methods</h3>
|
|
93
93
|
|
|
94
94
|
<div class="name-list">
|
|
95
|
-
<a href="#
|
|
95
|
+
<a href="#M000068">new</a>
|
|
96
96
|
</div>
|
|
97
97
|
</div>
|
|
98
98
|
|
|
@@ -137,19 +137,19 @@ Captures the information about a specific term
|
|
|
137
137
|
<div id="methods">
|
|
138
138
|
<h3 class="section-bar">Public Class methods</h3>
|
|
139
139
|
|
|
140
|
-
<div id="method-
|
|
141
|
-
<a name="
|
|
140
|
+
<div id="method-M000068" class="method-detail">
|
|
141
|
+
<a name="M000068"></a>
|
|
142
142
|
|
|
143
143
|
<div class="method-heading">
|
|
144
|
-
<a href="#
|
|
144
|
+
<a href="#M000068" class="method-signature">
|
|
145
145
|
<span class="method-name">new</span><span class="method-args">(hits, search_uri, value)</span>
|
|
146
146
|
</a>
|
|
147
147
|
</div>
|
|
148
148
|
|
|
149
149
|
<div class="method-description">
|
|
150
150
|
<p><a class="source-toggle" href="#"
|
|
151
|
-
onclick="toggleCode('
|
|
152
|
-
<div class="method-source-code" id="
|
|
151
|
+
onclick="toggleCode('M000068-source');return false;">[Source]</a></p>
|
|
152
|
+
<div class="method-source-code" id="M000068-source">
|
|
153
153
|
<pre>
|
|
154
154
|
<span class="ruby-comment cmt"># File lib/pho/facet.rb, line 12</span>
|
|
155
155
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">hits</span>, <span class="ruby-identifier">search_uri</span>, <span class="ruby-identifier">value</span>)
|
|
@@ -101,21 +101,21 @@ Platform API.
|
|
|
101
101
|
<h3 class="section-bar">Methods</h3>
|
|
102
102
|
|
|
103
103
|
<div class="name-list">
|
|
104
|
-
<a href="#
|
|
105
|
-
<a href="#
|
|
106
|
-
<a href="#
|
|
107
|
-
<a href="#
|
|
108
|
-
<a href="#
|
|
109
|
-
<a href="#
|
|
110
|
-
<a href="#
|
|
111
|
-
<a href="#
|
|
112
|
-
<a href="#
|
|
113
|
-
<a href="#
|
|
114
|
-
<a href="#
|
|
115
|
-
<a href="#
|
|
116
|
-
<a href="#
|
|
117
|
-
<a href="#
|
|
118
|
-
<a href="#
|
|
104
|
+
<a href="#M000084"><<</a>
|
|
105
|
+
<a href="#M000082">create_mapping</a>
|
|
106
|
+
<a href="#M000089">get_by_name</a>
|
|
107
|
+
<a href="#M000090">get_by_uri</a>
|
|
108
|
+
<a href="#M000085">get_name</a>
|
|
109
|
+
<a href="#M000086">get_property_uri</a>
|
|
110
|
+
<a href="#M000087">mapped_name?</a>
|
|
111
|
+
<a href="#M000088">mapped_uri?</a>
|
|
112
|
+
<a href="#M000083">new</a>
|
|
113
|
+
<a href="#M000081">read_from_store</a>
|
|
114
|
+
<a href="#M000091">remove</a>
|
|
115
|
+
<a href="#M000092">remove_by_name</a>
|
|
116
|
+
<a href="#M000093">remove_by_uri</a>
|
|
117
|
+
<a href="#M000094">to_rdf</a>
|
|
118
|
+
<a href="#M000095">upload</a>
|
|
119
119
|
</div>
|
|
120
120
|
</div>
|
|
121
121
|
|
|
@@ -169,11 +169,11 @@ URI for this resource
|
|
|
169
169
|
<div id="methods">
|
|
170
170
|
<h3 class="section-bar">Public Class methods</h3>
|
|
171
171
|
|
|
172
|
-
<div id="method-
|
|
173
|
-
<a name="
|
|
172
|
+
<div id="method-M000082" class="method-detail">
|
|
173
|
+
<a name="M000082"></a>
|
|
174
174
|
|
|
175
175
|
<div class="method-heading">
|
|
176
|
-
<a href="#
|
|
176
|
+
<a href="#M000082" class="method-signature">
|
|
177
177
|
<span class="method-name">create_mapping</span><span class="method-args">(store, property_uri, name, analyzer=nil)</span>
|
|
178
178
|
</a>
|
|
179
179
|
</div>
|
|
@@ -185,10 +185,10 @@ automatically assigning a unique identifier to it, and adding validating
|
|
|
185
185
|
the supplied data to ensure it matches the platform rules
|
|
186
186
|
</p>
|
|
187
187
|
<p><a class="source-toggle" href="#"
|
|
188
|
-
onclick="toggleCode('
|
|
189
|
-
<div class="method-source-code" id="
|
|
188
|
+
onclick="toggleCode('M000082-source');return false;">[Source]</a></p>
|
|
189
|
+
<div class="method-source-code" id="M000082-source">
|
|
190
190
|
<pre>
|
|
191
|
-
<span class="ruby-comment cmt"># File lib/pho/field_predicate_map.rb, line
|
|
191
|
+
<span class="ruby-comment cmt"># File lib/pho/field_predicate_map.rb, line 140</span>
|
|
192
192
|
<span class="ruby-keyword kw">def</span> <span class="ruby-constant">FieldPredicateMap</span>.<span class="ruby-identifier">create_mapping</span>(<span class="ruby-identifier">store</span>, <span class="ruby-identifier">property_uri</span>, <span class="ruby-identifier">name</span>, <span class="ruby-identifier">analyzer</span>=<span class="ruby-keyword kw">nil</span>)
|
|
193
193
|
<span class="ruby-identifier">check_value</span>(<span class="ruby-value str">"property_uri"</span>, <span class="ruby-identifier">property_uri</span>)
|
|
194
194
|
<span class="ruby-identifier">check_value</span>(<span class="ruby-value str">"name"</span>, <span class="ruby-identifier">name</span>)
|
|
@@ -207,21 +207,21 @@ the supplied data to ensure it matches the platform rules
|
|
|
207
207
|
</div>
|
|
208
208
|
</div>
|
|
209
209
|
|
|
210
|
-
<div id="method-
|
|
211
|
-
<a name="
|
|
210
|
+
<div id="method-M000083" class="method-detail">
|
|
211
|
+
<a name="M000083"></a>
|
|
212
212
|
|
|
213
213
|
<div class="method-heading">
|
|
214
|
-
<a href="#
|
|
214
|
+
<a href="#M000083" class="method-signature">
|
|
215
215
|
<span class="method-name">new</span><span class="method-args">(uri, label, datatype_properties = [])</span>
|
|
216
216
|
</a>
|
|
217
217
|
</div>
|
|
218
218
|
|
|
219
219
|
<div class="method-description">
|
|
220
220
|
<p><a class="source-toggle" href="#"
|
|
221
|
-
onclick="toggleCode('
|
|
222
|
-
<div class="method-source-code" id="
|
|
221
|
+
onclick="toggleCode('M000083-source');return false;">[Source]</a></p>
|
|
222
|
+
<div class="method-source-code" id="M000083-source">
|
|
223
223
|
<pre>
|
|
224
|
-
<span class="ruby-comment cmt"># File lib/pho/field_predicate_map.rb, line
|
|
224
|
+
<span class="ruby-comment cmt"># File lib/pho/field_predicate_map.rb, line 154</span>
|
|
225
225
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">uri</span>, <span class="ruby-identifier">label</span>, <span class="ruby-identifier">datatype_properties</span> = [])
|
|
226
226
|
<span class="ruby-ivar">@uri</span> = <span class="ruby-identifier">uri</span>
|
|
227
227
|
<span class="ruby-ivar">@label</span> = <span class="ruby-identifier">label</span>
|
|
@@ -232,11 +232,11 @@ the supplied data to ensure it matches the platform rules
|
|
|
232
232
|
</div>
|
|
233
233
|
</div>
|
|
234
234
|
|
|
235
|
-
<div id="method-
|
|
236
|
-
<a name="
|
|
235
|
+
<div id="method-M000081" class="method-detail">
|
|
236
|
+
<a name="M000081"></a>
|
|
237
237
|
|
|
238
238
|
<div class="method-heading">
|
|
239
|
-
<a href="#
|
|
239
|
+
<a href="#M000081" class="method-signature">
|
|
240
240
|
<span class="method-name">read_from_store</span><span class="method-args">(store)</span>
|
|
241
241
|
</a>
|
|
242
242
|
</div>
|
|
@@ -248,8 +248,8 @@ the provided store. The method will retrieve the config as JSON, and parse
|
|
|
248
248
|
it to create an object instance.
|
|
249
249
|
</p>
|
|
250
250
|
<p><a class="source-toggle" href="#"
|
|
251
|
-
onclick="toggleCode('
|
|
252
|
-
<div class="method-source-code" id="
|
|
251
|
+
onclick="toggleCode('M000081-source');return false;">[Source]</a></p>
|
|
252
|
+
<div class="method-source-code" id="M000081-source">
|
|
253
253
|
<pre>
|
|
254
254
|
<span class="ruby-comment cmt"># File lib/pho/field_predicate_map.rb, line 109</span>
|
|
255
255
|
<span class="ruby-keyword kw">def</span> <span class="ruby-constant">FieldPredicateMap</span>.<span class="ruby-identifier">read_from_store</span>(<span class="ruby-identifier">store</span>)
|
|
@@ -262,7 +262,12 @@ it to create an object instance.
|
|
|
262
262
|
|
|
263
263
|
<span class="ruby-identifier">json</span> = <span class="ruby-constant">JSON</span>.<span class="ruby-identifier">parse</span>( <span class="ruby-identifier">resp</span>.<span class="ruby-identifier">content</span> )
|
|
264
264
|
|
|
265
|
-
<span class="ruby-identifier">
|
|
265
|
+
<span class="ruby-identifier">labels</span> = <span class="ruby-identifier">json</span>[<span class="ruby-identifier">fpmap_uri</span>][<span class="ruby-value str">"http:\/\/www.w3.org\/2000\/01\/rdf-schema#label"</span>]
|
|
266
|
+
<span class="ruby-identifier">label</span> = <span class="ruby-value str">""</span>
|
|
267
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">labels</span> <span class="ruby-operator">!=</span> <span class="ruby-keyword kw">nil</span>
|
|
268
|
+
<span class="ruby-identifier">label</span> = <span class="ruby-identifier">labels</span>[<span class="ruby-value">0</span>][<span class="ruby-value str">"value"</span>]
|
|
269
|
+
<span class="ruby-keyword kw">end</span>
|
|
270
|
+
|
|
266
271
|
<span class="ruby-identifier">fpmap</span> = <span class="ruby-constant">FieldPredicateMap</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">fpmap_uri</span>, <span class="ruby-identifier">label</span>)
|
|
267
272
|
|
|
268
273
|
<span class="ruby-identifier">mapped_properties</span> = <span class="ruby-identifier">json</span>[<span class="ruby-identifier">fpmap_uri</span>][<span class="ruby-value str">"http:\/\/schemas.talis.com\/2006\/frame\/schema#mappedDatatypeProperty"</span>]
|
|
@@ -282,11 +287,11 @@ it to create an object instance.
|
|
|
282
287
|
|
|
283
288
|
<h3 class="section-bar">Public Instance methods</h3>
|
|
284
289
|
|
|
285
|
-
<div id="method-
|
|
286
|
-
<a name="
|
|
290
|
+
<div id="method-M000084" class="method-detail">
|
|
291
|
+
<a name="M000084"></a>
|
|
287
292
|
|
|
288
293
|
<div class="method-heading">
|
|
289
|
-
<a href="#
|
|
294
|
+
<a href="#M000084" class="method-signature">
|
|
290
295
|
<span class="method-name"><<</span><span class="method-args">(obj)</span>
|
|
291
296
|
</a>
|
|
292
297
|
</div>
|
|
@@ -298,10 +303,10 @@ this map. Note that the method does not validate the object, and neither
|
|
|
298
303
|
does it check for duplicate mappings.
|
|
299
304
|
</p>
|
|
300
305
|
<p><a class="source-toggle" href="#"
|
|
301
|
-
onclick="toggleCode('
|
|
302
|
-
<div class="method-source-code" id="
|
|
306
|
+
onclick="toggleCode('M000084-source');return false;">[Source]</a></p>
|
|
307
|
+
<div class="method-source-code" id="M000084-source">
|
|
303
308
|
<pre>
|
|
304
|
-
<span class="ruby-comment cmt"># File lib/pho/field_predicate_map.rb, line
|
|
309
|
+
<span class="ruby-comment cmt"># File lib/pho/field_predicate_map.rb, line 163</span>
|
|
305
310
|
<span class="ruby-keyword kw">def</span> <span class="ruby-operator"><<</span>(<span class="ruby-identifier">obj</span>)
|
|
306
311
|
<span class="ruby-ivar">@datatype_properties</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">obj</span>
|
|
307
312
|
<span class="ruby-keyword kw">end</span>
|
|
@@ -310,11 +315,11 @@ does it check for duplicate mappings.
|
|
|
310
315
|
</div>
|
|
311
316
|
</div>
|
|
312
317
|
|
|
313
|
-
<div id="method-
|
|
314
|
-
<a name="
|
|
318
|
+
<div id="method-M000089" class="method-detail">
|
|
319
|
+
<a name="M000089"></a>
|
|
315
320
|
|
|
316
321
|
<div class="method-heading">
|
|
317
|
-
<a href="#
|
|
322
|
+
<a href="#M000089" class="method-signature">
|
|
318
323
|
<span class="method-name">get_by_name</span><span class="method-args">(name)</span>
|
|
319
324
|
</a>
|
|
320
325
|
</div>
|
|
@@ -325,10 +330,10 @@ Find the <a href="DatatypeProperty.html">DatatypeProperty</a> (if any) with
|
|
|
325
330
|
the following name mapping
|
|
326
331
|
</p>
|
|
327
332
|
<p><a class="source-toggle" href="#"
|
|
328
|
-
onclick="toggleCode('
|
|
329
|
-
<div class="method-source-code" id="
|
|
333
|
+
onclick="toggleCode('M000089-source');return false;">[Source]</a></p>
|
|
334
|
+
<div class="method-source-code" id="M000089-source">
|
|
330
335
|
<pre>
|
|
331
|
-
<span class="ruby-comment cmt"># File lib/pho/field_predicate_map.rb, line
|
|
336
|
+
<span class="ruby-comment cmt"># File lib/pho/field_predicate_map.rb, line 202</span>
|
|
332
337
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">get_by_name</span>(<span class="ruby-identifier">name</span>)
|
|
333
338
|
<span class="ruby-keyword kw">return</span> <span class="ruby-ivar">@datatype_properties</span>.<span class="ruby-identifier">detect</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">mapping</span><span class="ruby-operator">|</span> <span class="ruby-identifier">name</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">mapping</span>.<span class="ruby-identifier">name</span> }
|
|
334
339
|
<span class="ruby-keyword kw">end</span>
|
|
@@ -337,11 +342,11 @@ the following name mapping
|
|
|
337
342
|
</div>
|
|
338
343
|
</div>
|
|
339
344
|
|
|
340
|
-
<div id="method-
|
|
341
|
-
<a name="
|
|
345
|
+
<div id="method-M000090" class="method-detail">
|
|
346
|
+
<a name="M000090"></a>
|
|
342
347
|
|
|
343
348
|
<div class="method-heading">
|
|
344
|
-
<a href="#
|
|
349
|
+
<a href="#M000090" class="method-signature">
|
|
345
350
|
<span class="method-name">get_by_uri</span><span class="method-args">(uri)</span>
|
|
346
351
|
</a>
|
|
347
352
|
</div>
|
|
@@ -352,10 +357,10 @@ Find the <a href="DatatypeProperty.html">DatatypeProperty</a> using a
|
|
|
352
357
|
property uri
|
|
353
358
|
</p>
|
|
354
359
|
<p><a class="source-toggle" href="#"
|
|
355
|
-
onclick="toggleCode('
|
|
356
|
-
<div class="method-source-code" id="
|
|
360
|
+
onclick="toggleCode('M000090-source');return false;">[Source]</a></p>
|
|
361
|
+
<div class="method-source-code" id="M000090-source">
|
|
357
362
|
<pre>
|
|
358
|
-
<span class="ruby-comment cmt"># File lib/pho/field_predicate_map.rb, line
|
|
363
|
+
<span class="ruby-comment cmt"># File lib/pho/field_predicate_map.rb, line 207</span>
|
|
359
364
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">get_by_uri</span>(<span class="ruby-identifier">uri</span>)
|
|
360
365
|
<span class="ruby-keyword kw">return</span> <span class="ruby-ivar">@datatype_properties</span>.<span class="ruby-identifier">detect</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">mapping</span><span class="ruby-operator">|</span> <span class="ruby-identifier">uri</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">mapping</span>.<span class="ruby-identifier">property_uri</span> }
|
|
361
366
|
<span class="ruby-keyword kw">end</span>
|
|
@@ -364,11 +369,11 @@ property uri
|
|
|
364
369
|
</div>
|
|
365
370
|
</div>
|
|
366
371
|
|
|
367
|
-
<div id="method-
|
|
368
|
-
<a name="
|
|
372
|
+
<div id="method-M000085" class="method-detail">
|
|
373
|
+
<a name="M000085"></a>
|
|
369
374
|
|
|
370
375
|
<div class="method-heading">
|
|
371
|
-
<a href="#
|
|
376
|
+
<a href="#M000085" class="method-signature">
|
|
372
377
|
<span class="method-name">get_name</span><span class="method-args">(uri)</span>
|
|
373
378
|
</a>
|
|
374
379
|
</div>
|
|
@@ -383,10 +388,10 @@ Lookup the name mapped to the specified uri
|
|
|
383
388
|
</td></tr>
|
|
384
389
|
</table>
|
|
385
390
|
<p><a class="source-toggle" href="#"
|
|
386
|
-
onclick="toggleCode('
|
|
387
|
-
<div class="method-source-code" id="
|
|
391
|
+
onclick="toggleCode('M000085-source');return false;">[Source]</a></p>
|
|
392
|
+
<div class="method-source-code" id="M000085-source">
|
|
388
393
|
<pre>
|
|
389
|
-
<span class="ruby-comment cmt"># File lib/pho/field_predicate_map.rb, line
|
|
394
|
+
<span class="ruby-comment cmt"># File lib/pho/field_predicate_map.rb, line 170</span>
|
|
390
395
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">get_name</span>(<span class="ruby-identifier">uri</span>)
|
|
391
396
|
<span class="ruby-identifier">p</span> = <span class="ruby-ivar">@datatype_properties</span>.<span class="ruby-identifier">detect</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">mapping</span><span class="ruby-operator">|</span> <span class="ruby-identifier">uri</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">mapping</span>.<span class="ruby-identifier">property_uri</span> }
|
|
392
397
|
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">p</span> <span class="ruby-operator">==</span> <span class="ruby-keyword kw">nil</span>
|
|
@@ -400,11 +405,11 @@ Lookup the name mapped to the specified uri
|
|
|
400
405
|
</div>
|
|
401
406
|
</div>
|
|
402
407
|
|
|
403
|
-
<div id="method-
|
|
404
|
-
<a name="
|
|
408
|
+
<div id="method-M000086" class="method-detail">
|
|
409
|
+
<a name="M000086"></a>
|
|
405
410
|
|
|
406
411
|
<div class="method-heading">
|
|
407
|
-
<a href="#
|
|
412
|
+
<a href="#M000086" class="method-signature">
|
|
408
413
|
<span class="method-name">get_property_uri</span><span class="method-args">(name)</span>
|
|
409
414
|
</a>
|
|
410
415
|
</div>
|
|
@@ -419,10 +424,10 @@ Lookup the property mapped to the specified name
|
|
|
419
424
|
</td></tr>
|
|
420
425
|
</table>
|
|
421
426
|
<p><a class="source-toggle" href="#"
|
|
422
|
-
onclick="toggleCode('
|
|
423
|
-
<div class="method-source-code" id="
|
|
427
|
+
onclick="toggleCode('M000086-source');return false;">[Source]</a></p>
|
|
428
|
+
<div class="method-source-code" id="M000086-source">
|
|
424
429
|
<pre>
|
|
425
|
-
<span class="ruby-comment cmt"># File lib/pho/field_predicate_map.rb, line
|
|
430
|
+
<span class="ruby-comment cmt"># File lib/pho/field_predicate_map.rb, line 182</span>
|
|
426
431
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">get_property_uri</span>(<span class="ruby-identifier">name</span>)
|
|
427
432
|
<span class="ruby-identifier">p</span> = <span class="ruby-ivar">@datatype_properties</span>.<span class="ruby-identifier">detect</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">mapping</span><span class="ruby-operator">|</span> <span class="ruby-identifier">name</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">mapping</span>.<span class="ruby-identifier">name</span> }
|
|
428
433
|
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">p</span> <span class="ruby-operator">==</span> <span class="ruby-keyword kw">nil</span>
|
|
@@ -436,11 +441,11 @@ Lookup the property mapped to the specified name
|
|
|
436
441
|
</div>
|
|
437
442
|
</div>
|
|
438
443
|
|
|
439
|
-
<div id="method-
|
|
440
|
-
<a name="
|
|
444
|
+
<div id="method-M000087" class="method-detail">
|
|
445
|
+
<a name="M000087"></a>
|
|
441
446
|
|
|
442
447
|
<div class="method-heading">
|
|
443
|
-
<a href="#
|
|
448
|
+
<a href="#M000087" class="method-signature">
|
|
444
449
|
<span class="method-name">mapped_name?</span><span class="method-args">(name)</span>
|
|
445
450
|
</a>
|
|
446
451
|
</div>
|
|
@@ -450,10 +455,10 @@ Lookup the property mapped to the specified name
|
|
|
450
455
|
Is there a mapping for a property with this name?
|
|
451
456
|
</p>
|
|
452
457
|
<p><a class="source-toggle" href="#"
|
|
453
|
-
onclick="toggleCode('
|
|
454
|
-
<div class="method-source-code" id="
|
|
458
|
+
onclick="toggleCode('M000087-source');return false;">[Source]</a></p>
|
|
459
|
+
<div class="method-source-code" id="M000087-source">
|
|
455
460
|
<pre>
|
|
456
|
-
<span class="ruby-comment cmt"># File lib/pho/field_predicate_map.rb, line
|
|
461
|
+
<span class="ruby-comment cmt"># File lib/pho/field_predicate_map.rb, line 192</span>
|
|
457
462
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">mapped_name?</span>(<span class="ruby-identifier">name</span>)
|
|
458
463
|
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">get_property_uri</span>(<span class="ruby-identifier">name</span>) <span class="ruby-operator">!=</span> <span class="ruby-keyword kw">nil</span>
|
|
459
464
|
<span class="ruby-keyword kw">end</span>
|
|
@@ -462,11 +467,11 @@ Is there a mapping for a property with this name?
|
|
|
462
467
|
</div>
|
|
463
468
|
</div>
|
|
464
469
|
|
|
465
|
-
<div id="method-
|
|
466
|
-
<a name="
|
|
470
|
+
<div id="method-M000088" class="method-detail">
|
|
471
|
+
<a name="M000088"></a>
|
|
467
472
|
|
|
468
473
|
<div class="method-heading">
|
|
469
|
-
<a href="#
|
|
474
|
+
<a href="#M000088" class="method-signature">
|
|
470
475
|
<span class="method-name">mapped_uri?</span><span class="method-args">(uri)</span>
|
|
471
476
|
</a>
|
|
472
477
|
</div>
|
|
@@ -476,10 +481,10 @@ Is there a mapping for a property with this name?
|
|
|
476
481
|
Is there a mapping for this uri?
|
|
477
482
|
</p>
|
|
478
483
|
<p><a class="source-toggle" href="#"
|
|
479
|
-
onclick="toggleCode('
|
|
480
|
-
<div class="method-source-code" id="
|
|
484
|
+
onclick="toggleCode('M000088-source');return false;">[Source]</a></p>
|
|
485
|
+
<div class="method-source-code" id="M000088-source">
|
|
481
486
|
<pre>
|
|
482
|
-
<span class="ruby-comment cmt"># File lib/pho/field_predicate_map.rb, line
|
|
487
|
+
<span class="ruby-comment cmt"># File lib/pho/field_predicate_map.rb, line 197</span>
|
|
483
488
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">mapped_uri?</span>(<span class="ruby-identifier">uri</span>)
|
|
484
489
|
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">get_name</span>(<span class="ruby-identifier">uri</span>) <span class="ruby-operator">!=</span> <span class="ruby-keyword kw">nil</span>
|
|
485
490
|
<span class="ruby-keyword kw">end</span>
|
|
@@ -488,11 +493,11 @@ Is there a mapping for this uri?
|
|
|
488
493
|
</div>
|
|
489
494
|
</div>
|
|
490
495
|
|
|
491
|
-
<div id="method-
|
|
492
|
-
<a name="
|
|
496
|
+
<div id="method-M000091" class="method-detail">
|
|
497
|
+
<a name="M000091"></a>
|
|
493
498
|
|
|
494
499
|
<div class="method-heading">
|
|
495
|
-
<a href="#
|
|
500
|
+
<a href="#M000091" class="method-signature">
|
|
496
501
|
<span class="method-name">remove</span><span class="method-args">(datatype_property)</span>
|
|
497
502
|
</a>
|
|
498
503
|
</div>
|
|
@@ -503,10 +508,10 @@ Remove a <a href="DatatypeProperty.html">DatatypeProperty</a> from the
|
|
|
503
508
|
collection
|
|
504
509
|
</p>
|
|
505
510
|
<p><a class="source-toggle" href="#"
|
|
506
|
-
onclick="toggleCode('
|
|
507
|
-
<div class="method-source-code" id="
|
|
511
|
+
onclick="toggleCode('M000091-source');return false;">[Source]</a></p>
|
|
512
|
+
<div class="method-source-code" id="M000091-source">
|
|
508
513
|
<pre>
|
|
509
|
-
<span class="ruby-comment cmt"># File lib/pho/field_predicate_map.rb, line
|
|
514
|
+
<span class="ruby-comment cmt"># File lib/pho/field_predicate_map.rb, line 212</span>
|
|
510
515
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">remove</span>(<span class="ruby-identifier">datatype_property</span>)
|
|
511
516
|
<span class="ruby-keyword kw">return</span> <span class="ruby-ivar">@datatype_properties</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-identifier">datatype_property</span>)
|
|
512
517
|
<span class="ruby-keyword kw">end</span>
|
|
@@ -515,11 +520,11 @@ collection
|
|
|
515
520
|
</div>
|
|
516
521
|
</div>
|
|
517
522
|
|
|
518
|
-
<div id="method-
|
|
519
|
-
<a name="
|
|
523
|
+
<div id="method-M000092" class="method-detail">
|
|
524
|
+
<a name="M000092"></a>
|
|
520
525
|
|
|
521
526
|
<div class="method-heading">
|
|
522
|
-
<a href="#
|
|
527
|
+
<a href="#M000092" class="method-signature">
|
|
523
528
|
<span class="method-name">remove_by_name</span><span class="method-args">(name)</span>
|
|
524
529
|
</a>
|
|
525
530
|
</div>
|
|
@@ -530,10 +535,10 @@ Remove a <a href="DatatypeProperty.html">DatatypeProperty</a> by its mapped
|
|
|
530
535
|
name
|
|
531
536
|
</p>
|
|
532
537
|
<p><a class="source-toggle" href="#"
|
|
533
|
-
onclick="toggleCode('
|
|
534
|
-
<div class="method-source-code" id="
|
|
538
|
+
onclick="toggleCode('M000092-source');return false;">[Source]</a></p>
|
|
539
|
+
<div class="method-source-code" id="M000092-source">
|
|
535
540
|
<pre>
|
|
536
|
-
<span class="ruby-comment cmt"># File lib/pho/field_predicate_map.rb, line
|
|
541
|
+
<span class="ruby-comment cmt"># File lib/pho/field_predicate_map.rb, line 217</span>
|
|
537
542
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">remove_by_name</span>(<span class="ruby-identifier">name</span>)
|
|
538
543
|
<span class="ruby-identifier">p</span> = <span class="ruby-identifier">get_by_name</span>(<span class="ruby-identifier">name</span>)
|
|
539
544
|
<span class="ruby-keyword kw">if</span> (<span class="ruby-identifier">p</span> <span class="ruby-operator">!=</span> <span class="ruby-keyword kw">nil</span>)
|
|
@@ -545,11 +550,11 @@ name
|
|
|
545
550
|
</div>
|
|
546
551
|
</div>
|
|
547
552
|
|
|
548
|
-
<div id="method-
|
|
549
|
-
<a name="
|
|
553
|
+
<div id="method-M000093" class="method-detail">
|
|
554
|
+
<a name="M000093"></a>
|
|
550
555
|
|
|
551
556
|
<div class="method-heading">
|
|
552
|
-
<a href="#
|
|
557
|
+
<a href="#M000093" class="method-signature">
|
|
553
558
|
<span class="method-name">remove_by_uri</span><span class="method-args">(uri)</span>
|
|
554
559
|
</a>
|
|
555
560
|
</div>
|
|
@@ -560,10 +565,10 @@ Remove a <a href="DatatypeProperty.html">DatatypeProperty</a> by its mapped
|
|
|
560
565
|
uri
|
|
561
566
|
</p>
|
|
562
567
|
<p><a class="source-toggle" href="#"
|
|
563
|
-
onclick="toggleCode('
|
|
564
|
-
<div class="method-source-code" id="
|
|
568
|
+
onclick="toggleCode('M000093-source');return false;">[Source]</a></p>
|
|
569
|
+
<div class="method-source-code" id="M000093-source">
|
|
565
570
|
<pre>
|
|
566
|
-
<span class="ruby-comment cmt"># File lib/pho/field_predicate_map.rb, line
|
|
571
|
+
<span class="ruby-comment cmt"># File lib/pho/field_predicate_map.rb, line 225</span>
|
|
567
572
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">remove_by_uri</span>(<span class="ruby-identifier">uri</span>)
|
|
568
573
|
<span class="ruby-identifier">p</span> = <span class="ruby-identifier">get_by_uri</span>(<span class="ruby-identifier">uri</span>)
|
|
569
574
|
<span class="ruby-keyword kw">if</span> (<span class="ruby-identifier">p</span> <span class="ruby-operator">!=</span> <span class="ruby-keyword kw">nil</span>)
|
|
@@ -575,11 +580,11 @@ uri
|
|
|
575
580
|
</div>
|
|
576
581
|
</div>
|
|
577
582
|
|
|
578
|
-
<div id="method-
|
|
579
|
-
<a name="
|
|
583
|
+
<div id="method-M000094" class="method-detail">
|
|
584
|
+
<a name="M000094"></a>
|
|
580
585
|
|
|
581
586
|
<div class="method-heading">
|
|
582
|
-
<a href="#
|
|
587
|
+
<a href="#M000094" class="method-signature">
|
|
583
588
|
<span class="method-name">to_rdf</span><span class="method-args">()</span>
|
|
584
589
|
</a>
|
|
585
590
|
</div>
|
|
@@ -590,10 +595,10 @@ Dump this object to an RDF/XML representation suitable for submitting to
|
|
|
590
595
|
the Platform
|
|
591
596
|
</p>
|
|
592
597
|
<p><a class="source-toggle" href="#"
|
|
593
|
-
onclick="toggleCode('
|
|
594
|
-
<div class="method-source-code" id="
|
|
598
|
+
onclick="toggleCode('M000094-source');return false;">[Source]</a></p>
|
|
599
|
+
<div class="method-source-code" id="M000094-source">
|
|
595
600
|
<pre>
|
|
596
|
-
<span class="ruby-comment cmt"># File lib/pho/field_predicate_map.rb, line
|
|
601
|
+
<span class="ruby-comment cmt"># File lib/pho/field_predicate_map.rb, line 233</span>
|
|
597
602
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_rdf</span>
|
|
598
603
|
<span class="ruby-identifier">rdf</span> = <span class="ruby-node">"<rdf:RDF xmlns:frm=\"#{Pho::Namespaces::FRAME}\" "</span>
|
|
599
604
|
<span class="ruby-identifier">rdf</span> <span class="ruby-operator"><<</span> <span class="ruby-value str">" xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\" "</span>
|
|
@@ -622,11 +627,11 @@ the Platform
|
|
|
622
627
|
</div>
|
|
623
628
|
</div>
|
|
624
629
|
|
|
625
|
-
<div id="method-
|
|
626
|
-
<a name="
|
|
630
|
+
<div id="method-M000095" class="method-detail">
|
|
631
|
+
<a name="M000095"></a>
|
|
627
632
|
|
|
628
633
|
<div class="method-heading">
|
|
629
|
-
<a href="#
|
|
634
|
+
<a href="#M000095" class="method-signature">
|
|
630
635
|
<span class="method-name">upload</span><span class="method-args">(store)</span>
|
|
631
636
|
</a>
|
|
632
637
|
</div>
|
|
@@ -637,10 +642,10 @@ Upload an RDF/XML presentation of this object to the provided Platform <a
|
|
|
637
642
|
href="Store.html">Store</a>
|
|
638
643
|
</p>
|
|
639
644
|
<p><a class="source-toggle" href="#"
|
|
640
|
-
onclick="toggleCode('
|
|
641
|
-
<div class="method-source-code" id="
|
|
645
|
+
onclick="toggleCode('M000095-source');return false;">[Source]</a></p>
|
|
646
|
+
<div class="method-source-code" id="M000095-source">
|
|
642
647
|
<pre>
|
|
643
|
-
<span class="ruby-comment cmt"># File lib/pho/field_predicate_map.rb, line
|
|
648
|
+
<span class="ruby-comment cmt"># File lib/pho/field_predicate_map.rb, line 258</span>
|
|
644
649
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">upload</span>(<span class="ruby-identifier">store</span>)
|
|
645
650
|
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">store</span>.<span class="ruby-identifier">put_field_predicate_map</span>(<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">to_rdf</span>)
|
|
646
651
|
<span class="ruby-keyword kw">end</span>
|