[redland-dev] ruby save

Eric Hanson elh at cs.pdx.edu
Wed Sep 27 09:02:44 UTC 2006


Hi,
Forgive a total newbie question, but I'm trying to create triples and
insert them into a repository using Dominic Sisneros' Ruby rdf-redland
library, and am not sure how to do it.

Its a eruby script.  My code is:

<%
require 'rdf/redland.rb'
require 'cgi'
cgi = CGI.new

store = Redland::HashStore.read_store('fook', '/usr/local/redland-data')
model = Redland::Model.new(store)

res = model.create_resource(cgi['s'])
res.add_property(cgi['p'], cgi['o'])

// ????

%>

How do I save the newly created resource to the model?

Thanks,
Eric


More information about the redland-dev mailing list