Skip to content

Commit aa9131e

Browse files
committed
Use BNode namer when generating nodes for toRdf, rather than re-using the input symbol. This was formerly done in flattening.
1 parent dddb353 commit aa9131e

File tree

4 files changed

+2
-4
lines changed

4 files changed

+2
-4
lines changed

lib/json/ld/api.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ class API
7979
# @option options [Boolean] :rename_bnodes (true)
8080
# Rename bnodes as part of expansion, or keep them the same.
8181
# @option options [Boolean] :unique_bnodes (false)
82-
# Use unique bnode identifiers, defaults to using the identifier which the node was originall initialized with (if any).
82+
# Use unique bnode identifiers, defaults to using the identifier which the node was originally initialized with (if any).
8383
# @option options [Boolean] :simple_compact_iris (false)
8484
# When compacting IRIs, do not use terms with expanded term definitions
8585
# @option options [Symbol] :adapter used with MultiJson

lib/json/ld/utils.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ def value?(value)
7070
def as_resource(id, base = nil)
7171
@nodes ||= {} # Re-use BNodes
7272
if id[0,2] == '_:'
73-
(@nodes[id] ||= RDF::Node.new(id[2..-1]))
73+
(@nodes[id] ||= RDF::Node.new(namer.get_sym(id)))
7474
elsif base
7575
base.join(id)
7676
else

spec/suite_to_rdf_spec.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
specify "#{t.property('input')}: #{t.name}#{' (negative test)' unless t.positiveTest?}" do
1212
skip "Native value fidelity" if %w(toRdf-0035-in.jsonld).include?(t.property('input'))
1313
pending "Generalized RDF" if %w(toRdf-0118-in.jsonld).include?(t.property('input'))
14-
pending "Blank nodes with reverse properties" if %w(toRdf-0119-in.jsonld).include?(t.property('input'))
1514
t.run self
1615
end
1716
end

spec/writer_spec.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,6 @@
201201
logger.info "source: #{t.input}"
202202
t.logger = logger
203203
pending "Shared list BNode in different graphs" if t.property('input').include?("fromRdf-0021")
204-
pending "graph comparison issue" if t.property('input').include?("fromRdf-0008")
205204
repo = RDF::Repository.load(t.input_loc, format: :nquads)
206205
jsonld = JSON::LD::Writer.buffer(logger: t.logger) do |writer|
207206
writer << repo

0 commit comments

Comments
 (0)