rdf-turtle 1.0.5 → 1.0.6
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/lib/rdf/turtle/freebase_reader.rb +20 -0
- metadata +3 -3
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.0.
|
1
|
+
1.0.6
|
@@ -68,6 +68,26 @@ module RDF::Turtle
|
|
68
68
|
raise RDF::ReaderError, "invalid PName"
|
69
69
|
end
|
70
70
|
|
71
|
+
##
|
72
|
+
# @return [RDF::Literal]
|
73
|
+
# @see http://www.w3.org/TR/rdf-testcases/#ntrip_grammar (literal)
|
74
|
+
def read_literal
|
75
|
+
if literal_str = match(LITERAL_PLAIN)
|
76
|
+
literal_str = self.class.unescape(literal_str)
|
77
|
+
literal = case
|
78
|
+
when language = match(RDF::NTriples::Reader::LANGTAG)
|
79
|
+
RDF::Literal.new(literal_str, :language => language)
|
80
|
+
when datatype = match(/^(\^\^)/)
|
81
|
+
RDF::Literal.new(literal_str, :datatype => read_pname(:intern => true) || read_uriref || fail_object)
|
82
|
+
else
|
83
|
+
RDF::Literal.new(literal_str) # plain string literal
|
84
|
+
end
|
85
|
+
literal.validate! if validate?
|
86
|
+
literal.canonicalize! if canonicalize?
|
87
|
+
literal
|
88
|
+
end
|
89
|
+
end
|
90
|
+
|
71
91
|
##
|
72
92
|
# Read a numeric value
|
73
93
|
# @return [RDF::Literal::Integer, RDF::Literal::Float, RDF::Literal::Double]
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rdf-turtle
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.6
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-
|
12
|
+
date: 2013-05-11 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rdf
|
@@ -195,7 +195,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
195
195
|
version: '0'
|
196
196
|
segments:
|
197
197
|
- 0
|
198
|
-
hash: -
|
198
|
+
hash: -221020975256303301
|
199
199
|
requirements: []
|
200
200
|
rubyforge_project: rdf-turtle
|
201
201
|
rubygems_version: 1.8.25
|