@prefix : <https://ontology.inferal.com/profiles/advertising-questions/> .
@prefix cqo: <https://ontology.inferal.com/modules/competency-question/> .
@prefix dcterms: <http://purl.org/dc/terms/> .
@prefix mod: <https://w3id.org/mod#> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix prof: <http://www.w3.org/ns/dx/prof/> .
@prefix pubacc: <https://ontology.inferal.com/modules/publication-access/> .
@prefix prov: <http://www.w3.org/ns/prov#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix sh: <http://www.w3.org/ns/shacl#> .
@prefix vann: <http://purl.org/vocab/vann/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .

: a owl:Ontology, prof:Profile, mod:SemanticArtefact, pubacc:PublicationManagedOntology ;
    dcterms:accessRights pubacc:PublicAccess ;
    prof:isProfileOf cqo: ; owl:imports cqo: ;
    dcterms:title "Advertising question contracts" ;
    dcterms:description "Versioned SELECT answer contracts and qualified provider implementations of shared advertising competency questions." ;
    dcterms:license <https://creativecommons.org/licenses/by/4.0/> ;
    dcterms:source cqo: ;
    vann:preferredNamespacePrefix "adq" ; vann:preferredNamespaceUri "https://ontology.inferal.com/profiles/advertising-questions/" ;
    mod:status "draft" ; owl:versionInfo "0.1.0" ;
    rdfs:label "advertising question contracts" ;
    rdfs:comment "Reuses CQ identity, formulation, requirements and execution evidence. Adds SELECT schema and provider qualification without changing the natural-language template parameter model." .

:AnswerContract a owl:Class ; rdfs:subClassOf cqo:AnswerExpectation, mod:SemanticArtefact ;
    rdfs:label "answer contract" ;
    rdfs:comment "An immutable version of the answer interface and interpretation bounds for a question. It is an expectation, not a successful execution." .
:ProviderImplementation a owl:Class ; rdfs:subClassOf prov:Entity ;
    rdfs:label "provider implementation" ;
    rdfs:comment "A qualified binding of a provider, stable question, exact contract version, authoritative query and executable assessment cases. Registration alone conveys no passing coverage." .

:contractVersion a rdf:Property ; rdfs:label "contract version" ;
    rdfs:comment "A positive version number for an immutable answer contract." ;
    rdfs:domain :AnswerContract ;
    rdfs:range xsd:positiveInteger .

:resultVariables a rdf:Property ; rdfs:label "result variables" ;
    rdfs:comment "The ordered RDF list of all projected variable names, including names unbound in every solution." ;
    rdfs:domain :AnswerContract ;
    rdfs:range rdf:List .

:requiredVariable a rdf:Property ; rdfs:label "required variable" ;
    rdfs:comment "A declared variable that must be bound in every returned solution." ;
    rdfs:domain :AnswerContract ;
    rdfs:range xsd:string .

:iriVariable a rdf:Property ; rdfs:label "IRI variable" ;
    rdfs:comment "A declared variable whose bound values must be RDF IRIs." ;
    rdfs:domain :AnswerContract ;
    rdfs:range xsd:string .

:numericVariable a rdf:Property ; rdfs:label "numeric variable" ;
    rdfs:comment "A declared variable whose bound values must be finite numeric literals; concrete answer assessments preserve datatype." ;
    rdfs:domain :AnswerContract ;
    rdfs:range xsd:string .

:stringVariable a rdf:Property ; rdfs:label "string variable" ;
    rdfs:comment "A declared variable whose bound values must be untagged string literals." ;
    rdfs:domain :AnswerContract ;
    rdfs:range xsd:string .

:scopeNote a rdf:Property ; rdfs:label "scope note" ;
    rdfs:comment "A language-tagged statement limiting the interpretations or decisions supported by the contract." ;
    rdfs:domain :AnswerContract ;
    rdfs:range rdf:langString .

:implementsQuestion a rdf:Property ; rdfs:label "implements question" ;
    rdfs:comment "The stable competency question implemented by this qualified provider binding." ;
    rdfs:domain :ProviderImplementation ;
    rdfs:range cqo:CompetencyQuestion .

:answerContract a rdf:Property ; rdfs:label "answer contract version" ;
    rdfs:comment "The exact answer contract satisfied by a registered implementation." ;
    rdfs:domain :ProviderImplementation ;
    rdfs:range :AnswerContract .

:provider a rdf:Property ; rdfs:label "provider" ;
    rdfs:comment "The source provider in a declared question-set scope or qualified implementation." ;
    rdfs:range prov:Entity .

:queryArtifact a rdf:Property ; rdfs:label "query artifact" ;
    rdfs:comment "The authoritative SELECT artifact identified by its stable IRI. Executable text is read from its representation during assessment." ;
    rdfs:domain :ProviderImplementation ;
    rdfs:range prov:Entity .

:assessmentCase a rdf:Property ; rdfs:label "assessment case" ;
    rdfs:comment "An operational RDF manifest case assessing the implementation over its declared source and independently authored expectation." ;
    rdfs:domain :ProviderImplementation ;
    rdfs:range rdfs:Resource .
