pho 0.7.2 → 0.7.3
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 +5 -0
- data/Rakefile +1 -1
- data/lib/pho/snapshot.rb +6 -1
- data/lib/pho/sparql.rb +4 -1
- data/tests/tc_snapshots.rb +14 -1
- data/tests/tc_sparql_helper.rb +23 -0
- metadata +60 -160
- data/doc/rdoc/classes/Pho/Analyzers.html +0 -310
- data/doc/rdoc/classes/Pho/CommandLine.html +0 -770
- data/doc/rdoc/classes/Pho/DatatypeProperty.html +0 -241
- data/doc/rdoc/classes/Pho/Enrichment/StoreEnricher.html +0 -410
- data/doc/rdoc/classes/Pho/Enrichment.html +0 -119
- data/doc/rdoc/classes/Pho/Etags.html +0 -310
- data/doc/rdoc/classes/Pho/Facet/Results.html +0 -299
- data/doc/rdoc/classes/Pho/Facet/Term.html +0 -177
- data/doc/rdoc/classes/Pho/Facet.html +0 -119
- data/doc/rdoc/classes/Pho/FieldPredicateMap.html +0 -668
- data/doc/rdoc/classes/Pho/FieldWeighting.html +0 -230
- data/doc/rdoc/classes/Pho/FileManagement/AbstractFileManager.html +0 -478
- data/doc/rdoc/classes/Pho/FileManagement/FileManager.html +0 -264
- data/doc/rdoc/classes/Pho/FileManagement/RDFManager.html +0 -259
- data/doc/rdoc/classes/Pho/FileManagement.html +0 -121
- data/doc/rdoc/classes/Pho/Job.html +0 -627
- data/doc/rdoc/classes/Pho/JobUpdate.html +0 -141
- data/doc/rdoc/classes/Pho/Jobs.html +0 -538
- data/doc/rdoc/classes/Pho/Namespaces.html +0 -164
- data/doc/rdoc/classes/Pho/OAI/Record.html +0 -165
- data/doc/rdoc/classes/Pho/OAI/Records.html +0 -331
- data/doc/rdoc/classes/Pho/OAI.html +0 -118
- data/doc/rdoc/classes/Pho/QueryProfile.html +0 -497
- data/doc/rdoc/classes/Pho/RDF/Parser.html +0 -279
- data/doc/rdoc/classes/Pho/RDF.html +0 -120
- data/doc/rdoc/classes/Pho/RDFCollection.html +0 -119
- data/doc/rdoc/classes/Pho/ResourceHash/Converter.html +0 -325
- data/doc/rdoc/classes/Pho/ResourceHash/SetAlgebra.html +0 -241
- data/doc/rdoc/classes/Pho/ResourceHash.html +0 -123
- data/doc/rdoc/classes/Pho/Snapshot.html +0 -397
- data/doc/rdoc/classes/Pho/Sparql/SparqlClient.html +0 -594
- data/doc/rdoc/classes/Pho/Sparql/SparqlHelper.html +0 -692
- data/doc/rdoc/classes/Pho/Sparql.html +0 -187
- data/doc/rdoc/classes/Pho/Status.html +0 -296
- data/doc/rdoc/classes/Pho/Store.html +0 -1560
- data/doc/rdoc/classes/Pho/StoreSparqlClient.html +0 -183
- data/doc/rdoc/classes/Pho/Update/Changeset.html +0 -521
- data/doc/rdoc/classes/Pho/Update/ChangesetBuilder.html +0 -330
- data/doc/rdoc/classes/Pho/Update/ChangesetHelper.html +0 -159
- data/doc/rdoc/classes/Pho/Update/Changesets.html +0 -205
- data/doc/rdoc/classes/Pho/Update/LiteralStatement.html +0 -257
- data/doc/rdoc/classes/Pho/Update/ResourceStatement.html +0 -237
- data/doc/rdoc/classes/Pho/Update/Statement.html +0 -303
- data/doc/rdoc/classes/Pho/Update.html +0 -128
- data/doc/rdoc/classes/Pho.html +0 -283
- data/doc/rdoc/classes/String.html +0 -146
- data/doc/rdoc/created.rid +0 -1
- data/doc/rdoc/files/CHANGES.html +0 -351
- data/doc/rdoc/files/README.html +0 -191
- data/doc/rdoc/files/lib/pho/changeset_builder_rb.html +0 -108
- data/doc/rdoc/files/lib/pho/changeset_rb.html +0 -108
- data/doc/rdoc/files/lib/pho/command_line_rb.html +0 -101
- data/doc/rdoc/files/lib/pho/converter_rb.html +0 -108
- data/doc/rdoc/files/lib/pho/enrichment_rb.html +0 -101
- data/doc/rdoc/files/lib/pho/etags_rb.html +0 -108
- data/doc/rdoc/files/lib/pho/facet_rb.html +0 -101
- data/doc/rdoc/files/lib/pho/field_predicate_map_rb.html +0 -101
- data/doc/rdoc/files/lib/pho/file_management_rb.html +0 -101
- data/doc/rdoc/files/lib/pho/file_manager_rb.html +0 -108
- data/doc/rdoc/files/lib/pho/job_rb.html +0 -101
- data/doc/rdoc/files/lib/pho/oai_rb.html +0 -101
- data/doc/rdoc/files/lib/pho/query_profile_rb.html +0 -101
- data/doc/rdoc/files/lib/pho/rdf_collection_rb.html +0 -101
- data/doc/rdoc/files/lib/pho/rdf_rb.html +0 -108
- data/doc/rdoc/files/lib/pho/resource_hash_rb.html +0 -101
- data/doc/rdoc/files/lib/pho/snapshot_rb.html +0 -109
- data/doc/rdoc/files/lib/pho/sparql_rb.html +0 -101
- data/doc/rdoc/files/lib/pho/status_rb.html +0 -101
- data/doc/rdoc/files/lib/pho/store_rb.html +0 -108
- data/doc/rdoc/files/lib/pho_rb.html +0 -133
- data/doc/rdoc/fr_class_index.html +0 -72
- data/doc/rdoc/fr_file_index.html +0 -49
- data/doc/rdoc/fr_method_index.html +0 -237
- data/doc/rdoc/index.html +0 -24
- data/doc/rdoc/rdoc-style.css +0 -208
|
@@ -1,668 +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::FieldPredicateMap</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::FieldPredicateMap</td>
|
|
54
|
-
</tr>
|
|
55
|
-
<tr class="top-aligned-row">
|
|
56
|
-
<td><strong>In:</strong></td>
|
|
57
|
-
<td>
|
|
58
|
-
<a href="../../files/lib/pho/field_predicate_map_rb.html">
|
|
59
|
-
lib/pho/field_predicate_map.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 a the Field Predicate Map configuration associated with a Platform
|
|
84
|
-
<a href="Store.html">Store</a>.
|
|
85
|
-
</p>
|
|
86
|
-
<p>
|
|
87
|
-
Class methods exist to create a <a
|
|
88
|
-
href="FieldPredicateMap.html">FieldPredicateMap</a> instance by reading
|
|
89
|
-
from a store, and to create <a
|
|
90
|
-
href="DatatypeProperty.html">DatatypeProperty</a> instances checking that
|
|
91
|
-
the supplied data is valid according to the same logic as used by the
|
|
92
|
-
Platform API.
|
|
93
|
-
</p>
|
|
94
|
-
|
|
95
|
-
</div>
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
</div>
|
|
99
|
-
|
|
100
|
-
<div id="method-list">
|
|
101
|
-
<h3 class="section-bar">Methods</h3>
|
|
102
|
-
|
|
103
|
-
<div class="name-list">
|
|
104
|
-
<a href="#M000097"><<</a>
|
|
105
|
-
<a href="#M000095">create_mapping</a>
|
|
106
|
-
<a href="#M000102">get_by_name</a>
|
|
107
|
-
<a href="#M000103">get_by_uri</a>
|
|
108
|
-
<a href="#M000098">get_name</a>
|
|
109
|
-
<a href="#M000099">get_property_uri</a>
|
|
110
|
-
<a href="#M000100">mapped_name?</a>
|
|
111
|
-
<a href="#M000101">mapped_uri?</a>
|
|
112
|
-
<a href="#M000096">new</a>
|
|
113
|
-
<a href="#M000094">read_from_store</a>
|
|
114
|
-
<a href="#M000104">remove</a>
|
|
115
|
-
<a href="#M000105">remove_by_name</a>
|
|
116
|
-
<a href="#M000106">remove_by_uri</a>
|
|
117
|
-
<a href="#M000107">to_rdf</a>
|
|
118
|
-
<a href="#M000108">upload</a>
|
|
119
|
-
</div>
|
|
120
|
-
</div>
|
|
121
|
-
|
|
122
|
-
</div>
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
<!-- if includes -->
|
|
126
|
-
|
|
127
|
-
<div id="section">
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
<div id="attribute-list">
|
|
134
|
-
<h3 class="section-bar">Attributes</h3>
|
|
135
|
-
|
|
136
|
-
<div class="name-list">
|
|
137
|
-
<table>
|
|
138
|
-
<tr class="top-aligned-row context-row">
|
|
139
|
-
<td class="context-item-name">datatype_properties</td>
|
|
140
|
-
<td class="context-item-value"> [R] </td>
|
|
141
|
-
<td class="context-item-desc">
|
|
142
|
-
An array of <a href="DatatypeProperty.html">DatatypeProperty</a> instances
|
|
143
|
-
|
|
144
|
-
</td>
|
|
145
|
-
</tr>
|
|
146
|
-
<tr class="top-aligned-row context-row">
|
|
147
|
-
<td class="context-item-name">label</td>
|
|
148
|
-
<td class="context-item-value"> [R] </td>
|
|
149
|
-
<td class="context-item-desc">
|
|
150
|
-
Label associated with the resource in the Platform config
|
|
151
|
-
|
|
152
|
-
</td>
|
|
153
|
-
</tr>
|
|
154
|
-
<tr class="top-aligned-row context-row">
|
|
155
|
-
<td class="context-item-name">uri</td>
|
|
156
|
-
<td class="context-item-value"> [R] </td>
|
|
157
|
-
<td class="context-item-desc">
|
|
158
|
-
URI for this resource
|
|
159
|
-
|
|
160
|
-
</td>
|
|
161
|
-
</tr>
|
|
162
|
-
</table>
|
|
163
|
-
</div>
|
|
164
|
-
</div>
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
<!-- if method_list -->
|
|
169
|
-
<div id="methods">
|
|
170
|
-
<h3 class="section-bar">Public Class methods</h3>
|
|
171
|
-
|
|
172
|
-
<div id="method-M000095" class="method-detail">
|
|
173
|
-
<a name="M000095"></a>
|
|
174
|
-
|
|
175
|
-
<div class="method-heading">
|
|
176
|
-
<a href="#M000095" class="method-signature">
|
|
177
|
-
<span class="method-name">create_mapping</span><span class="method-args">(store, property_uri, name, analyzer=nil)</span>
|
|
178
|
-
</a>
|
|
179
|
-
</div>
|
|
180
|
-
|
|
181
|
-
<div class="method-description">
|
|
182
|
-
<p>
|
|
183
|
-
Create a <a href="DatatypeProperty.html">DatatypeProperty</a> instance,
|
|
184
|
-
automatically assigning a unique identifier to it, and adding validating
|
|
185
|
-
the supplied data to ensure it matches the platform rules
|
|
186
|
-
</p>
|
|
187
|
-
<p><a class="source-toggle" href="#"
|
|
188
|
-
onclick="toggleCode('M000095-source');return false;">[Source]</a></p>
|
|
189
|
-
<div class="method-source-code" id="M000095-source">
|
|
190
|
-
<pre>
|
|
191
|
-
<span class="ruby-comment cmt"># File lib/pho/field_predicate_map.rb, line 139</span>
|
|
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
|
-
<span class="ruby-identifier">check_value</span>(<span class="ruby-value str">"property_uri"</span>, <span class="ruby-identifier">property_uri</span>)
|
|
194
|
-
<span class="ruby-identifier">check_value</span>(<span class="ruby-value str">"name"</span>, <span class="ruby-identifier">name</span>)
|
|
195
|
-
<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>)
|
|
196
|
-
<span class="ruby-identifier">raise</span> <span class="ruby-value str">"Name does not conform to regular expression: ^[a-zA-Z][a-zA-Z0-9]*$"</span>
|
|
197
|
-
<span class="ruby-keyword kw">end</span>
|
|
198
|
-
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">analyzer</span> <span class="ruby-operator">!=</span> <span class="ruby-keyword kw">nil</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">analyzer</span>.<span class="ruby-identifier">empty?</span>
|
|
199
|
-
<span class="ruby-identifier">analyzer</span> = <span class="ruby-keyword kw">nil</span>
|
|
200
|
-
<span class="ruby-keyword kw">end</span>
|
|
201
|
-
<span class="ruby-identifier">suffix</span> = <span class="ruby-identifier">get_suffix</span>(<span class="ruby-identifier">property_uri</span>)
|
|
202
|
-
<span class="ruby-identifier">mapping_uri</span> = <span class="ruby-identifier">store</span>.<span class="ruby-identifier">build_uri</span>(<span class="ruby-node">"/config/fpmaps/1##{suffix}"</span>)
|
|
203
|
-
<span class="ruby-keyword kw">return</span> <span class="ruby-constant">DatatypeProperty</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">mapping_uri</span>, <span class="ruby-identifier">property_uri</span>, <span class="ruby-identifier">name</span>, <span class="ruby-identifier">analyzer</span>)
|
|
204
|
-
<span class="ruby-keyword kw">end</span>
|
|
205
|
-
</pre>
|
|
206
|
-
</div>
|
|
207
|
-
</div>
|
|
208
|
-
</div>
|
|
209
|
-
|
|
210
|
-
<div id="method-M000096" class="method-detail">
|
|
211
|
-
<a name="M000096"></a>
|
|
212
|
-
|
|
213
|
-
<div class="method-heading">
|
|
214
|
-
<a href="#M000096" class="method-signature">
|
|
215
|
-
<span class="method-name">new</span><span class="method-args">(uri, label, datatype_properties = [])</span>
|
|
216
|
-
</a>
|
|
217
|
-
</div>
|
|
218
|
-
|
|
219
|
-
<div class="method-description">
|
|
220
|
-
<p><a class="source-toggle" href="#"
|
|
221
|
-
onclick="toggleCode('M000096-source');return false;">[Source]</a></p>
|
|
222
|
-
<div class="method-source-code" id="M000096-source">
|
|
223
|
-
<pre>
|
|
224
|
-
<span class="ruby-comment cmt"># File lib/pho/field_predicate_map.rb, line 153</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">datatype_properties</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">@datatype_properties</span> = <span class="ruby-identifier">datatype_properties</span>
|
|
229
|
-
<span class="ruby-keyword kw">end</span>
|
|
230
|
-
</pre>
|
|
231
|
-
</div>
|
|
232
|
-
</div>
|
|
233
|
-
</div>
|
|
234
|
-
|
|
235
|
-
<div id="method-M000094" class="method-detail">
|
|
236
|
-
<a name="M000094"></a>
|
|
237
|
-
|
|
238
|
-
<div class="method-heading">
|
|
239
|
-
<a href="#M000094" 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>
|
|
246
|
-
Read a <a href="FieldPredicateMap.html">FieldPredicateMap</a> instance from
|
|
247
|
-
the provided store. The method will retrieve the config as JSON, and parse
|
|
248
|
-
it to create an object instance.
|
|
249
|
-
</p>
|
|
250
|
-
<p><a class="source-toggle" href="#"
|
|
251
|
-
onclick="toggleCode('M000094-source');return false;">[Source]</a></p>
|
|
252
|
-
<div class="method-source-code" id="M000094-source">
|
|
253
|
-
<pre>
|
|
254
|
-
<span class="ruby-comment cmt"># File lib/pho/field_predicate_map.rb, line 109</span>
|
|
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>)
|
|
256
|
-
<span class="ruby-identifier">resp</span> = <span class="ruby-identifier">store</span>.<span class="ruby-identifier">get_field_predicate_map</span>(<span class="ruby-constant">Pho</span><span class="ruby-operator">::</span><span class="ruby-constant">ACCEPT_JSON</span>)
|
|
257
|
-
<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>
|
|
258
|
-
<span class="ruby-identifier">raise</span> <span class="ruby-node">"Unable to read Field Predicate Map from store. Response code was #{resp.status}"</span>
|
|
259
|
-
<span class="ruby-keyword kw">end</span>
|
|
260
|
-
|
|
261
|
-
<span class="ruby-identifier">fpmap_uri</span> = <span class="ruby-identifier">store</span>.<span class="ruby-identifier">build_uri</span>(<span class="ruby-value str">"/config/fpmaps/1"</span>)
|
|
262
|
-
|
|
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
|
-
<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>]
|
|
265
|
-
<span class="ruby-identifier">label</span> = <span class="ruby-value str">""</span>
|
|
266
|
-
<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>
|
|
267
|
-
<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>]
|
|
268
|
-
<span class="ruby-keyword kw">end</span>
|
|
269
|
-
|
|
270
|
-
<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>)
|
|
271
|
-
|
|
272
|
-
<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>]
|
|
273
|
-
<span class="ruby-identifier">mapped_properties</span>.<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">uri</span><span class="ruby-operator">|</span>
|
|
274
|
-
<span class="ruby-identifier">property</span> = <span class="ruby-identifier">json</span>[<span class="ruby-identifier">uri</span>[<span class="ruby-value str">"value"</span>]]
|
|
275
|
-
<span class="ruby-identifier">property_uri</span> = <span class="ruby-identifier">property</span>[<span class="ruby-value str">"http:\/\/schemas.talis.com\/2006\/frame\/schema#property"</span>][<span class="ruby-value">0</span>][<span class="ruby-value str">"value"</span>]
|
|
276
|
-
<span class="ruby-identifier">name</span> = <span class="ruby-identifier">property</span>[<span class="ruby-value str">"http:\/\/schemas.talis.com\/2006\/frame\/schema#name"</span>][<span class="ruby-value">0</span>][<span class="ruby-value str">"value"</span>]
|
|
277
|
-
<span class="ruby-identifier">fpmap</span> <span class="ruby-operator"><<</span> <span class="ruby-constant">DatatypeProperty</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">uri</span>[<span class="ruby-value str">"value"</span>], <span class="ruby-identifier">property_uri</span>, <span class="ruby-identifier">name</span>)
|
|
278
|
-
}
|
|
279
|
-
|
|
280
|
-
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">fpmap</span>
|
|
281
|
-
<span class="ruby-keyword kw">end</span>
|
|
282
|
-
</pre>
|
|
283
|
-
</div>
|
|
284
|
-
</div>
|
|
285
|
-
</div>
|
|
286
|
-
|
|
287
|
-
<h3 class="section-bar">Public Instance methods</h3>
|
|
288
|
-
|
|
289
|
-
<div id="method-M000097" class="method-detail">
|
|
290
|
-
<a name="M000097"></a>
|
|
291
|
-
|
|
292
|
-
<div class="method-heading">
|
|
293
|
-
<a href="#M000097" class="method-signature">
|
|
294
|
-
<span class="method-name"><<</span><span class="method-args">(obj)</span>
|
|
295
|
-
</a>
|
|
296
|
-
</div>
|
|
297
|
-
|
|
298
|
-
<div class="method-description">
|
|
299
|
-
<p>
|
|
300
|
-
Append a <a href="DatatypeProperty.html">DatatypeProperty</a> object to
|
|
301
|
-
this map. Note that the method does not validate the object, and neither
|
|
302
|
-
does it check for duplicate mappings.
|
|
303
|
-
</p>
|
|
304
|
-
<p><a class="source-toggle" href="#"
|
|
305
|
-
onclick="toggleCode('M000097-source');return false;">[Source]</a></p>
|
|
306
|
-
<div class="method-source-code" id="M000097-source">
|
|
307
|
-
<pre>
|
|
308
|
-
<span class="ruby-comment cmt"># File lib/pho/field_predicate_map.rb, line 162</span>
|
|
309
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-operator"><<</span>(<span class="ruby-identifier">obj</span>)
|
|
310
|
-
<span class="ruby-ivar">@datatype_properties</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">obj</span>
|
|
311
|
-
<span class="ruby-keyword kw">end</span>
|
|
312
|
-
</pre>
|
|
313
|
-
</div>
|
|
314
|
-
</div>
|
|
315
|
-
</div>
|
|
316
|
-
|
|
317
|
-
<div id="method-M000102" class="method-detail">
|
|
318
|
-
<a name="M000102"></a>
|
|
319
|
-
|
|
320
|
-
<div class="method-heading">
|
|
321
|
-
<a href="#M000102" class="method-signature">
|
|
322
|
-
<span class="method-name">get_by_name</span><span class="method-args">(name)</span>
|
|
323
|
-
</a>
|
|
324
|
-
</div>
|
|
325
|
-
|
|
326
|
-
<div class="method-description">
|
|
327
|
-
<p>
|
|
328
|
-
Find the <a href="DatatypeProperty.html">DatatypeProperty</a> (if any) with
|
|
329
|
-
the following name mapping
|
|
330
|
-
</p>
|
|
331
|
-
<p><a class="source-toggle" href="#"
|
|
332
|
-
onclick="toggleCode('M000102-source');return false;">[Source]</a></p>
|
|
333
|
-
<div class="method-source-code" id="M000102-source">
|
|
334
|
-
<pre>
|
|
335
|
-
<span class="ruby-comment cmt"># File lib/pho/field_predicate_map.rb, line 201</span>
|
|
336
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">get_by_name</span>(<span class="ruby-identifier">name</span>)
|
|
337
|
-
<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> }
|
|
338
|
-
<span class="ruby-keyword kw">end</span>
|
|
339
|
-
</pre>
|
|
340
|
-
</div>
|
|
341
|
-
</div>
|
|
342
|
-
</div>
|
|
343
|
-
|
|
344
|
-
<div id="method-M000103" class="method-detail">
|
|
345
|
-
<a name="M000103"></a>
|
|
346
|
-
|
|
347
|
-
<div class="method-heading">
|
|
348
|
-
<a href="#M000103" class="method-signature">
|
|
349
|
-
<span class="method-name">get_by_uri</span><span class="method-args">(uri)</span>
|
|
350
|
-
</a>
|
|
351
|
-
</div>
|
|
352
|
-
|
|
353
|
-
<div class="method-description">
|
|
354
|
-
<p>
|
|
355
|
-
Find the <a href="DatatypeProperty.html">DatatypeProperty</a> using a
|
|
356
|
-
property uri
|
|
357
|
-
</p>
|
|
358
|
-
<p><a class="source-toggle" href="#"
|
|
359
|
-
onclick="toggleCode('M000103-source');return false;">[Source]</a></p>
|
|
360
|
-
<div class="method-source-code" id="M000103-source">
|
|
361
|
-
<pre>
|
|
362
|
-
<span class="ruby-comment cmt"># File lib/pho/field_predicate_map.rb, line 206</span>
|
|
363
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">get_by_uri</span>(<span class="ruby-identifier">uri</span>)
|
|
364
|
-
<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> }
|
|
365
|
-
<span class="ruby-keyword kw">end</span>
|
|
366
|
-
</pre>
|
|
367
|
-
</div>
|
|
368
|
-
</div>
|
|
369
|
-
</div>
|
|
370
|
-
|
|
371
|
-
<div id="method-M000098" class="method-detail">
|
|
372
|
-
<a name="M000098"></a>
|
|
373
|
-
|
|
374
|
-
<div class="method-heading">
|
|
375
|
-
<a href="#M000098" class="method-signature">
|
|
376
|
-
<span class="method-name">get_name</span><span class="method-args">(uri)</span>
|
|
377
|
-
</a>
|
|
378
|
-
</div>
|
|
379
|
-
|
|
380
|
-
<div class="method-description">
|
|
381
|
-
<p>
|
|
382
|
-
Lookup the name mapped to the specified uri
|
|
383
|
-
</p>
|
|
384
|
-
<table>
|
|
385
|
-
<tr><td valign="top">uri:</td><td>the property uri to search for
|
|
386
|
-
|
|
387
|
-
</td></tr>
|
|
388
|
-
</table>
|
|
389
|
-
<p><a class="source-toggle" href="#"
|
|
390
|
-
onclick="toggleCode('M000098-source');return false;">[Source]</a></p>
|
|
391
|
-
<div class="method-source-code" id="M000098-source">
|
|
392
|
-
<pre>
|
|
393
|
-
<span class="ruby-comment cmt"># File lib/pho/field_predicate_map.rb, line 169</span>
|
|
394
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">get_name</span>(<span class="ruby-identifier">uri</span>)
|
|
395
|
-
<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> }
|
|
396
|
-
<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>
|
|
397
|
-
<span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">nil</span>
|
|
398
|
-
<span class="ruby-keyword kw">else</span>
|
|
399
|
-
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">p</span>.<span class="ruby-identifier">name</span>
|
|
400
|
-
<span class="ruby-keyword kw">end</span>
|
|
401
|
-
<span class="ruby-keyword kw">end</span>
|
|
402
|
-
</pre>
|
|
403
|
-
</div>
|
|
404
|
-
</div>
|
|
405
|
-
</div>
|
|
406
|
-
|
|
407
|
-
<div id="method-M000099" class="method-detail">
|
|
408
|
-
<a name="M000099"></a>
|
|
409
|
-
|
|
410
|
-
<div class="method-heading">
|
|
411
|
-
<a href="#M000099" class="method-signature">
|
|
412
|
-
<span class="method-name">get_property_uri</span><span class="method-args">(name)</span>
|
|
413
|
-
</a>
|
|
414
|
-
</div>
|
|
415
|
-
|
|
416
|
-
<div class="method-description">
|
|
417
|
-
<p>
|
|
418
|
-
Lookup the property mapped to the specified name
|
|
419
|
-
</p>
|
|
420
|
-
<table>
|
|
421
|
-
<tr><td valign="top">name:</td><td>the name to search for
|
|
422
|
-
|
|
423
|
-
</td></tr>
|
|
424
|
-
</table>
|
|
425
|
-
<p><a class="source-toggle" href="#"
|
|
426
|
-
onclick="toggleCode('M000099-source');return false;">[Source]</a></p>
|
|
427
|
-
<div class="method-source-code" id="M000099-source">
|
|
428
|
-
<pre>
|
|
429
|
-
<span class="ruby-comment cmt"># File lib/pho/field_predicate_map.rb, line 181</span>
|
|
430
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">get_property_uri</span>(<span class="ruby-identifier">name</span>)
|
|
431
|
-
<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> }
|
|
432
|
-
<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>
|
|
433
|
-
<span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">nil</span>
|
|
434
|
-
<span class="ruby-keyword kw">else</span>
|
|
435
|
-
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">p</span>.<span class="ruby-identifier">property_uri</span>
|
|
436
|
-
<span class="ruby-keyword kw">end</span>
|
|
437
|
-
<span class="ruby-keyword kw">end</span>
|
|
438
|
-
</pre>
|
|
439
|
-
</div>
|
|
440
|
-
</div>
|
|
441
|
-
</div>
|
|
442
|
-
|
|
443
|
-
<div id="method-M000100" class="method-detail">
|
|
444
|
-
<a name="M000100"></a>
|
|
445
|
-
|
|
446
|
-
<div class="method-heading">
|
|
447
|
-
<a href="#M000100" class="method-signature">
|
|
448
|
-
<span class="method-name">mapped_name?</span><span class="method-args">(name)</span>
|
|
449
|
-
</a>
|
|
450
|
-
</div>
|
|
451
|
-
|
|
452
|
-
<div class="method-description">
|
|
453
|
-
<p>
|
|
454
|
-
Is there a mapping for a property with this name?
|
|
455
|
-
</p>
|
|
456
|
-
<p><a class="source-toggle" href="#"
|
|
457
|
-
onclick="toggleCode('M000100-source');return false;">[Source]</a></p>
|
|
458
|
-
<div class="method-source-code" id="M000100-source">
|
|
459
|
-
<pre>
|
|
460
|
-
<span class="ruby-comment cmt"># File lib/pho/field_predicate_map.rb, line 191</span>
|
|
461
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">mapped_name?</span>(<span class="ruby-identifier">name</span>)
|
|
462
|
-
<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>
|
|
463
|
-
<span class="ruby-keyword kw">end</span>
|
|
464
|
-
</pre>
|
|
465
|
-
</div>
|
|
466
|
-
</div>
|
|
467
|
-
</div>
|
|
468
|
-
|
|
469
|
-
<div id="method-M000101" class="method-detail">
|
|
470
|
-
<a name="M000101"></a>
|
|
471
|
-
|
|
472
|
-
<div class="method-heading">
|
|
473
|
-
<a href="#M000101" class="method-signature">
|
|
474
|
-
<span class="method-name">mapped_uri?</span><span class="method-args">(uri)</span>
|
|
475
|
-
</a>
|
|
476
|
-
</div>
|
|
477
|
-
|
|
478
|
-
<div class="method-description">
|
|
479
|
-
<p>
|
|
480
|
-
Is there a mapping for this uri?
|
|
481
|
-
</p>
|
|
482
|
-
<p><a class="source-toggle" href="#"
|
|
483
|
-
onclick="toggleCode('M000101-source');return false;">[Source]</a></p>
|
|
484
|
-
<div class="method-source-code" id="M000101-source">
|
|
485
|
-
<pre>
|
|
486
|
-
<span class="ruby-comment cmt"># File lib/pho/field_predicate_map.rb, line 196</span>
|
|
487
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">mapped_uri?</span>(<span class="ruby-identifier">uri</span>)
|
|
488
|
-
<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>
|
|
489
|
-
<span class="ruby-keyword kw">end</span>
|
|
490
|
-
</pre>
|
|
491
|
-
</div>
|
|
492
|
-
</div>
|
|
493
|
-
</div>
|
|
494
|
-
|
|
495
|
-
<div id="method-M000104" class="method-detail">
|
|
496
|
-
<a name="M000104"></a>
|
|
497
|
-
|
|
498
|
-
<div class="method-heading">
|
|
499
|
-
<a href="#M000104" class="method-signature">
|
|
500
|
-
<span class="method-name">remove</span><span class="method-args">(datatype_property)</span>
|
|
501
|
-
</a>
|
|
502
|
-
</div>
|
|
503
|
-
|
|
504
|
-
<div class="method-description">
|
|
505
|
-
<p>
|
|
506
|
-
Remove a <a href="DatatypeProperty.html">DatatypeProperty</a> from the
|
|
507
|
-
collection
|
|
508
|
-
</p>
|
|
509
|
-
<p><a class="source-toggle" href="#"
|
|
510
|
-
onclick="toggleCode('M000104-source');return false;">[Source]</a></p>
|
|
511
|
-
<div class="method-source-code" id="M000104-source">
|
|
512
|
-
<pre>
|
|
513
|
-
<span class="ruby-comment cmt"># File lib/pho/field_predicate_map.rb, line 211</span>
|
|
514
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">remove</span>(<span class="ruby-identifier">datatype_property</span>)
|
|
515
|
-
<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>)
|
|
516
|
-
<span class="ruby-keyword kw">end</span>
|
|
517
|
-
</pre>
|
|
518
|
-
</div>
|
|
519
|
-
</div>
|
|
520
|
-
</div>
|
|
521
|
-
|
|
522
|
-
<div id="method-M000105" class="method-detail">
|
|
523
|
-
<a name="M000105"></a>
|
|
524
|
-
|
|
525
|
-
<div class="method-heading">
|
|
526
|
-
<a href="#M000105" class="method-signature">
|
|
527
|
-
<span class="method-name">remove_by_name</span><span class="method-args">(name)</span>
|
|
528
|
-
</a>
|
|
529
|
-
</div>
|
|
530
|
-
|
|
531
|
-
<div class="method-description">
|
|
532
|
-
<p>
|
|
533
|
-
Remove a <a href="DatatypeProperty.html">DatatypeProperty</a> by its mapped
|
|
534
|
-
name
|
|
535
|
-
</p>
|
|
536
|
-
<p><a class="source-toggle" href="#"
|
|
537
|
-
onclick="toggleCode('M000105-source');return false;">[Source]</a></p>
|
|
538
|
-
<div class="method-source-code" id="M000105-source">
|
|
539
|
-
<pre>
|
|
540
|
-
<span class="ruby-comment cmt"># File lib/pho/field_predicate_map.rb, line 216</span>
|
|
541
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">remove_by_name</span>(<span class="ruby-identifier">name</span>)
|
|
542
|
-
<span class="ruby-identifier">p</span> = <span class="ruby-identifier">get_by_name</span>(<span class="ruby-identifier">name</span>)
|
|
543
|
-
<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>)
|
|
544
|
-
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">remove</span>(<span class="ruby-identifier">p</span>)
|
|
545
|
-
<span class="ruby-keyword kw">end</span>
|
|
546
|
-
<span class="ruby-keyword kw">end</span>
|
|
547
|
-
</pre>
|
|
548
|
-
</div>
|
|
549
|
-
</div>
|
|
550
|
-
</div>
|
|
551
|
-
|
|
552
|
-
<div id="method-M000106" class="method-detail">
|
|
553
|
-
<a name="M000106"></a>
|
|
554
|
-
|
|
555
|
-
<div class="method-heading">
|
|
556
|
-
<a href="#M000106" class="method-signature">
|
|
557
|
-
<span class="method-name">remove_by_uri</span><span class="method-args">(uri)</span>
|
|
558
|
-
</a>
|
|
559
|
-
</div>
|
|
560
|
-
|
|
561
|
-
<div class="method-description">
|
|
562
|
-
<p>
|
|
563
|
-
Remove a <a href="DatatypeProperty.html">DatatypeProperty</a> by its mapped
|
|
564
|
-
uri
|
|
565
|
-
</p>
|
|
566
|
-
<p><a class="source-toggle" href="#"
|
|
567
|
-
onclick="toggleCode('M000106-source');return false;">[Source]</a></p>
|
|
568
|
-
<div class="method-source-code" id="M000106-source">
|
|
569
|
-
<pre>
|
|
570
|
-
<span class="ruby-comment cmt"># File lib/pho/field_predicate_map.rb, line 224</span>
|
|
571
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">remove_by_uri</span>(<span class="ruby-identifier">uri</span>)
|
|
572
|
-
<span class="ruby-identifier">p</span> = <span class="ruby-identifier">get_by_uri</span>(<span class="ruby-identifier">uri</span>)
|
|
573
|
-
<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>)
|
|
574
|
-
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">remove</span>(<span class="ruby-identifier">p</span>)
|
|
575
|
-
<span class="ruby-keyword kw">end</span>
|
|
576
|
-
<span class="ruby-keyword kw">end</span>
|
|
577
|
-
</pre>
|
|
578
|
-
</div>
|
|
579
|
-
</div>
|
|
580
|
-
</div>
|
|
581
|
-
|
|
582
|
-
<div id="method-M000107" class="method-detail">
|
|
583
|
-
<a name="M000107"></a>
|
|
584
|
-
|
|
585
|
-
<div class="method-heading">
|
|
586
|
-
<a href="#M000107" class="method-signature">
|
|
587
|
-
<span class="method-name">to_rdf</span><span class="method-args">()</span>
|
|
588
|
-
</a>
|
|
589
|
-
</div>
|
|
590
|
-
|
|
591
|
-
<div class="method-description">
|
|
592
|
-
<p>
|
|
593
|
-
Dump this object to an <a href="RDF.html">RDF</a>/XML representation
|
|
594
|
-
suitable for submitting to the Platform
|
|
595
|
-
</p>
|
|
596
|
-
<p><a class="source-toggle" href="#"
|
|
597
|
-
onclick="toggleCode('M000107-source');return false;">[Source]</a></p>
|
|
598
|
-
<div class="method-source-code" id="M000107-source">
|
|
599
|
-
<pre>
|
|
600
|
-
<span class="ruby-comment cmt"># File lib/pho/field_predicate_map.rb, line 232</span>
|
|
601
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_rdf</span>
|
|
602
|
-
<span class="ruby-identifier">rdf</span> = <span class="ruby-node">"<rdf:RDF xmlns:frm=\"#{Pho::Namespaces::FRAME}\" "</span>
|
|
603
|
-
<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>
|
|
604
|
-
<span class="ruby-identifier">rdf</span> <span class="ruby-operator"><<</span> <span class="ruby-value str">" xmlns:rdfs=\"http://www.w3.org/2000/01/rdf-schema#\" "</span>
|
|
605
|
-
<span class="ruby-identifier">rdf</span> <span class="ruby-operator"><<</span> <span class="ruby-node">" xmlns:bf=\"#{Pho::Namespaces::CONFIG}\" > "</span>
|
|
606
|
-
|
|
607
|
-
<span class="ruby-identifier">rdf</span> <span class="ruby-operator"><<</span> <span class="ruby-node">" <rdf:Description rdf:about=\"#{@uri}\"> "</span>
|
|
608
|
-
|
|
609
|
-
<span class="ruby-identifier">rdf</span> <span class="ruby-operator"><<</span> <span class="ruby-node">" <rdf:type rdf:resource=\"#{Pho::Namespaces::CONFIG}FieldPredicateMap\"/> "</span>
|
|
610
|
-
<span class="ruby-identifier">rdf</span> <span class="ruby-operator"><<</span> <span class="ruby-node">" <rdfs:label>#{@label}</rdfs:label> "</span>
|
|
611
|
-
|
|
612
|
-
<span class="ruby-ivar">@datatype_properties</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>
|
|
613
|
-
<span class="ruby-identifier">rdf</span> <span class="ruby-operator"><<</span> <span class="ruby-node">" <frm:mappedDatatypeProperty rdf:resource=\"#{property.uri}\"/> "</span>
|
|
614
|
-
<span class="ruby-keyword kw">end</span>
|
|
615
|
-
|
|
616
|
-
<span class="ruby-identifier">rdf</span> <span class="ruby-operator"><<</span> <span class="ruby-value str">" </rdf:Description>"</span>
|
|
617
|
-
|
|
618
|
-
<span class="ruby-ivar">@datatype_properties</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>
|
|
619
|
-
<span class="ruby-identifier">rdf</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">property</span>.<span class="ruby-identifier">to_rdf</span>(<span class="ruby-keyword kw">false</span>)
|
|
620
|
-
<span class="ruby-keyword kw">end</span>
|
|
621
|
-
|
|
622
|
-
<span class="ruby-identifier">rdf</span> <span class="ruby-operator"><<</span> <span class="ruby-value str">"</rdf:RDF>"</span>
|
|
623
|
-
<span class="ruby-keyword kw">end</span>
|
|
624
|
-
</pre>
|
|
625
|
-
</div>
|
|
626
|
-
</div>
|
|
627
|
-
</div>
|
|
628
|
-
|
|
629
|
-
<div id="method-M000108" class="method-detail">
|
|
630
|
-
<a name="M000108"></a>
|
|
631
|
-
|
|
632
|
-
<div class="method-heading">
|
|
633
|
-
<a href="#M000108" class="method-signature">
|
|
634
|
-
<span class="method-name">upload</span><span class="method-args">(store)</span>
|
|
635
|
-
</a>
|
|
636
|
-
</div>
|
|
637
|
-
|
|
638
|
-
<div class="method-description">
|
|
639
|
-
<p>
|
|
640
|
-
Upload an <a href="RDF.html">RDF</a>/XML presentation of this object to the
|
|
641
|
-
provided Platform <a href="Store.html">Store</a>
|
|
642
|
-
</p>
|
|
643
|
-
<p><a class="source-toggle" href="#"
|
|
644
|
-
onclick="toggleCode('M000108-source');return false;">[Source]</a></p>
|
|
645
|
-
<div class="method-source-code" id="M000108-source">
|
|
646
|
-
<pre>
|
|
647
|
-
<span class="ruby-comment cmt"># File lib/pho/field_predicate_map.rb, line 257</span>
|
|
648
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">upload</span>(<span class="ruby-identifier">store</span>)
|
|
649
|
-
<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>)
|
|
650
|
-
<span class="ruby-keyword kw">end</span>
|
|
651
|
-
</pre>
|
|
652
|
-
</div>
|
|
653
|
-
</div>
|
|
654
|
-
</div>
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
</div>
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
</div>
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
<div id="validator-badges">
|
|
664
|
-
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
|
665
|
-
</div>
|
|
666
|
-
|
|
667
|
-
</body>
|
|
668
|
-
</html>
|