Skip to content

Graph methods to_ntriples, etc. do not work. #105

Closed
jamsden opened this Issue Feb 25, 2013 · 1 comment

2 participants

@jamsden
jamsden commented Feb 25, 2013

Tracing these methods to Term, there is now case for Graph in the code.

These are useful methods when using RDF.rb with Ruby httpclient to GET and PUT graphs.

Perhaps there should also be class methods like Graph::from_ntriples, from_rdf, from_turtle. These can be easily implemented using Readers, but would be convenient for reading and writing graphs that are created and used in memory.

@gkellogg
Ruby RDF member

Value#to_ntriples and Value#from_ntriples are somewhat special cases, because they work for a variety of formats. Other readers and writers typically don't expose #serialize and #unserialize methods, so they would not work.

However, I could see having RDF::Mutable#from_{sym} where {sym} comes from RDF::Format.reader_symbols. Same for RDF::Enumerable#to_{sym}. using RDF::Format.writer_symbols.

@gkellogg gkellogg was assigned Mar 20, 2013
@gkellogg gkellogg added a commit that referenced this issue Mar 20, 2013
@gkellogg gkellogg Added Enumerable#to_{writer} and Mutable#from_{reader} behavior in me…
…thod_missing based on all available Readers/Writers. This addresses issue #105
3ff7ee9
@gkellogg gkellogg closed this Mar 23, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.