W3C home > Mailing lists > Public > public-rdf-ruby@w3.org > June 2010

Re: Spira triple storage

From: Ben Lavender <blavender@gmail.com>
Date: Thu, 3 Jun 2010 19:29:50 +0200
Message-ID: <AANLkTilWLn7v3XMLqislObNXOPiYV8awMDhNQ2xNcLYT@mail.gmail.com>
To: David Peterson <david.seth.p@gmail.com>
Cc: public-rdf-ruby@w3.org
Thanks for the interest.

Spira supports writing more or less as one might expect.  The first
example in the README has a person.save! statement which will save the
person as triples.

bob = RDF::URI("http://example.org/people/bob").as(Person)
bob.age  = 15
bob.name = "Bob Smith"
bob.save!

There's also bob.destroy! and bob.destroy_resource!.  bob.destroy!
deletes triples associated with the particular model class, and
bob.destroy_resource! deletes all triples with bob's URI as the
subject.

The README has several examples of save!:
http://spira.rubyforge.org/

You can find detailed instance method info at:
http://spira.rubyforge.org/Spira/Resource/InstanceMethods.html

Is that what you needed?

Ben

On Thu, Jun 3, 2010 at 4:25 AM, David Peterson <david.seth.p@gmail.com> wrote:
> Spira looks fascinating! Great work! I have read the docs and they talk
> about reading triples from a backend, but nothing about saving back. Is this
> possible and what backends can I plug into. If I have totally missed some
> documentation I apologise and can you please point me (RTFM) to the correct
> web link.
>
> Cheers,
>
> David Peterson
>
>
>
Received on Thursday, 3 June 2010 17:30:18 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Thursday, 3 June 2010 17:30:18 GMT