# The pattern's own scenario: Bud Powell sits in at the piano and the tune jumps from
# static comping to a hard driving swing. The tune and the performance are invariant
# through the change; the three intervals put the two states and the event in order.

@prefix participation: <http://www.ontologydesignpatterns.org/cp/owl/participation.owl#> .
@prefix region: <http://www.ontologydesignpatterns.org/cp/owl/region.owl#> .
@prefix sequence: <http://www.ontologydesignpatterns.org/cp/owl/sequence.owl#> .
@prefix situation: <http://www.ontologydesignpatterns.org/cp/owl/situation.owl#> .
@prefix timeindexedparticipation: <http://www.ontologydesignpatterns.org/cp/owl/timeindexedparticipation.owl#> .
@prefix timeindexedsituation: <http://www.ontologydesignpatterns.org/cp/owl/timeindexedsituation.owl#> .
@prefix timeinterval: <http://www.ontologydesignpatterns.org/cp/owl/timeinterval.owl#> .
@prefix transition: <http://www.ontologydesignpatterns.org/cp/owl/transition.owl#> .
@prefix ex: <https://w3id.org/ontoboard/example/transition#> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .

ex:TheTuneJump a owl:NamedIndividual , transition:Transition ;
    rdfs:label "the tune's jump from static comping to hard driving swing" ;
    transition:includesInitialSituation ex:StaticComping ;
    transition:includesFinalSituation ex:HardDrivingSwing ;
    transition:includesProcess ex:ThePerformance ;
    transition:hasInitialStateAtTime ex:BeforePowellSitsIn ;
    transition:hasEventAtTime ex:WhilePowellSitsIn ;
    transition:hasFinalStateAtTime ex:AfterPowellSitsIn .

ex:BudPowellSitsIn a owl:NamedIndividual , participation:Event ;
    rdfs:label "Bud Powell sitting in at the piano" ;
    participation:hasParticipant ex:TheTune .

ex:ThePerformance a owl:NamedIndividual , transition:Process ;
    rdfs:label "the performance of the tune, invariant through the change" .

ex:TheTune a owl:NamedIndividual , participation:Object ;
    rdfs:label "the tune being played" ;
    participation:isParticipantIn ex:ThePerformance .

ex:StaticComping a owl:NamedIndividual , timeindexedparticipation:TimeIndexedParticipation ,
        timeindexedsituation:TimeIndexedSituation ;
    rdfs:label "the rhythm section comping statically behind the horn" ;
    timeindexedparticipation:includesObject ex:TheTune ;
    timeindexedparticipation:includesEvent ex:ThePerformance ;
    timeindexedsituation:atTime ex:BeforePowellSitsIn .

ex:HardDrivingSwing a owl:NamedIndividual , timeindexedparticipation:TimeIndexedParticipation ,
        timeindexedsituation:TimeIndexedSituation ;
    rdfs:label "the rhythm section driving a hard swing" ;
    timeindexedparticipation:includesObject ex:TheTune ;
    timeindexedparticipation:includesEvent ex:ThePerformance ;
    timeindexedsituation:atTime ex:AfterPowellSitsIn .

ex:BeforePowellSitsIn a owl:NamedIndividual , timeinterval:TimeInterval , sequence:Entity ;
    rdfs:label "the choruses before Powell sits in" ;
    sequence:directlyPrecedes ex:WhilePowellSitsIn ;
    sequence:precedes ex:AfterPowellSitsIn .

ex:WhilePowellSitsIn a owl:NamedIndividual , timeinterval:TimeInterval , sequence:Entity ;
    rdfs:label "the bars in which Powell takes the piano stool" ;
    sequence:directlyPrecedes ex:AfterPowellSitsIn ;
    transition:isTimeOf ex:BudPowellSitsIn .

ex:AfterPowellSitsIn a owl:NamedIndividual , timeinterval:TimeInterval , sequence:Entity ;
    rdfs:label "the choruses after Powell sits in" .

# Only one direction of each inverse pair is asserted: atTime/isTimeIndexFor, forEntity/hasTimeIndexedSetting, hasEventAtTime/isEventTimeIndexFor, hasFinalStateAtTime/isFinalStateTimeIndexFor, hasInitialStateAtTime/isInitialStateTimeIndexFor, hasRegion/isRegionFor, includesEvent/isEventIncludedIn, includesFinalSituation/isFinalSituationIncludedIn, includesInitialSituation/isInitialSituationIncludedIn, includesObject/isObjectIncludedIn, includesProcess/isProcessIncludedIn, isTimeOf/occursAt. A reasoner adds the other.
