lib/rdf/trig/streaming_writer.rb in rdf-trig-1.1.5.1 vs lib/rdf/trig/streaming_writer.rb in rdf-trig-1.99.0

- old
+ new

@@ -6,16 +6,16 @@ ## # Write out a statement, retaining current # `subject` and `predicate` to create more compact output # @return [void] `self` def stream_statement(statement) - if statement.context != @streaming_context + if statement.graph_name != @streaming_graph stream_epilogue - if statement.context - @output.write "#{format_term(statement.context, options)} {" + if statement.graph_name + @output.write "#{format_term(statement.graph_name, options)} {" end - @streaming_context, @streaming_subject, @streaming_predicate = statement.context, statement.subject, statement.predicate + @streaming_graph, @streaming_subject, @streaming_predicate = statement.graph_name, statement.subject, statement.predicate @output.write "#{format_term(statement.subject, options)} " @output.write "#{format_term(statement.predicate, options)} " elsif statement.subject != @streaming_subject @output.puts " ." if @previous_statement @output.write "#{indent(@streaming_subject ? 1 : 0)}" @@ -36,10 +36,10 @@ # Complete open statements # @return [void] `self` def stream_epilogue case when @previous_statement.nil? ; - when @streaming_context then @output.puts " }" + when @streaming_graph then @output.puts " }" else @output.puts " ." end end private