ruby-rdf / rdf-blazegraph

A Ruby RDF::Repository for Blazegraph
The Unlicense
7 stars 3 forks source link

RDF::Blazegraph

An RDF::Repository implementation for Blazegraph; a REST client for NanoSparqlServer.

Usage

Run gem install rdf-blazegraph or add gem 'rdf-blazegraph' to your Gemspec.

require 'rdf/blazegraph'

# as an RDF::Repository
repo = RDF::Blazegraph::Repository.new('http://localhost:9999/bigdata/sparql')
repo << RDF::Statement(RDF::URI('http://example.org/#moomin'), RDF::FOAF.name, 'Moomin')
repo.count # => 1

# with REST interface
nano = RDF::Blazegraph::RestClient.new('http://localhost:9999/bigdata/sparql')
nano.get_statements.each { |s| puts s.inspect }
# #<RDF::Statement:0x3ff0d450e5ec(<http://example.org/#moomin> <http://xmlns.com/foaf/0.1/name> "Moomin" .)>

Running the Tests

$ bundle install
$ bundle exec rspec

Contributing

This repository uses Git Flow to mange development and release activity. All submissions must be on a feature branch based on the develop branch to ease staging and integration.

License

This is free and unencumbered public domain software. For more information, see http://unlicense.org/ or the accompanying {file:UNLICENSE} file.