rdf 0.3.1 → 0.3.2
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/CREDITS +2 -0
- data/README +12 -1
- data/VERSION +1 -1
- data/etc/doap.nt +20 -12
- data/lib/rdf/format.rb +8 -6
- data/lib/rdf/model/statement.rb +8 -0
- data/lib/rdf/version.rb +1 -1
- data/lib/rdf/writer.rb +3 -5
- metadata +12 -6
data/CREDITS
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
* Călin Ardelean <calinucs@gmail.com>
|
|
2
|
+
* Danny Gagne <danny@dannygagne.com>
|
|
2
3
|
* Joey Geiger <jgeiger@gmail.com>
|
|
3
4
|
* Fumihiro Kato <fumi@fumi.me>
|
|
5
|
+
* Naoki Kawamukai <kna@slis.tsukuba.ac.jp>
|
|
4
6
|
* Hellekin O. Wolf <hellekin@cepheide.org>
|
|
5
7
|
* John Fieber <jrf@ursamaris.org>
|
|
6
8
|
* Keita Urashima <ursm@ursm.jp>
|
data/README
CHANGED
|
@@ -9,7 +9,6 @@ This is a pure-Ruby library for working with [Resource Description Framework
|
|
|
9
9
|
* <http://blog.datagraph.org/2010/03/rdf-for-ruby>
|
|
10
10
|
* <http://blog.datagraph.org/2010/04/parsing-rdf-with-ruby>
|
|
11
11
|
* <http://blog.datagraph.org/2010/04/rdf-repository-howto>
|
|
12
|
-
* <http://semanticweb.org/wiki/Getting_data_from_the_Semantic_Web_(Ruby)>
|
|
13
12
|
|
|
14
13
|
Features
|
|
15
14
|
--------
|
|
@@ -29,6 +28,16 @@ Features
|
|
|
29
28
|
* Compatible with Ruby 1.8.7+, Ruby 1.9.x, and JRuby 1.4/1.5.
|
|
30
29
|
* Compatible with older Ruby versions with the help of the [Backports][] gem.
|
|
31
30
|
|
|
31
|
+
Tutorials
|
|
32
|
+
---------
|
|
33
|
+
|
|
34
|
+
* [Getting data from the Semantic Web using Ruby and RDF.rb]
|
|
35
|
+
(http://semanticweb.org/wiki/Getting_data_from_the_Semantic_Web_%28Ruby%29)
|
|
36
|
+
* [Using RDF.rb and Spira to process RDF data from the British Ordnance Survey]
|
|
37
|
+
(http://ultramagnus.org/?p=85)
|
|
38
|
+
* [Getting started with RDF and SPARQL using 4store and RDF.rb]
|
|
39
|
+
(http://www.jenitennison.com/blog/node/152)
|
|
40
|
+
|
|
32
41
|
Examples
|
|
33
42
|
--------
|
|
34
43
|
|
|
@@ -226,8 +235,10 @@ Contributors
|
|
|
226
235
|
------------
|
|
227
236
|
|
|
228
237
|
* [Călin Ardelean](http://github.com/clnx) - <http://github.com/clnx>
|
|
238
|
+
* [Danny Gagne](http://github.com/danny) - <http://www.dannygagne.com/>
|
|
229
239
|
* [Joey Geiger](http://github.com/jgeiger) - <http://github.com/jgeiger>
|
|
230
240
|
* [Fumihiro Kato](http://github.com/fumi) - <http://fumi.me/>
|
|
241
|
+
* [Naoki Kawamukai](http://github.com/kna) - <http://github.com/kna>
|
|
231
242
|
* [Hellekin O. Wolf](http://github.com/hellekin) - <http://hellekin.cepheide.org/>
|
|
232
243
|
* [John Fieber](http://github.com/jfieber) - <http://github.com/jfieber>
|
|
233
244
|
* [Keita Urashima](http://github.com/ursm) - <http://ursm.jp/>
|
data/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
0.3.
|
|
1
|
+
0.3.2
|
data/etc/doap.nt
CHANGED
|
@@ -39,6 +39,8 @@
|
|
|
39
39
|
<http://rubygems.org/gems/rdf> <http://usefulinc.com/ns/doap#helper> _:genid5 .
|
|
40
40
|
<http://rubygems.org/gems/rdf> <http://usefulinc.com/ns/doap#helper> _:genid6 .
|
|
41
41
|
<http://rubygems.org/gems/rdf> <http://usefulinc.com/ns/doap#helper> _:genid7 .
|
|
42
|
+
<http://rubygems.org/gems/rdf> <http://usefulinc.com/ns/doap#helper> _:genid8 .
|
|
43
|
+
<http://rubygems.org/gems/rdf> <http://usefulinc.com/ns/doap#helper> _:genid9 .
|
|
42
44
|
<http://rubygems.org/gems/rdf> <http://usefulinc.com/ns/doap#homepage> <http://rdf.rubyforge.org/> .
|
|
43
45
|
<http://rubygems.org/gems/rdf> <http://usefulinc.com/ns/doap#license> <http://creativecommons.org/licenses/publicdomain/> .
|
|
44
46
|
<http://rubygems.org/gems/rdf> <http://usefulinc.com/ns/doap#maintainer> <http://ar.to/#self> .
|
|
@@ -54,20 +56,26 @@ _:genid1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foa
|
|
|
54
56
|
_:genid1 <http://xmlns.com/foaf/0.1/mbox_sha1sum> "274bd18402fc773ffc0606996aa1fb90b603aa29" .
|
|
55
57
|
_:genid1 <http://xmlns.com/foaf/0.1/name> "C\u0103lin Ardelean" .
|
|
56
58
|
_:genid2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
|
|
57
|
-
_:genid2 <http://xmlns.com/foaf/0.1/mbox_sha1sum> "
|
|
58
|
-
_:genid2 <http://xmlns.com/foaf/0.1/name> "
|
|
59
|
+
_:genid2 <http://xmlns.com/foaf/0.1/mbox_sha1sum> "6de43e9cf7de53427fea9765706703e4d957c17b" .
|
|
60
|
+
_:genid2 <http://xmlns.com/foaf/0.1/name> "Danny Gagne" .
|
|
59
61
|
_:genid3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
|
|
60
|
-
_:genid3 <http://xmlns.com/foaf/0.1/mbox_sha1sum> "
|
|
61
|
-
_:genid3 <http://xmlns.com/foaf/0.1/name> "
|
|
62
|
+
_:genid3 <http://xmlns.com/foaf/0.1/mbox_sha1sum> "f412d743150d7b27b8468d56e69ca147917ea6fc" .
|
|
63
|
+
_:genid3 <http://xmlns.com/foaf/0.1/name> "Joey Geiger" .
|
|
62
64
|
_:genid4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
|
|
63
|
-
_:genid4 <http://xmlns.com/foaf/0.1/mbox_sha1sum> "
|
|
64
|
-
_:genid4 <http://xmlns.com/foaf/0.1/name> "
|
|
65
|
+
_:genid4 <http://xmlns.com/foaf/0.1/mbox_sha1sum> "d31fdd6af7a279a89bf09fdc9f7c44d9d08bb930" .
|
|
66
|
+
_:genid4 <http://xmlns.com/foaf/0.1/name> "Fumihiro Kato" .
|
|
65
67
|
_:genid5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
|
|
66
|
-
_:genid5 <http://xmlns.com/foaf/0.1/mbox_sha1sum> "
|
|
67
|
-
_:genid5 <http://xmlns.com/foaf/0.1/name> "
|
|
68
|
+
_:genid5 <http://xmlns.com/foaf/0.1/mbox_sha1sum> "5bdcd8e2af4f5952aaeeffbdd371c41525ec761d" .
|
|
69
|
+
_:genid5 <http://xmlns.com/foaf/0.1/name> "Naoki Kawamukai" .
|
|
68
70
|
_:genid6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
|
|
69
|
-
_:genid6 <http://xmlns.com/foaf/0.1/mbox_sha1sum> "
|
|
70
|
-
_:genid6 <http://xmlns.com/foaf/0.1/name> "
|
|
71
|
+
_:genid6 <http://xmlns.com/foaf/0.1/mbox_sha1sum> "c69f3255ff0639543cc5edfd8116eac8df16fab8" .
|
|
72
|
+
_:genid6 <http://xmlns.com/foaf/0.1/name> "Hellekin O. Wolf" .
|
|
71
73
|
_:genid7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
|
|
72
|
-
_:genid7 <http://xmlns.com/foaf/0.1/mbox_sha1sum> "
|
|
73
|
-
_:genid7 <http://xmlns.com/foaf/0.1/name> "
|
|
74
|
+
_:genid7 <http://xmlns.com/foaf/0.1/mbox_sha1sum> "f7653fc1ac0e82ebb32f092389bd5fc728eaae12" .
|
|
75
|
+
_:genid7 <http://xmlns.com/foaf/0.1/name> "John Fieber" .
|
|
76
|
+
_:genid8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
|
|
77
|
+
_:genid8 <http://xmlns.com/foaf/0.1/mbox_sha1sum> "2b4247b6fd5bb4a1383378f325784318680d5ff9" .
|
|
78
|
+
_:genid8 <http://xmlns.com/foaf/0.1/name> "Keita Urashima" .
|
|
79
|
+
_:genid9 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
|
|
80
|
+
_:genid9 <http://xmlns.com/foaf/0.1/mbox_sha1sum> "bedbbf2451e5beb38d59687c0460032aff92cd3c" .
|
|
81
|
+
_:genid9 <http://xmlns.com/foaf/0.1/name> "Pius Uzamere" .
|
data/lib/rdf/format.rb
CHANGED
|
@@ -88,15 +88,17 @@ module RDF
|
|
|
88
88
|
|
|
89
89
|
when Hash
|
|
90
90
|
case
|
|
91
|
-
# Find a format based on the MIME content type
|
|
91
|
+
# Find a format based on the MIME content type:
|
|
92
92
|
when mime_type = options[:content_type]
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
93
|
+
# @see http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.17
|
|
94
|
+
# @see http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.7
|
|
95
|
+
mime_type = mime_type.to_s
|
|
96
|
+
mime_type = mime_type.split(';').first if mime_type.include?(?;) # remove any media type parameters
|
|
97
|
+
content_types.has_key?(mime_type) ? content_types[mime_type].first : nil
|
|
98
|
+
# Find a format based on the file name:
|
|
97
99
|
when file_name = options[:file_name]
|
|
98
100
|
self.for(:file_extension => File.extname(file_name.to_s)[1..-1])
|
|
99
|
-
# Find a format based on the file extension
|
|
101
|
+
# Find a format based on the file extension:
|
|
100
102
|
when file_ext = options[:file_extension]
|
|
101
103
|
if file_extensions.has_key?(file_ext = file_ext.to_sym)
|
|
102
104
|
self.for(:content_type => file_extensions[file_ext])
|
data/lib/rdf/model/statement.rb
CHANGED
data/lib/rdf/version.rb
CHANGED
data/lib/rdf/writer.rb
CHANGED
|
@@ -281,6 +281,7 @@ module RDF
|
|
|
281
281
|
##
|
|
282
282
|
# @param [RDF::Graph] graph
|
|
283
283
|
# @return [void] `self`
|
|
284
|
+
# @deprecated replace by `RDF::Writable#insert_graph`
|
|
284
285
|
def write_graph(graph)
|
|
285
286
|
graph.each_triple { |*triple| write_triple(*triple) }
|
|
286
287
|
self
|
|
@@ -289,6 +290,7 @@ module RDF
|
|
|
289
290
|
##
|
|
290
291
|
# @param [Array<RDF::Statement>] statements
|
|
291
292
|
# @return [void] `self`
|
|
293
|
+
# @deprecated replace by `RDF::Writable#insert_statements`
|
|
292
294
|
def write_statements(*statements)
|
|
293
295
|
statements.flatten.each { |statement| write_statement(statement) }
|
|
294
296
|
self
|
|
@@ -301,6 +303,7 @@ module RDF
|
|
|
301
303
|
write_triple(*statement.to_triple)
|
|
302
304
|
self
|
|
303
305
|
end
|
|
306
|
+
alias_method :insert_statement, :write_statement # support the RDF::Writable interface
|
|
304
307
|
|
|
305
308
|
##
|
|
306
309
|
# @param [Array<Array(RDF::Resource, RDF::URI, RDF::Term)>] triples
|
|
@@ -321,11 +324,6 @@ module RDF
|
|
|
321
324
|
raise NotImplementedError.new("#{self.class}#write_triple") # override in subclasses
|
|
322
325
|
end
|
|
323
326
|
|
|
324
|
-
# Support the RDF::Writable interface:
|
|
325
|
-
alias_method :insert_graph, :write_graph
|
|
326
|
-
alias_method :insert_statements, :write_statements
|
|
327
|
-
alias_method :insert_statement, :write_statement
|
|
328
|
-
|
|
329
327
|
##
|
|
330
328
|
# @param [RDF::Term] term
|
|
331
329
|
# @return [String]
|
metadata
CHANGED
|
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
|
5
5
|
segments:
|
|
6
6
|
- 0
|
|
7
7
|
- 3
|
|
8
|
-
-
|
|
9
|
-
version: 0.3.
|
|
8
|
+
- 2
|
|
9
|
+
version: 0.3.2
|
|
10
10
|
platform: ruby
|
|
11
11
|
authors:
|
|
12
12
|
- Arto Bendiken
|
|
@@ -16,13 +16,14 @@ autorequire:
|
|
|
16
16
|
bindir: bin
|
|
17
17
|
cert_chain: []
|
|
18
18
|
|
|
19
|
-
date: 2011-
|
|
19
|
+
date: 2011-04-04 00:00:00 +02:00
|
|
20
20
|
default_executable: rdf
|
|
21
21
|
dependencies:
|
|
22
22
|
- !ruby/object:Gem::Dependency
|
|
23
23
|
name: addressable
|
|
24
24
|
prerelease: false
|
|
25
25
|
requirement: &id001 !ruby/object:Gem::Requirement
|
|
26
|
+
none: false
|
|
26
27
|
requirements:
|
|
27
28
|
- - ">="
|
|
28
29
|
- !ruby/object:Gem::Version
|
|
@@ -36,6 +37,7 @@ dependencies:
|
|
|
36
37
|
name: yard
|
|
37
38
|
prerelease: false
|
|
38
39
|
requirement: &id002 !ruby/object:Gem::Requirement
|
|
40
|
+
none: false
|
|
39
41
|
requirements:
|
|
40
42
|
- - ">="
|
|
41
43
|
- !ruby/object:Gem::Version
|
|
@@ -50,6 +52,7 @@ dependencies:
|
|
|
50
52
|
name: rspec
|
|
51
53
|
prerelease: false
|
|
52
54
|
requirement: &id003 !ruby/object:Gem::Requirement
|
|
55
|
+
none: false
|
|
53
56
|
requirements:
|
|
54
57
|
- - ">="
|
|
55
58
|
- !ruby/object:Gem::Version
|
|
@@ -64,14 +67,15 @@ dependencies:
|
|
|
64
67
|
name: rdf-spec
|
|
65
68
|
prerelease: false
|
|
66
69
|
requirement: &id004 !ruby/object:Gem::Requirement
|
|
70
|
+
none: false
|
|
67
71
|
requirements:
|
|
68
72
|
- - ~>
|
|
69
73
|
- !ruby/object:Gem::Version
|
|
70
74
|
segments:
|
|
71
75
|
- 0
|
|
72
76
|
- 3
|
|
73
|
-
-
|
|
74
|
-
version: 0.3.
|
|
77
|
+
- 2
|
|
78
|
+
version: 0.3.2
|
|
75
79
|
type: :development
|
|
76
80
|
version_requirements: *id004
|
|
77
81
|
description: RDF.rb is a pure-Ruby library for working with Resource Description Framework (RDF) data.
|
|
@@ -171,6 +175,7 @@ rdoc_options: []
|
|
|
171
175
|
require_paths:
|
|
172
176
|
- lib
|
|
173
177
|
required_ruby_version: !ruby/object:Gem::Requirement
|
|
178
|
+
none: false
|
|
174
179
|
requirements:
|
|
175
180
|
- - ">="
|
|
176
181
|
- !ruby/object:Gem::Version
|
|
@@ -180,6 +185,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
180
185
|
- 1
|
|
181
186
|
version: 1.8.1
|
|
182
187
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
188
|
+
none: false
|
|
183
189
|
requirements:
|
|
184
190
|
- - ">="
|
|
185
191
|
- !ruby/object:Gem::Version
|
|
@@ -189,7 +195,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
189
195
|
requirements: []
|
|
190
196
|
|
|
191
197
|
rubyforge_project: rdf
|
|
192
|
-
rubygems_version: 1.3.
|
|
198
|
+
rubygems_version: 1.3.7
|
|
193
199
|
signing_key:
|
|
194
200
|
specification_version: 3
|
|
195
201
|
summary: A Ruby library for working with Resource Description Framework (RDF) data.
|