@prefix dc: .
<> dc:description """working toward a test query: when can EricM and DanC
get together for a game of pool?""".
@prefix ical: .
@prefix rdf: .
@prefix u: .
@prefix pa: .
@prefix foaf: .
@prefix nav: .
@prefix t: .
@prefix log: .
@prefix v: >.
this log:forAll v:doc, v:who, v:grp, v:where, v:where2,
v:e, v:e2, v:text, v:name, v:dt, v:whoWhere, v:day.
@prefix contact: .
@prefix ont: .
foaf:mbox u:subPropertyOf contact:mailbox.
contact:mailbox a ont:UnambiguousProperty.
######
# Borrow from cyc...
@prefix cg: .
@prefix ct: .
@prefix cs: .
@prefix cact: .
@prefix ctrans: .
cact:eventOccursAt u:subPropertyOf ct:temporallyIntersects, cact:actors, cs:inRegion .
cg:groupMembers u:domain cg:Group; cg:range ct:TemporalThing.
<#EricDanBayArea> cg:groupMembers [ =<#em>; foaf:name "Eric Miller";
foaf:mbox ];
cg:groupMembers [ =<#DanC>; foaf:name "Dan Connolly";
foaf:mbox ];
#and no others...
cg:groupCardinality [ is cg:seriesLength of (<#x> <#y>)];
#hmmm... haven't said EricM and DanC are distinct.
cact:eventOccursAt [ t:stateAbbr "CA" ];
a t:TemporallyContinuous.
# Of course there are many ERIC MILLERs in the world,
# but as of this excercise, only one who uses
# the navigant itinerary stuff.
# Hmm... perhaps I could add a command-line option
# to grokNavItin.pl to ground the user
# in URI space (email address, homepage, ...)
{ v:doc nav:for v:who.
v:who pa:name "MILLER"; pa:firstName "ERIC" }
log:implies { v:who = <#em> }.
{ v:doc nav:for v:who.
v:who pa:name "CONNOLLY"; pa:firstName "DANIEL" }
log:implies { v:who = <#DanC> }.
## kludge to convert between yyyy-mm-dd and yyyymmdd
<#jul30> a ct:CalendarDay;
t:yyyymmdd "20010730";
t:yyyy_mm_dd "2001-07-30".
<#jul31> a ct:CalendarDay;
t:yyyymmdd "20010731";
t:yyyy_mm_dd "2001-07-31".
<#aug1> a ct:CalendarDay;
t:yyyymmdd "20010801";
t:yyyy_mm_dd "2001-08-01".
<#aug2> a ct:CalendarDay;
t:yyyymmdd "20010802";
t:yyyy_mm_dd "2001-08-02".
ical:ATTENDEE u:subPropertyOf cact:actors.
# associate events with calendar days.
# @@ignore timezones
{
v:e ical:DTSTART [ rdf:value v:d1 ].
v:day t:yyyymmdd v:d2.
v:d1 log:startsWith v:d2.
}
log:implies { v:day ct:temporallySubsumes v:e }.
# grp is continuous...
this log:forAll v:d1, v:d2, v:d3.
{
ct:CalendarDay is rdf:type of v:d1, v:d2, v:d3.
v:grp a t:TemporallyContinuous; ct:temporallyIntersects v:d1, v:d2.
v:d3 t:yyyy_mm_dd [ log:greaterThan [ is t:yyyy_mm_dd of v:d1 ];
log:lessThan [ is t:yyyy_mm_dd of v:d2 ]; ].
}
log:implies { v:grp ct:temporallyIntersects v:d3 }.
## an event involving ?who located ?where
# includes the whole day when ?who arrives ?where....
# Hmm... this assumes the event is temporally subsumed by the itinerary?
{ v:e cg:groupMembers v:who; cs:inRegion v:where.
v:itin nav:for v:who; nav:air v:e2.
v:e2 ctrans:toLocation v:where2.
v:where2 cs:inRegion v:where.
v:e2 ct:endingDate v:day.
}
log:implies
{ v:e ct:temporallySubsumes v:day }.
{ v:e cg:groupMembers v:who; cs:inRegion v:where.
v:itin nav:for v:who; nav:air v:e2.
v:e2 ctrans:fromLocation v:where2.
v:where2 cs:inRegion v:where.
v:e2 ct:startingDate v:day.
}
log:implies
{ v:e ct:temporallySubsumes v:day. }.
{ v:grp cg:groupMembers v:who;
ct:temporallyIntersects [ = v:e; cact:actors v:who ].
}
log:implies
{
v:grp <#__hasPlans> v:e.
}.