pho 0.7.3 → 0.7.4
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGES +6 -0
- data/README +9 -1
- data/Rakefile +1 -1
- data/doc/index.html +3 -1
- data/doc/rdoc/classes/Pho/Analyzers.html +310 -0
- data/doc/rdoc/classes/Pho/CommandLine.html +770 -0
- data/doc/rdoc/classes/Pho/DatatypeProperty.html +241 -0
- data/doc/rdoc/classes/Pho/Enrichment/StoreEnricher.html +410 -0
- data/doc/rdoc/classes/Pho/Enrichment.html +119 -0
- data/doc/rdoc/classes/Pho/Etags.html +310 -0
- data/doc/rdoc/classes/Pho/Facet/Results.html +299 -0
- data/doc/rdoc/classes/Pho/Facet/Term.html +177 -0
- data/doc/rdoc/classes/Pho/Facet.html +119 -0
- data/doc/rdoc/classes/Pho/FieldPredicateMap.html +695 -0
- data/doc/rdoc/classes/Pho/FieldWeighting.html +230 -0
- data/doc/rdoc/classes/Pho/FileManagement/AbstractFileManager.html +478 -0
- data/doc/rdoc/classes/Pho/FileManagement/FileManager.html +264 -0
- data/doc/rdoc/classes/Pho/FileManagement/RDFManager.html +259 -0
- data/doc/rdoc/classes/Pho/FileManagement.html +121 -0
- data/doc/rdoc/classes/Pho/Job.html +627 -0
- data/doc/rdoc/classes/Pho/JobUpdate.html +141 -0
- data/doc/rdoc/classes/Pho/Jobs.html +538 -0
- data/doc/rdoc/classes/Pho/Namespaces.html +164 -0
- data/doc/rdoc/classes/Pho/OAI/Record.html +165 -0
- data/doc/rdoc/classes/Pho/OAI/Records.html +331 -0
- data/doc/rdoc/classes/Pho/OAI.html +118 -0
- data/doc/rdoc/classes/Pho/QueryProfile.html +524 -0
- data/doc/rdoc/classes/Pho/RDF/Parser.html +279 -0
- data/doc/rdoc/classes/Pho/RDF.html +120 -0
- data/doc/rdoc/classes/Pho/RDFCollection.html +119 -0
- data/doc/rdoc/classes/Pho/ResourceHash/Converter.html +325 -0
- data/doc/rdoc/classes/Pho/ResourceHash/SetAlgebra.html +241 -0
- data/doc/rdoc/classes/Pho/ResourceHash.html +123 -0
- data/doc/rdoc/classes/Pho/Snapshot.html +402 -0
- data/doc/rdoc/classes/Pho/Sparql/SparqlClient.html +594 -0
- data/doc/rdoc/classes/Pho/Sparql/SparqlHelper.html +696 -0
- data/doc/rdoc/classes/Pho/Sparql.html +187 -0
- data/doc/rdoc/classes/Pho/Status.html +296 -0
- data/doc/rdoc/classes/Pho/Store.html +1569 -0
- data/doc/rdoc/classes/Pho/StoreSparqlClient.html +183 -0
- data/doc/rdoc/classes/Pho/Update/Changeset.html +521 -0
- data/doc/rdoc/classes/Pho/Update/ChangesetBuilder.html +330 -0
- data/doc/rdoc/classes/Pho/Update/ChangesetHelper.html +159 -0
- data/doc/rdoc/classes/Pho/Update/Changesets.html +205 -0
- data/doc/rdoc/classes/Pho/Update/LiteralStatement.html +257 -0
- data/doc/rdoc/classes/Pho/Update/ResourceStatement.html +237 -0
- data/doc/rdoc/classes/Pho/Update/Statement.html +303 -0
- data/doc/rdoc/classes/Pho/Update.html +128 -0
- data/doc/rdoc/classes/Pho.html +283 -0
- data/doc/rdoc/classes/String.html +146 -0
- data/doc/rdoc/created.rid +1 -0
- data/doc/rdoc/files/CHANGES.html +373 -0
- data/doc/rdoc/files/README.html +204 -0
- data/doc/rdoc/files/lib/pho/changeset_builder_rb.html +108 -0
- data/doc/rdoc/files/lib/pho/changeset_rb.html +108 -0
- data/doc/rdoc/files/lib/pho/command_line_rb.html +101 -0
- data/doc/rdoc/files/lib/pho/converter_rb.html +108 -0
- data/doc/rdoc/files/lib/pho/enrichment_rb.html +101 -0
- data/doc/rdoc/files/lib/pho/etags_rb.html +108 -0
- data/doc/rdoc/files/lib/pho/facet_rb.html +101 -0
- data/doc/rdoc/files/lib/pho/field_predicate_map_rb.html +101 -0
- data/doc/rdoc/files/lib/pho/file_management_rb.html +101 -0
- data/doc/rdoc/files/lib/pho/file_manager_rb.html +108 -0
- data/doc/rdoc/files/lib/pho/job_rb.html +101 -0
- data/doc/rdoc/files/lib/pho/oai_rb.html +101 -0
- data/doc/rdoc/files/lib/pho/query_profile_rb.html +101 -0
- data/doc/rdoc/files/lib/pho/rdf_collection_rb.html +101 -0
- data/doc/rdoc/files/lib/pho/rdf_rb.html +108 -0
- data/doc/rdoc/files/lib/pho/resource_hash_rb.html +101 -0
- data/doc/rdoc/files/lib/pho/snapshot_rb.html +109 -0
- data/doc/rdoc/files/lib/pho/sparql_rb.html +101 -0
- data/doc/rdoc/files/lib/pho/status_rb.html +101 -0
- data/doc/rdoc/files/lib/pho/store_rb.html +108 -0
- data/doc/rdoc/files/lib/pho_rb.html +133 -0
- data/doc/rdoc/fr_class_index.html +72 -0
- data/doc/rdoc/fr_file_index.html +49 -0
- data/doc/rdoc/fr_method_index.html +239 -0
- data/doc/rdoc/index.html +24 -0
- data/doc/rdoc/rdoc-style.css +208 -0
- data/lib/pho/enrichment.rb +1 -0
- data/lib/pho/field_predicate_map.rb +5 -0
- data/lib/pho/query_profile.rb +5 -0
- data/lib/pho/store.rb +4 -1
- data/tests/tc_field_predicate_map.rb +7 -1
- data/tests/tc_query_profile.rb +6 -0
- data/tests/tc_store_util.rb +7 -0
- metadata +134 -21
@@ -0,0 +1,521 @@
|
|
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::Update::Changeset</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::Update::Changeset</td>
|
54
|
+
</tr>
|
55
|
+
<tr class="top-aligned-row">
|
56
|
+
<td><strong>In:</strong></td>
|
57
|
+
<td>
|
58
|
+
<a href="../../../files/lib/pho/changeset_rb.html">
|
59
|
+
lib/pho/changeset.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 <a href="Changeset.html">Changeset</a>: a delta to an <a
|
84
|
+
href="../RDF.html">RDF</a> graph
|
85
|
+
</p>
|
86
|
+
<p>
|
87
|
+
The <a href="../RDF.html">RDF</a> Schema for <a
|
88
|
+
href="Changesets.html">Changesets</a> can be found at:
|
89
|
+
</p>
|
90
|
+
<pre>
|
91
|
+
http://vocab.org/changeset/schema
|
92
|
+
</pre>
|
93
|
+
<p>
|
94
|
+
Further reading:
|
95
|
+
</p>
|
96
|
+
<pre>
|
97
|
+
http://n2.talis.com/wiki/Changesets
|
98
|
+
</pre>
|
99
|
+
<p>
|
100
|
+
The Platform <a href="Changeset.html">Changeset</a> protocol is described
|
101
|
+
at:
|
102
|
+
</p>
|
103
|
+
<pre>
|
104
|
+
http://n2.talis.com/wiki/Changeset_Protocol
|
105
|
+
</pre>
|
106
|
+
<p>
|
107
|
+
Processing of batch changesets is described at:
|
108
|
+
</p>
|
109
|
+
<pre>
|
110
|
+
http://n2.talis.com/wiki/Metabox
|
111
|
+
</pre>
|
112
|
+
|
113
|
+
</div>
|
114
|
+
|
115
|
+
|
116
|
+
</div>
|
117
|
+
|
118
|
+
<div id="method-list">
|
119
|
+
<h3 class="section-bar">Methods</h3>
|
120
|
+
|
121
|
+
<div class="name-list">
|
122
|
+
<a href="#M000041">add_addition</a>
|
123
|
+
<a href="#M000042">add_additions</a>
|
124
|
+
<a href="#M000044">add_removal</a>
|
125
|
+
<a href="#M000045">add_removals</a>
|
126
|
+
<a href="#M000040">additions</a>
|
127
|
+
<a href="#M000037">new</a>
|
128
|
+
<a href="#M000043">removals</a>
|
129
|
+
<a href="#M000046">submit</a>
|
130
|
+
<a href="#M000039">to_rdf</a>
|
131
|
+
<a href="#M000038">to_s</a>
|
132
|
+
</div>
|
133
|
+
</div>
|
134
|
+
|
135
|
+
</div>
|
136
|
+
|
137
|
+
|
138
|
+
<!-- if includes -->
|
139
|
+
|
140
|
+
<div id="section">
|
141
|
+
|
142
|
+
|
143
|
+
|
144
|
+
|
145
|
+
|
146
|
+
<div id="attribute-list">
|
147
|
+
<h3 class="section-bar">Attributes</h3>
|
148
|
+
|
149
|
+
<div class="name-list">
|
150
|
+
<table>
|
151
|
+
<tr class="top-aligned-row context-row">
|
152
|
+
<td class="context-item-name">change_reason</td>
|
153
|
+
<td class="context-item-value"> [RW] </td>
|
154
|
+
<td class="context-item-desc">
|
155
|
+
Reason for the change being made
|
156
|
+
|
157
|
+
</td>
|
158
|
+
</tr>
|
159
|
+
<tr class="top-aligned-row context-row">
|
160
|
+
<td class="context-item-name">creator_name</td>
|
161
|
+
<td class="context-item-value"> [RW] </td>
|
162
|
+
<td class="context-item-desc">
|
163
|
+
Creator name
|
164
|
+
|
165
|
+
</td>
|
166
|
+
</tr>
|
167
|
+
<tr class="top-aligned-row context-row">
|
168
|
+
<td class="context-item-name">subject_of_change</td>
|
169
|
+
<td class="context-item-value"> [R] </td>
|
170
|
+
<td class="context-item-desc">
|
171
|
+
URI of the subject of change for this changeset
|
172
|
+
|
173
|
+
</td>
|
174
|
+
</tr>
|
175
|
+
</table>
|
176
|
+
</div>
|
177
|
+
</div>
|
178
|
+
|
179
|
+
|
180
|
+
|
181
|
+
<!-- if method_list -->
|
182
|
+
<div id="methods">
|
183
|
+
<h3 class="section-bar">Public Class methods</h3>
|
184
|
+
|
185
|
+
<div id="method-M000037" class="method-detail">
|
186
|
+
<a name="M000037"></a>
|
187
|
+
|
188
|
+
<div class="method-heading">
|
189
|
+
<a href="#M000037" class="method-signature">
|
190
|
+
<span class="method-name">new</span><span class="method-args">(subject_of_change, creator_name=nil, change_reason=nil) {|self if block_given?| ...}</span>
|
191
|
+
</a>
|
192
|
+
</div>
|
193
|
+
|
194
|
+
<div class="method-description">
|
195
|
+
<p>
|
196
|
+
Constructor. Parameter should be the URI of the subject of change
|
197
|
+
</p>
|
198
|
+
<pre>
|
199
|
+
subject_of_change:: the URI of the resource being changed
|
200
|
+
creator_name:: the name of the creator of this change (optional)
|
201
|
+
change_reason:: the reason for the change (optional)
|
202
|
+
</pre>
|
203
|
+
<p><a class="source-toggle" href="#"
|
204
|
+
onclick="toggleCode('M000037-source');return false;">[Source]</a></p>
|
205
|
+
<div class="method-source-code" id="M000037-source">
|
206
|
+
<pre>
|
207
|
+
<span class="ruby-comment cmt"># File lib/pho/changeset.rb, line 222</span>
|
208
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">subject_of_change</span>, <span class="ruby-identifier">creator_name</span>=<span class="ruby-keyword kw">nil</span>, <span class="ruby-identifier">change_reason</span>=<span class="ruby-keyword kw">nil</span>)
|
209
|
+
<span class="ruby-identifier">u</span> = <span class="ruby-constant">URI</span>.<span class="ruby-identifier">parse</span>(<span class="ruby-identifier">subject_of_change</span>)
|
210
|
+
<span class="ruby-comment cmt">#this should catch literals</span>
|
211
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">u</span>.<span class="ruby-identifier">scheme</span>() <span class="ruby-operator">==</span> <span class="ruby-keyword kw">nil</span>
|
212
|
+
<span class="ruby-identifier">raise</span> <span class="ruby-constant">URI</span><span class="ruby-operator">::</span><span class="ruby-constant">InvalidURIError</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value str">"Invalid URI"</span>)
|
213
|
+
<span class="ruby-keyword kw">end</span>
|
214
|
+
<span class="ruby-ivar">@subject_of_change</span> = <span class="ruby-identifier">subject_of_change</span>
|
215
|
+
<span class="ruby-ivar">@creator_name</span> = <span class="ruby-identifier">creator_name</span>
|
216
|
+
<span class="ruby-ivar">@change_reason</span> = <span class="ruby-identifier">change_reason</span>
|
217
|
+
<span class="ruby-ivar">@additions</span> = <span class="ruby-constant">Array</span>.<span class="ruby-identifier">new</span>
|
218
|
+
<span class="ruby-ivar">@removals</span> = <span class="ruby-constant">Array</span>.<span class="ruby-identifier">new</span>
|
219
|
+
<span class="ruby-keyword kw">yield</span> <span class="ruby-keyword kw">self</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">block_given?</span>
|
220
|
+
<span class="ruby-keyword kw">end</span>
|
221
|
+
</pre>
|
222
|
+
</div>
|
223
|
+
</div>
|
224
|
+
</div>
|
225
|
+
|
226
|
+
<h3 class="section-bar">Public Instance methods</h3>
|
227
|
+
|
228
|
+
<div id="method-M000041" class="method-detail">
|
229
|
+
<a name="M000041"></a>
|
230
|
+
|
231
|
+
<div class="method-heading">
|
232
|
+
<a href="#M000041" class="method-signature">
|
233
|
+
<span class="method-name">add_addition</span><span class="method-args">(statement)</span>
|
234
|
+
</a>
|
235
|
+
</div>
|
236
|
+
|
237
|
+
<div class="method-description">
|
238
|
+
<p>
|
239
|
+
Include a <a href="Statement.html">Statement</a> in the <a
|
240
|
+
href="Changeset.html">Changeset</a> as an addition
|
241
|
+
</p>
|
242
|
+
<p><a class="source-toggle" href="#"
|
243
|
+
onclick="toggleCode('M000041-source');return false;">[Source]</a></p>
|
244
|
+
<div class="method-source-code" id="M000041-source">
|
245
|
+
<pre>
|
246
|
+
<span class="ruby-comment cmt"># File lib/pho/changeset.rb, line 281</span>
|
247
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add_addition</span>(<span class="ruby-identifier">statement</span>)
|
248
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">statement</span>.<span class="ruby-identifier">subject</span> <span class="ruby-operator">!=</span> <span class="ruby-ivar">@subject_of_change</span>
|
249
|
+
<span class="ruby-identifier">raise</span> <span class="ruby-value str">"Subject of statement must match subject of change of changeset"</span>
|
250
|
+
<span class="ruby-keyword kw">end</span>
|
251
|
+
<span class="ruby-ivar">@additions</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">statement</span>
|
252
|
+
<span class="ruby-keyword kw">end</span>
|
253
|
+
</pre>
|
254
|
+
</div>
|
255
|
+
</div>
|
256
|
+
</div>
|
257
|
+
|
258
|
+
<div id="method-M000042" class="method-detail">
|
259
|
+
<a name="M000042"></a>
|
260
|
+
|
261
|
+
<div class="method-heading">
|
262
|
+
<a href="#M000042" class="method-signature">
|
263
|
+
<span class="method-name">add_additions</span><span class="method-args">(statements)</span>
|
264
|
+
</a>
|
265
|
+
</div>
|
266
|
+
|
267
|
+
<div class="method-description">
|
268
|
+
<p>
|
269
|
+
Add an array of statements as <a
|
270
|
+
href="Changeset.html#M000040">additions</a>
|
271
|
+
</p>
|
272
|
+
<p><a class="source-toggle" href="#"
|
273
|
+
onclick="toggleCode('M000042-source');return false;">[Source]</a></p>
|
274
|
+
<div class="method-source-code" id="M000042-source">
|
275
|
+
<pre>
|
276
|
+
<span class="ruby-comment cmt"># File lib/pho/changeset.rb, line 289</span>
|
277
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add_additions</span>(<span class="ruby-identifier">statements</span>)
|
278
|
+
<span class="ruby-identifier">statements</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">statement</span><span class="ruby-operator">|</span>
|
279
|
+
<span class="ruby-identifier">add_addition</span>(<span class="ruby-identifier">statement</span>)
|
280
|
+
<span class="ruby-keyword kw">end</span>
|
281
|
+
<span class="ruby-keyword kw">end</span>
|
282
|
+
</pre>
|
283
|
+
</div>
|
284
|
+
</div>
|
285
|
+
</div>
|
286
|
+
|
287
|
+
<div id="method-M000044" class="method-detail">
|
288
|
+
<a name="M000044"></a>
|
289
|
+
|
290
|
+
<div class="method-heading">
|
291
|
+
<a href="#M000044" class="method-signature">
|
292
|
+
<span class="method-name">add_removal</span><span class="method-args">(statement)</span>
|
293
|
+
</a>
|
294
|
+
</div>
|
295
|
+
|
296
|
+
<div class="method-description">
|
297
|
+
<p>
|
298
|
+
Include a <a href="Statement.html">Statement</a> in the <a
|
299
|
+
href="Changeset.html">Changeset</a> as a removal
|
300
|
+
</p>
|
301
|
+
<p><a class="source-toggle" href="#"
|
302
|
+
onclick="toggleCode('M000044-source');return false;">[Source]</a></p>
|
303
|
+
<div class="method-source-code" id="M000044-source">
|
304
|
+
<pre>
|
305
|
+
<span class="ruby-comment cmt"># File lib/pho/changeset.rb, line 301</span>
|
306
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add_removal</span>(<span class="ruby-identifier">statement</span>)
|
307
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">statement</span>.<span class="ruby-identifier">subject</span> <span class="ruby-operator">!=</span> <span class="ruby-ivar">@subject_of_change</span>
|
308
|
+
<span class="ruby-identifier">raise</span> <span class="ruby-value str">"Subject of statement must match subject of change of changeset"</span>
|
309
|
+
<span class="ruby-keyword kw">end</span>
|
310
|
+
<span class="ruby-ivar">@removals</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">statement</span>
|
311
|
+
<span class="ruby-keyword kw">end</span>
|
312
|
+
</pre>
|
313
|
+
</div>
|
314
|
+
</div>
|
315
|
+
</div>
|
316
|
+
|
317
|
+
<div id="method-M000045" class="method-detail">
|
318
|
+
<a name="M000045"></a>
|
319
|
+
|
320
|
+
<div class="method-heading">
|
321
|
+
<a href="#M000045" class="method-signature">
|
322
|
+
<span class="method-name">add_removals</span><span class="method-args">(statements)</span>
|
323
|
+
</a>
|
324
|
+
</div>
|
325
|
+
|
326
|
+
<div class="method-description">
|
327
|
+
<p>
|
328
|
+
Add an array of statements as <a href="Changeset.html#M000043">removals</a>
|
329
|
+
</p>
|
330
|
+
<p><a class="source-toggle" href="#"
|
331
|
+
onclick="toggleCode('M000045-source');return false;">[Source]</a></p>
|
332
|
+
<div class="method-source-code" id="M000045-source">
|
333
|
+
<pre>
|
334
|
+
<span class="ruby-comment cmt"># File lib/pho/changeset.rb, line 309</span>
|
335
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add_removals</span>(<span class="ruby-identifier">statements</span>)
|
336
|
+
<span class="ruby-identifier">statements</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">statement</span><span class="ruby-operator">|</span>
|
337
|
+
<span class="ruby-identifier">add_removal</span>(<span class="ruby-identifier">statement</span>)
|
338
|
+
<span class="ruby-keyword kw">end</span>
|
339
|
+
<span class="ruby-keyword kw">end</span>
|
340
|
+
</pre>
|
341
|
+
</div>
|
342
|
+
</div>
|
343
|
+
</div>
|
344
|
+
|
345
|
+
<div id="method-M000040" class="method-detail">
|
346
|
+
<a name="M000040"></a>
|
347
|
+
|
348
|
+
<div class="method-heading">
|
349
|
+
<a href="#M000040" class="method-signature">
|
350
|
+
<span class="method-name">additions</span><span class="method-args">()</span>
|
351
|
+
</a>
|
352
|
+
</div>
|
353
|
+
|
354
|
+
<div class="method-description">
|
355
|
+
<p>
|
356
|
+
Return the <a href="Statement.html">Statement</a> describing the addition
|
357
|
+
in this <a href="Changeset.html">Changeset</a>
|
358
|
+
</p>
|
359
|
+
<p><a class="source-toggle" href="#"
|
360
|
+
onclick="toggleCode('M000040-source');return false;">[Source]</a></p>
|
361
|
+
<div class="method-source-code" id="M000040-source">
|
362
|
+
<pre>
|
363
|
+
<span class="ruby-comment cmt"># File lib/pho/changeset.rb, line 276</span>
|
364
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">additions</span>()
|
365
|
+
<span class="ruby-keyword kw">return</span> <span class="ruby-ivar">@additions</span>
|
366
|
+
<span class="ruby-keyword kw">end</span>
|
367
|
+
</pre>
|
368
|
+
</div>
|
369
|
+
</div>
|
370
|
+
</div>
|
371
|
+
|
372
|
+
<div id="method-M000043" class="method-detail">
|
373
|
+
<a name="M000043"></a>
|
374
|
+
|
375
|
+
<div class="method-heading">
|
376
|
+
<a href="#M000043" class="method-signature">
|
377
|
+
<span class="method-name">removals</span><span class="method-args">()</span>
|
378
|
+
</a>
|
379
|
+
</div>
|
380
|
+
|
381
|
+
<div class="method-description">
|
382
|
+
<p>
|
383
|
+
Return the list of Statements describing the <a
|
384
|
+
href="Changeset.html#M000043">removals</a> in this <a
|
385
|
+
href="Changeset.html">Changeset</a>
|
386
|
+
</p>
|
387
|
+
<p><a class="source-toggle" href="#"
|
388
|
+
onclick="toggleCode('M000043-source');return false;">[Source]</a></p>
|
389
|
+
<div class="method-source-code" id="M000043-source">
|
390
|
+
<pre>
|
391
|
+
<span class="ruby-comment cmt"># File lib/pho/changeset.rb, line 296</span>
|
392
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">removals</span>()
|
393
|
+
<span class="ruby-keyword kw">return</span> <span class="ruby-ivar">@removals</span>
|
394
|
+
<span class="ruby-keyword kw">end</span>
|
395
|
+
</pre>
|
396
|
+
</div>
|
397
|
+
</div>
|
398
|
+
</div>
|
399
|
+
|
400
|
+
<div id="method-M000046" class="method-detail">
|
401
|
+
<a name="M000046"></a>
|
402
|
+
|
403
|
+
<div class="method-heading">
|
404
|
+
<a href="#M000046" class="method-signature">
|
405
|
+
<span class="method-name">submit</span><span class="method-args">(store, versioned=false)</span>
|
406
|
+
</a>
|
407
|
+
</div>
|
408
|
+
|
409
|
+
<div class="method-description">
|
410
|
+
<p>
|
411
|
+
Submit this changeset to the specified store
|
412
|
+
</p>
|
413
|
+
<pre>
|
414
|
+
store:: the store to which the changeset should be applied
|
415
|
+
</pre>
|
416
|
+
<p><a class="source-toggle" href="#"
|
417
|
+
onclick="toggleCode('M000046-source');return false;">[Source]</a></p>
|
418
|
+
<div class="method-source-code" id="M000046-source">
|
419
|
+
<pre>
|
420
|
+
<span class="ruby-comment cmt"># File lib/pho/changeset.rb, line 318</span>
|
421
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">submit</span>(<span class="ruby-identifier">store</span>, <span class="ruby-identifier">versioned</span>=<span class="ruby-keyword kw">false</span>)
|
422
|
+
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">store</span>.<span class="ruby-identifier">submit_changeset</span>(<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">to_rdf</span>, <span class="ruby-identifier">versioned</span>)
|
423
|
+
<span class="ruby-keyword kw">end</span>
|
424
|
+
</pre>
|
425
|
+
</div>
|
426
|
+
</div>
|
427
|
+
</div>
|
428
|
+
|
429
|
+
<div id="method-M000039" class="method-detail">
|
430
|
+
<a name="M000039"></a>
|
431
|
+
|
432
|
+
<div class="method-heading">
|
433
|
+
<a href="#M000039" class="method-signature">
|
434
|
+
<span class="method-name">to_rdf</span><span class="method-args">(include_root=true)</span>
|
435
|
+
</a>
|
436
|
+
</div>
|
437
|
+
|
438
|
+
<div class="method-description">
|
439
|
+
<p>
|
440
|
+
Serialize this changeset as <a href="../RDF.html">RDF</a>/XML suitable for
|
441
|
+
submitting to the Platform.
|
442
|
+
</p>
|
443
|
+
<p><a class="source-toggle" href="#"
|
444
|
+
onclick="toggleCode('M000039-source');return false;">[Source]</a></p>
|
445
|
+
<div class="method-source-code" id="M000039-source">
|
446
|
+
<pre>
|
447
|
+
<span class="ruby-comment cmt"># File lib/pho/changeset.rb, line 241</span>
|
448
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_rdf</span>(<span class="ruby-identifier">include_root</span>=<span class="ruby-keyword kw">true</span>)
|
449
|
+
<span class="ruby-identifier">rdf</span> = <span class="ruby-value str">""</span>
|
450
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">include_root</span>
|
451
|
+
<span class="ruby-identifier">rdf</span> <span class="ruby-operator"><<</span> <span class="ruby-value str">"<rdf:RDF xmlns:cs=\"http://purl.org/vocab/changeset/schema#\" xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\">"</span>
|
452
|
+
<span class="ruby-keyword kw">end</span>
|
453
|
+
|
454
|
+
<span class="ruby-identifier">rdf</span> <span class="ruby-operator"><<</span> <span class="ruby-value str">" <cs:ChangeSet>"</span>
|
455
|
+
<span class="ruby-identifier">rdf</span> <span class="ruby-operator"><<</span> <span class="ruby-node">" <cs:subjectOfChange rdf:resource=\"#{@subject_of_change}\"/>"</span>
|
456
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@creator_name</span>
|
457
|
+
<span class="ruby-identifier">rdf</span> <span class="ruby-operator"><<</span> <span class="ruby-node">" <cs:creatorName>#{@creator_name}</cs:creatorName>"</span>
|
458
|
+
<span class="ruby-keyword kw">end</span>
|
459
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@change_reason</span>
|
460
|
+
<span class="ruby-identifier">rdf</span> <span class="ruby-operator"><<</span> <span class="ruby-node">" <cs:changeReason>#{@change_reason}</cs:changeReason>"</span>
|
461
|
+
<span class="ruby-keyword kw">end</span>
|
462
|
+
<span class="ruby-ivar">@additions</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">add</span><span class="ruby-operator">|</span>
|
463
|
+
<span class="ruby-identifier">rdf</span> <span class="ruby-operator"><<</span> <span class="ruby-value str">" <cs:addition>"</span>
|
464
|
+
<span class="ruby-identifier">rdf</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">add</span>.<span class="ruby-identifier">to_rdf</span>
|
465
|
+
<span class="ruby-identifier">rdf</span> <span class="ruby-operator"><<</span> <span class="ruby-value str">" </cs:addition>"</span>
|
466
|
+
<span class="ruby-keyword kw">end</span>
|
467
|
+
<span class="ruby-ivar">@removals</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">remove</span><span class="ruby-operator">|</span>
|
468
|
+
<span class="ruby-identifier">rdf</span> <span class="ruby-operator"><<</span> <span class="ruby-value str">" <cs:removal>"</span>
|
469
|
+
<span class="ruby-identifier">rdf</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">remove</span>.<span class="ruby-identifier">to_rdf</span>
|
470
|
+
<span class="ruby-identifier">rdf</span> <span class="ruby-operator"><<</span> <span class="ruby-value str">" </cs:removal>"</span>
|
471
|
+
<span class="ruby-keyword kw">end</span>
|
472
|
+
|
473
|
+
<span class="ruby-identifier">rdf</span> <span class="ruby-operator"><<</span> <span class="ruby-value str">" </cs:ChangeSet>"</span>
|
474
|
+
|
475
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">include_root</span>
|
476
|
+
<span class="ruby-identifier">rdf</span> <span class="ruby-operator"><<</span> <span class="ruby-value str">"</rdf:RDF>"</span>
|
477
|
+
<span class="ruby-keyword kw">end</span>
|
478
|
+
|
479
|
+
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">rdf</span>
|
480
|
+
<span class="ruby-keyword kw">end</span>
|
481
|
+
</pre>
|
482
|
+
</div>
|
483
|
+
</div>
|
484
|
+
</div>
|
485
|
+
|
486
|
+
<div id="method-M000038" class="method-detail">
|
487
|
+
<a name="M000038"></a>
|
488
|
+
|
489
|
+
<div class="method-heading">
|
490
|
+
<a href="#M000038" class="method-signature">
|
491
|
+
<span class="method-name">to_s</span><span class="method-args">()</span>
|
492
|
+
</a>
|
493
|
+
</div>
|
494
|
+
|
495
|
+
<div class="method-description">
|
496
|
+
<p><a class="source-toggle" href="#"
|
497
|
+
onclick="toggleCode('M000038-source');return false;">[Source]</a></p>
|
498
|
+
<div class="method-source-code" id="M000038-source">
|
499
|
+
<pre>
|
500
|
+
<span class="ruby-comment cmt"># File lib/pho/changeset.rb, line 236</span>
|
501
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_s</span>
|
502
|
+
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">to_rdf</span>
|
503
|
+
<span class="ruby-keyword kw">end</span>
|
504
|
+
</pre>
|
505
|
+
</div>
|
506
|
+
</div>
|
507
|
+
</div>
|
508
|
+
|
509
|
+
|
510
|
+
</div>
|
511
|
+
|
512
|
+
|
513
|
+
</div>
|
514
|
+
|
515
|
+
|
516
|
+
<div id="validator-badges">
|
517
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
518
|
+
</div>
|
519
|
+
|
520
|
+
</body>
|
521
|
+
</html>
|