Skip to content

Commit f5dd4e8

Browse files
committed
* Even though deprecated, when matching a quoted triple (<< ... >>) be sure it's not a triple term (<<( ... )>>).
* Add `rdf:reifies` to the RDF vocabulary.
1 parent 196b73b commit f5dd4e8

2 files changed

Lines changed: 11 additions & 1 deletion

File tree

lib/rdf/ntriples/reader.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ def read_tripleTerm
261261
# @return [RDF::Statement]
262262
# @deprecated Quoted triples are now deprecated
263263
def read_quotedTriple
264-
if @options[:rdfstar] && match(QT_START)
264+
if @options[:rdfstar] && !match(TT_START) && match(QT_START)
265265
warn "[DEPRECATION] RDF-star quoted triples are deprecated and will be removed in a future version.\n" +
266266
"Called from #{Gem.location_of_caller.join(':')}"
267267
subject = read_uriref || read_node || read_quotedTriple || fail_subject

lib/rdf/vocab/rdfv.rb

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,10 @@ module RDF
7272
# # @return [RDF::Vocabulary::Term]
7373
# # @attr_reader :value
7474
#
75+
# # Reification predicate
76+
# # @return [RDF::Vocabulary::Term]
77+
# # @attr_reader :reifies
78+
#
7579
# # The datatype of RDF literals storing fragments of HTML content.
7680
# # @return [RDF::Vocabulary::Term]
7781
# # @attr_reader :HTML
@@ -253,6 +257,12 @@ def name; "RDF"; end
253257
range: "http://www.w3.org/2000/01/rdf-schema#Resource".freeze,
254258
isDefinedBy: %(http://www.w3.org/1999/02/22-rdf-syntax-ns#).freeze,
255259
type: "http://www.w3.org/1999/02/22-rdf-syntax-ns#Property".freeze
260+
property :reifies,
261+
comment: %(Property relating to a Triple Term.).freeze,
262+
domain: "http://www.w3.org/2000/01/rdf-schema#Resource".freeze,
263+
label: "reifies".freeze,
264+
isDefinedBy: %(http://www.w3.org/1999/02/22-rdf-syntax-ns#).freeze,
265+
type: "http://www.w3.org/1999/02/22-rdf-syntax-ns#Property".freeze
256266

257267
# Datatype definitions
258268
term :HTML,

0 commit comments

Comments
 (0)