#!/usr/bin/env ruby

# Basic reporting script that expects TR-in-RDF input
# $Id: report.rb,v 1.1 2003/03/25 02:56:41 danbri Exp $
# todo: make this into a test (of the input data and/or the tools using it)
#
# danbri@w3.org

# grep -i rec *nt| grep -i '#type'

$:.unshift '../../lib/'
require 'basicrdf'

rec='http://www.w3.org/2001/02pd/rec54#'
dc='http://purl.org/dc/elements/1.1/'
doc='http://www.w3.org/2000/10/swap/pim/doc#'
rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#'

tr = Loader.get_rdf 'tr.rdf'

drafts=tr.ask( Statement.new(nil,rdf+'type',rec+'WD'))
drafts.subjects.each do |wd|
  title=tr.ask(Statement.new(wd,dc+'title',nil)).objects.shift
  puts "Got: #{wd} Title: #{title} " if title
end

puts tr.toNtriples

