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,205 +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::Update::Changesets</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::Changesets</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
|
-
The <a href="Changesets.html">Changesets</a> class provides utility methods
|
|
84
|
-
for manipulating and generating collections of <a
|
|
85
|
-
href="Changeset.html">Changeset</a> objects
|
|
86
|
-
</p>
|
|
87
|
-
|
|
88
|
-
</div>
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
</div>
|
|
92
|
-
|
|
93
|
-
<div id="method-list">
|
|
94
|
-
<h3 class="section-bar">Methods</h3>
|
|
95
|
-
|
|
96
|
-
<div class="name-list">
|
|
97
|
-
<a href="#M000053">all_to_rdf</a>
|
|
98
|
-
<a href="#M000054">submit_all</a>
|
|
99
|
-
</div>
|
|
100
|
-
</div>
|
|
101
|
-
|
|
102
|
-
</div>
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
<!-- if includes -->
|
|
106
|
-
|
|
107
|
-
<div id="section">
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
<!-- if method_list -->
|
|
117
|
-
<div id="methods">
|
|
118
|
-
<h3 class="section-bar">Public Class methods</h3>
|
|
119
|
-
|
|
120
|
-
<div id="method-M000053" class="method-detail">
|
|
121
|
-
<a name="M000053"></a>
|
|
122
|
-
|
|
123
|
-
<div class="method-heading">
|
|
124
|
-
<a href="#M000053" class="method-signature">
|
|
125
|
-
<span class="method-name">all_to_rdf</span><span class="method-args">(changesets)</span>
|
|
126
|
-
</a>
|
|
127
|
-
</div>
|
|
128
|
-
|
|
129
|
-
<div class="method-description">
|
|
130
|
-
<p>
|
|
131
|
-
Convert an array of changesets into an <a href="../RDF.html">RDF</a>/XML
|
|
132
|
-
document
|
|
133
|
-
</p>
|
|
134
|
-
<pre>
|
|
135
|
-
changesets:: an array of changesets
|
|
136
|
-
</pre>
|
|
137
|
-
<p><a class="source-toggle" href="#"
|
|
138
|
-
onclick="toggleCode('M000053-source');return false;">[Source]</a></p>
|
|
139
|
-
<div class="method-source-code" id="M000053-source">
|
|
140
|
-
<pre>
|
|
141
|
-
<span class="ruby-comment cmt"># File lib/pho/changeset.rb, line 158</span>
|
|
142
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-constant">Changesets</span>.<span class="ruby-identifier">all_to_rdf</span>(<span class="ruby-identifier">changesets</span>)
|
|
143
|
-
<span class="ruby-identifier">rdf</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>
|
|
144
|
-
<span class="ruby-identifier">changesets</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">cs</span><span class="ruby-operator">|</span>
|
|
145
|
-
<span class="ruby-identifier">rdf</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">cs</span>.<span class="ruby-identifier">to_rdf</span>(<span class="ruby-keyword kw">false</span>)
|
|
146
|
-
<span class="ruby-keyword kw">end</span>
|
|
147
|
-
<span class="ruby-identifier">rdf</span> <span class="ruby-operator"><<</span> <span class="ruby-value str">"</rdf:RDF>"</span>
|
|
148
|
-
<span class="ruby-keyword kw">end</span>
|
|
149
|
-
</pre>
|
|
150
|
-
</div>
|
|
151
|
-
</div>
|
|
152
|
-
</div>
|
|
153
|
-
|
|
154
|
-
<div id="method-M000054" class="method-detail">
|
|
155
|
-
<a name="M000054"></a>
|
|
156
|
-
|
|
157
|
-
<div class="method-heading">
|
|
158
|
-
<a href="#M000054" class="method-signature">
|
|
159
|
-
<span class="method-name">submit_all</span><span class="method-args">(changesets, store, versioned=false)</span>
|
|
160
|
-
</a>
|
|
161
|
-
</div>
|
|
162
|
-
|
|
163
|
-
<div class="method-description">
|
|
164
|
-
<p>
|
|
165
|
-
Submit an array of changests to the Platform. After first converting them
|
|
166
|
-
to an <a href="../RDF.html">RDF</a>/XML document.
|
|
167
|
-
</p>
|
|
168
|
-
<pre>
|
|
169
|
-
Note that this submits all of the changessets in a single request to the Platform
|
|
170
|
-
If the changeset is too large then it may be rejected. Similarly the Platform may
|
|
171
|
-
respond with a 202 Accepted status if the data is to be processed asynchronously;
|
|
172
|
-
again that depends on the size of the changes.
|
|
173
|
-
|
|
174
|
-
changesets:: an array of changesets
|
|
175
|
-
store:: the store to submit the changesets to
|
|
176
|
-
versioned:: whether this is a versioned changed. Versioned Changesets must have
|
|
177
|
-
change_reason and creator_name properties.
|
|
178
|
-
</pre>
|
|
179
|
-
<p><a class="source-toggle" href="#"
|
|
180
|
-
onclick="toggleCode('M000054-source');return false;">[Source]</a></p>
|
|
181
|
-
<div class="method-source-code" id="M000054-source">
|
|
182
|
-
<pre>
|
|
183
|
-
<span class="ruby-comment cmt"># File lib/pho/changeset.rb, line 178</span>
|
|
184
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-constant">Changesets</span>.<span class="ruby-identifier">submit_all</span>(<span class="ruby-identifier">changesets</span>, <span class="ruby-identifier">store</span>, <span class="ruby-identifier">versioned</span>=<span class="ruby-keyword kw">false</span>)
|
|
185
|
-
<span class="ruby-identifier">rdf</span> = <span class="ruby-identifier">all_to_rdf</span>(<span class="ruby-identifier">changesets</span>)
|
|
186
|
-
<span class="ruby-identifier">store</span>.<span class="ruby-identifier">submit_changeset</span>(<span class="ruby-identifier">rdf</span>, <span class="ruby-identifier">versioned</span>)
|
|
187
|
-
<span class="ruby-keyword kw">end</span>
|
|
188
|
-
</pre>
|
|
189
|
-
</div>
|
|
190
|
-
</div>
|
|
191
|
-
</div>
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
</div>
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
</div>
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
<div id="validator-badges">
|
|
201
|
-
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
|
202
|
-
</div>
|
|
203
|
-
|
|
204
|
-
</body>
|
|
205
|
-
</html>
|
|
@@ -1,257 +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::Update::LiteralStatement</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::LiteralStatement</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
|
-
<a href="Statement.html">
|
|
69
|
-
Statement
|
|
70
|
-
</a>
|
|
71
|
-
</td>
|
|
72
|
-
</tr>
|
|
73
|
-
</table>
|
|
74
|
-
</div>
|
|
75
|
-
<!-- banner header -->
|
|
76
|
-
|
|
77
|
-
<div id="bodyContent">
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
<div id="contextContent">
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
</div>
|
|
86
|
-
|
|
87
|
-
<div id="method-list">
|
|
88
|
-
<h3 class="section-bar">Methods</h3>
|
|
89
|
-
|
|
90
|
-
<div class="name-list">
|
|
91
|
-
<a href="#M000043">==</a>
|
|
92
|
-
<a href="#M000042">new</a>
|
|
93
|
-
<a href="#M000044">write_object</a>
|
|
94
|
-
</div>
|
|
95
|
-
</div>
|
|
96
|
-
|
|
97
|
-
</div>
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
<!-- if includes -->
|
|
101
|
-
|
|
102
|
-
<div id="section">
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
<div id="attribute-list">
|
|
109
|
-
<h3 class="section-bar">Attributes</h3>
|
|
110
|
-
|
|
111
|
-
<div class="name-list">
|
|
112
|
-
<table>
|
|
113
|
-
<tr class="top-aligned-row context-row">
|
|
114
|
-
<td class="context-item-name">datatype</td>
|
|
115
|
-
<td class="context-item-value"> [R] </td>
|
|
116
|
-
<td class="context-item-desc">
|
|
117
|
-
Datatype for literals
|
|
118
|
-
|
|
119
|
-
</td>
|
|
120
|
-
</tr>
|
|
121
|
-
<tr class="top-aligned-row context-row">
|
|
122
|
-
<td class="context-item-name">language</td>
|
|
123
|
-
<td class="context-item-value"> [R] </td>
|
|
124
|
-
<td class="context-item-desc">
|
|
125
|
-
Language for literals
|
|
126
|
-
|
|
127
|
-
</td>
|
|
128
|
-
</tr>
|
|
129
|
-
</table>
|
|
130
|
-
</div>
|
|
131
|
-
</div>
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
<!-- if method_list -->
|
|
136
|
-
<div id="methods">
|
|
137
|
-
<h3 class="section-bar">Public Class methods</h3>
|
|
138
|
-
|
|
139
|
-
<div id="method-M000042" class="method-detail">
|
|
140
|
-
<a name="M000042"></a>
|
|
141
|
-
|
|
142
|
-
<div class="method-heading">
|
|
143
|
-
<a href="#M000042" class="method-signature">
|
|
144
|
-
<span class="method-name">new</span><span class="method-args">(subject, predicate, object, language=nil, datatype=nil)</span>
|
|
145
|
-
</a>
|
|
146
|
-
</div>
|
|
147
|
-
|
|
148
|
-
<div class="method-description">
|
|
149
|
-
<p>
|
|
150
|
-
Create a <a href="Statement.html">Statement</a> referring to a literal. Can
|
|
151
|
-
have one of lang or datatype but not both
|
|
152
|
-
</p>
|
|
153
|
-
<pre>
|
|
154
|
-
subject:: URI of subject of triple
|
|
155
|
-
predicate:: URI of predicate of triple
|
|
156
|
-
object:: literal value
|
|
157
|
-
lang:: language for literal
|
|
158
|
-
datatype:: datatype for literal
|
|
159
|
-
</pre>
|
|
160
|
-
<p><a class="source-toggle" href="#"
|
|
161
|
-
onclick="toggleCode('M000042-source');return false;">[Source]</a></p>
|
|
162
|
-
<div class="method-source-code" id="M000042-source">
|
|
163
|
-
<pre>
|
|
164
|
-
<span class="ruby-comment cmt"># File lib/pho/changeset.rb, line 86</span>
|
|
165
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">subject</span>, <span class="ruby-identifier">predicate</span>, <span class="ruby-identifier">object</span>, <span class="ruby-identifier">language</span>=<span class="ruby-keyword kw">nil</span>, <span class="ruby-identifier">datatype</span>=<span class="ruby-keyword kw">nil</span>)
|
|
166
|
-
<span class="ruby-keyword kw">super</span>(<span class="ruby-identifier">subject</span>, <span class="ruby-identifier">predicate</span>, <span class="ruby-identifier">object</span>)
|
|
167
|
-
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">language</span> <span class="ruby-operator">!=</span> <span class="ruby-keyword kw">nil</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">datatype</span> <span class="ruby-operator">!=</span> <span class="ruby-keyword kw">nil</span>
|
|
168
|
-
<span class="ruby-identifier">raise</span> <span class="ruby-value str">"Cannot specify both language and datatype for a literal"</span>
|
|
169
|
-
<span class="ruby-keyword kw">end</span>
|
|
170
|
-
<span class="ruby-ivar">@language</span> = <span class="ruby-identifier">language</span>
|
|
171
|
-
<span class="ruby-ivar">@datatype</span> = <span class="ruby-identifier">datatype</span>
|
|
172
|
-
<span class="ruby-keyword kw">end</span>
|
|
173
|
-
</pre>
|
|
174
|
-
</div>
|
|
175
|
-
</div>
|
|
176
|
-
</div>
|
|
177
|
-
|
|
178
|
-
<h3 class="section-bar">Public Instance methods</h3>
|
|
179
|
-
|
|
180
|
-
<div id="method-M000043" class="method-detail">
|
|
181
|
-
<a name="M000043"></a>
|
|
182
|
-
|
|
183
|
-
<div class="method-heading">
|
|
184
|
-
<a href="#M000043" class="method-signature">
|
|
185
|
-
<span class="method-name">==</span><span class="method-args">(other)</span>
|
|
186
|
-
</a>
|
|
187
|
-
</div>
|
|
188
|
-
|
|
189
|
-
<div class="method-description">
|
|
190
|
-
<p><a class="source-toggle" href="#"
|
|
191
|
-
onclick="toggleCode('M000043-source');return false;">[Source]</a></p>
|
|
192
|
-
<div class="method-source-code" id="M000043-source">
|
|
193
|
-
<pre>
|
|
194
|
-
<span class="ruby-comment cmt"># File lib/pho/changeset.rb, line 95</span>
|
|
195
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-operator">==</span>(<span class="ruby-identifier">other</span>)
|
|
196
|
-
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">other</span> <span class="ruby-operator">==</span> <span class="ruby-keyword kw">nil</span>
|
|
197
|
-
<span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span>
|
|
198
|
-
<span class="ruby-keyword kw">end</span>
|
|
199
|
-
<span class="ruby-keyword kw">return</span> <span class="ruby-ivar">@subject</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">other</span>.<span class="ruby-identifier">subject</span> <span class="ruby-operator">&&</span>
|
|
200
|
-
<span class="ruby-ivar">@predicate</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">other</span>.<span class="ruby-identifier">predicate</span> <span class="ruby-operator">&&</span>
|
|
201
|
-
<span class="ruby-ivar">@object</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">other</span>.<span class="ruby-identifier">object</span> <span class="ruby-operator">&&</span>
|
|
202
|
-
<span class="ruby-ivar">@lang</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">other</span>.<span class="ruby-identifier">language</span> <span class="ruby-operator">&&</span>
|
|
203
|
-
<span class="ruby-ivar">@datatype</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">other</span>.<span class="ruby-identifier">datatype</span>
|
|
204
|
-
<span class="ruby-keyword kw">end</span>
|
|
205
|
-
</pre>
|
|
206
|
-
</div>
|
|
207
|
-
</div>
|
|
208
|
-
</div>
|
|
209
|
-
|
|
210
|
-
<h3 class="section-bar">Protected Instance methods</h3>
|
|
211
|
-
|
|
212
|
-
<div id="method-M000044" class="method-detail">
|
|
213
|
-
<a name="M000044"></a>
|
|
214
|
-
|
|
215
|
-
<div class="method-heading">
|
|
216
|
-
<a href="#M000044" class="method-signature">
|
|
217
|
-
<span class="method-name">write_object</span><span class="method-args">()</span>
|
|
218
|
-
</a>
|
|
219
|
-
</div>
|
|
220
|
-
|
|
221
|
-
<div class="method-description">
|
|
222
|
-
<p><a class="source-toggle" href="#"
|
|
223
|
-
onclick="toggleCode('M000044-source');return false;">[Source]</a></p>
|
|
224
|
-
<div class="method-source-code" id="M000044-source">
|
|
225
|
-
<pre>
|
|
226
|
-
<span class="ruby-comment cmt"># File lib/pho/changeset.rb, line 107</span>
|
|
227
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">write_object</span>()
|
|
228
|
-
<span class="ruby-identifier">tag</span> = <span class="ruby-value str">""</span>
|
|
229
|
-
<span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@datatype</span> <span class="ruby-operator">!=</span> <span class="ruby-keyword kw">nil</span>
|
|
230
|
-
<span class="ruby-identifier">tag</span> = <span class="ruby-node">"<rdf:object rdf:datatype=\"#{@datatype}\">"</span>
|
|
231
|
-
<span class="ruby-keyword kw">elsif</span> <span class="ruby-ivar">@language</span> <span class="ruby-operator">!=</span> <span class="ruby-keyword kw">nil</span>
|
|
232
|
-
<span class="ruby-identifier">tag</span> = <span class="ruby-node">"<rdf:object xml:lang=\"#{@language}\">"</span>
|
|
233
|
-
<span class="ruby-keyword kw">else</span>
|
|
234
|
-
<span class="ruby-identifier">tag</span> = <span class="ruby-value str">"<rdf:object>"</span>
|
|
235
|
-
<span class="ruby-keyword kw">end</span>
|
|
236
|
-
<span class="ruby-identifier">text</span> = <span class="ruby-ivar">@object</span>.<span class="ruby-identifier">gsub</span>(<span class="ruby-value str">"&"</span>, <span class="ruby-value str">"&amp;"</span>)
|
|
237
|
-
<span class="ruby-identifier">tag</span> <span class="ruby-operator"><<</span> <span class="ruby-node">"#{text}</rdf:object>"</span>
|
|
238
|
-
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">tag</span>
|
|
239
|
-
<span class="ruby-keyword kw">end</span>
|
|
240
|
-
</pre>
|
|
241
|
-
</div>
|
|
242
|
-
</div>
|
|
243
|
-
</div>
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
</div>
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
</div>
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
<div id="validator-badges">
|
|
253
|
-
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
|
254
|
-
</div>
|
|
255
|
-
|
|
256
|
-
</body>
|
|
257
|
-
</html>
|