Skip to content

Commit

Permalink
* Even though deprecated, when matching a quoted triple (<< ... >>)…
Browse files Browse the repository at this point in the history
… be sure it's not a triple term (`<<( ... )>>`).

* Add `rdf:reifies` to the RDF vocabulary.
  • Loading branch information
gkellogg committed Mar 26, 2024
1 parent 196b73b commit f5dd4e8
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/rdf/ntriples/reader.rb
Expand Up @@ -261,7 +261,7 @@ def read_tripleTerm
# @return [RDF::Statement]
# @deprecated Quoted triples are now deprecated
def read_quotedTriple
if @options[:rdfstar] && match(QT_START)
if @options[:rdfstar] && !match(TT_START) && match(QT_START)
warn "[DEPRECATION] RDF-star quoted triples are deprecated and will be removed in a future version.\n" +
"Called from #{Gem.location_of_caller.join(':')}"
subject = read_uriref || read_node || read_quotedTriple || fail_subject
Expand Down
10 changes: 10 additions & 0 deletions lib/rdf/vocab/rdfv.rb
Expand Up @@ -72,6 +72,10 @@ module RDF
# # @return [RDF::Vocabulary::Term]
# # @attr_reader :value
#
# # Reification predicate
# # @return [RDF::Vocabulary::Term]
# # @attr_reader :reifies
#
# # The datatype of RDF literals storing fragments of HTML content.
# # @return [RDF::Vocabulary::Term]
# # @attr_reader :HTML
Expand Down Expand Up @@ -253,6 +257,12 @@ def name; "RDF"; end
range: "http://www.w3.org/2000/01/rdf-schema#Resource".freeze,
isDefinedBy: %(http://www.w3.org/1999/02/22-rdf-syntax-ns#).freeze,
type: "http://www.w3.org/1999/02/22-rdf-syntax-ns#Property".freeze
property :reifies,
comment: %(Property relating to a Triple Term.).freeze,
domain: "http://www.w3.org/2000/01/rdf-schema#Resource".freeze,
label: "reifies".freeze,
isDefinedBy: %(http://www.w3.org/1999/02/22-rdf-syntax-ns#).freeze,
type: "http://www.w3.org/1999/02/22-rdf-syntax-ns#Property".freeze

# Datatype definitions
term :HTML,
Expand Down

0 comments on commit f5dd4e8

Please sign in to comment.