@prefix : <https://ontology.inferal.com/modules/advertising-budget/> .
@prefix adm: <https://ontology.inferal.com/modules/advertising-measurement/> .
@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 rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix rng: <https://ontology.inferal.com/modules/range/> .
@prefix skos: <http://www.w3.org/2004/02/skos/core#> .
@prefix vann: <http://purl.org/vocab/vann/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .

:
    a owl:Ontology, pubacc:PublicationManagedOntology ;
    dcterms:accessRights pubacc:PublicAccess ;
    owl:imports
        adm: ,
        rng: ,
        <http://www.w3.org/2004/02/skos/core> ;
    dcterms:title "Advertising Budget Ontology" ;
    dcterms:description "Terms for stating an advertising budget as separable parts: an amount, the period it renews over, how it is paced, what it applies to, and whether it is shared. Spend caps are modelled apart from budgets." ;
    dcterms:license <https://creativecommons.org/licenses/by/4.0/> ;
    dcterms:source adm: , rng: , <http://www.w3.org/2004/02/skos/core> ;
    vann:preferredNamespacePrefix "abg" ;
    vann:preferredNamespaceUri "https://ontology.inferal.com/modules/advertising-budget/" ;
    mod:status "draft" ;
    rdfs:comment "A budget separates allowance amount, recurrence, pacing and represented scope evidence. Compatible period, pacing and currency allow quantity inspection; aggregation also requires qualified scope, window and revision evidence. Missing sharing or membership evidence remains unassessed. Money is reused from advertising-measurement." ;
    owl:versionInfo "0.4.0" .


# --- Budget ------------------------------------------------------------------

:SpendingSpecification
    a rdfs:Class ;
    rdfs:label "spending specification" ;
    rdfs:comment "A specification of planned spending, expressed as an allowance or a ceiling. A specification alone establishes neither a Budget nor a SpendCap. An optional effective window records applicability; absence leaves the interval unspecified." .

:Budget
    a rdfs:Class ;
    rdfs:subClassOf :SpendingSpecification ;
    rdfs:label "budget" ;
    rdfs:comment "A planned spending allowance: an amount of money, the period it applies over, how it is paced within that period, and the scope of entities it covers." ;
    dcterms:description "The allowance directs delivery according to its provider rules. Quantity compatibility checks period, pacing and currency; it does not establish safe aggregation across scopes, windows or revisions." .

:BudgetPeriod
    a rdfs:Class ;
    rdfs:subClassOf skos:Concept ;
    rdfs:label "budget period" ;
    rdfs:comment "The recurrence over which a budget amount is allowed to be spent, such as each day or once over the whole flight." ;
    dcterms:description "A first-class value rather than a suffix on a property name. One provider distinguishes daily from lifetime by having two separate fields, which makes the period invisible to any rule that reads only the amount. Comparing or summing across periods is the most common budget error." .

:DeliveryMethod
    a rdfs:Class ;
    rdfs:subClassOf skos:Concept ;
    rdfs:label "delivery method" ;
    rdfs:comment "How spending is paced within the budget period: evenly across it, or as quickly as inventory allows." ;
    dcterms:description "Pacing changes what a partial-period figure means. Under accelerated delivery a budget can be exhausted early, so a mid-period spend total is not a proportional indicator of the period's outcome. A consumer comparing pacing-sensitive metrics must be able to see this." .

:BudgetScope
    a rdfs:Class ;
    rdfs:label "budget scope" ;
    rdfs:comment "Represented scope evidence for an allowance or cap. Provider counts, budget-reference links, configuration and owner roles are independent; missing enumeration does not establish an empty or complete scope." ;
    dcterms:description "Pooling alone cannot apportion the allowance to members. Independently measured member spend remains usable under its own source, grain, currency and reporting-window qualifiers." .

:SpendCap
    a rdfs:Class ;
    rdfs:subClassOf :SpendingSpecification ;
    rdfs:label "spend cap" ;
    rdfs:comment "A ceiling on spending that constrains delivery without directing it." ;
    dcterms:description "Deliberately not a kind of budget. A cap forbids exceeding an amount; a budget is a target that pacing spends toward. One provider ships daily budget, lifetime budget, and spend cap as three identically shaped minor-unit strings, which invites reading a ceiling as a target and reporting an account as underspending when it is capped." .


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

:budgetAmount
    a rdf:Property ;
    rdfs:label "budget amount" ;
    rdfs:comment "The allowance a budget permits, as a monetary amount reused from the advertising measurement vocabulary so budgets and spend are denominated in the same terms." ;
    rdfs:domain :Budget ;
    rdfs:range adm:MonetaryAmount .

:budgetPeriod
    a rdf:Property ;
    rdfs:label "has budget period" ;
    rdfs:comment "The recurrence the budget amount applies over." ;
    rdfs:domain :Budget ;
    rdfs:range :BudgetPeriod .

:budgetDeliveryMethod
    a rdf:Property ;
    rdfs:label "has delivery method" ;
    rdfs:comment "How the budget is paced within its period." ;
    rdfs:domain :Budget ;
    rdfs:range :DeliveryMethod .

:appliesToScope
    a rdf:Property ;
    rdfs:label "applies to scope" ;
    rdfs:comment "The scope of entities the budget covers." ;
    rdfs:domain :Budget ;
    rdfs:range :BudgetScope .

:coversEntity
    a rdf:Property ;
    rdfs:label "covers entity" ;
    rdfs:comment "A legacy covered-entity link with producer-qualified meaning. It may denote a budget owner rather than a funded member; no completeness or currentness follows." ;
    dcterms:description "Optional legacy links preserve existing consumers. observedFundedEntity carries explicit represented budget-reference links; scopeOwner states the independent owner role. Absence is unenumerated rather than proof of no consumers." ;
    rdfs:domain :BudgetScope ;
    rdfs:range rdfs:Resource .

:coveredEntityCount
    a rdf:Property ;
    rdfs:label "covered entity count" ;
    rdfs:comment "A legacy producer-qualified scope count, including zero. This may be a native reported count or a derived explicit single-allocation count." ;
    dcterms:description "Read reportedEntityCount with reportedCountBasis for actual native counts. Legacy or reported count agreement with fetched links does not prove equal denominators, complete enumeration or current membership." ;
    rdfs:domain :BudgetScope ;
    rdfs:range xsd:integer .

:capAmount
    a rdf:Property ;
    rdfs:label "cap amount" ;
    rdfs:comment "The ceiling a spend cap imposes, as a monetary amount reused from the advertising measurement vocabulary." ;
    rdfs:domain :SpendCap ;
    rdfs:range adm:MonetaryAmount .

:capPeriod
    a rdf:Property ;
    rdfs:label "has cap period" ;
    rdfs:comment "The recurrence a spend cap's ceiling applies over." ;
    rdfs:domain :SpendCap ;
    rdfs:range :BudgetPeriod .

:constrainsScope
    a rdf:Property ;
    rdfs:label "constrains scope" ;
    rdfs:comment "The scope of entities a spend cap applies to." ;
    rdfs:domain :SpendCap ;
    rdfs:range :BudgetScope .

:effectiveWindow
    a rdf:Property ;
    rdfs:label "effective window" ;
    rdfs:comment "The interval over which a spending specification applies. Budgets and spend caps may both carry this property. Absence leaves applicability unspecified and does not establish an unbounded or standing allowance." ;
    rdfs:domain :SpendingSpecification ;
    rdfs:range rng:Range .


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

:sharedAcrossEntities
    a rdf:Property ;
    rdfs:label "shared across entities" ;
    rdfs:comment "Legacy sharing evidence whose basis is provider-specific: configured intent or shared-allocation kind. It is not proof of multiple current consumers or complete enumeration." ;
    rdfs:domain :BudgetScope ;
    rdfs:range xsd:boolean .


# --- Independent scope evidence ----------------------------------------------

:configuredSharing
    a rdf:Property ;
    rdfs:label "configured sharing" ;
    rdfs:comment "A returned configured sharing policy. Absence is unspecified; a create default does not supply a returned value. This evidence grants no write authorization." ;
    rdfs:domain :BudgetScope ;
    rdfs:range xsd:boolean .

:rebalanceEnabled
    a rdf:Property ;
    rdfs:label "rebalance enabled" ;
    rdfs:comment "A returned rebalance flag. It does not state transfer amounts, redistribution limits, reversibility or a confirmed mutation effect." ;
    rdfs:domain :BudgetScope ;
    rdfs:range xsd:boolean .

:scopeOwner
    a rdf:Property ;
    rdfs:label "scope owner" ;
    rdfs:comment "An explicitly represented owner role, independent of funded membership. An owner may also be a funded member when that link is stated; ownership alone neither infers nor excludes funding." ;
    rdfs:domain :BudgetScope ;
    rdfs:range rdfs:Resource .

:observedFundedEntity
    a rdf:Property ;
    rdfs:label "observed funded entity" ;
    rdfs:comment "An explicitly represented native budget-reference or allocation link. It is not measured spending, proof of current active membership or a complete funded-member enumeration." ;
    rdfs:domain :BudgetScope ;
    rdfs:range rdfs:Resource .

:memberBasis
    a rdf:Property ;
    rdfs:label "member basis" ;
    rdfs:comment "The native predicate or explicit source basis supporting represented budget-reference or allocation links. It does not qualify their completeness or currentness." ;
    rdfs:domain :BudgetScope ;
    rdfs:range rdfs:Resource .

:reportedEntityCount
    a rdf:Property ;
    rdfs:label "reported entity count" ;
    rdfs:comment "An actual native provider-reported reference or association count, including zero. Its native denominator is recorded by reportedCountBasis; no complete enumeration or write permission follows." ;
    rdfs:domain :BudgetScope ;
    rdfs:range xsd:integer .

:reportedCountBasis
    a rdf:Property ;
    rdfs:label "reported count basis" ;
    rdfs:comment "The native source predicate whose count is preserved as reportedEntityCount. Producer-derived campaign-owned counts do not carry this basis." ;
    rdfs:domain :BudgetScope ;
    rdfs:range rdfs:Resource .

:sharingBasis
    a rdf:Property ;
    rdfs:label "sharing basis" ;
    rdfs:comment "The source predicate supporting legacy sharedAcrossEntities evidence. Configured intent and shared-allocation kind have different meanings across producers." ;
    rdfs:domain :BudgetScope ;
    rdfs:range rdfs:Resource .

:scopeAccount
    a rdf:Property ;
    rdfs:label "scope account" ;
    rdfs:comment "The account resource attached to this scope observation by its producer. This records represented account context without establishing cross-record identity or authorization." ;
    rdfs:domain :BudgetScope ;
    rdfs:range rdfs:Resource .

:scopeObservedAt
    a rdf:Property ;
    rdfs:label "scope observed at" ;
    rdfs:comment "The source capture instant of this scope observation when explicitly available. It does not establish currentness, a validity interval or complete membership." ;
    rdfs:domain :BudgetScope ;
    rdfs:range xsd:dateTime .

# --- Budget period scheme ----------------------------------------------------

:BudgetPeriodScheme
    a skos:ConceptScheme ;
    rdfs:label "budget period scheme" ;
    rdfs:comment "Controlled vocabulary of budget recurrences." ;
    skos:prefLabel "Budget periods" .

:dailyPeriod
    a :BudgetPeriod, skos:Concept ;
    skos:inScheme :BudgetPeriodScheme ;
    rdfs:label "daily" ;
    rdfs:comment "The amount is allowed each day and resets at the provider's day boundary." ;
    skos:definition "A recurring per-day allowance." .

:lifetimePeriod
    a :BudgetPeriod, skos:Concept ;
    skos:inScheme :BudgetPeriodScheme ;
    rdfs:label "lifetime" ;
    rdfs:comment "The amount is allowed once across the entire flight and does not reset." ;
    skos:definition "A single allowance spanning the whole effective window." .

:customPeriod
    a :BudgetPeriod, skos:Concept ;
    skos:inScheme :BudgetPeriodScheme ;
    rdfs:label "custom period" ;
    rdfs:comment "The amount is allowed once across a provider-defined span that is neither a day nor the entity's whole flight. The span itself is carried by the effective window rather than by this concept." ;
    skos:definition "A single allowance over an explicitly bounded span." .


# --- Delivery method scheme --------------------------------------------------

:DeliveryMethodScheme
    a skos:ConceptScheme ;
    rdfs:label "delivery method scheme" ;
    rdfs:comment "Controlled vocabulary of pacing behaviours." ;
    skos:prefLabel "Delivery methods" .

:standardDelivery
    a :DeliveryMethod, skos:Concept ;
    skos:inScheme :DeliveryMethodScheme ;
    rdfs:label "standard" ;
    rdfs:comment "Spending is paced evenly across the budget period." ;
    skos:definition "Even pacing across the period." .

:acceleratedDelivery
    a :DeliveryMethod, skos:Concept ;
    skos:inScheme :DeliveryMethodScheme ;
    rdfs:label "accelerated" ;
    rdfs:comment "Spending proceeds as quickly as inventory allows and may exhaust the budget before the period ends." ;
    skos:definition "Unpaced delivery, front-loaded within the period." .
