pho 0.7.3 → 0.7.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (87) hide show
  1. data/CHANGES +6 -0
  2. data/README +9 -1
  3. data/Rakefile +1 -1
  4. data/doc/index.html +3 -1
  5. data/doc/rdoc/classes/Pho/Analyzers.html +310 -0
  6. data/doc/rdoc/classes/Pho/CommandLine.html +770 -0
  7. data/doc/rdoc/classes/Pho/DatatypeProperty.html +241 -0
  8. data/doc/rdoc/classes/Pho/Enrichment/StoreEnricher.html +410 -0
  9. data/doc/rdoc/classes/Pho/Enrichment.html +119 -0
  10. data/doc/rdoc/classes/Pho/Etags.html +310 -0
  11. data/doc/rdoc/classes/Pho/Facet/Results.html +299 -0
  12. data/doc/rdoc/classes/Pho/Facet/Term.html +177 -0
  13. data/doc/rdoc/classes/Pho/Facet.html +119 -0
  14. data/doc/rdoc/classes/Pho/FieldPredicateMap.html +695 -0
  15. data/doc/rdoc/classes/Pho/FieldWeighting.html +230 -0
  16. data/doc/rdoc/classes/Pho/FileManagement/AbstractFileManager.html +478 -0
  17. data/doc/rdoc/classes/Pho/FileManagement/FileManager.html +264 -0
  18. data/doc/rdoc/classes/Pho/FileManagement/RDFManager.html +259 -0
  19. data/doc/rdoc/classes/Pho/FileManagement.html +121 -0
  20. data/doc/rdoc/classes/Pho/Job.html +627 -0
  21. data/doc/rdoc/classes/Pho/JobUpdate.html +141 -0
  22. data/doc/rdoc/classes/Pho/Jobs.html +538 -0
  23. data/doc/rdoc/classes/Pho/Namespaces.html +164 -0
  24. data/doc/rdoc/classes/Pho/OAI/Record.html +165 -0
  25. data/doc/rdoc/classes/Pho/OAI/Records.html +331 -0
  26. data/doc/rdoc/classes/Pho/OAI.html +118 -0
  27. data/doc/rdoc/classes/Pho/QueryProfile.html +524 -0
  28. data/doc/rdoc/classes/Pho/RDF/Parser.html +279 -0
  29. data/doc/rdoc/classes/Pho/RDF.html +120 -0
  30. data/doc/rdoc/classes/Pho/RDFCollection.html +119 -0
  31. data/doc/rdoc/classes/Pho/ResourceHash/Converter.html +325 -0
  32. data/doc/rdoc/classes/Pho/ResourceHash/SetAlgebra.html +241 -0
  33. data/doc/rdoc/classes/Pho/ResourceHash.html +123 -0
  34. data/doc/rdoc/classes/Pho/Snapshot.html +402 -0
  35. data/doc/rdoc/classes/Pho/Sparql/SparqlClient.html +594 -0
  36. data/doc/rdoc/classes/Pho/Sparql/SparqlHelper.html +696 -0
  37. data/doc/rdoc/classes/Pho/Sparql.html +187 -0
  38. data/doc/rdoc/classes/Pho/Status.html +296 -0
  39. data/doc/rdoc/classes/Pho/Store.html +1569 -0
  40. data/doc/rdoc/classes/Pho/StoreSparqlClient.html +183 -0
  41. data/doc/rdoc/classes/Pho/Update/Changeset.html +521 -0
  42. data/doc/rdoc/classes/Pho/Update/ChangesetBuilder.html +330 -0
  43. data/doc/rdoc/classes/Pho/Update/ChangesetHelper.html +159 -0
  44. data/doc/rdoc/classes/Pho/Update/Changesets.html +205 -0
  45. data/doc/rdoc/classes/Pho/Update/LiteralStatement.html +257 -0
  46. data/doc/rdoc/classes/Pho/Update/ResourceStatement.html +237 -0
  47. data/doc/rdoc/classes/Pho/Update/Statement.html +303 -0
  48. data/doc/rdoc/classes/Pho/Update.html +128 -0
  49. data/doc/rdoc/classes/Pho.html +283 -0
  50. data/doc/rdoc/classes/String.html +146 -0
  51. data/doc/rdoc/created.rid +1 -0
  52. data/doc/rdoc/files/CHANGES.html +373 -0
  53. data/doc/rdoc/files/README.html +204 -0
  54. data/doc/rdoc/files/lib/pho/changeset_builder_rb.html +108 -0
  55. data/doc/rdoc/files/lib/pho/changeset_rb.html +108 -0
  56. data/doc/rdoc/files/lib/pho/command_line_rb.html +101 -0
  57. data/doc/rdoc/files/lib/pho/converter_rb.html +108 -0
  58. data/doc/rdoc/files/lib/pho/enrichment_rb.html +101 -0
  59. data/doc/rdoc/files/lib/pho/etags_rb.html +108 -0
  60. data/doc/rdoc/files/lib/pho/facet_rb.html +101 -0
  61. data/doc/rdoc/files/lib/pho/field_predicate_map_rb.html +101 -0
  62. data/doc/rdoc/files/lib/pho/file_management_rb.html +101 -0
  63. data/doc/rdoc/files/lib/pho/file_manager_rb.html +108 -0
  64. data/doc/rdoc/files/lib/pho/job_rb.html +101 -0
  65. data/doc/rdoc/files/lib/pho/oai_rb.html +101 -0
  66. data/doc/rdoc/files/lib/pho/query_profile_rb.html +101 -0
  67. data/doc/rdoc/files/lib/pho/rdf_collection_rb.html +101 -0
  68. data/doc/rdoc/files/lib/pho/rdf_rb.html +108 -0
  69. data/doc/rdoc/files/lib/pho/resource_hash_rb.html +101 -0
  70. data/doc/rdoc/files/lib/pho/snapshot_rb.html +109 -0
  71. data/doc/rdoc/files/lib/pho/sparql_rb.html +101 -0
  72. data/doc/rdoc/files/lib/pho/status_rb.html +101 -0
  73. data/doc/rdoc/files/lib/pho/store_rb.html +108 -0
  74. data/doc/rdoc/files/lib/pho_rb.html +133 -0
  75. data/doc/rdoc/fr_class_index.html +72 -0
  76. data/doc/rdoc/fr_file_index.html +49 -0
  77. data/doc/rdoc/fr_method_index.html +239 -0
  78. data/doc/rdoc/index.html +24 -0
  79. data/doc/rdoc/rdoc-style.css +208 -0
  80. data/lib/pho/enrichment.rb +1 -0
  81. data/lib/pho/field_predicate_map.rb +5 -0
  82. data/lib/pho/query_profile.rb +5 -0
  83. data/lib/pho/store.rb +4 -1
  84. data/tests/tc_field_predicate_map.rb +7 -1
  85. data/tests/tc_query_profile.rb +6 -0
  86. data/tests/tc_store_util.rb +7 -0
  87. metadata +134 -21
@@ -0,0 +1,524 @@
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="#M000135">&lt;&lt;</a>&nbsp;&nbsp;
102
+ <a href="#M000133">create_weighting</a>&nbsp;&nbsp;
103
+ <a href="#M000136">get_by_name</a>&nbsp;&nbsp;
104
+ <a href="#M000140">mapped_name?</a>&nbsp;&nbsp;
105
+ <a href="#M000134">new</a>&nbsp;&nbsp;
106
+ <a href="#M000132">read_from_store</a>&nbsp;&nbsp;
107
+ <a href="#M000138">remove</a>&nbsp;&nbsp;
108
+ <a href="#M000139">remove_all</a>&nbsp;&nbsp;
109
+ <a href="#M000137">remove_by_name</a>&nbsp;&nbsp;
110
+ <a href="#M000141">to_rdf</a>&nbsp;&nbsp;
111
+ <a href="#M000142">upload</a>&nbsp;&nbsp;
112
+ </div>
113
+ </div>
114
+
115
+ </div>
116
+
117
+
118
+ <!-- if includes -->
119
+
120
+ <div id="section">
121
+
122
+
123
+
124
+
125
+
126
+ <div id="attribute-list">
127
+ <h3 class="section-bar">Attributes</h3>
128
+
129
+ <div class="name-list">
130
+ <table>
131
+ <tr class="top-aligned-row context-row">
132
+ <td class="context-item-name">field_weights</td>
133
+ <td class="context-item-value">&nbsp;[R]&nbsp;</td>
134
+ <td class="context-item-desc">
135
+ The list of field weightings
136
+
137
+ </td>
138
+ </tr>
139
+ <tr class="top-aligned-row context-row">
140
+ <td class="context-item-name">label</td>
141
+ <td class="context-item-value">&nbsp;[R]&nbsp;</td>
142
+ <td class="context-item-desc">
143
+ Label associated with the resource in the Platform config
144
+
145
+ </td>
146
+ </tr>
147
+ <tr class="top-aligned-row context-row">
148
+ <td class="context-item-name">uri</td>
149
+ <td class="context-item-value">&nbsp;[R]&nbsp;</td>
150
+ <td class="context-item-desc">
151
+ URI for this resource
152
+
153
+ </td>
154
+ </tr>
155
+ </table>
156
+ </div>
157
+ </div>
158
+
159
+
160
+
161
+ <!-- if method_list -->
162
+ <div id="methods">
163
+ <h3 class="section-bar">Public Class methods</h3>
164
+
165
+ <div id="method-M000133" class="method-detail">
166
+ <a name="M000133"></a>
167
+
168
+ <div class="method-heading">
169
+ <a href="#M000133" class="method-signature">
170
+ <span class="method-name">create_weighting</span><span class="method-args">(store, name, weight)</span>
171
+ </a>
172
+ </div>
173
+
174
+ <div class="method-description">
175
+ <p>
176
+ Create a <a href="FieldWeighting.html">FieldWeighting</a> object suitable
177
+ for adding to this store. Will ensure that the name of the propery is valid
178
+ according to the Platform naming rules
179
+ </p>
180
+ <table>
181
+ <tr><td valign="top">store:</td><td>the store that the weighting is to be created for
182
+
183
+ </td></tr>
184
+ <tr><td valign="top">name:</td><td>name of the field to be weighted
185
+
186
+ </td></tr>
187
+ <tr><td valign="top">weight:</td><td>the weighting of the field
188
+
189
+ </td></tr>
190
+ </table>
191
+ <p><a class="source-toggle" href="#"
192
+ onclick="toggleCode('M000133-source');return false;">[Source]</a></p>
193
+ <div class="method-source-code" id="M000133-source">
194
+ <pre>
195
+ <span class="ruby-comment cmt"># File lib/pho/query_profile.rb, line 84</span>
196
+ <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>)
197
+ <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>)
198
+ <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>
199
+ <span class="ruby-keyword kw">end</span>
200
+
201
+ <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>)
202
+ <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>)
203
+
204
+ <span class="ruby-keyword kw">end</span>
205
+ </pre>
206
+ </div>
207
+ </div>
208
+ </div>
209
+
210
+ <div id="method-M000134" class="method-detail">
211
+ <a name="M000134"></a>
212
+
213
+ <div class="method-heading">
214
+ <a href="#M000134" class="method-signature">
215
+ <span class="method-name">new</span><span class="method-args">(uri, label, field_weights=Array.new)</span>
216
+ </a>
217
+ </div>
218
+
219
+ <div class="method-description">
220
+ <p><a class="source-toggle" href="#"
221
+ onclick="toggleCode('M000134-source');return false;">[Source]</a></p>
222
+ <div class="method-source-code" id="M000134-source">
223
+ <pre>
224
+ <span class="ruby-comment cmt"># File lib/pho/query_profile.rb, line 94</span>
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">field_weights</span>=<span class="ruby-constant">Array</span>.<span class="ruby-identifier">new</span>)
226
+ <span class="ruby-ivar">@uri</span> = <span class="ruby-identifier">uri</span>
227
+ <span class="ruby-ivar">@label</span> = <span class="ruby-identifier">label</span>
228
+ <span class="ruby-ivar">@field_weights</span> = <span class="ruby-identifier">field_weights</span>
229
+ <span class="ruby-keyword kw">end</span>
230
+ </pre>
231
+ </div>
232
+ </div>
233
+ </div>
234
+
235
+ <div id="method-M000132" class="method-detail">
236
+ <a name="M000132"></a>
237
+
238
+ <div class="method-heading">
239
+ <a href="#M000132" class="method-signature">
240
+ <span class="method-name">read_from_store</span><span class="method-args">(store)</span>
241
+ </a>
242
+ </div>
243
+
244
+ <div class="method-description">
245
+ <p><a class="source-toggle" href="#"
246
+ onclick="toggleCode('M000132-source');return false;">[Source]</a></p>
247
+ <div class="method-source-code" id="M000132-source">
248
+ <pre>
249
+ <span class="ruby-comment cmt"># File lib/pho/query_profile.rb, line 53</span>
250
+ <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>)
251
+ <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>)
252
+ <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>
253
+ <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>
254
+ <span class="ruby-keyword kw">end</span>
255
+
256
+ <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>)
257
+
258
+ <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> )
259
+
260
+ <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>]
261
+ <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>)
262
+
263
+ <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>]
264
+ <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>
265
+ <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>]]
266
+ <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>]
267
+ <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>]
268
+ <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>)
269
+ }
270
+
271
+ <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">qp</span>
272
+
273
+ <span class="ruby-keyword kw">end</span>
274
+ </pre>
275
+ </div>
276
+ </div>
277
+ </div>
278
+
279
+ <h3 class="section-bar">Public Instance methods</h3>
280
+
281
+ <div id="method-M000135" class="method-detail">
282
+ <a name="M000135"></a>
283
+
284
+ <div class="method-heading">
285
+ <a href="#M000135" class="method-signature">
286
+ <span class="method-name">&lt;&lt;</span><span class="method-args">(weight)</span>
287
+ </a>
288
+ </div>
289
+
290
+ <div class="method-description">
291
+ <p><a class="source-toggle" href="#"
292
+ onclick="toggleCode('M000135-source');return false;">[Source]</a></p>
293
+ <div class="method-source-code" id="M000135-source">
294
+ <pre>
295
+ <span class="ruby-comment cmt"># File lib/pho/query_profile.rb, line 100</span>
296
+ <span class="ruby-keyword kw">def</span> <span class="ruby-operator">&lt;&lt;</span>(<span class="ruby-identifier">weight</span>)
297
+ <span class="ruby-ivar">@field_weights</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">weight</span>
298
+ <span class="ruby-keyword kw">end</span>
299
+ </pre>
300
+ </div>
301
+ </div>
302
+ </div>
303
+
304
+ <div id="method-M000136" class="method-detail">
305
+ <a name="M000136"></a>
306
+
307
+ <div class="method-heading">
308
+ <a href="#M000136" class="method-signature">
309
+ <span class="method-name">get_by_name</span><span class="method-args">(name)</span>
310
+ </a>
311
+ </div>
312
+
313
+ <div class="method-description">
314
+ <p>
315
+ Retrieve a FieldWeighing by name
316
+ </p>
317
+ <p><a class="source-toggle" href="#"
318
+ onclick="toggleCode('M000136-source');return false;">[Source]</a></p>
319
+ <div class="method-source-code" id="M000136-source">
320
+ <pre>
321
+ <span class="ruby-comment cmt"># File lib/pho/query_profile.rb, line 105</span>
322
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">get_by_name</span>(<span class="ruby-identifier">name</span>)
323
+ <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> }
324
+ <span class="ruby-keyword kw">end</span>
325
+ </pre>
326
+ </div>
327
+ </div>
328
+ </div>
329
+
330
+ <div id="method-M000140" class="method-detail">
331
+ <a name="M000140"></a>
332
+
333
+ <div class="method-heading">
334
+ <a href="#M000140" class="method-signature">
335
+ <span class="method-name">mapped_name?</span><span class="method-args">(name)</span>
336
+ </a>
337
+ </div>
338
+
339
+ <div class="method-description">
340
+ <p>
341
+ Is there a field weighting for a property with this name?
342
+ </p>
343
+ <p><a class="source-toggle" href="#"
344
+ onclick="toggleCode('M000140-source');return false;">[Source]</a></p>
345
+ <div class="method-source-code" id="M000140-source">
346
+ <pre>
347
+ <span class="ruby-comment cmt"># File lib/pho/query_profile.rb, line 128</span>
348
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">mapped_name?</span>(<span class="ruby-identifier">name</span>)
349
+ <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>
350
+ <span class="ruby-keyword kw">end</span>
351
+ </pre>
352
+ </div>
353
+ </div>
354
+ </div>
355
+
356
+ <div id="method-M000138" class="method-detail">
357
+ <a name="M000138"></a>
358
+
359
+ <div class="method-heading">
360
+ <a href="#M000138" class="method-signature">
361
+ <span class="method-name">remove</span><span class="method-args">(fw)</span>
362
+ </a>
363
+ </div>
364
+
365
+ <div class="method-description">
366
+ <p>
367
+ Remove a <a href="FieldWeighting.html">FieldWeighting</a> from the
368
+ collection
369
+ </p>
370
+ <p><a class="source-toggle" href="#"
371
+ onclick="toggleCode('M000138-source');return false;">[Source]</a></p>
372
+ <div class="method-source-code" id="M000138-source">
373
+ <pre>
374
+ <span class="ruby-comment cmt"># File lib/pho/query_profile.rb, line 118</span>
375
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">remove</span>(<span class="ruby-identifier">fw</span>)
376
+ <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>)
377
+ <span class="ruby-keyword kw">end</span>
378
+ </pre>
379
+ </div>
380
+ </div>
381
+ </div>
382
+
383
+ <div id="method-M000139" class="method-detail">
384
+ <a name="M000139"></a>
385
+
386
+ <div class="method-heading">
387
+ <a href="#M000139" class="method-signature">
388
+ <span class="method-name">remove_all</span><span class="method-args">()</span>
389
+ </a>
390
+ </div>
391
+
392
+ <div class="method-description">
393
+ <p>
394
+ Remove all field weights
395
+ </p>
396
+ <p><a class="source-toggle" href="#"
397
+ onclick="toggleCode('M000139-source');return false;">[Source]</a></p>
398
+ <div class="method-source-code" id="M000139-source">
399
+ <pre>
400
+ <span class="ruby-comment cmt"># File lib/pho/query_profile.rb, line 123</span>
401
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">remove_all</span>()
402
+ <span class="ruby-ivar">@field_weights</span> = <span class="ruby-constant">Array</span>.<span class="ruby-identifier">new</span>
403
+ <span class="ruby-keyword kw">end</span>
404
+ </pre>
405
+ </div>
406
+ </div>
407
+ </div>
408
+
409
+ <div id="method-M000137" class="method-detail">
410
+ <a name="M000137"></a>
411
+
412
+ <div class="method-heading">
413
+ <a href="#M000137" class="method-signature">
414
+ <span class="method-name">remove_by_name</span><span class="method-args">(name)</span>
415
+ </a>
416
+ </div>
417
+
418
+ <div class="method-description">
419
+ <p>
420
+ Remove a <a href="FieldWeighting.html">FieldWeighting</a> by name
421
+ </p>
422
+ <p><a class="source-toggle" href="#"
423
+ onclick="toggleCode('M000137-source');return false;">[Source]</a></p>
424
+ <div class="method-source-code" id="M000137-source">
425
+ <pre>
426
+ <span class="ruby-comment cmt"># File lib/pho/query_profile.rb, line 110</span>
427
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">remove_by_name</span>(<span class="ruby-identifier">name</span>)
428
+ <span class="ruby-identifier">fw</span> = <span class="ruby-identifier">get_by_name</span>(<span class="ruby-identifier">name</span>)
429
+ <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>)
430
+ <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">remove</span>(<span class="ruby-identifier">fw</span>)
431
+ <span class="ruby-keyword kw">end</span>
432
+ <span class="ruby-keyword kw">end</span>
433
+ </pre>
434
+ </div>
435
+ </div>
436
+ </div>
437
+
438
+ <div id="method-M000141" class="method-detail">
439
+ <a name="M000141"></a>
440
+
441
+ <div class="method-heading">
442
+ <a href="#M000141" class="method-signature">
443
+ <span class="method-name">to_rdf</span><span class="method-args">()</span>
444
+ </a>
445
+ </div>
446
+
447
+ <div class="method-description">
448
+ <p>
449
+ Dump this object to an <a href="RDF.html">RDF</a>/XML representation
450
+ suitable for submitting to the Platform
451
+ </p>
452
+ <p><a class="source-toggle" href="#"
453
+ onclick="toggleCode('M000141-source');return false;">[Source]</a></p>
454
+ <div class="method-source-code" id="M000141-source">
455
+ <pre>
456
+ <span class="ruby-comment cmt"># File lib/pho/query_profile.rb, line 133</span>
457
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_rdf</span>
458
+ <span class="ruby-identifier">rdf</span> = <span class="ruby-node">&quot;&lt;rdf:RDF xmlns:frm=\&quot;#{Pho::Namespaces::FRAME}\&quot; &quot;</span>
459
+ <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>
460
+ <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>
461
+ <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>
462
+
463
+ <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>
464
+
465
+ <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>
466
+ <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>
467
+
468
+ <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>
469
+ <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>
470
+ <span class="ruby-keyword kw">end</span>
471
+
472
+ <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>
473
+
474
+ <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>
475
+ <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>)
476
+ <span class="ruby-keyword kw">end</span>
477
+
478
+ <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>
479
+ <span class="ruby-keyword kw">end</span>
480
+ </pre>
481
+ </div>
482
+ </div>
483
+ </div>
484
+
485
+ <div id="method-M000142" class="method-detail">
486
+ <a name="M000142"></a>
487
+
488
+ <div class="method-heading">
489
+ <a href="#M000142" class="method-signature">
490
+ <span class="method-name">upload</span><span class="method-args">(store)</span>
491
+ </a>
492
+ </div>
493
+
494
+ <div class="method-description">
495
+ <p>
496
+ Upload an <a href="RDF.html">RDF</a>/XML presentation of this object to the
497
+ provided Platform <a href="Store.html">Store</a>
498
+ </p>
499
+ <p><a class="source-toggle" href="#"
500
+ onclick="toggleCode('M000142-source');return false;">[Source]</a></p>
501
+ <div class="method-source-code" id="M000142-source">
502
+ <pre>
503
+ <span class="ruby-comment cmt"># File lib/pho/query_profile.rb, line 158</span>
504
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">upload</span>(<span class="ruby-identifier">store</span>)
505
+ <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>)
506
+ <span class="ruby-keyword kw">end</span>
507
+ </pre>
508
+ </div>
509
+ </div>
510
+ </div>
511
+
512
+
513
+ </div>
514
+
515
+
516
+ </div>
517
+
518
+
519
+ <div id="validator-badges">
520
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
521
+ </div>
522
+
523
+ </body>
524
+ </html>