@prefix twb:     <https://w3id.org/twb#> .
@prefix prov:    <http://www.w3.org/ns/prov#> .
@prefix owl:     <http://www.w3.org/2002/07/owl#> .
@prefix rdfs:    <http://www.w3.org/2000/01/rdf-schema#> .
@prefix xsd:     <http://www.w3.org/2001/XMLSchema#> .
@prefix skos:    <http://www.w3.org/2004/02/skos/core#> .
@prefix dcterms: <http://purl.org/dc/terms/> .
@prefix vann:    <http://purl.org/vocab/vann/> .

# =================================================================================================
#  TWB decisions — a module of the Thin-Walled Blueprint ontology (TWB)
#
#  Where a blueprint's values came from: decisions in three tiers (profile, standard, override),
#  what each decides and its value, and its source: a drawing and what it says, or an assumption
#  and its reason.
#
#  TWB is modular, as SEAS is: one namespace (twb:, https://w3id.org/twb#) shared by every module,
#  each module an ontology of its own that imports only the modules it builds on, and every term
#  stating the module that defines it (rdfs:isDefinedBy). https://w3id.org/twb imports them all.
#
#  Working draft, version 0.3.0 (2026-10-13).
# =================================================================================================

<https://w3id.org/twb/decision>
    a owl:Ontology ;
    dcterms:title "TWB decisions"@en ;
    dcterms:description """Where a blueprint's values came from: decisions in three tiers (profile,
standard, override), what each decides and its value, and its source: a drawing and what it says, or an
assumption and its reason."""@en ;
    dcterms:creator "Mads Holten Rasmussen" ;
    dcterms:license <https://creativecommons.org/licenses/by/4.0/> ;
    dcterms:isPartOf <https://w3id.org/twb> ;
    vann:preferredNamespacePrefix "twb" ;
    vann:preferredNamespaceUri "https://w3id.org/twb#" ;
    owl:imports <https://w3id.org/twb/core> ;
    owl:versionInfo "0.3.0" ;
    owl:versionIRI <https://w3id.org/twb/decision/0.3.0> ;
    dcterms:modified "2026-10-13"^^xsd:date .

# =================================================================================================
#  Decisions and their sources (0.2.0)
# =================================================================================================

twb:Decision
    a owl:Class ;
    rdfs:subClassOf prov:Entity ;
    rdfs:label "Decision"@en ;
    rdfs:comment """One choice about how the building is built, with where it came from: a drawing sheet and the text or line
on it that says so, or an assumption and its reason. Decisions come in three tiers — the profile, a standard per kind
of joint, an override on one joint — and anything not decided falls through to the tier above, then to the
expression, then to the implementation's default. The blueprint's values are what the decisions resolve to."""@en ;
    twb:archTerm "arch-settings/1 (model/house-settings.ts)" ;
    rdfs:isDefinedBy <https://w3id.org/twb/decision> .

twb:hasDecision a owl:ObjectProperty ; rdfs:label "has decision"@en ; rdfs:domain twb:Blueprint ; rdfs:range twb:Decision ;
    rdfs:isDefinedBy <https://w3id.org/twb/decision> .
twb:decides
    a owl:DatatypeProperty, owl:FunctionalProperty ;
    rdfs:label "decides"@en ;
    rdfs:comment "What is decided, as the settings catalogue names it: 'profile', 'house/facade', 'overhang/eave', 'opening:4'."@en ;
    rdfs:domain twb:Decision ;
    rdfs:range xsd:string ;
    rdfs:isDefinedBy <https://w3id.org/twb/decision> .

twb:decidedValue
    a owl:DatatypeProperty, owl:FunctionalProperty ;
    rdfs:label "decided value"@en ;
    rdfs:domain twb:Decision ;
    rdfs:isDefinedBy <https://w3id.org/twb/decision> .

twb:decisionTier
    a owl:ObjectProperty, owl:FunctionalProperty ;
    rdfs:label "decision tier"@en ;
    rdfs:domain twb:Decision ;
    rdfs:range twb:DecisionTier ;
    rdfs:isDefinedBy <https://w3id.org/twb/decision> .

twb:DecisionTier a owl:Class ; rdfs:subClassOf skos:Concept ; rdfs:label "Decision tier"@en ;
    rdfs:isDefinedBy <https://w3id.org/twb/decision> .
twb:DecisionTiers a skos:ConceptScheme ; skos:prefLabel "Decision tiers"@en ;
    rdfs:isDefinedBy <https://w3id.org/twb/decision> .
twb:ProfileTier a twb:DecisionTier ; skos:prefLabel "profile"@en ; skos:inScheme twb:DecisionTiers ;
    skos:definition "What kind of building this is; sets every house-wide value."@en ;
    rdfs:isDefinedBy <https://w3id.org/twb/decision> .

twb:StandardTier a twb:DecisionTier ; skos:prefLabel "standard"@en ; skos:inScheme twb:DecisionTiers ;
    skos:definition "One kind of joint, edge, opening or overhang, everywhere in the house."@en ;
    rdfs:isDefinedBy <https://w3id.org/twb/decision> .

twb:OverrideTier a twb:DecisionTier ; skos:prefLabel "override"@en ; skos:inScheme twb:DecisionTiers ;
    skos:definition "One place in the house that differs."@en ;
    rdfs:isDefinedBy <https://w3id.org/twb/decision> .

twb:sourceNote
    a owl:DatatypeProperty ;
    rdfs:label "source note"@en ;
    rdfs:comment "Where a decision came from, as its author wrote it: 'A301 section A-A: 300 to the fascia', or 'assumed: …'."@en ;
    rdfs:domain twb:Decision ;
    rdfs:range xsd:string ;
    rdfs:isDefinedBy <https://w3id.org/twb/decision> .

twb:isAssumed
    a owl:DatatypeProperty ;
    rdfs:label "is assumed"@en ;
    rdfs:comment "True for a decision no drawing states, made on an assumption."@en ;
    rdfs:domain twb:Decision ;
    rdfs:range xsd:boolean ;
    rdfs:isDefinedBy <https://w3id.org/twb/decision> .

twb:decidedBy
    a owl:ObjectProperty ;
    rdfs:subPropertyOf prov:wasAttributedTo ;
    rdfs:label "decided by"@en ;
    rdfs:comment "Who decided: the reader of the drawings (a person or a language model), or the client, whose fixed choices win."@en ;
    rdfs:domain twb:Decision ;
    rdfs:isDefinedBy <https://w3id.org/twb/decision> .
