pho 0.7.2 → 0.7.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (82) hide show
  1. data/CHANGES +5 -0
  2. data/Rakefile +1 -1
  3. data/lib/pho/snapshot.rb +6 -1
  4. data/lib/pho/sparql.rb +4 -1
  5. data/tests/tc_snapshots.rb +14 -1
  6. data/tests/tc_sparql_helper.rb +23 -0
  7. metadata +60 -160
  8. data/doc/rdoc/classes/Pho/Analyzers.html +0 -310
  9. data/doc/rdoc/classes/Pho/CommandLine.html +0 -770
  10. data/doc/rdoc/classes/Pho/DatatypeProperty.html +0 -241
  11. data/doc/rdoc/classes/Pho/Enrichment/StoreEnricher.html +0 -410
  12. data/doc/rdoc/classes/Pho/Enrichment.html +0 -119
  13. data/doc/rdoc/classes/Pho/Etags.html +0 -310
  14. data/doc/rdoc/classes/Pho/Facet/Results.html +0 -299
  15. data/doc/rdoc/classes/Pho/Facet/Term.html +0 -177
  16. data/doc/rdoc/classes/Pho/Facet.html +0 -119
  17. data/doc/rdoc/classes/Pho/FieldPredicateMap.html +0 -668
  18. data/doc/rdoc/classes/Pho/FieldWeighting.html +0 -230
  19. data/doc/rdoc/classes/Pho/FileManagement/AbstractFileManager.html +0 -478
  20. data/doc/rdoc/classes/Pho/FileManagement/FileManager.html +0 -264
  21. data/doc/rdoc/classes/Pho/FileManagement/RDFManager.html +0 -259
  22. data/doc/rdoc/classes/Pho/FileManagement.html +0 -121
  23. data/doc/rdoc/classes/Pho/Job.html +0 -627
  24. data/doc/rdoc/classes/Pho/JobUpdate.html +0 -141
  25. data/doc/rdoc/classes/Pho/Jobs.html +0 -538
  26. data/doc/rdoc/classes/Pho/Namespaces.html +0 -164
  27. data/doc/rdoc/classes/Pho/OAI/Record.html +0 -165
  28. data/doc/rdoc/classes/Pho/OAI/Records.html +0 -331
  29. data/doc/rdoc/classes/Pho/OAI.html +0 -118
  30. data/doc/rdoc/classes/Pho/QueryProfile.html +0 -497
  31. data/doc/rdoc/classes/Pho/RDF/Parser.html +0 -279
  32. data/doc/rdoc/classes/Pho/RDF.html +0 -120
  33. data/doc/rdoc/classes/Pho/RDFCollection.html +0 -119
  34. data/doc/rdoc/classes/Pho/ResourceHash/Converter.html +0 -325
  35. data/doc/rdoc/classes/Pho/ResourceHash/SetAlgebra.html +0 -241
  36. data/doc/rdoc/classes/Pho/ResourceHash.html +0 -123
  37. data/doc/rdoc/classes/Pho/Snapshot.html +0 -397
  38. data/doc/rdoc/classes/Pho/Sparql/SparqlClient.html +0 -594
  39. data/doc/rdoc/classes/Pho/Sparql/SparqlHelper.html +0 -692
  40. data/doc/rdoc/classes/Pho/Sparql.html +0 -187
  41. data/doc/rdoc/classes/Pho/Status.html +0 -296
  42. data/doc/rdoc/classes/Pho/Store.html +0 -1560
  43. data/doc/rdoc/classes/Pho/StoreSparqlClient.html +0 -183
  44. data/doc/rdoc/classes/Pho/Update/Changeset.html +0 -521
  45. data/doc/rdoc/classes/Pho/Update/ChangesetBuilder.html +0 -330
  46. data/doc/rdoc/classes/Pho/Update/ChangesetHelper.html +0 -159
  47. data/doc/rdoc/classes/Pho/Update/Changesets.html +0 -205
  48. data/doc/rdoc/classes/Pho/Update/LiteralStatement.html +0 -257
  49. data/doc/rdoc/classes/Pho/Update/ResourceStatement.html +0 -237
  50. data/doc/rdoc/classes/Pho/Update/Statement.html +0 -303
  51. data/doc/rdoc/classes/Pho/Update.html +0 -128
  52. data/doc/rdoc/classes/Pho.html +0 -283
  53. data/doc/rdoc/classes/String.html +0 -146
  54. data/doc/rdoc/created.rid +0 -1
  55. data/doc/rdoc/files/CHANGES.html +0 -351
  56. data/doc/rdoc/files/README.html +0 -191
  57. data/doc/rdoc/files/lib/pho/changeset_builder_rb.html +0 -108
  58. data/doc/rdoc/files/lib/pho/changeset_rb.html +0 -108
  59. data/doc/rdoc/files/lib/pho/command_line_rb.html +0 -101
  60. data/doc/rdoc/files/lib/pho/converter_rb.html +0 -108
  61. data/doc/rdoc/files/lib/pho/enrichment_rb.html +0 -101
  62. data/doc/rdoc/files/lib/pho/etags_rb.html +0 -108
  63. data/doc/rdoc/files/lib/pho/facet_rb.html +0 -101
  64. data/doc/rdoc/files/lib/pho/field_predicate_map_rb.html +0 -101
  65. data/doc/rdoc/files/lib/pho/file_management_rb.html +0 -101
  66. data/doc/rdoc/files/lib/pho/file_manager_rb.html +0 -108
  67. data/doc/rdoc/files/lib/pho/job_rb.html +0 -101
  68. data/doc/rdoc/files/lib/pho/oai_rb.html +0 -101
  69. data/doc/rdoc/files/lib/pho/query_profile_rb.html +0 -101
  70. data/doc/rdoc/files/lib/pho/rdf_collection_rb.html +0 -101
  71. data/doc/rdoc/files/lib/pho/rdf_rb.html +0 -108
  72. data/doc/rdoc/files/lib/pho/resource_hash_rb.html +0 -101
  73. data/doc/rdoc/files/lib/pho/snapshot_rb.html +0 -109
  74. data/doc/rdoc/files/lib/pho/sparql_rb.html +0 -101
  75. data/doc/rdoc/files/lib/pho/status_rb.html +0 -101
  76. data/doc/rdoc/files/lib/pho/store_rb.html +0 -108
  77. data/doc/rdoc/files/lib/pho_rb.html +0 -133
  78. data/doc/rdoc/fr_class_index.html +0 -72
  79. data/doc/rdoc/fr_file_index.html +0 -49
  80. data/doc/rdoc/fr_method_index.html +0 -237
  81. data/doc/rdoc/index.html +0 -24
  82. data/doc/rdoc/rdoc-style.css +0 -208
@@ -1,497 +0,0 @@
1
- <?xml version="1.0" encoding="iso-8859-1"?>
2
- <!DOCTYPE html
3
- PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
-
6
- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
7
- <head>
8
- <title>Class: Pho::QueryProfile</title>
9
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
- <meta http-equiv="Content-Script-Type" content="text/javascript" />
11
- <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
12
- <script type="text/javascript">
13
- // <![CDATA[
14
-
15
- function popupCode( url ) {
16
- window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
17
- }
18
-
19
- function toggleCode( id ) {
20
- if ( document.getElementById )
21
- elem = document.getElementById( id );
22
- else if ( document.all )
23
- elem = eval( "document.all." + id );
24
- else
25
- return false;
26
-
27
- elemStyle = elem.style;
28
-
29
- if ( elemStyle.display != "block" ) {
30
- elemStyle.display = "block"
31
- } else {
32
- elemStyle.display = "none"
33
- }
34
-
35
- return true;
36
- }
37
-
38
- // Make codeblocks hidden by default
39
- document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
40
-
41
- // ]]>
42
- </script>
43
-
44
- </head>
45
- <body>
46
-
47
-
48
-
49
- <div id="classHeader">
50
- <table class="header-table">
51
- <tr class="top-aligned-row">
52
- <td><strong>Class</strong></td>
53
- <td class="class-name-in-header">Pho::QueryProfile</td>
54
- </tr>
55
- <tr class="top-aligned-row">
56
- <td><strong>In:</strong></td>
57
- <td>
58
- <a href="../../files/lib/pho/query_profile_rb.html">
59
- lib/pho/query_profile.rb
60
- </a>
61
- <br />
62
- </td>
63
- </tr>
64
-
65
- <tr class="top-aligned-row">
66
- <td><strong>Parent:</strong></td>
67
- <td>
68
- Object
69
- </td>
70
- </tr>
71
- </table>
72
- </div>
73
- <!-- banner header -->
74
-
75
- <div id="bodyContent">
76
-
77
-
78
-
79
- <div id="contextContent">
80
-
81
- <div id="description">
82
- <p>
83
- Models the <a href="QueryProfile.html">QueryProfile</a> configuration
84
- associated with a Platform store
85
- </p>
86
- <p>
87
- Class methods exist to read a <a href="QueryProfile.html">QueryProfile</a>
88
- from a store, providing some convenience over the basic <a
89
- href="Store.html">Store</a> methods.
90
- </p>
91
-
92
- </div>
93
-
94
-
95
- </div>
96
-
97
- <div id="method-list">
98
- <h3 class="section-bar">Methods</h3>
99
-
100
- <div class="name-list">
101
- <a href="#M000134">&lt;&lt;</a>&nbsp;&nbsp;
102
- <a href="#M000132">create_weighting</a>&nbsp;&nbsp;
103
- <a href="#M000135">get_by_name</a>&nbsp;&nbsp;
104
- <a href="#M000138">mapped_name?</a>&nbsp;&nbsp;
105
- <a href="#M000133">new</a>&nbsp;&nbsp;
106
- <a href="#M000131">read_from_store</a>&nbsp;&nbsp;
107
- <a href="#M000137">remove</a>&nbsp;&nbsp;
108
- <a href="#M000136">remove_by_name</a>&nbsp;&nbsp;
109
- <a href="#M000139">to_rdf</a>&nbsp;&nbsp;
110
- <a href="#M000140">upload</a>&nbsp;&nbsp;
111
- </div>
112
- </div>
113
-
114
- </div>
115
-
116
-
117
- <!-- if includes -->
118
-
119
- <div id="section">
120
-
121
-
122
-
123
-
124
-
125
- <div id="attribute-list">
126
- <h3 class="section-bar">Attributes</h3>
127
-
128
- <div class="name-list">
129
- <table>
130
- <tr class="top-aligned-row context-row">
131
- <td class="context-item-name">field_weights</td>
132
- <td class="context-item-value">&nbsp;[R]&nbsp;</td>
133
- <td class="context-item-desc">
134
- The list of field weightings
135
-
136
- </td>
137
- </tr>
138
- <tr class="top-aligned-row context-row">
139
- <td class="context-item-name">label</td>
140
- <td class="context-item-value">&nbsp;[R]&nbsp;</td>
141
- <td class="context-item-desc">
142
- Label associated with the resource in the Platform config
143
-
144
- </td>
145
- </tr>
146
- <tr class="top-aligned-row context-row">
147
- <td class="context-item-name">uri</td>
148
- <td class="context-item-value">&nbsp;[R]&nbsp;</td>
149
- <td class="context-item-desc">
150
- URI for this resource
151
-
152
- </td>
153
- </tr>
154
- </table>
155
- </div>
156
- </div>
157
-
158
-
159
-
160
- <!-- if method_list -->
161
- <div id="methods">
162
- <h3 class="section-bar">Public Class methods</h3>
163
-
164
- <div id="method-M000132" class="method-detail">
165
- <a name="M000132"></a>
166
-
167
- <div class="method-heading">
168
- <a href="#M000132" class="method-signature">
169
- <span class="method-name">create_weighting</span><span class="method-args">(store, name, weight)</span>
170
- </a>
171
- </div>
172
-
173
- <div class="method-description">
174
- <p>
175
- Create a <a href="FieldWeighting.html">FieldWeighting</a> object suitable
176
- for adding to this store. Will ensure that the name of the propery is valid
177
- according to the Platform naming rules
178
- </p>
179
- <table>
180
- <tr><td valign="top">store:</td><td>the store that the weighting is to be created for
181
-
182
- </td></tr>
183
- <tr><td valign="top">name:</td><td>name of the field to be weighted
184
-
185
- </td></tr>
186
- <tr><td valign="top">weight:</td><td>the weighting of the field
187
-
188
- </td></tr>
189
- </table>
190
- <p><a class="source-toggle" href="#"
191
- onclick="toggleCode('M000132-source');return false;">[Source]</a></p>
192
- <div class="method-source-code" id="M000132-source">
193
- <pre>
194
- <span class="ruby-comment cmt"># File lib/pho/query_profile.rb, line 84</span>
195
- <span class="ruby-keyword kw">def</span> <span class="ruby-constant">QueryProfile</span>.<span class="ruby-identifier">create_weighting</span>(<span class="ruby-identifier">store</span>, <span class="ruby-identifier">name</span>, <span class="ruby-identifier">weight</span>)
196
- <span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">name</span>.<span class="ruby-identifier">match</span>(<span class="ruby-regexp re">/^[a-zA-Z][a-zA-Z0-9]*$/</span>)
197
- <span class="ruby-identifier">raise</span> <span class="ruby-value str">&quot;Name does not conform to regular expression: ^[a-zA-Z][a-zA-Z0-9]*$&quot;</span>
198
- <span class="ruby-keyword kw">end</span>
199
-
200
- <span class="ruby-identifier">weight_uri</span> = <span class="ruby-identifier">store</span>.<span class="ruby-identifier">build_uri</span>(<span class="ruby-node">&quot;/config/queryprofiles/1##{name}&quot;</span>)
201
- <span class="ruby-keyword kw">return</span> <span class="ruby-constant">FieldWeighting</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">weight_uri</span>, <span class="ruby-identifier">name</span>, <span class="ruby-identifier">weight</span>)
202
-
203
- <span class="ruby-keyword kw">end</span>
204
- </pre>
205
- </div>
206
- </div>
207
- </div>
208
-
209
- <div id="method-M000133" class="method-detail">
210
- <a name="M000133"></a>
211
-
212
- <div class="method-heading">
213
- <a href="#M000133" class="method-signature">
214
- <span class="method-name">new</span><span class="method-args">(uri, label, field_weights=Array.new)</span>
215
- </a>
216
- </div>
217
-
218
- <div class="method-description">
219
- <p><a class="source-toggle" href="#"
220
- onclick="toggleCode('M000133-source');return false;">[Source]</a></p>
221
- <div class="method-source-code" id="M000133-source">
222
- <pre>
223
- <span class="ruby-comment cmt"># File lib/pho/query_profile.rb, line 94</span>
224
- <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">field_weights</span>=<span class="ruby-constant">Array</span>.<span class="ruby-identifier">new</span>)
225
- <span class="ruby-ivar">@uri</span> = <span class="ruby-identifier">uri</span>
226
- <span class="ruby-ivar">@label</span> = <span class="ruby-identifier">label</span>
227
- <span class="ruby-ivar">@field_weights</span> = <span class="ruby-identifier">field_weights</span>
228
- <span class="ruby-keyword kw">end</span>
229
- </pre>
230
- </div>
231
- </div>
232
- </div>
233
-
234
- <div id="method-M000131" class="method-detail">
235
- <a name="M000131"></a>
236
-
237
- <div class="method-heading">
238
- <a href="#M000131" class="method-signature">
239
- <span class="method-name">read_from_store</span><span class="method-args">(store)</span>
240
- </a>
241
- </div>
242
-
243
- <div class="method-description">
244
- <p><a class="source-toggle" href="#"
245
- onclick="toggleCode('M000131-source');return false;">[Source]</a></p>
246
- <div class="method-source-code" id="M000131-source">
247
- <pre>
248
- <span class="ruby-comment cmt"># File lib/pho/query_profile.rb, line 53</span>
249
- <span class="ruby-keyword kw">def</span> <span class="ruby-constant">QueryProfile</span>.<span class="ruby-identifier">read_from_store</span>(<span class="ruby-identifier">store</span>)
250
- <span class="ruby-identifier">resp</span> = <span class="ruby-identifier">store</span>.<span class="ruby-identifier">get_query_profile</span>(<span class="ruby-constant">Pho</span><span class="ruby-operator">::</span><span class="ruby-constant">ACCEPT_JSON</span>)
251
- <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">resp</span>.<span class="ruby-identifier">status</span> <span class="ruby-operator">!=</span> <span class="ruby-value">200</span>
252
- <span class="ruby-identifier">raise</span> <span class="ruby-node">&quot;Unable to read Query Profile from store. Response code was #{resp.status}&quot;</span>
253
- <span class="ruby-keyword kw">end</span>
254
-
255
- <span class="ruby-identifier">qp_uri</span> = <span class="ruby-identifier">store</span>.<span class="ruby-identifier">build_uri</span>(<span class="ruby-value str">&quot;/config/queryprofiles/1&quot;</span>)
256
-
257
- <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> )
258
-
259
- <span class="ruby-identifier">label</span> = <span class="ruby-identifier">json</span>[<span class="ruby-identifier">qp_uri</span>][<span class="ruby-value str">&quot;http:\/\/www.w3.org\/2000\/01\/rdf-schema#label&quot;</span>][<span class="ruby-value">0</span>][<span class="ruby-value str">&quot;value&quot;</span>]
260
- <span class="ruby-identifier">qp</span> = <span class="ruby-constant">QueryProfile</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">qp_uri</span>, <span class="ruby-identifier">label</span>)
261
-
262
- <span class="ruby-identifier">field_weights</span> = <span class="ruby-identifier">json</span>[<span class="ruby-identifier">qp_uri</span>][<span class="ruby-value str">&quot;http:\/\/schemas.talis.com\/2006\/bigfoot\/configuration#fieldWeight&quot;</span>]
263
- <span class="ruby-identifier">field_weights</span>.<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">uri</span><span class="ruby-operator">|</span>
264
- <span class="ruby-identifier">property</span> = <span class="ruby-identifier">json</span>[<span class="ruby-identifier">uri</span>[<span class="ruby-value str">&quot;value&quot;</span>]]
265
- <span class="ruby-identifier">name</span> = <span class="ruby-identifier">property</span>[<span class="ruby-value str">&quot;http:\/\/schemas.talis.com\/2006\/frame\/schema#name&quot;</span>][<span class="ruby-value">0</span>][<span class="ruby-value str">&quot;value&quot;</span>]
266
- <span class="ruby-identifier">weight</span> = <span class="ruby-identifier">property</span>[<span class="ruby-value str">&quot;http:\/\/schemas.talis.com\/2006\/bigfoot\/configuration#weight&quot;</span>][<span class="ruby-value">0</span>][<span class="ruby-value str">&quot;value&quot;</span>]
267
- <span class="ruby-identifier">qp</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-constant">FieldWeighting</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">uri</span>[<span class="ruby-value str">&quot;value&quot;</span>], <span class="ruby-identifier">name</span>, <span class="ruby-identifier">weight</span>)
268
- }
269
-
270
- <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">qp</span>
271
-
272
- <span class="ruby-keyword kw">end</span>
273
- </pre>
274
- </div>
275
- </div>
276
- </div>
277
-
278
- <h3 class="section-bar">Public Instance methods</h3>
279
-
280
- <div id="method-M000134" class="method-detail">
281
- <a name="M000134"></a>
282
-
283
- <div class="method-heading">
284
- <a href="#M000134" class="method-signature">
285
- <span class="method-name">&lt;&lt;</span><span class="method-args">(weight)</span>
286
- </a>
287
- </div>
288
-
289
- <div class="method-description">
290
- <p><a class="source-toggle" href="#"
291
- onclick="toggleCode('M000134-source');return false;">[Source]</a></p>
292
- <div class="method-source-code" id="M000134-source">
293
- <pre>
294
- <span class="ruby-comment cmt"># File lib/pho/query_profile.rb, line 100</span>
295
- <span class="ruby-keyword kw">def</span> <span class="ruby-operator">&lt;&lt;</span>(<span class="ruby-identifier">weight</span>)
296
- <span class="ruby-ivar">@field_weights</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">weight</span>
297
- <span class="ruby-keyword kw">end</span>
298
- </pre>
299
- </div>
300
- </div>
301
- </div>
302
-
303
- <div id="method-M000135" class="method-detail">
304
- <a name="M000135"></a>
305
-
306
- <div class="method-heading">
307
- <a href="#M000135" class="method-signature">
308
- <span class="method-name">get_by_name</span><span class="method-args">(name)</span>
309
- </a>
310
- </div>
311
-
312
- <div class="method-description">
313
- <p>
314
- Retrieve a FieldWeighing by name
315
- </p>
316
- <p><a class="source-toggle" href="#"
317
- onclick="toggleCode('M000135-source');return false;">[Source]</a></p>
318
- <div class="method-source-code" id="M000135-source">
319
- <pre>
320
- <span class="ruby-comment cmt"># File lib/pho/query_profile.rb, line 105</span>
321
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">get_by_name</span>(<span class="ruby-identifier">name</span>)
322
- <span class="ruby-keyword kw">return</span> <span class="ruby-ivar">@field_weights</span>.<span class="ruby-identifier">detect</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">field</span><span class="ruby-operator">|</span> <span class="ruby-identifier">field</span>.<span class="ruby-identifier">name</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">name</span> }
323
- <span class="ruby-keyword kw">end</span>
324
- </pre>
325
- </div>
326
- </div>
327
- </div>
328
-
329
- <div id="method-M000138" class="method-detail">
330
- <a name="M000138"></a>
331
-
332
- <div class="method-heading">
333
- <a href="#M000138" class="method-signature">
334
- <span class="method-name">mapped_name?</span><span class="method-args">(name)</span>
335
- </a>
336
- </div>
337
-
338
- <div class="method-description">
339
- <p>
340
- Is there a field weighting for a property with this name?
341
- </p>
342
- <p><a class="source-toggle" href="#"
343
- onclick="toggleCode('M000138-source');return false;">[Source]</a></p>
344
- <div class="method-source-code" id="M000138-source">
345
- <pre>
346
- <span class="ruby-comment cmt"># File lib/pho/query_profile.rb, line 123</span>
347
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">mapped_name?</span>(<span class="ruby-identifier">name</span>)
348
- <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">get_by_name</span>(<span class="ruby-identifier">name</span>) <span class="ruby-operator">!=</span> <span class="ruby-keyword kw">nil</span>
349
- <span class="ruby-keyword kw">end</span>
350
- </pre>
351
- </div>
352
- </div>
353
- </div>
354
-
355
- <div id="method-M000137" class="method-detail">
356
- <a name="M000137"></a>
357
-
358
- <div class="method-heading">
359
- <a href="#M000137" class="method-signature">
360
- <span class="method-name">remove</span><span class="method-args">(fw)</span>
361
- </a>
362
- </div>
363
-
364
- <div class="method-description">
365
- <p>
366
- Remove a <a href="FieldWeighting.html">FieldWeighting</a> from the
367
- collection
368
- </p>
369
- <p><a class="source-toggle" href="#"
370
- onclick="toggleCode('M000137-source');return false;">[Source]</a></p>
371
- <div class="method-source-code" id="M000137-source">
372
- <pre>
373
- <span class="ruby-comment cmt"># File lib/pho/query_profile.rb, line 118</span>
374
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">remove</span>(<span class="ruby-identifier">fw</span>)
375
- <span class="ruby-keyword kw">return</span> <span class="ruby-ivar">@field_weights</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-identifier">fw</span>)
376
- <span class="ruby-keyword kw">end</span>
377
- </pre>
378
- </div>
379
- </div>
380
- </div>
381
-
382
- <div id="method-M000136" class="method-detail">
383
- <a name="M000136"></a>
384
-
385
- <div class="method-heading">
386
- <a href="#M000136" class="method-signature">
387
- <span class="method-name">remove_by_name</span><span class="method-args">(name)</span>
388
- </a>
389
- </div>
390
-
391
- <div class="method-description">
392
- <p>
393
- Remove a <a href="FieldWeighting.html">FieldWeighting</a> by name
394
- </p>
395
- <p><a class="source-toggle" href="#"
396
- onclick="toggleCode('M000136-source');return false;">[Source]</a></p>
397
- <div class="method-source-code" id="M000136-source">
398
- <pre>
399
- <span class="ruby-comment cmt"># File lib/pho/query_profile.rb, line 110</span>
400
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">remove_by_name</span>(<span class="ruby-identifier">name</span>)
401
- <span class="ruby-identifier">fw</span> = <span class="ruby-identifier">get_by_name</span>(<span class="ruby-identifier">name</span>)
402
- <span class="ruby-keyword kw">if</span> (<span class="ruby-identifier">fw</span> <span class="ruby-operator">!=</span> <span class="ruby-keyword kw">nil</span>)
403
- <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">remove</span>(<span class="ruby-identifier">fw</span>)
404
- <span class="ruby-keyword kw">end</span>
405
- <span class="ruby-keyword kw">end</span>
406
- </pre>
407
- </div>
408
- </div>
409
- </div>
410
-
411
- <div id="method-M000139" class="method-detail">
412
- <a name="M000139"></a>
413
-
414
- <div class="method-heading">
415
- <a href="#M000139" class="method-signature">
416
- <span class="method-name">to_rdf</span><span class="method-args">()</span>
417
- </a>
418
- </div>
419
-
420
- <div class="method-description">
421
- <p>
422
- Dump this object to an <a href="RDF.html">RDF</a>/XML representation
423
- suitable for submitting to the Platform
424
- </p>
425
- <p><a class="source-toggle" href="#"
426
- onclick="toggleCode('M000139-source');return false;">[Source]</a></p>
427
- <div class="method-source-code" id="M000139-source">
428
- <pre>
429
- <span class="ruby-comment cmt"># File lib/pho/query_profile.rb, line 128</span>
430
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_rdf</span>
431
- <span class="ruby-identifier">rdf</span> = <span class="ruby-node">&quot;&lt;rdf:RDF xmlns:frm=\&quot;#{Pho::Namespaces::FRAME}\&quot; &quot;</span>
432
- <span class="ruby-identifier">rdf</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-value str">&quot; xmlns:rdf=\&quot;http://www.w3.org/1999/02/22-rdf-syntax-ns#\&quot; &quot;</span>
433
- <span class="ruby-identifier">rdf</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-value str">&quot; xmlns:rdfs=\&quot;http://www.w3.org/2000/01/rdf-schema#\&quot; &quot;</span>
434
- <span class="ruby-identifier">rdf</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-node">&quot; xmlns:bf=\&quot;#{Pho::Namespaces::CONFIG}\&quot; &gt; &quot;</span>
435
-
436
- <span class="ruby-identifier">rdf</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-node">&quot; &lt;rdf:Description rdf:about=\&quot;#{@uri}\&quot;&gt; &quot;</span>
437
-
438
- <span class="ruby-identifier">rdf</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-node">&quot; &lt;rdf:type rdf:resource=\&quot;#{Pho::Namespaces::CONFIG}QueryProfile\&quot;/&gt; &quot;</span>
439
- <span class="ruby-identifier">rdf</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-node">&quot; &lt;rdfs:label&gt;#{@label}&lt;/rdfs:label&gt; &quot;</span>
440
-
441
- <span class="ruby-ivar">@field_weights</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">property</span><span class="ruby-operator">|</span>
442
- <span class="ruby-identifier">rdf</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-node">&quot; &lt;bf:fieldWeight rdf:resource=\&quot;#{property.uri}\&quot;/&gt; &quot;</span>
443
- <span class="ruby-keyword kw">end</span>
444
-
445
- <span class="ruby-identifier">rdf</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-value str">&quot; &lt;/rdf:Description&gt;&quot;</span>
446
-
447
- <span class="ruby-ivar">@field_weights</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">property</span><span class="ruby-operator">|</span>
448
- <span class="ruby-identifier">rdf</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">property</span>.<span class="ruby-identifier">to_rdf</span>(<span class="ruby-keyword kw">false</span>)
449
- <span class="ruby-keyword kw">end</span>
450
-
451
- <span class="ruby-identifier">rdf</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-value str">&quot;&lt;/rdf:RDF&gt;&quot;</span>
452
- <span class="ruby-keyword kw">end</span>
453
- </pre>
454
- </div>
455
- </div>
456
- </div>
457
-
458
- <div id="method-M000140" class="method-detail">
459
- <a name="M000140"></a>
460
-
461
- <div class="method-heading">
462
- <a href="#M000140" class="method-signature">
463
- <span class="method-name">upload</span><span class="method-args">(store)</span>
464
- </a>
465
- </div>
466
-
467
- <div class="method-description">
468
- <p>
469
- Upload an <a href="RDF.html">RDF</a>/XML presentation of this object to the
470
- provided Platform <a href="Store.html">Store</a>
471
- </p>
472
- <p><a class="source-toggle" href="#"
473
- onclick="toggleCode('M000140-source');return false;">[Source]</a></p>
474
- <div class="method-source-code" id="M000140-source">
475
- <pre>
476
- <span class="ruby-comment cmt"># File lib/pho/query_profile.rb, line 153</span>
477
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">upload</span>(<span class="ruby-identifier">store</span>)
478
- <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">store</span>.<span class="ruby-identifier">put_query_profile</span>(<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">to_rdf</span>)
479
- <span class="ruby-keyword kw">end</span>
480
- </pre>
481
- </div>
482
- </div>
483
- </div>
484
-
485
-
486
- </div>
487
-
488
-
489
- </div>
490
-
491
-
492
- <div id="validator-badges">
493
- <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
494
- </div>
495
-
496
- </body>
497
- </html>