Skip to content

Commit

Permalink
Don't parse quoted triples when validating.
Browse files Browse the repository at this point in the history
  • Loading branch information
gkellogg committed Aug 3, 2024
1 parent 6e55907 commit 2a94ae5
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion lib/rdf/mixin/enumerable.rb
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ def to_a
# * `:validity` allows a concrete Enumerable implementation to indicate that it does or does not support valididty checking. By default implementations are assumed to support validity checking.
# * `:skolemize` supports [Skolemization](https://www.w3.org/wiki/BnodeSkolemization) of an `Enumerable`. Implementations supporting this feature must implement a `#skolemize` method, taking a base URI used for minting URIs for BNodes as stable identifiers and a `#deskolemize` method, also taking a base URI used for turning URIs having that prefix back into the same BNodes which were originally skolemized.
# * `:rdf_full` supports RDF 1.2 Full profile, including support for embedded Triple Terms.
# * `:quoted_triples` supports RDF-star quoted triples.
# * `:quoted_triples` supports RDF-star quoted triples. (DEPRECATED)
# * `:base_direction` supports RDF 1.2 directional language-tagged strings.
#
# @param [Symbol, #to_sym] feature
Expand Down
4 changes: 2 additions & 2 deletions lib/rdf/ntriples/reader.rb
Original file line number Diff line number Diff line change
Expand Up @@ -259,9 +259,9 @@ def read_tripleTerm

##
# @return [RDF::Statement]
# @deprecated Quoted triples are now deprecated
# @deprecated Quoted triples are now deprecated (not supported when validating)
def read_quotedTriple
if @options[:rdfstar] && !match(TT_START) && match(QT_START)
if @options[:rdfstar] && !match(TT_START) && match(QT_START) && !validate?
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
2 changes: 1 addition & 1 deletion lib/rdf/repository.rb
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ def supports?(feature)
when :literal_equality then true
when :atomic_write then true
when :rdf_full then true
when :quoted_triples then true
when :quoted_triples then true # DEPRECATED
when :base_direction then true
when :snapshots then true
else false
Expand Down

0 comments on commit 2a94ae5

Please sign in to comment.