reddy

A set of compliant RDF parsers:

  • N3-rdf

  • RDF/XML

  • RDFa

DESCRIPTION:

Reddy is an RDF library for Ruby.

FEATURES:

Reddy parses RDF/XML, RDFa and N3-rdf into a Graph object. It also serializes RDF/XML and N-Triples from the Graph.

  • Fully compliant RDF/XML parser.

  • Fully compliant XHTML/RDFa 1.0 parser.

  • N3-rdf parser

  • N-Triples and RDF/XML serializer

  • RDFa tests use SPARQL for most tests due to Rasqal limitations. Other tests compare directly against N-triples.

  • Graph serializes into RDF/XML and N-Triples.

  • ConjunctiveGraph, named Graphs and contextual storage modules.

Install with ‘gem install gkellogg-reddy’

SYNOPSIS:

A simple RDF library for Ruby has been necessary for some time.

Basic usage:

require 'reddy'
parser = Reddy::RdfXmlParser.new
parser.parse(stream, base_uri) do |triple|
  puts triple.to_ntriple
end

or

graph = parser.parse(stream, base_uri)
graph.to_rdfxml

REQUIREMENTS:

  • Addressable

  • Treetop

  • Whatlanguage

  • nokogiri

  • facets

For testing

  • Redland/Rasqal

INSTALL:

  • (sudo gem install reddy)

TODO:

LICENSE:

(The MIT License)

Copyright © 2008 Tom Morris and contributors Copyright © 2009 Gregg Kellogg

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the ‘Software’), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED ‘AS IS’, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

FEEDBACK

  • [email protected] or [email protected]

  • github.com/tommorris/reddy or github.com/gkellogg/reddy

  • tommorris.lighthouseapp.com for bug reports

  • public-rdf-ruby mailing list on w3.org