# The eventprocessing pattern in use: the complex event processing engine of a wind farm
# watches turbine T-07. An over-temperature alarm is the event object that records the
# actual overheating of the gearbox; the engine abstracts that alarm into a health
# warning and makes it a part of the shutdown incident it opens for the turbine.

@prefix dul:             <http://www.loa-cnr.it/ontologies/DUL.owl#> .
@prefix eventprocessing: <http://www.ontologydesignpatterns.org/cp/owl/eventprocessing.owl#> .
@prefix model:           <http://events.semantic-multimedia.org/ontology/2009/4/15/model.owl#> .
@prefix ssn:             <http://purl.oclc.org/NET/ssnx/ssn#> .
@prefix ex:              <https://w3id.org/ontoboard/example/eventprocessing#> .
@prefix owl:             <http://www.w3.org/2002/07/owl#> .
@prefix rdfs:            <http://www.w3.org/2000/01/rdf-schema#> .

ex:GearboxHealthWarning a owl:NamedIndividual , eventprocessing:ComplexEventObject ;
    rdfs:label "health warning WARN-312, the engine's abstraction over turbine T-07's alarms" ;
    eventprocessing:hasDirectSubEventObject ex:OverTemperatureAlarm ;
    eventprocessing:hasSubEventObject ex:OverTemperatureAlarm .

ex:ShutdownIncident a owl:NamedIndividual , eventprocessing:CompositeEventObject ;
    rdfs:label "shutdown incident INC-88 for turbine T-07, made up of the alarms that stopped it" ;
    eventprocessing:hasEventObjectComponent ex:OverTemperatureAlarm ;
    eventprocessing:hasEventObjectPart ex:OverTemperatureAlarm .

ex:GearboxOverheating a owl:NamedIndividual , dul:Event ;
    rdfs:label "the gearbox of wind turbine T-07 running hot, 14:52 on 3 March 2026" .

ex:OverTemperatureAlarm a owl:NamedIndividual , eventprocessing:EventObject ;
    rdfs:label "over-temperature alarm TMP-4471, sent by turbine T-07's SCADA gateway" ;
    eventprocessing:hasEventObjectBody ex:AlarmPayload ;
    eventprocessing:hasEventObjectHeader ex:AlarmHeader ;
    eventprocessing:informationAboutEvent ex:GearboxOverheating .

ex:AlarmPayload a owl:NamedIndividual , eventprocessing:EventObjectBody ;
    rdfs:label "body of alarm TMP-4471: the raw 10 kHz vibration spectrum, which the engine does not parse" .

ex:AlarmHeader a owl:NamedIndividual , eventprocessing:EventObjectHeader ;
    rdfs:label "header of alarm TMP-4471: turbine id, sensor id, timestamp and the alarm id it names" ;
    eventprocessing:refersToEventObjectComponent ex:OverTemperatureAlarm ;
    eventprocessing:refersToEventObjectConstituent ex:OverTemperatureAlarm .

# Only one direction of each inverse pair is asserted: hasDirectSubEventObject/isDirectSubEventObjectOf, hasEventObjectBody/isEventObjectBodyOf, hasEventObjectComponent/isEventObjectComponentOf, hasEventObjectHeader/isEventObjectHeaderOf, hasEventObjectPart/isEventObjectPartOf, hasSubEventObject/isSubEventObjectOf. A reasoner adds the other.
