class BibTeX::Bibliography::RDFConverter
Attributes
agent[R]
bibtex[R]
graph[R]
Public Class Methods
convert(bibtex)
click to toggle source
new(bibtex, graph = RDF::Graph.new)
click to toggle source
@param [BibTeX::Entry] the bibliography to convert
# File lib/bibtex/bibliography/rdf_converter.rb, line 9 def initialize(bibtex, graph = RDF::Graph.new) @bibtex = bibtex @graph = graph @agent = {} end
Public Instance Methods
convert!()
click to toggle source
@return [RDF::Graph] the RDF
graph of this bibliography
# File lib/bibtex/bibliography/rdf_converter.rb, line 16 def convert! bibtex.q('@entry').each do |entry| BibTeX::Entry::RDFConverter.convert(entry, graph, agent) end graph end