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

SPARQL client executes against local repository

From: Gregg Kellogg <gregg@greggkellogg.net>
Date: Wed, 19 Jun 2013 16:31:22 -0700
Message-Id: <A6CB8D5C-64EB-4139-AFA2-D16128601737@greggkellogg.net>
To: "public-rdf-ruby@w3.org" <public-rdf-ruby@w3.org>
Just released SPARQL::Client version 1.0.4, which now works against an RDF::Repository (actually any RDF::Queryable) in addition to remote endpoints. This allows the DSL to be used along with the SPARQL gem to access a local Repository, and runs in pure Ruby. For example:

    require 'rdf/turtle'
    require 'sparql/client'
    repository = RDF::Repository.load("https://raw.github.com/ruby-rdf/sparql-client/master/etc/doap.ttl", :format => :ttl)

    sparql = SPARQL::Client.new(repository)
    query = sparql.select.where([:s, :p, :o]).offset(10).limit(10)

Gregg Kellogg
Received on Wednesday, 19 June 2013 23:31:52 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 17:02:16 UTC