rdf-raptor 1.2.1 → 1.99.0
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.
- checksums.yaml +4 -4
- data/README +17 -17
- data/VERSION +1 -1
- data/lib/rdf/raptor.rb +12 -12
- data/lib/rdf/raptor/ffi/v1/serializer.rb +1 -1
- data/lib/rdf/raptor/ffi/v1/statement.rb +6 -6
- data/lib/rdf/raptor/ffi/v2/serializer.rb +1 -1
- data/lib/rdf/raptor/ffi/v2/statement.rb +4 -4
- data/lib/rdf/raptor/ffi/v2/term.rb +3 -3
- data/lib/rdf/raptor/graphviz.rb +7 -7
- data/lib/rdf/raptor/ntriples.rb +10 -10
- data/lib/rdf/raptor/rdfa.rb +7 -7
- data/lib/rdf/raptor/rdfxml.rb +10 -10
- data/lib/rdf/raptor/turtle.rb +10 -10
- metadata +8 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e5ae888c81773bd00155b708856b8120550a8d4a
|
4
|
+
data.tar.gz: 585cb977bc2f5850249bc4874de401a2864d17f8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 322d066746c0bf42d28c804e36c86ea9bea5269bbcdf2378054c7c454501e0d25953887373cf53f003a453dddc9c4614e495c31e1bea105a164d5443702f08e5
|
7
|
+
data.tar.gz: c07b84899ecbcfa949d06c4a589b5effa63eadb7a4656499defaec1622ec4f51633a9b80f45481ddc0ce1154cf8c5dd570682521eeb5db4de4fbccb11e5756a8
|
data/README
CHANGED
@@ -58,7 +58,7 @@ Examples
|
|
58
58
|
|
59
59
|
### Extracting RDF statements from an HTML+RDFa document
|
60
60
|
|
61
|
-
RDF::Reader.open(url = "http://bblfish.net/", :
|
61
|
+
RDF::Reader.open(url = "http://bblfish.net/", format: :rdfa, base_uri: url) do |reader|
|
62
62
|
reader.each_statement do |statement|
|
63
63
|
puts statement.inspect
|
64
64
|
end
|
@@ -88,41 +88,41 @@ Examples
|
|
88
88
|
|
89
89
|
RDF::Format.for(:ntriples) #=> RDF::Raptor::NTriples::Format
|
90
90
|
RDF::Format.for("input.nt")
|
91
|
-
RDF::Format.for(:
|
92
|
-
RDF::Format.for(:
|
93
|
-
RDF::Format.for(:
|
91
|
+
RDF::Format.for(file_name: "input.nt")
|
92
|
+
RDF::Format.for(file_extension: "nt")
|
93
|
+
RDF::Format.for(content_type: "application/n-triples")
|
94
94
|
|
95
95
|
### Obtaining the RDF/XML format specification class
|
96
96
|
|
97
97
|
RDF::Format.for(:rdfxml) #=> RDF::Raptor::RDFXML::Format
|
98
98
|
RDF::Format.for("input.rdf")
|
99
|
-
RDF::Format.for(:
|
100
|
-
RDF::Format.for(:
|
101
|
-
RDF::Format.for(:
|
99
|
+
RDF::Format.for(file_name: "input.rdf")
|
100
|
+
RDF::Format.for(file_extension: "rdf")
|
101
|
+
RDF::Format.for(content_type: "application/rdf+xml")
|
102
102
|
|
103
103
|
### Obtaining the Turtle format specification class
|
104
104
|
|
105
105
|
RDF::Format.for(:turtle) #=> RDF::Raptor::Turtle::Format
|
106
106
|
RDF::Format.for("input.ttl")
|
107
|
-
RDF::Format.for(:
|
108
|
-
RDF::Format.for(:
|
109
|
-
RDF::Format.for(:
|
107
|
+
RDF::Format.for(file_name: "input.ttl")
|
108
|
+
RDF::Format.for(file_extension: "ttl")
|
109
|
+
RDF::Format.for(content_type: "text/turtle")
|
110
110
|
|
111
111
|
### Obtaining the RDFa format specification class
|
112
112
|
|
113
113
|
RDF::Format.for(:rdfa) #=> RDF::Raptor::RDFa::Format
|
114
114
|
RDF::Format.for("input.html")
|
115
|
-
RDF::Format.for(:
|
116
|
-
RDF::Format.for(:
|
117
|
-
RDF::Format.for(:
|
115
|
+
RDF::Format.for(file_name: "input.html")
|
116
|
+
RDF::Format.for(file_extension: "html")
|
117
|
+
RDF::Format.for(content_type: "application/xhtml+xml")
|
118
118
|
|
119
119
|
### Obtaining the Graphviz format specification class
|
120
120
|
|
121
121
|
RDF::Format.for(:graphviz) #=> RDF::Raptor::Graphviz::Format
|
122
122
|
RDF::Format.for("output.dot")
|
123
|
-
RDF::Format.for(:
|
124
|
-
RDF::Format.for(:
|
125
|
-
RDF::Format.for(:
|
123
|
+
RDF::Format.for(file_name: "output.dot")
|
124
|
+
RDF::Format.for(file_extension: "")
|
125
|
+
RDF::Format.for(content_type: "text/vnd.graphviz")
|
126
126
|
|
127
127
|
Documentation
|
128
128
|
-------------
|
@@ -161,7 +161,7 @@ Mac and the most common Linux and BSD distributions:
|
|
161
161
|
% brew install raptor # Mac OS X with Homebrew
|
162
162
|
% [sudo] aptitude install raptor-utils # Ubuntu / Debian with aptitude
|
163
163
|
% [sudo] apt-get install libraptor2-0 # Ubuntu / Debian with apt-get
|
164
|
-
% [sudo] yum install
|
164
|
+
% [sudo] yum install raptor2 # Fedora / CentOS / RHEL
|
165
165
|
% [sudo] zypper install raptor # openSUSE
|
166
166
|
% [sudo] emerge raptor # Gentoo Linux
|
167
167
|
% [sudo] pacman -S raptor # Arch Linux
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.
|
1
|
+
1.99.0
|
data/lib/rdf/raptor.rb
CHANGED
@@ -31,30 +31,30 @@ module RDF
|
|
31
31
|
# @example Obtaining an N-Triples format class
|
32
32
|
# RDF::Format.for(:ntriples) #=> RDF::Raptor::NTriples::Format
|
33
33
|
# RDF::Format.for("input.nt")
|
34
|
-
# RDF::Format.for(:
|
35
|
-
# RDF::Format.for(:
|
36
|
-
# RDF::Format.for(:
|
34
|
+
# RDF::Format.for(file_name: "input.nt")
|
35
|
+
# RDF::Format.for(file_extension: "nt")
|
36
|
+
# RDF::Format.for(content_type: "text/plain")
|
37
37
|
#
|
38
38
|
# @example Obtaining a Turtle format class
|
39
39
|
# RDF::Format.for(:turtle) #=> RDF::Raptor::Turtle::Format
|
40
40
|
# RDF::Format.for("input.ttl")
|
41
|
-
# RDF::Format.for(:
|
42
|
-
# RDF::Format.for(:
|
43
|
-
# RDF::Format.for(:
|
41
|
+
# RDF::Format.for(file_name: "input.ttl")
|
42
|
+
# RDF::Format.for(file_extension: "ttl")
|
43
|
+
# RDF::Format.for(content_type: "text/turtle")
|
44
44
|
#
|
45
45
|
# @example Obtaining an RDF/XML format class
|
46
46
|
# RDF::Format.for(:rdfxml) #=> RDF::Raptor::RDFXML::Format
|
47
47
|
# RDF::Format.for("input.rdf")
|
48
|
-
# RDF::Format.for(:
|
49
|
-
# RDF::Format.for(:
|
50
|
-
# RDF::Format.for(:
|
48
|
+
# RDF::Format.for(file_name: "input.rdf")
|
49
|
+
# RDF::Format.for(file_extension: "rdf")
|
50
|
+
# RDF::Format.for(content_type: "application/rdf+xml")
|
51
51
|
#
|
52
52
|
# @example Obtaining an RDFa format class
|
53
53
|
# RDF::Format.for(:rdfa) #=> RDF::Raptor::RDFa::Format
|
54
54
|
# RDF::Format.for("input.html")
|
55
|
-
# RDF::Format.for(:
|
56
|
-
# RDF::Format.for(:
|
57
|
-
# RDF::Format.for(:
|
55
|
+
# RDF::Format.for(file_name: "input.html")
|
56
|
+
# RDF::Format.for(file_extension: "html")
|
57
|
+
# RDF::Format.for(content_type: "application/xhtml+xml")
|
58
58
|
#
|
59
59
|
# {RDF::Raptor} includes an FFI implementation, which loads the
|
60
60
|
# `libraptor2` library into the Ruby process, as well as a CLI
|
@@ -71,7 +71,7 @@ module RDF::Raptor::FFI::V1
|
|
71
71
|
# any additional options for serializing (see {#start_to})
|
72
72
|
# @return [void]
|
73
73
|
def start_to_stream(stream, options = {})
|
74
|
-
iostream = V1::IOStream.new(V1::IOStreamHandler.new(stream), :
|
74
|
+
iostream = V1::IOStream.new(V1::IOStreamHandler.new(stream), free_iostream: false)
|
75
75
|
start_to_iostream(iostream, options)
|
76
76
|
end
|
77
77
|
|
@@ -33,7 +33,7 @@ module RDF::Raptor::FFI::V1
|
|
33
33
|
attr_accessor :id
|
34
34
|
|
35
35
|
# @return [RDF::Resource]
|
36
|
-
attr_accessor :
|
36
|
+
attr_accessor :graph_name
|
37
37
|
|
38
38
|
##
|
39
39
|
# @return [RDF::Resource]
|
@@ -118,9 +118,9 @@ module RDF::Raptor::FFI::V1
|
|
118
118
|
str = self[:object].read_string.unpack('U*').pack('U*')
|
119
119
|
case
|
120
120
|
when !self[:object_literal_language].null?
|
121
|
-
RDF::Literal.new(str, :
|
121
|
+
RDF::Literal.new(str, language: self[:object_literal_language].read_string)
|
122
122
|
when !self[:object_literal_datatype].null?
|
123
|
-
RDF::Literal.new(str, :
|
123
|
+
RDF::Literal.new(str, datatype: V1.raptor_uri_as_string(self[:object_literal_datatype]))
|
124
124
|
else
|
125
125
|
RDF::Literal.new(str)
|
126
126
|
end
|
@@ -175,19 +175,19 @@ module RDF::Raptor::FFI::V1
|
|
175
175
|
# @return [Array(RDF::Resource, RDF::URI, RDF::Term, nil)]
|
176
176
|
# @see RDF::Statement#to_quad
|
177
177
|
def to_quad
|
178
|
-
[subject, predicate, object,
|
178
|
+
[subject, predicate, object, graph_name]
|
179
179
|
end
|
180
180
|
|
181
181
|
##
|
182
182
|
# @return [RDF::Statement]
|
183
183
|
def to_rdf
|
184
|
-
RDF::Statement.new(subject, predicate, object, :
|
184
|
+
RDF::Statement.new(subject, predicate, object, graph_name: graph_name)
|
185
185
|
end
|
186
186
|
|
187
187
|
##
|
188
188
|
# @return [void]
|
189
189
|
def reset!
|
190
|
-
@subject = @predicate = @object = @
|
190
|
+
@subject = @predicate = @object = @graph_name = nil
|
191
191
|
end
|
192
192
|
|
193
193
|
##
|
@@ -81,7 +81,7 @@ module RDF::Raptor::FFI::V2
|
|
81
81
|
# any additional options for serializing (see {#start_to})
|
82
82
|
# @return [void]
|
83
83
|
def start_to_stream(stream, options = {})
|
84
|
-
iostream = V2::IOStream.new(V2::IOStreamHandler.new(stream), :
|
84
|
+
iostream = V2::IOStream.new(V2::IOStreamHandler.new(stream), free_iostream: self[:free_iostream_on_end])
|
85
85
|
start_to_iostream(iostream, options)
|
86
86
|
end
|
87
87
|
|
@@ -30,7 +30,7 @@ module RDF::Raptor::FFI::V2
|
|
30
30
|
attr_accessor :id
|
31
31
|
|
32
32
|
# @return [RDF::Resource]
|
33
|
-
attr_accessor :
|
33
|
+
attr_accessor :graph_name
|
34
34
|
|
35
35
|
##
|
36
36
|
# @return [RDF::Resource]
|
@@ -115,19 +115,19 @@ module RDF::Raptor::FFI::V2
|
|
115
115
|
# @return [Array(RDF::Resource, RDF::URI, RDF::Term, nil)]
|
116
116
|
# @see RDF::Statement#to_quad
|
117
117
|
def to_quad
|
118
|
-
[subject, predicate, object,
|
118
|
+
[subject, predicate, object, graph_name]
|
119
119
|
end
|
120
120
|
|
121
121
|
##
|
122
122
|
# @return [RDF::Statement]
|
123
123
|
def to_rdf
|
124
|
-
RDF::Statement.new(subject, predicate, object, :
|
124
|
+
RDF::Statement.new(subject, predicate, object, graph_name: graph_name)
|
125
125
|
end
|
126
126
|
|
127
127
|
##
|
128
128
|
# @return [void]
|
129
129
|
def reset!
|
130
|
-
@subject = @predicate = @object = @
|
130
|
+
@subject = @predicate = @object = @graph_name = nil
|
131
131
|
end
|
132
132
|
|
133
133
|
##
|
@@ -33,9 +33,9 @@ module RDF::Raptor::FFI::V2
|
|
33
33
|
str = self.to_str
|
34
34
|
case
|
35
35
|
when language = self.language
|
36
|
-
RDF::Literal.new(str, :
|
36
|
+
RDF::Literal.new(str, language: language)
|
37
37
|
when datatype = self.datatype
|
38
|
-
RDF::Literal.new(str, :
|
38
|
+
RDF::Literal.new(str, datatype: datatype)
|
39
39
|
else
|
40
40
|
RDF::Literal.new(str)
|
41
41
|
end
|
@@ -87,7 +87,7 @@ module RDF::Raptor::FFI::V2
|
|
87
87
|
#
|
88
88
|
# @param [FFI::Pointer] ptr
|
89
89
|
# @return [void]
|
90
|
-
def release
|
90
|
+
def release(ptr = nil)
|
91
91
|
V2.raptor_free_term(self) unless ptr.null?
|
92
92
|
end
|
93
93
|
|
data/lib/rdf/raptor/graphviz.rb
CHANGED
@@ -19,15 +19,15 @@ module RDF::Raptor
|
|
19
19
|
# @example Obtaining a Graphviz format class
|
20
20
|
# RDF::Format.for(:graphviz) #=> RDF::Raptor::Graphviz::Format
|
21
21
|
# RDF::Format.for("output.dot")
|
22
|
-
# RDF::Format.for(:
|
23
|
-
# RDF::Format.for(:
|
24
|
-
# RDF::Format.for(:
|
22
|
+
# RDF::Format.for(file_name: "output.dot")
|
23
|
+
# RDF::Format.for(file_extension: "dot")
|
24
|
+
# RDF::Format.for(content_type: "text/vnd.graphviz")
|
25
25
|
#
|
26
26
|
# @see http://www.iana.org/assignments/media-types/text/vnd.graphviz
|
27
27
|
class Format < RDF::Format
|
28
28
|
extend RDF::Raptor::Format
|
29
29
|
|
30
|
-
content_type 'text/vnd.graphviz', :
|
30
|
+
content_type 'text/vnd.graphviz', aliases: ['application/x-graphviz', 'text/x-graphviz'], extension: :dot # TODO: also .gv
|
31
31
|
content_encoding 'utf-8'
|
32
32
|
rapper_format :dot
|
33
33
|
|
@@ -41,9 +41,9 @@ module RDF::Raptor
|
|
41
41
|
# @example Obtaining a Graphviz writer class
|
42
42
|
# RDF::Writer.for(:graphviz) #=> RDF::Raptor::Graphviz::Writer
|
43
43
|
# RDF::Writer.for("output.dot")
|
44
|
-
# RDF::Writer.for(:
|
45
|
-
# RDF::Writer.for(:
|
46
|
-
# RDF::Writer.for(:
|
44
|
+
# RDF::Writer.for(file_name: "output.dot")
|
45
|
+
# RDF::Writer.for(file_extension: "dot")
|
46
|
+
# RDF::Writer.for(content_type: "text/vnd.graphviz")
|
47
47
|
#
|
48
48
|
# @example Serializing RDF statements into a Graphviz file
|
49
49
|
# RDF::Writer.open("output.dot") do |writer|
|
data/lib/rdf/raptor/ntriples.rb
CHANGED
@@ -27,14 +27,14 @@ module RDF::Raptor
|
|
27
27
|
# @example Obtaining an N-Triples format class
|
28
28
|
# RDF::Format.for(:ntriples) #=> RDF::Raptor::NTriples::Format
|
29
29
|
# RDF::Format.for("input.nt")
|
30
|
-
# RDF::Format.for(:
|
31
|
-
# RDF::Format.for(:
|
32
|
-
# RDF::Format.for(:
|
30
|
+
# RDF::Format.for(file_name: "input.nt")
|
31
|
+
# RDF::Format.for(file_extension: "nt")
|
32
|
+
# RDF::Format.for(content_type: "text/plain")
|
33
33
|
#
|
34
34
|
class Format < RDF::Format
|
35
35
|
extend RDF::Raptor::Format
|
36
36
|
|
37
|
-
content_type 'application/n-triples', :
|
37
|
+
content_type 'application/n-triples', extension: :nt, alias: ['text/plain']
|
38
38
|
content_encoding 'utf-8'
|
39
39
|
rapper_format :ntriples
|
40
40
|
|
@@ -53,9 +53,9 @@ module RDF::Raptor
|
|
53
53
|
# @example Obtaining an N-Triples reader class
|
54
54
|
# RDF::Reader.for(:ntriples) #=> RDF::Raptor::NTriples::Reader
|
55
55
|
# RDF::Reader.for("input.nt")
|
56
|
-
# RDF::Reader.for(:
|
57
|
-
# RDF::Reader.for(:
|
58
|
-
# RDF::Reader.for(:
|
56
|
+
# RDF::Reader.for(file_name: "input.nt")
|
57
|
+
# RDF::Reader.for(file_extension: "nt")
|
58
|
+
# RDF::Reader.for(content_type: "text/plain")
|
59
59
|
#
|
60
60
|
# @example Parsing RDF statements from an N-Triples file
|
61
61
|
# RDF::Reader.open("input.nt") do |reader|
|
@@ -74,9 +74,9 @@ module RDF::Raptor
|
|
74
74
|
# @example Obtaining an N-Triples writer class
|
75
75
|
# RDF::Writer.for(:ntriples) #=> RDF::Raptor::NTriples::Writer
|
76
76
|
# RDF::Writer.for("output.nt")
|
77
|
-
# RDF::Writer.for(:
|
78
|
-
# RDF::Writer.for(:
|
79
|
-
# RDF::Writer.for(:
|
77
|
+
# RDF::Writer.for(file_name: "output.nt")
|
78
|
+
# RDF::Writer.for(file_extension: "nt")
|
79
|
+
# RDF::Writer.for(content_type: "text/plain")
|
80
80
|
#
|
81
81
|
# @example Serializing RDF statements into an N-Triples file
|
82
82
|
# RDF::Writer.open("output.nt") do |writer|
|
data/lib/rdf/raptor/rdfa.rb
CHANGED
@@ -20,14 +20,14 @@ module RDF::Raptor
|
|
20
20
|
# @example Obtaining an RDFa format class
|
21
21
|
# RDF::Format.for(:rdfa) #=> RDF::Raptor::RDFa::Format
|
22
22
|
# RDF::Format.for("input.html")
|
23
|
-
# RDF::Format.for(:
|
24
|
-
# RDF::Format.for(:
|
25
|
-
# RDF::Format.for(:
|
23
|
+
# RDF::Format.for(file_name: "input.html")
|
24
|
+
# RDF::Format.for(file_extension: "html")
|
25
|
+
# RDF::Format.for(content_type: "application/xhtml+xml")
|
26
26
|
#
|
27
27
|
class Format < RDF::Format
|
28
28
|
extend RDF::Raptor::Format
|
29
29
|
|
30
|
-
content_type 'application/xhtml+xml', :
|
30
|
+
content_type 'application/xhtml+xml', aliases: ['text/html'], extension: :html
|
31
31
|
content_encoding 'utf-8'
|
32
32
|
rapper_format :rdfa
|
33
33
|
|
@@ -40,9 +40,9 @@ module RDF::Raptor
|
|
40
40
|
# @example Obtaining an RDFa reader class
|
41
41
|
# RDF::Reader.for(:rdfa) #=> RDF::Raptor::RDFa::Reader
|
42
42
|
# RDF::Reader.for("input.html")
|
43
|
-
# RDF::Reader.for(:
|
44
|
-
# RDF::Reader.for(:
|
45
|
-
# RDF::Reader.for(:
|
43
|
+
# RDF::Reader.for(file_name: "input.html")
|
44
|
+
# RDF::Reader.for(file_extension: "html")
|
45
|
+
# RDF::Reader.for(content_type: "application/xhtml+xml")
|
46
46
|
#
|
47
47
|
# @example Extracting RDF statements from an XHTML+RDFa file
|
48
48
|
# RDF::Reader.open("input.html") do |reader|
|
data/lib/rdf/raptor/rdfxml.rb
CHANGED
@@ -27,14 +27,14 @@ module RDF::Raptor
|
|
27
27
|
# @example Obtaining an RDF/XML format class
|
28
28
|
# RDF::Format.for(:rdfxml) #=> RDF::Raptor::RDFXML::Format
|
29
29
|
# RDF::Format.for("input.rdf")
|
30
|
-
# RDF::Format.for(:
|
31
|
-
# RDF::Format.for(:
|
32
|
-
# RDF::Format.for(:
|
30
|
+
# RDF::Format.for(file_name: "input.rdf")
|
31
|
+
# RDF::Format.for(file_extension: "rdf")
|
32
|
+
# RDF::Format.for(content_type: "application/rdf+xml")
|
33
33
|
#
|
34
34
|
class Format < RDF::Format
|
35
35
|
extend RDF::Raptor::Format
|
36
36
|
|
37
|
-
content_type 'application/rdf+xml', :
|
37
|
+
content_type 'application/rdf+xml', extension: :rdf
|
38
38
|
content_encoding 'utf-8'
|
39
39
|
rapper_format :rdfxml
|
40
40
|
|
@@ -53,9 +53,9 @@ module RDF::Raptor
|
|
53
53
|
# @example Obtaining an RDF/XML reader class
|
54
54
|
# RDF::Reader.for(:rdfxml) #=> RDF::Raptor::RDFXML::Reader
|
55
55
|
# RDF::Reader.for("input.rdf")
|
56
|
-
# RDF::Reader.for(:
|
57
|
-
# RDF::Reader.for(:
|
58
|
-
# RDF::Reader.for(:
|
56
|
+
# RDF::Reader.for(file_name: "input.rdf")
|
57
|
+
# RDF::Reader.for(file_extension: "rdf")
|
58
|
+
# RDF::Reader.for(content_type: "application/rdf+xml")
|
59
59
|
#
|
60
60
|
# @example Parsing RDF statements from an RDF/XML file
|
61
61
|
# RDF::Reader.open("input.rdf") do |reader|
|
@@ -74,9 +74,9 @@ module RDF::Raptor
|
|
74
74
|
# @example Obtaining an RDF/XML writer class
|
75
75
|
# RDF::Writer.for(:rdfxml) #=> RDF::Raptor::RDFXML::Writer
|
76
76
|
# RDF::Writer.for("output.rdf")
|
77
|
-
# RDF::Writer.for(:
|
78
|
-
# RDF::Writer.for(:
|
79
|
-
# RDF::Writer.for(:
|
77
|
+
# RDF::Writer.for(file_name: "output.rdf")
|
78
|
+
# RDF::Writer.for(file_extension: "rdf")
|
79
|
+
# RDF::Writer.for(content_type: "application/rdf+xml")
|
80
80
|
#
|
81
81
|
# @example Serializing RDF statements into an RDF/XML file
|
82
82
|
# RDF::Writer.open("output.rdf") do |writer|
|
data/lib/rdf/raptor/turtle.rb
CHANGED
@@ -27,14 +27,14 @@ module RDF::Raptor
|
|
27
27
|
# @example Obtaining a Turtle format class
|
28
28
|
# RDF::Format.for(:turtle) #=> RDF::Raptor::Turtle::Format
|
29
29
|
# RDF::Format.for("input.ttl")
|
30
|
-
# RDF::Format.for(:
|
31
|
-
# RDF::Format.for(:
|
32
|
-
# RDF::Format.for(:
|
30
|
+
# RDF::Format.for(file_name: "input.ttl")
|
31
|
+
# RDF::Format.for(file_extension: "ttl")
|
32
|
+
# RDF::Format.for(content_type: "text/turtle")
|
33
33
|
#
|
34
34
|
class Format < RDF::Format
|
35
35
|
extend RDF::Raptor::Format
|
36
36
|
|
37
|
-
content_type 'text/turtle', :
|
37
|
+
content_type 'text/turtle', aliases: ['application/x-turtle', 'application/turtle'], extension: :ttl
|
38
38
|
content_encoding 'utf-8'
|
39
39
|
rapper_format :turtle
|
40
40
|
|
@@ -48,9 +48,9 @@ module RDF::Raptor
|
|
48
48
|
# @example Obtaining a Turtle reader class
|
49
49
|
# RDF::Reader.for(:turtle) #=> RDF::Raptor::Turtle::Reader
|
50
50
|
# RDF::Reader.for("input.ttl")
|
51
|
-
# RDF::Reader.for(:
|
52
|
-
# RDF::Reader.for(:
|
53
|
-
# RDF::Reader.for(:
|
51
|
+
# RDF::Reader.for(file_name: "input.ttl")
|
52
|
+
# RDF::Reader.for(file_extension: "ttl")
|
53
|
+
# RDF::Reader.for(content_type: "text/turtle")
|
54
54
|
#
|
55
55
|
# @example Parsing RDF statements from a Turtle file
|
56
56
|
# RDF::Reader.open("input.ttl") do |reader|
|
@@ -69,9 +69,9 @@ module RDF::Raptor
|
|
69
69
|
# @example Obtaining a Turtle writer class
|
70
70
|
# RDF::Writer.for(:turtle) #=> RDF::Raptor::Turtle::Writer
|
71
71
|
# RDF::Writer.for("output.ttl")
|
72
|
-
# RDF::Writer.for(:
|
73
|
-
# RDF::Writer.for(:
|
74
|
-
# RDF::Writer.for(:
|
72
|
+
# RDF::Writer.for(file_name: "output.ttl")
|
73
|
+
# RDF::Writer.for(file_extension: "ttl")
|
74
|
+
# RDF::Writer.for(content_type: "text/turtle")
|
75
75
|
#
|
76
76
|
# @example Serializing RDF statements into a Turtle file
|
77
77
|
# RDF::Writer.open("output.ttl") do |writer|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rdf-raptor
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.99.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Arto Bendiken
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2015-10-30 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: ffi
|
@@ -31,14 +31,14 @@ dependencies:
|
|
31
31
|
requirements:
|
32
32
|
- - ">="
|
33
33
|
- !ruby/object:Gem::Version
|
34
|
-
version: 1.
|
34
|
+
version: '1.99'
|
35
35
|
type: :runtime
|
36
36
|
prerelease: false
|
37
37
|
version_requirements: !ruby/object:Gem::Requirement
|
38
38
|
requirements:
|
39
39
|
- - ">="
|
40
40
|
- !ruby/object:Gem::Version
|
41
|
-
version: 1.
|
41
|
+
version: '1.99'
|
42
42
|
- !ruby/object:Gem::Dependency
|
43
43
|
name: yard
|
44
44
|
requirement: !ruby/object:Gem::Requirement
|
@@ -87,14 +87,14 @@ dependencies:
|
|
87
87
|
requirements:
|
88
88
|
- - ">="
|
89
89
|
- !ruby/object:Gem::Version
|
90
|
-
version: 1.
|
90
|
+
version: '1.99'
|
91
91
|
type: :development
|
92
92
|
prerelease: false
|
93
93
|
version_requirements: !ruby/object:Gem::Requirement
|
94
94
|
requirements:
|
95
95
|
- - ">="
|
96
96
|
- !ruby/object:Gem::Version
|
97
|
-
version: 1.
|
97
|
+
version: '1.99'
|
98
98
|
- !ruby/object:Gem::Dependency
|
99
99
|
name: rake
|
100
100
|
requirement: !ruby/object:Gem::Requirement
|
@@ -163,7 +163,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
163
163
|
requirements:
|
164
164
|
- - ">="
|
165
165
|
- !ruby/object:Gem::Version
|
166
|
-
version: 1.9.
|
166
|
+
version: 1.9.3
|
167
167
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
168
168
|
requirements:
|
169
169
|
- - ">="
|
@@ -172,7 +172,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
172
172
|
requirements:
|
173
173
|
- libraptor2 (>= 2.0)
|
174
174
|
rubyforge_project: rdf
|
175
|
-
rubygems_version: 2.
|
175
|
+
rubygems_version: 2.4.5.1
|
176
176
|
signing_key:
|
177
177
|
specification_version: 4
|
178
178
|
summary: Raptor RDF Parser plugin for RDF.rb.
|