Sha256: dbbf8a06cc5f5ae2cd7a540b9f56979832f5a29b3d9a7ef0f884475eac90922c
Contents?: true
Size: 626 Bytes
Versions: 49
Compression:
Stored size: 626 Bytes
Contents
class BibTeX::Bibliography::RDFConverter # converts a BibTeX Bibliography to RDF # @return [RDF::Graph] the RDF graph of the bibliography def self.convert(bibtex) new(bibtex).convert! end # @param [BibTeX::Entry] the bibliography to convert def initialize(bibtex, graph = RDF::Graph.new) @bibtex = bibtex @graph = graph @agent = {} end # @return [RDF::Graph] the RDF graph of this bibliography def convert! bibtex.q('@entry').each do |entry| BibTeX::Entry::RDFConverter.convert(entry, graph, agent) end graph end protected attr_reader :bibtex, :graph, :agent end
Version data entries
49 entries across 49 versions & 3 rubygems