Ldpath

This is a ruby implementation of LDPath, a language for selecting values linked data resources.

Gem Version Build Status Coverage Status

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::Vocab::DC.title, "Some Title"]

program = Ldpath::Program.parse my_program
output = program.evaluate uri, context
# => { ... }

Compatibility

  • Ruby 2.5 or the latest 2.4 version is recommended. Later versions may also work.

Product Owner & Maintenance

LDPath is moving toward being a Core Component of the Samvera community. The documentation for what this means can be found here.

Product Owner

elrayle

Help

The Samvera community is here to help. Please see our support guide.

Acknowledgments

This software has been developed by and is brought to you by the Samvera community. Learn more at the Samvera website.

Samvera Logo

Special thanks to...

Chris Beer for the initial implementation of this gem!