= RDF-Redland -- A Ruby Wrapper around the Redland Application Framework

This package contains RDF-Redland, a rubyified api using the Redland
Application Framework underneath.

== Download

The latest version of rdf-redland can be found at
* http://rubyforge.org/frs/?group_id=172

== Installation

=== Install Redland
Install Redland-The installation of rdf-redland is dependent upon having
the Redland Application Framework installed. Download the distribution from the 
following url:
http://www.redland.opensource.ac.uk/dist/source/redland-0.9.16.tar.gz

* The current version of Redland.i in redland-0.9.16.tar.gz needs to be replaced with
  the Redland.i file included with the rdf-redland distribution.  The current CVS HEAD of 
  the Redland Application Framework includes these changes.

* Configure redland with ruby support.
  at the redland base directory type the following:
    ./configure --with-ruby
  
* Make Redland 
    make

* Install Redland
    make Install

For a more detailed look at Redland installation and options go to
http://www.redland.opensource.ac.uk/INSTALL.html

=== Install redland-rdf

Download the GEM file and install it with ..

  gem -i rdf-redland-VERSION.gem

== Simple Example
  # This example creates my FOAF file
  require 'rubygems'
  require_gem 'rdf-redland'
  require 'rdf/redland/constants'
  
  include Redland
  
  foaf = Namespace.new('http://xmlns.com/foaf/0.1')
  model = Model.new()
  res = model.create_resource() # create a blank node
  res.add_property(Redland::TYPE,foaf['Person'].
    add_property(foaf['name'],'Dominic Sisneros').
    add_property(foaf['surname'],'Sisneros').
    add_property(foaf['title','Electronic Engineer')
  r2 = model.create_resource()
  
  require 'rdf/redland/schemas/foaf'
  r2.type = FOAF::PERSON
  res.add_property(FOAF::KNOWS,r2)
  serializer = Serializer.new()
  
  serializer.to_file('foaf.rdf',model,Uri.new("http://www.faa.gov/people#"))
  


    

 


