@prefix : <https://ontology.inferal.com/modules/advertising-delivery-state/> .
@prefix dcterms: <http://purl.org/dc/terms/> .
@prefix mod: <https://w3id.org/mod#> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix pubacc: <https://ontology.inferal.com/modules/publication-access/> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix vann: <http://purl.org/vocab/vann/> .

<https://ontology.inferal.com/modules/advertising-delivery-state/owl>
    a owl:Ontology, pubacc:PublicationManagedOntology ;
    dcterms:accessRights pubacc:PublicAccess ;
    owl:imports : ;
    dcterms:title "Advertising Delivery State Ontology - OWL Addendum" ;
    dcterms:description "OWL class, property, key, and disjointness axioms layered on the RDFS Advertising Delivery State Ontology." ;
    dcterms:license <https://creativecommons.org/licenses/by/4.0/> ;
    dcterms:source : ;
    vann:preferredNamespacePrefix "adel" ;
    vann:preferredNamespaceUri "https://ontology.inferal.com/modules/advertising-delivery-state/" ;
    mod:status "draft" ;
    rdfs:comment "This addendum states what makes two holds the same hold, and keeps the four questions apart that a single status enumeration merges." ;
    owl:versionInfo "0.1.0" .


# --- Classes -----------------------------------------------------------------

:DeliveryState a owl:Class .
:DeliveryIntent a owl:Class .
:ServingState a owl:Class .
:ServingHold a owl:Class .
:HoldKind a owl:Class .
:LifecycleState a owl:Class .


# --- Object properties -------------------------------------------------------

:stateOf a owl:ObjectProperty , owl:FunctionalProperty .
:intendedDelivery a owl:ObjectProperty , owl:FunctionalProperty .
:observedServing a owl:ObjectProperty , owl:FunctionalProperty .
:lifecycleStanding a owl:ObjectProperty , owl:FunctionalProperty .
:holdKind a owl:ObjectProperty , owl:FunctionalProperty .
:originatingResource a owl:ObjectProperty , owl:FunctionalProperty .
:effectiveDuring a owl:ObjectProperty , owl:FunctionalProperty .

# Deliberately not functional: several independent causes can prevent delivery at
# once, and reporting only one of them is what makes a fix appear ineffective.
:heldBy a owl:ObjectProperty .


# --- Identity ----------------------------------------------------------------

# A hold is identified by its kind and where it came from. The same cause is
# reported repeatedly as a graph is refreshed, and without a key each refresh
# accumulates duplicates that inflate any count of what is blocking delivery.
:ServingHold
    owl:hasKey ( :holdKind :originatingResource ) .

# A state is identified by the entity it describes and the interval it covers.
:DeliveryState
    owl:hasKey ( :stateOf :effectiveDuring ) .


# --- Incompatibility ---------------------------------------------------------

# The four questions a single status enumeration merges. Declaring the vocabulary
# classes disjoint is what stops a reasoner treating an intent value and a
# lifecycle value as interchangeable, which is the confusion that lets a query for
# paused entities return deleted ones.
:DeliveryIntent owl:disjointWith :ServingState , :LifecycleState , :HoldKind .
:ServingState owl:disjointWith :LifecycleState , :HoldKind .
:LifecycleState owl:disjointWith :HoldKind .

# A hold is not the state that carries it, nor a vocabulary value.
:ServingHold owl:disjointWith :DeliveryState , :HoldKind .
