Ldpath
This is a ruby implementation of LDPath, a language for selecting values linked data resources.
Installation
Add this line to your application's Gemfile:
gem 'ldpath'
And then execute:
$ bundle
Or install it yourself as:
$ gem install ldpath
Usage
require 'ldpath'
my_program = <<-EOF
@prefix dcterms : <http://purl.org/dc/terms/> ;
title = dcterms:title :: xsd:string ;
EOF
uri = RDF::URI.new "info:a"
context = RDF::Graph.new << [uri, RDF::DC.title, "Some Title"]
program = Ldpath::Program.parse my_program
output = program.evaluate uri, context
# => { ... }
Contributing
- Fork it ( http://github.com/cbeer/ldpath.rb/fork )
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request