module RDF::Raptor::CLI::Reader::Extensions

Extensions for ‘RDF::NTriples::Reader`.

Constants

GENID
NODEID

Public Instance Methods

read_node() click to toggle source

Generates fresh random identifiers for Raptor’s ‘_:genid+` blank nodes, while preserving any user-specified blank node identifiers verbatim.

@private @see RDF::NTriples::Reader#read_node @see github.com/ruby-rdf/rdf-raptor/issues/#issue/9

# File lib/rdf/raptor/cli.rb, line 117
def read_node
  if node_id = match(NODEID)
    @nodes ||= {}
    @nodes[node_id] ||= RDF::Node.new(GENID === node_id ? nil : node_id)
  end
end