#Processed by Id: cwm.py,v 1.83 2002/01/04 16:16:10 timbl Exp 
        #    using base file:/home/connolly/w3ccvs/WWW/2002/02va-py/
        
#  Notation3 generation by
#       notation3.py,v 1.98 2001/11/15 22:11:24 timbl Exp

#   Base was: file:/home/connolly/w3ccvs/WWW/2002/02va-py/
     @prefix : <file:/home/connolly/w3ccvs/WWW/2002/01dc-nj//itin2ical.n3#> .
     @prefix dc: <http://purl.org/dc/elements/1.1/> .
     @prefix ical: <http://ilrt.org/discovery/2001/06/schemas/ical-full/hybrid.rdf#> .
     @prefix log: <http://www.w3.org/2000/10/swap/log#> .
     @prefix n: <http://www.w3.org/2001/07dc-bos/grokNavItin#> .
     @prefix pa: <http://www.w3.org/2000/08/palm56/addr#> .
     @prefix pd: <http://www.w3.org/2000/08/palm56/datebook#> .
     @prefix r: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
     @prefix str: <http://www.w3.org/2000/10/swap/string#> .
    
    :ChicagoTime     a ical:VTIMEZONE;
         ical:TZID "/softwarestudio.org/Olson_20011030_5/America/Chicago";
         ical:_subComponent  [
             a ical:STANDARD;
             ical:TZOFFSETFROM "-0500";
             ical:TZOFFSETTO "-0600";
             ical:TZNAME "CST";
             ical:DTSTART "19701025T020000";
             ical:RRULE  [
                 ical:FREQ ical:YEARLY;
                 ical:INTERVAL "1";
                 ical:BYDAY "-1SU";
                 ical:BYMONTH "10" ] ],
                 [
             a ical:DAYLIGHT;
             ical:TZOFFSETFROM "-0600";
             ical:TZOFFSETTO "-0500";
             ical:TZNAME "CDT";
             ical:DTSTART "19700405T020000";
             ical:RRULE  [
                 ical:FREQ ical:YEARLY;
                 ical:INTERVAL "1";
                 ical:BYDAY "1SU";
                 ical:BYMONTH "4" ] ] .
    
    :NewYorkTime     a ical:VTIMEZONE;
         ical:TZID "/softwarestudio.org/Olson_20011030_5/America/New_York";
         ical:_subComponent  [
             a ical:STANDARD;
             ical:TZOFFSETFROM "-0400";
             ical:TZOFFSETTO "-0500";
             ical:TZNAME "EST";
             ical:DTSTART "19701025T020000";
             ical:RRULE  [
                 ical:FREQ ical:YEARLY;
                 ical:INTERVAL "1";
                 ical:BYDAY "-1SU";
                 ical:BYMONTH "10" ] ],
                 [
             a ical:DAYLIGHT;
             ical:TZOFFSETFROM "-0500";
             ical:TZOFFSETTO "-0400";
             ical:TZNAME "EDT";
             ical:DTSTART "19700405T020000";
             ical:RRULE  [
                 ical:FREQ ical:YEARLY;
                 ical:INTERVAL "1";
                 ical:BYDAY "1SU";
                 ical:BYMONTH "4" ] ] .
    {
        :where     n:airportName "KANSAS CITY INTL" .
        
        }     log:implies {:where     :timeZone :ChicagoTime .
        } .
    {
        :where     n:airportName "CHICAGO OHARE" .
        
        }     log:implies {:where     :timeZone :ChicagoTime .
        } .
    {
        :where     n:airportName "NEWARK" .
        
        }     log:implies {:where     :timeZone :NewYorkTime .
        } .
    {
        :where     n:airportName "WASHINGTON REAGAN" .
        
        }     log:implies {:where     :timeZone :NewYorkTime .
        } .
    {
        
          ( :carrierName 
            " #" 
            :num 
            " from " 
            :fromName 
            " to " 
            :toName  )
             str:concatenation :sum .
          ( :yymmdd 
            "T" 
            :hh_mm 
            ":00"  )
             str:concatenation :dtstart .
          ( :yymmdd 
            "T" 
            :hh_mm2 
            ":00"  )
             str:concatenation :dtend .
        :flt     n:AR  [
                 n:place  [
                     n:airportName :toName;
                     :timeZone  [
                         ical:TZID :tz2 ] ];
                 n:time :hh_mm2 ];
             n:LV  [
                 n:time :hh_mm;
                 n:place  [
                     n:airportName :fromName;
                     :timeZone  [
                         ical:TZID :tz ] ] ];
             n:carrier  [
                 pa:company :carrierName ];
             n:date :yymmdd;
             n:flightNum :num .
        
        }     log:implies {:flt     a ical:VEVENT;
             ical:DTEND  [
                 ical:TZID :tz2;
                 r:value :dtend ];
             ical:DTSTART  [
                 ical:TZID :tz;
                 r:value :dtstart ];
             ical:SUMMARY :sum .
        } .
    
    <file:/home/connolly/w3ccvs/WWW/2002/01dc-nj//itin2ical.n3>     <http://purl.org/dc/elements/1.1/description> """
rules to map from Navigant itinerary vocabulary
to iCalendar vocabulary.
$Id: itincal.n3,v 1.1 2002/01/23 18:27:06 connolly Exp $
""";
         <http://purl.org/dc/elements/1.1/source> <ftp://elsie.nci.nih.gov/pub/>,
                <http://ilrt.org/discovery/2001/06/schemas/ical-full/hybrid.rdf> .
    
    this     log:forAll :carrierName,
                :dtend,
                :dtstart,
                :flt,
                :fromName,
                :hh_mm2,
                :hh_mm,
                :num,
                :sum,
                :toName,
                :tz2,
                :tz,
                :where,
                :yymmdd;
         log:forSome <itin1.n3#_gairport7>,
                <itin1.n3#_gairport9>,
                <itin1.n3#_gcompany5> .
      [      n:date "2002-02-07";
             n:dayName "THURSDAY" ].
    
      [      n:date "2002-02-04";
             n:dayName "MONDAY" ].
    
    <itin1.n3#_gairport7>     :timeZone :ChicagoTime;
         n:airportName "KANSAS CITY INTL" .
    
    <itin1.n3#_gairport9>     :timeZone :NewYorkTime;
         n:airportName "WASHINGTON REAGAN" .
    
    <itin1.n3#_gcompany5>     pa:company "MIDWEST EXPRESS" .
    
    <itin1.n3>     n:air  [
             n:date "2002-02-07";
             n:flightNum "56";
             n:carrier <itin1.n3#_gcompany5>;
             n:flightClassName "ECONOMY";
             n:LV  [
                 n:time "18:35";
                 n:place <itin1.n3#_gairport9> ];
             n:AR  [
                 n:time "20:15";
                 n:place <itin1.n3#_gairport7> ];
             a ical:VEVENT;
             ical:SUMMARY "MIDWEST EXPRESS #56 from WASHINGTON REAGAN to KANSAS CITY INTL";
             ical:DTSTART  [
                 ical:TZID "/softwarestudio.org/Olson_20011030_5/America/New_York";
                 r:value "2002-02-07T18:35:00" ];
             ical:DTEND  [
                 ical:TZID "/softwarestudio.org/Olson_20011030_5/America/Chicago";
                 r:value "2002-02-07T20:15:00" ] ],
                 [
             n:date "2002-02-04";
             n:flightNum "57";
             n:carrier <itin1.n3#_gcompany5>;
             n:flightClassName "ECONOMY";
             n:LV  [
                 n:time "14:35";
                 n:place <itin1.n3#_gairport7> ];
             n:AR  [
                 n:time "17:50";
                 n:place <itin1.n3#_gairport9> ];
             a ical:VEVENT;
             ical:SUMMARY "MIDWEST EXPRESS #57 from KANSAS CITY INTL to WASHINGTON REAGAN";
             ical:DTSTART  [
                 ical:TZID "/softwarestudio.org/Olson_20011030_5/America/Chicago";
                 r:value "2002-02-04T14:35:00" ];
             ical:DTEND  [
                 ical:TZID "/softwarestudio.org/Olson_20011030_5/America/New_York";
                 r:value "2002-02-04T17:50:00" ] ] .
    
    <ftp://elsie.nci.nih.gov/pub/>     <http://purl.org/dc/elements/1.1/creator> "Olson, A.D., et al";
         <http://purl.org/dc/elements/1.1/description> "updated periodically";
         <http://purl.org/dc/elements/1.1/title> "Time zone code and data" .
    
    <http://ilrt.org/discovery/2001/06/schemas/ical-full/hybrid.rdf>     <http://purl.org/dc/elements/1.1/source> <http://www.ietf.org/rfc/rfc2445.txt> .
    
#ENDS
