# A train journey and what took part in it. The 07:12 Karlsruhe-to-Frankfurt service has the train set ICE 374 as a
# participant, and the clock interval the journey filled has its setting in the situation that gathers the two - which is
# what the pattern reifies: a Situation (the class NaryParticipation specialises) holding an event, an object and an interval.

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

ex:interval_0712_to_0831 a owl:NamedIndividual , situation:Entity ;
    rdfs:label "07:12 to 08:31 on 14 May 2024" ;
    situation:hasSetting ex:ice374_in_the_0712_service .

ex:the_0712_karlsruhe_frankfurt_service a owl:NamedIndividual , participation:Event ;
    rdfs:label "the 07:12 Karlsruhe to Frankfurt service of 14 May 2024" ;
    participation:hasParticipant ex:ice_374 .

ex:ice_374 a owl:NamedIndividual , participation:Object ;
    rdfs:label "ICE 374, the train set that ran the service" ;
    participation:isParticipantIn ex:the_0712_karlsruhe_frankfurt_service .

ex:ice374_in_the_0712_service a owl:NamedIndividual , situation:Situation ;
    rdfs:label "ICE 374 taking part in the 07:12 service, 07:12 to 08:31" ;
    situation:isSettingFor ex:interval_0712_to_0831 .

# The pattern as shipped declares no owl:inverseOf, so both directions of each pair are written out and neither is
# inferred from the other: drop 'is participant in' and a query asking which services ICE 374 ran finds nothing.
