@prefix : <https://ontology.inferal.com/modules/advertising-entity/> .
@prefix adm: <https://ontology.inferal.com/modules/advertising-measurement/> .
@prefix ci: <https://ontology.inferal.com/modules/company-intelligence/> .
@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-entity/owl>
    a owl:Ontology, pubacc:PublicationManagedOntology ;
    dcterms:accessRights pubacc:PublicAccess ;
    owl:imports : , adm:owl ;
    dcterms:title "Advertising Entity Ontology - OWL Addendum" ;
    dcterms:description "OWL class, property, key, and disjointness axioms layered on the RDFS Advertising Entity Ontology." ;
    dcterms:license <https://creativecommons.org/licenses/by/4.0/> ;
    dcterms:source : ;
    vann:preferredNamespacePrefix "aent" ;
    vann:preferredNamespaceUri "https://ontology.inferal.com/modules/advertising-entity/" ;
    mod:status "draft" ;
    rdfs:comment "States what makes two records the same entity, and keeps the tiers apart from one another and from the assets they deliver." ;
    owl:versionInfo "0.1.0" .


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

:AdvertisingResource a owl:Class .
:AdvertisingEntity a owl:Class .
:AdAccount a owl:Class .
:Campaign a owl:Class .
:TargetingGroup a owl:Class .
:Ad a owl:Class .
:Creative a owl:Class .
:ProviderIdentity a owl:Class .
:CreativeFormat a owl:Class .
:Objective a owl:Class .
:BidStrategy a owl:Class .


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

:issuingChannel a owl:ObjectProperty , owl:FunctionalProperty .
# The convenience direction of an existing link. Declaring the inverse is
# what stops it becoming a second, drifting way to say the same thing.
:heldUnderRole a owl:ObjectProperty ;
    owl:inverseOf ci:roleInEntity .
:accountChannel a owl:ObjectProperty , owl:FunctionalProperty .
:pursuesObjective a owl:ObjectProperty , owl:FunctionalProperty .
:pursuesBidStrategy a owl:ObjectProperty , owl:FunctionalProperty .
:deliversCreative a owl:ObjectProperty .
:carriesTargeting a owl:ObjectProperty .
:bidAmount a owl:ObjectProperty , owl:FunctionalProperty .
:creativeFormat a owl:ObjectProperty , owl:FunctionalProperty .

# Deliberately not functional: one entity carries different identifiers on the
# platform that runs it and on a measurement platform that reports it, and both
# are needed to join the two sources.
:identifiedBy a owl:ObjectProperty .


# --- Datatype properties -----------------------------------------------------

:identifierValue a owl:DatatypeProperty , owl:FunctionalProperty .
:entityName a owl:DatatypeProperty .
:accountCurrency a owl:DatatypeProperty , owl:FunctionalProperty .


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

# What makes two identifiers the same identity. The channel is half of it:
# platforms reuse numeric ranges, so a value alone identifies nothing.
:ProviderIdentity
    owl:hasKey ( :identifierValue :issuingChannel ) .


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

# The tiers are mutually exclusive. Without this a reasoner can hold a resource
# to be both a campaign and the targeting group beneath it, which is exactly the
# confusion that arises when one provider's campaign is another's campaign group.
:AdAccount owl:disjointWith :Campaign , :TargetingGroup , :Ad .
:Campaign owl:disjointWith :TargetingGroup , :Ad .
:TargetingGroup owl:disjointWith :Ad .

# A creative is not a configured position in the hierarchy, and an ad is not the
# artwork it delivers. Folding the two is what makes a creative reused across
# six ads look like six creatives.
:Creative owl:disjointWith :AdvertisingEntity , :Ad .

# Neither is an identity nor an objective one of the things it qualifies.
:ProviderIdentity owl:disjointWith :AdvertisingEntity , :Creative , :Objective .
