# Convert RRSAgent action items to RDFIcal schema
#
# $Id: ra2cal3.n3,v 1.4 2004/03/01 14:33:07 charles Exp $
#
# 1.3: adding a dtstamp
# 1.4: making it a dtstart with the right syntax    
#        (to make it work through a bug in Apple's iCal, which wrongly requires one)


     @prefix ical: <http://www.w3.org/2002/12/cal/ical#> .
     @prefix act: <http://www.w3.org/2002/07/meeting#> .
     @prefix dc: <http://purl.org/dc/elements/1.1/> .
     @prefix log: <http://www.w3.org/2000/10/swap/log#> .
     @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
     @prefix apple: <http://www.w3.org/2002/12/cal/prod/Apple_Comp_628d9d8459c556fa#> .

# convert between the vocabularies

{ ?x a act:ActionItem ; dc:source ?source ; dc:title ?title } =>
{ ?x a ical:Vtodo ; ical:summary ?title ; ical:url ?source ; 
     is ical:component of <foo> } .

# add a dtstamp...

{ ?x a act:ActionItem ; log:racine ?y . ?y dc:date ?date } =>
  { ?x ical:dtstart [ ical:dateTime ?date ] } .

# Nasty hack to collect the items into a single calendar
#
# @@ this should work from a real collection, not <foo>
#

  <foo> a ical:Vcalendar ; apple:name "test" .

# this is used as a filter, so the following rule just
#   makes sure the calendar is included in the output.

{  <foo> a ical:Vcalendar ; apple:name "test" } =>
{  <foo> a ical:Vcalendar ; apple:name "test" } .
 
