Skip to content

lszeremeta/RTriples

Repository files navigation

RTriples

Simple but powerful RDF graph store based on awesome RethinkDB database & Ruby projects like Sinatra.

Installation

git clone https://github.com/lszeremeta/RTriples.git
cd RTriples
bundle

Note: RethinkDB must be installed and started.

Now you may need to import some triples to RethinkDB (RDF/JSON serialization). You can simply generate it through bsbmtools-json or just use one of generated samples.

After that, import this data to RethinkDB:

rethinkdb import -f 100.json --table rtriples.100

That's all.

Running client

You now need another simple step to start the client:

rackup -E production

Advanced options:

rackup [-E development|production] [-p PORT]

Example usage

http://localhost:9292/?s=&p=&o=http://www4.wiwiss.fu-berlin.de/bizer/bsbm/v01/instances/ProductFeature179

or simply:

http://localhost:9292/?o=http://www4.wiwiss.fu-berlin.de/bizer/bsbm/v01/instances/ProductFeature179

returns HTML table with subjects and predicates related to object.

Available params

  • s - subject value (default: nothing)
  • p - predicate value (default: nothing)
  • o - object value (default: nothing)
  • type - object type (default: uri; other options: literal, typed-literal)
  • lang - object language (default: nothing; allowed only if type is literal)
  • datatype - object datatype (default: nothing; allowed only if type is typed-literal)
  • limit - results limit (default: 10)
  • format - output format (default: html; other options: json, nt, csv, txt)

Output formats

Client returns results as HTML table by default, but you can change it!

Specify the output format using format parameter:

License

Distributed under MIT license.