@prefix : <https://w3id.org/adiro/aec_drawing_metadata#> .
@base <https://w3id.org/adiro/> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix skos: <http://www.w3.org/2004/02/skos/core#> .
@prefix aprov: <https://w3id.org/adiro/aec_provenance#> .
@prefix geom: <https://w3id.org/adiro/aec_geometry#> .
@prefix dcterms: <http://purl.org/dc/terms/> .

#################################################################
#    Ontology
#################################################################

<https://w3id.org/adiro/aec_drawing_metadata> rdf:type owl:Ontology ;
    rdfs:label "AEC Drawing Metadata Ontology" ;
    rdfs:comment "The core drawing vocabulary. It describes the structure of a drawing sheet: its layouts, title block, revisions, and the fields read from them. It imports the provenance and geometry modules, and the discipline modules build on it." ;
    dcterms:title "AEC Drawing Metadata Ontology" ;
    dcterms:description "Sheet/layout/document structure for AEC drawings." ;
    dcterms:license <https://www.gnu.org/licenses/gpl-3.0.html> ;
    dcterms:creator "Buro Happold — Machine Learning R&D" ;
    dcterms:publisher "Buro Happold" ;
    owl:imports <https://w3id.org/adiro/aec_provenance> ;
    owl:imports <https://w3id.org/adiro/aec_geometry> ;
    owl:versionIRI <https://w3id.org/adiro/aec_drawing_metadata/4.0.0> ;
    owl:versionInfo "4.0.0" .


#################################################################
#    Annotation properties
#################################################################

:exampleImage rdf:type owl:AnnotationProperty ;
    rdfs:label "example image"@en ;
    rdfs:comment "Links a class or concept to an example image illustrating it."@en .

:isCVATProperty rdf:type owl:AnnotationProperty ;
    rdfs:label "isCVATProperty" ;
    rdfs:comment "Presentation hint for downstream annotation tooling: when true, the label should be displayed on the trailing side of the tool's label panel rather than the default leading side. Carries no reasoning weight. The property name still carries a tool name and is due to be renamed - see GitHub issue #89." ;
    rdfs:range xsd:boolean .

:labellableRoot rdf:type owl:AnnotationProperty;
    rdfs:label "Labellable root";
    rdfs:comment "When true, this class can be used as a label by annotators (solid contour in diagram). When false, non-labellable (dashed contour).";
    rdfs:range xsd:boolean.

:extractionHint rdf:type owl:AnnotationProperty ;
    rdfs:label "extraction hint"@en ;
    rdfs:comment "Free-text guidance for an information-extraction model on where and how a field typically appears on a drawing sheet (adjacent captions, cell grouping, formatting). Consumed by the generated extraction profile, not by reasoning."@en ;
    rdfs:range xsd:string .

#################################################################
#    Object Properties — Generic top-level
#################################################################

:contains rdf:type owl:ObjectProperty;
    rdfs:label "contains";
    rdfs:comment "Direct containment: indicates physical containment of something within a parent thing (e.g. object in a box). Min cardinality 0 by default (can contain).";
    rdfs:range owl:Thing;
    rdfs:domain owl:Thing.

:hasProperty rdf:type owl:ObjectProperty;
    rdfs:label "hasProperty";
    rdfs:comment "Subject is characterised by a property, or quality. Used for example to indicate qualitative things like 'it is vertical' or 'it has a colour blue'.";
    rdfs:range owl:Thing;
    rdfs:domain owl:Thing.

:hasOrientation rdf:type owl:ObjectProperty;
    rdfs:label "hasOrientation";
    rdfs:comment "Orientation value for layouts where orientation is applicable.";
    rdfs:range :OrientationValue;
    rdfs:domain [ rdf:type owl:Class ; owl:unionOf ( :Section :Detail ) ] .

#################################################################
#    Object Properties — UC-01 named subproperties
#################################################################

:hasLayout rdf:type owl:ObjectProperty ;
    rdfs:label "hasLayout" ;
    rdfs:comment "Named containment: a DrawingSheet contains one or more Layouts." ;
    rdfs:subPropertyOf :contains ;
    rdfs:domain :DrawingSheet ;
    rdfs:range :Layout .

:hasLayoutContentType rdf:type owl:ObjectProperty ;
    rdfs:label "hasLayoutContentType" ;
    rdfs:comment "Named characterisation: a Layout has exactly one LayoutContentType." ;
    rdfs:subPropertyOf :hasProperty ;
    rdfs:domain :Layout ;
    rdfs:range :LayoutContentType .

:hasRevision rdf:type owl:ObjectProperty ;
    rdfs:label "hasRevision" ;
    rdfs:comment "A DrawingSheet compositionally contains its DrawingRevisions. To navigate from a revision back to its sheet, use the SPARQL inverse path ^metadata:hasRevision - ADIRO declares no named inverse properties and no owl:inverseOf axioms (see GitHub issue #21)." ;
    rdfs:subPropertyOf :contains ;
    rdfs:domain :DrawingSheet ;
    rdfs:range :DrawingRevision .

:belongsToProject rdf:type owl:ObjectProperty ;
    rdfs:label "belongsToProject" ;
    rdfs:comment "Associates a DrawingSheet with the Project it belongs to." ;
    rdfs:domain :DrawingSheet ;
    rdfs:range :Project .

:belongsToPackage rdf:type owl:ObjectProperty ;
    rdfs:label "belongsToPackage" ;
    rdfs:comment "Associates a DrawingSheet with the DrawingPackage it belongs to." ;
    rdfs:domain :DrawingSheet ;
    rdfs:range :DrawingPackage .

:isAuthoredBy rdf:type owl:ObjectProperty ;
    rdfs:label "isAuthoredBy" ;
    rdfs:comment "The Person who authored this DrawingRevision." ;
    rdfs:domain :DrawingRevision ;
    rdfs:range :Person .

:isCheckedBy rdf:type owl:ObjectProperty ;
    rdfs:label "isCheckedBy" ;
    rdfs:comment "The Person who checked this DrawingRevision." ;
    rdfs:domain :DrawingRevision ;
    rdfs:range :Person .

:isApprovedBy rdf:type owl:ObjectProperty ;
    rdfs:label "isApprovedBy" ;
    rdfs:comment "The Person who approved this DrawingRevision." ;
    rdfs:domain :DrawingRevision ;
    rdfs:range :Person .

:hasStatusCode rdf:type owl:ObjectProperty ;
    rdfs:label "hasStatusCode" ;
    rdfs:comment "The controlled-vocabulary StatusCode assigned to a DrawingRevision." ;
    rdfs:subPropertyOf :hasProperty ;
    rdfs:domain :DrawingRevision ;
    rdfs:range :StatusCode .

#################################################################
#    Object Properties — title-block assertions
#
#    NAMING — asserts<Thing>, not has<Thing>. A title block states a
#    CLAIM, not a verified fact, and the property name is the cheapest
#    place to make that visible at every call site. It carries real
#    weight here: assertsClient (a claim read off a printed region) and
#    isCheckedBy (a fact about a revision) sit in the same namespace,
#    so the verb is the only thing distinguishing them.
#################################################################

:assertsMetadataFor rdf:type owl:ObjectProperty ;
    rdfs:label "asserts metadata for"@en ;
    rdfs:domain :Titleblock ;
    rdfs:range :DrawingSheet ;
    rdfs:comment "Links a titleblock region to the drawing sheet whose metadata it asserts. Range is DrawingSheet rather than a separate Document class: the sheet is the unit UC-01 established as searchable, and introducing a competing Document class would deepen an unresolved placement question rather than settle it."@en ;
    :extractionHint "Not extracted. Asserted by the pipeline when a titleblock region is detected on a sheet."@en .

:assertsClient rdf:type owl:ObjectProperty ;
    rdfs:label "asserts client"@en ;
    rdfs:domain :Titleblock ;
    rdfs:range :Organisation ;
    rdfs:comment "The organisation commissioning the work — the client or employer — as named by this title block. Universal on AEC title blocks and absent from ISO 7200, which provides only a legal-owner field. Distinct from assertsOriginator, which names the organisation that produced the sheet: on an in-house drawing both may print the same name, so the distinction is carried by the property, not by the value."@en ;
    skos:altLabel "client"@en, "employer"@en, "for"@en,
                  "Bauherr"@de, "Auftraggeber"@de ;
    :extractionHint "Often the most prominent organisation name on the sheet, sometimes a logo rather than text. Frequently in its own cell above or beside the originator's block."@en .

:assertsOriginator rdf:type owl:ObjectProperty ;
    rdfs:label "asserts originator"@en ;
    rdfs:domain :Titleblock ;
    rdfs:range :Organisation ;
    rdfs:comment "The organisation that produced the drawing — the originator in ISO 19650-2 terms, and one segment of the information-container identifier. This is the practice or consultancy whose name and logo appear as author of the sheet. Distinct from assertsClient, which names who commissioned the work."@en ;
    skos:altLabel "originator"@en, "drawn by (company)"@en, "consultant"@en,
                  "Planverfasser"@de, "Verfasser"@de ;
    :extractionHint "Usually the organisation whose logo sits in or beside the title block, and whose code appears in the drawing-number originator segment."@en .

#################################################################
#    Datatype Properties — existing
#################################################################

:refersToDrawingId rdf:type owl:DatatypeProperty;
    rdfs:label "refersToDrawingId";
    rdfs:comment "References another Drawing by using a drawing identifier, like a drawing number.";
    rdfs:range xsd:string;
    rdfs:domain :TextualNote.

#################################################################
#    Datatype Properties — DrawingSheet identity (UC-01)
#################################################################

:drawingIdentifier rdf:type owl:DatatypeProperty ;
    rdfs:label "drawingIdentifier" ;
    rdfs:comment "Sheet-level identifier, e.g. 'ST-201'. Also known as 'drawing number'." ;
    rdfs:domain :DrawingSheet ;
    rdfs:range xsd:string .

:drawingTitle rdf:type owl:DatatypeProperty ;
    rdfs:label "drawingTitle" ;
    rdfs:comment "Title of the drawing sheet." ;
    rdfs:domain :DrawingSheet ;
    rdfs:range xsd:string .

:hasScale rdf:type owl:DatatypeProperty ;
    rdfs:label "hasScale" ;
    rdfs:comment "Scale notation, e.g. '1:50'. Applies to a DrawingSheet where one scale governs the whole sheet, and to a Layout where the sheet carries several drawings at different scales — a detail at 1:5 beside a plan at 1:100 is ordinary. Where a Layout carries its own value it is the more specific one and describes that drawing; the sheet-level value, where both are present, is the sheet's nominal or predominant scale rather than a claim about every layout on it." ;
    rdfs:domain [ rdf:type owl:Class ; owl:unionOf ( :DrawingSheet :Layout ) ] ;
    rdfs:range xsd:string .

:sheetSize rdf:type owl:DatatypeProperty ;
    rdfs:label "sheetSize" ;
    rdfs:comment "Sheet size designation, e.g. 'A1', 'A0'." ;
    rdfs:domain :DrawingSheet ;
    rdfs:range xsd:string .

#################################################################
#    Datatype Properties — Layout identity (UC-03 dependency)
#################################################################

:layoutIdentifier rdf:type owl:DatatypeProperty ;
    rdfs:label "layoutIdentifier" ;
    rdfs:comment "Identifier for a Layout within its parent DrawingSheet. Also known as 'layout number'. Typically a small integer or letter ('1', '2', 'A')." ;
    rdfs:domain :Layout ;
    rdfs:range xsd:string .

:layoutTitle rdf:type owl:DatatypeProperty ;
    rdfs:label "layoutTitle" ;
    rdfs:comment "The caption naming an individual Layout, distinct from the sheet-level drawingTitle. A sheet routinely carries several drawings — details, sections, plans at different scales — each with its own printed title such as 'Mullion Head Detail' or 'Ground Floor Plan'. Pairs with layoutIdentifier as title-to-number: the identifier says which layout, this says what it depicts." ;
    rdfs:domain :Layout ;
    rdfs:range xsd:string ;
    skos:altLabel "drawing title"@en, "detail title"@en, "view title"@en,
                  "Zeichnungstitel"@de ;
    :extractionHint "Printed adjacent to its layout rather than in the title block — usually directly beneath or above the drawing, often with the layout number and scale in the same caption line ('3  MULLION HEAD  1:5'). Capture only the descriptive part: that caption decomposes across three properties on the same Layout — layoutIdentifier '3', layoutTitle 'MULLION HEAD', hasScale '1:5'. Do not confuse with drawingTitle, which is the single sheet-level title inside the title block."@en .

#################################################################
#    Datatype Properties — UC-01 extension classes
#################################################################

:revisionCode rdf:type owl:DatatypeProperty ;
    rdfs:label "revisionCode" ;
    rdfs:comment "The code identifying a specific revision, e.g. 'A', 'B', 'P01'." ;
    rdfs:domain :DrawingRevision ;
    rdfs:range xsd:string .

:issueDate rdf:type owl:DatatypeProperty ;
    rdfs:label "issueDate" ;
    rdfs:comment "The date this revision was issued." ;
    rdfs:domain :DrawingRevision ;
    rdfs:range xsd:date .

:personName rdf:type owl:DatatypeProperty ;
    rdfs:label "personName" ;
    rdfs:comment "Name of the person." ;
    rdfs:domain :Person ;
    rdfs:range xsd:string .

:projectName rdf:type owl:DatatypeProperty ;
    rdfs:label "projectName" ;
    rdfs:comment "Name of the project." ;
    rdfs:domain :Project ;
    rdfs:range xsd:string .

:projectNumber rdf:type owl:DatatypeProperty ;
    rdfs:label "projectNumber" ;
    rdfs:comment "Project number." ;
    rdfs:domain :Project ;
    rdfs:range xsd:string .

:packageName rdf:type owl:DatatypeProperty ;
    rdfs:label "packageName" ;
    rdfs:comment "Name of the drawing package." ;
    rdfs:domain :DrawingPackage ;
    rdfs:range xsd:string .

:statusLabel rdf:type owl:DatatypeProperty ;
    rdfs:label "statusLabel" ;
    rdfs:comment "Display label for the status code, e.g. 'IFC', 'IFR', 'AFC'." ;
    rdfs:domain :StatusCode ;
    rdfs:range xsd:string .

#################################################################
#    Datatype Properties — title-block assertions
#    See the object-property section above for the asserts- naming
#    rationale.
#################################################################

:organisationName rdf:type owl:DatatypeProperty ;
    rdfs:label "organisationName" ;
    rdfs:domain :Organisation ;
    rdfs:range xsd:string ;
    rdfs:comment "The name of an organisation as printed. Parallels personName. Verbatim: not normalised, expanded or translated at extraction time."@en ;
    :extractionHint "Transcribe exactly as printed, including any legal suffix."@en .

:assertsCrossReferenceNumber rdf:type owl:DatatypeProperty ;
    rdfs:label "assertsCrossReferenceNumber" ;
    rdfs:domain :Titleblock ;
    rdfs:range xsd:string ;
    rdfs:comment "A second (or third) identifier the title block prints for the same sheet, issued by a system other than the one drawingIdentifier is read from — a design-team-internal number, a client/EDMS document number, or a sketch/site-advice reference. Stored whole and verbatim, not parsed into segments; which system issued it is not modelled as a controlled vocabulary here, so that distinction is carried by extractionHint only."@en ;
    skos:altLabel "SA/SK No."@en, "sketch number"@en, "EDMS document number"@en,
                  "design team drawing number"@en, "client reference number"@en ;
    :extractionHint "A second coded number near or below the primary drawing number, often prefixed by the issuing system's initials (e.g. a sketch/site-advice code, or an EDMS platform's own document ID). Do not conflate with drawingIdentifier — capture only when a sheet prints more than one numbering system."@en .

#################################################################
#    Classes — MetadataContainer and supporting visual regions
#################################################################

:MetadataContainer rdf:type owl:Class;
    rdfs:label "MetadataContainer";
    rdfs:comment "Supporting visual region on a drawing sheet (titleblock, legend, etc.). Renamed from :Metadata to avoid confusion with semantic metadata properties on DrawingSheet.";
    :labellableRoot "false"^^xsd:boolean.

:Titleblock rdf:type owl:Class;
    rdfs:subClassOf :MetadataContainer,
        [ rdf:type owl:Restriction ; owl:onProperty :contains ; owl:minQualifiedCardinality "0"^^xsd:nonNegativeInteger ; owl:onClass :KeyPlan ],
        [ rdf:type owl:Restriction ; owl:onProperty :contains ; owl:minQualifiedCardinality "0"^^xsd:nonNegativeInteger ; owl:onClass :Legend ],
        [ rdf:type owl:Restriction ; owl:onProperty :contains ; owl:minQualifiedCardinality "0"^^xsd:nonNegativeInteger ; owl:onClass :RevisionTable ];
    rdfs:label "Titleblock";
    rdfs:comment "Titleblock containing information about the drawing, for example project name, drawing title, drawing number, etc. May itself contain a KeyPlan, Legend or RevisionTable, which are commonly printed inside the title-block strip rather than standing alone on the page; all three are optional, and each may alternatively be contained directly by the DrawingSheet.";
    :exampleImage <img/aec_drawing_ontology/titleblock_01.png> ;
    :exampleImage <img/aec_drawing_ontology/titleblock_02.png> ;
    :exampleImage <img/aec_drawing_ontology/titleblock_03.png> ;
    :exampleImage <img/aec_drawing_ontology/titleblock_04.png> ;
    :labellableRoot "true"^^xsd:boolean.

:RevisionTable rdf:type owl:Class;
    rdfs:subClassOf :MetadataContainer;
    rdfs:label "Revision table";
    rdfs:comment "A table recording the documented change history of the drawing sheet, with columns for revision number, date, and description of each amendment." ;
    :exampleImage <img/aec_drawing_ontology/revision_table_01.png> ;
    :exampleImage <img/aec_drawing_ontology/revision_table_02.png> ;
    :labellableRoot "true"^^xsd:boolean.

:Legend rdf:type owl:Class;
    rdfs:subClassOf :MetadataContainer;
    rdfs:label "Legend";
    rdfs:comment "A legend containing mapping information between symbols and a text signifier.";
    :exampleImage <img/aec_drawing_ontology/legend_01.png> ;
    :exampleImage <img/aec_drawing_ontology/legend_02.png> ;
    :labellableRoot "true"^^xsd:boolean.

:KeyPlan rdf:type owl:Class;
    rdfs:subClassOf :MetadataContainer;
    rdfs:label "Key Plan";
    rdfs:comment "A small locator diagram on a drawing sheet showing where the sheet's subject sits within the wider building or site, typically with the relevant area hatched or outlined. A graphical region rather than a text field: its value is the diagram, so it is modelled here as a detectable region alongside Legend and RevisionTable, not as an asserted title-block property. Contained either by a Titleblock, where it is printed inside the title-block strip, or directly by a DrawingSheet where it stands alone on the page; both placements occur and both are optional." ;
    :labellableRoot "true"^^xsd:boolean.

:Note rdf:type owl:Class;
    rdfs:subClassOf :MetadataContainer;
    rdfs:label "Note";
    rdfs:comment "Superclass for annotations on a drawing sheet that are not part of the drawing geometry, including textual notes and images." ;
    :labellableRoot "true"^^xsd:boolean.

:TextualNote rdf:type owl:Class;
    rdfs:subClassOf :Note;
    rdfs:label "Text";
    rdfs:comment "A free-form block of text, such as numbered lists or paragraphs, containing general requirements, assumptions, or keyed notes that apply to the drawing." ;
    :exampleImage <img/aec_drawing_ontology/textual_note_01.png> ;
    :exampleImage <img/aec_drawing_ontology/textual_note_02.png> ;
    :labellableRoot "true"^^xsd:boolean.

:Image rdf:type owl:Class;
    rdfs:subClassOf :Note;
    rdfs:label "Image";
    rdfs:comment "An image embedded within a note region on a drawing sheet.";
    :labellableRoot "true"^^xsd:boolean.

#################################################################
#    Classes — Drawing structure
#################################################################

:DrawingSheet rdf:type owl:Class ;
    rdfs:subClassOf
        [ rdf:type owl:Restriction ; owl:onProperty :contains ; owl:minQualifiedCardinality "0"^^xsd:nonNegativeInteger ; owl:onClass :Note ],
        [ rdf:type owl:Restriction ; owl:onProperty :contains ; owl:minQualifiedCardinality "0"^^xsd:nonNegativeInteger ; owl:onClass :Legend ],
        [ rdf:type owl:Restriction ; owl:onProperty :contains ; owl:minQualifiedCardinality "0"^^xsd:nonNegativeInteger ; owl:onClass :KeyPlan ],
        [ rdf:type owl:Restriction ; owl:onProperty :contains ; owl:minQualifiedCardinality "0"^^xsd:nonNegativeInteger ; owl:onClass :RevisionTable ],
        [ rdf:type owl:Restriction ; owl:onProperty :contains ; owl:onClass :Titleblock ; owl:qualifiedCardinality "1"^^xsd:nonNegativeInteger ],
        [ rdf:type owl:Restriction ; owl:onProperty :contains ; owl:minQualifiedCardinality "1"^^xsd:nonNegativeInteger ; owl:onClass :Layout ];
    rdfs:label "Drawing Sheet" ;
    rdfs:comment "Top-level container for a drawing. Contains Layout(s)." ;
    :labellableRoot false.

:hasCoordinateFrame rdf:type owl:ObjectProperty ;
    rdfs:label "hasCoordinateFrame" ;
    rdfs:comment "The coordinate frame (aec_geometry:CoordinateFrame) that a drawing sheet's page geometry is expressed in - the exact PDF/page, unit and named coordinate space its bounding boxes are relative to. Owned by the sheet and shared by the geometries on that page; a sheet may carry different frames for different file versions or output PDFs." ;
    rdfs:domain :DrawingSheet ;
    rdfs:range geom:CoordinateFrame .

:Layout rdf:type owl:Class ;
    rdfs:subClassOf
        [ rdf:type owl:Restriction ; owl:onProperty :contains ; owl:minQualifiedCardinality "0"^^xsd:nonNegativeInteger ; owl:onClass :DrawingElement ],
        [ rdf:type owl:Restriction ; owl:onProperty :hasProperty ; owl:onClass :LayoutContentType ; owl:qualifiedCardinality "1"^^xsd:nonNegativeInteger ];
    rdfs:label "Layout" ;
    rdfs:comment "Drawing layout - contained by DrawingSheet. Contains DrawingElement(s), annotations, drawing type, and content." ;
    :labellableRoot true.

#################################################################
#    Classes — Layout content types
#################################################################

:LayoutContentType rdf:type owl:Class;
    rdfs:label "Layout content type";
    rdfs:comment "Type of content included in a layout.";
    :labellableRoot "false"^^xsd:boolean.

:Plan rdf:type owl:Class;
    rdfs:subClassOf :LayoutContentType;
    rdfs:label "Plan";
    rdfs:comment "A horizontal cut through a building viewed from above, showing the arrangement of spaces, walls, doors, and openings at a given floor level." ;
    :exampleImage <img/aec_drawing_ontology/plan_01.png> ;
    :exampleImage <img/aec_drawing_ontology/plan_02.png> ;
    :labellableRoot "true"^^xsd:boolean.

:Section rdf:type owl:Class;
    rdfs:subClassOf :LayoutContentType,
        [ rdf:type owl:Restriction ; owl:onProperty :hasOrientation ; owl:onClass :OrientationValue ; owl:qualifiedCardinality "1"^^xsd:nonNegativeInteger ];
    rdfs:label "Section";
    rdfs:comment "Section drawing. Has a required property of orientation, which can be vertical or horizontal.";
    :exampleImage <img/aec_drawing_ontology/section_01.png> ;
    :exampleImage <img/aec_drawing_ontology/section_02.png> ;
    :labellableRoot "true"^^xsd:boolean.

:Elevation rdf:type owl:Class;
    rdfs:subClassOf :LayoutContentType;
    rdfs:label "Elevation";
    rdfs:comment "A flat, frontal orthographic view of a building facade or interior face, showing surface appearance, window positions, and heights without revealing internal construction." ;
    :exampleImage <img/aec_drawing_ontology/elevation_01.png> ;
    :exampleImage <img/aec_drawing_ontology/elevation_02.png> ;
    :labellableRoot "true"^^xsd:boolean.

:Detail rdf:type owl:Class ;
    rdfs:subClassOf :LayoutContentType,
    [ rdf:type owl:Restriction ; owl:onProperty :hasOrientation ; owl:onClass :OrientationValue ; owl:qualifiedCardinality "1"^^xsd:nonNegativeInteger ];
    rdfs:label "Detail" ;
    rdfs:comment "A large-scale zoomed-in drawing of a specific construction assembly or connection, showing how individual components fit together with dense material callouts and dimensions. Can be vertical or horizontal." ;
    :exampleImage <img/aec_drawing_ontology/detail_01.png> ;
    :exampleImage <img/aec_drawing_ontology/detail_02.png> ;
    :labellableRoot true .

:Table rdf:type owl:Class;
    rdfs:label "Table";
    rdfs:subClassOf :LayoutContentType;
    rdfs:comment "A table containing structured information, for example a schedule of elements.";
    :exampleImage <img/aec_drawing_ontology/table_01.png> ;
    :exampleImage <img/aec_drawing_ontology/table_02.png> ;
    :labellableRoot "true"^^xsd:boolean.

:Perspective rdf:type owl:Class;
    rdfs:subClassOf :LayoutContentType;
    rdfs:label "Perspective";
    rdfs:comment "A three-dimensional pictorial view of a building or assembly showing depth and spatial relationships, used where orthographic drawings cannot convey form." ;
    :labellableRoot "true"^^xsd:boolean.

#################################################################
#    Classes — Orientation
#################################################################

:OrientationValue rdf:type owl:Class ;
    rdfs:label "Orientation" ;
    rdfs:comment "Enumerated orientation values used with hasOrientation." ;
    owl:oneOf ( :Undefined :Horizontal :Vertical ) ;
    :labellableRoot "false"^^xsd:boolean.

:Undefined rdf:type owl:NamedIndividual, :OrientationValue ;
    rdfs:label "Undefined" ;
    rdfs:comment "Orientation not specified." ;
    :labellableRoot "true"^^xsd:boolean.

:Horizontal rdf:type owl:NamedIndividual, :OrientationValue ;
    rdfs:label "Horizontal" ;
    rdfs:comment "Horizontal orientation." ;
    :labellableRoot "true"^^xsd:boolean.

:Vertical rdf:type owl:NamedIndividual, :OrientationValue ;
    rdfs:label "Vertical" ;
    rdfs:comment "Vertical orientation." ;
    :labellableRoot "true"^^xsd:boolean.

#################################################################
#    Classes — Drawing elements
#################################################################

:DrawingElement rdf:type owl:Class;
    rdfs:comment "Element depicted on a drawing. Contained by Layout. Can be a Facade system or Facade component, or other domain-specific symbols, or generic symbols like dimensions, grids, etc.";
    rdfs:label "Drawing element";
    :labellableRoot "false"^^xsd:boolean.

#################################################################
#    Classes — UC-01 extension (semantic entities, not labellable)
#################################################################

:DrawingRevision rdf:type owl:Class ;
    rdfs:label "DrawingRevision" ;
    rdfs:comment "A specific revision of a DrawingSheet. Carries revision-specific metadata: code, issue date, status, and role-differentiated person attribution." ;
    :labellableRoot "false"^^xsd:boolean .

:Project rdf:type owl:Class ;
    rdfs:label "Project" ;
    rdfs:comment "A project under which DrawingSheets are grouped." ;
    :labellableRoot "false"^^xsd:boolean .

:Person rdf:type owl:Class ;
    rdfs:label "Person" ;
    rdfs:comment "A named individual associated with a DrawingRevision in some role (author, checker, approver). The role is expressed by the object property, not by subclassing." ;
    :labellableRoot "false"^^xsd:boolean .

:Organisation rdf:type owl:Class ;
    rdfs:label "Organisation" ;
    rdfs:comment "A legal entity named in a title block — client, originator, legal owner or responsible department. Modelled as a class rather than a string so that one organisation recurring across many sheets is a single individual, which is what makes cross-sheet questions answerable. Aligns to ct:Organisation (ISO 21597-1) and IfcActorSelect; note the ISO spelling differs." ;
    skos:altLabel "Organisation"@en ;
    :labellableRoot "false"^^xsd:boolean .

:StatusCode rdf:type owl:Class ;
    rdfs:label "StatusCode" ;
    rdfs:comment "Controlled-vocabulary status assigned to a DrawingRevision, e.g. IFC (Issued for Construction), IFR (Issued for Review), AFC (Approved for Construction)." ;
    :labellableRoot "false"^^xsd:boolean .

:DrawingPackage rdf:type owl:Class ;
    rdfs:label "DrawingPackage" ;
    rdfs:comment "A grouping of DrawingSheets within a Project, e.g. a volume or submission package." ;
    :labellableRoot "false"^^xsd:boolean .

#################################################################
#    Title-block field kinds (SKOS) - the extraction profile
#
#    A field kind is the stable concept behind a printed title-block field
#    (Scale, Client, Drawn By, ...). Names and synonyms - the strings a field
#    is printed under, per language - live HERE on the concept, not on a
#    per-field property, so the number of relationships stays small and a new
#    field is added as data (a concept), not schema. Membership in the
#    TitleblockFieldScheme IS the extraction profile: the set an extraction
#    pipeline looks for. Each concept records its expected value type
#    (aprov:expectedRange) and the ADIRO property a validated assertion is
#    promoted to (aprov:mapsToFieldProperty) - the hybrid bridge to the shipped
#    asserts*/has* properties, which are left in place. See Discussion #72 and
#    the aec_provenance module (imported above) for the assertion/provenance
#    model that binds an extracted value to one of these kinds.
#################################################################

:TitleblockFieldScheme rdf:type skos:ConceptScheme ;
    rdfs:label "Titleblock Field Scheme" ;
    rdfs:comment "The controlled vocabulary of title-block field kinds an extraction pipeline looks for. Each member concept carries the names/synonyms (per language) the field is printed under, generic public example values where useful, its expected value type, and the ADIRO property a validated assertion of it maps to." ;
    skos:scopeNote "Content provenance (public/private policy). Every skos:prefLabel, skos:altLabel and skos:example in this scheme is generic and public: standard AEC field names, their common German equivalents, and non-identifying example values (scales, status/revision/discipline codes). No project-specific name, synonym or value appears here - project-specific keys stay in the per-project titleblock_keys_to_ensure.json overlay and are joined to these concepts by IRI (aprov:mapsToFieldProperty / the concept's own IRI as adiro_uri). Per-item dcterms:source citations to a published source dataset will be added when the anonymised title-block dataset is public. The private key inventory and its per-item public/vs/project-specific classification are tracked off-repo, internally; the modelling rationale is in field-kind Discussion #72." ;
    skos:note "Synonym-uniqueness contract (for the JSON-vs-ADIRO consistency check): within this scheme a given skos:altLabel string, in a given language, denotes at most one field kind. A per-project synonym that collides with an altLabel of a different field kind is therefore a genuine conflict, not an ADIRO-internal ambiguity. Note the sentinel :UnidentifiedField below is intentionally NOT a member of this scheme, so it is never itself searched for." .

:ClientField rdf:type skos:Concept ;
    rdfs:label "Client Field" ;
    skos:definition "The party commissioning the works - the organisation the drawing is produced for."@en ;
    skos:prefLabel "Client"@en , "Auftraggeber"@de ;
    skos:altLabel "client"@en , "employer"@en , "for"@en , "Bauherr"@de ;
    skos:inScheme :TitleblockFieldScheme ;
    aprov:expectedRange :Organisation ;
    aprov:mapsToFieldProperty :assertsClient .

:OriginatorField rdf:type skos:Concept ;
    rdfs:label "Originator Field" ;
    skos:definition "The organisation that authored/produced the drawing (the consultant or design practice), as distinct from the individual who drew it (see Drawn By Field)."@en ;
    skos:prefLabel "Originator"@en , "Planverfasser"@de ;
    skos:altLabel "originator"@en , "consultant"@en , "drawn by (company)"@en ;
    skos:inScheme :TitleblockFieldScheme ;
    aprov:expectedRange :Organisation ;
    aprov:mapsToFieldProperty :assertsOriginator .

:DrawingTitleField rdf:type skos:Concept ;
    rdfs:label "Drawing Title Field" ;
    skos:definition "The descriptive title of the individual drawing or sheet."@en ;
    skos:prefLabel "Drawing Title"@en , "Zeichnungstitel"@de ;
    skos:altLabel "Sheet Title"@en , "title"@en , "drawing title"@en , "view title"@en ;
    skos:inScheme :TitleblockFieldScheme ;
    aprov:expectedRange xsd:string ;
    aprov:mapsToFieldProperty :drawingTitle .

:DrawingNumberField rdf:type skos:Concept ;
    rdfs:label "Drawing Number Field" ;
    skos:definition "The identifier assigned to the drawing sheet within its numbering system."@en ;
    skos:prefLabel "Drawing Number"@en , "Zeichnungsnummer"@de ;
    skos:altLabel "Drawing No."@en , "drawing number"@en , "Dwg No."@en ;
    skos:example "ST-201" ;
    skos:inScheme :TitleblockFieldScheme ;
    aprov:expectedRange xsd:string ;
    aprov:mapsToFieldProperty :drawingIdentifier .

:CrossReferenceNumberField rdf:type skos:Concept ;
    rdfs:label "Cross Reference Number Field" ;
    skos:definition "An alternative or external identifier for the drawing - e.g. a client, design-team or document-management-system (EDMS) reference number, distinct from the drawing's own number."@en ;
    skos:prefLabel "Cross-Reference Number"@en ;
    skos:altLabel "Alternative Ref. No."@en , "Design Team Drawing Number"@en , "EDMS document number"@en , "client reference number"@en , "SA/SK No."@en ;
    skos:inScheme :TitleblockFieldScheme ;
    aprov:expectedRange xsd:string ;
    aprov:mapsToFieldProperty :assertsCrossReferenceNumber .

:ScaleField rdf:type skos:Concept ;
    rdfs:label "Scale Field" ;
    skos:definition "The drawing scale - a ratio such as 1:50, or a note such as NTS ('not to scale') or 'as shown'."@en ;
    skos:prefLabel "Scale"@en , "Maßstab"@de ;
    skos:altLabel "scale"@en , "NTS"@en , "as shown"@en ;
    skos:example "1:50" , "1:100" , "NTS" ;
    skos:inScheme :TitleblockFieldScheme ;
    aprov:expectedRange xsd:string ;
    aprov:mapsToFieldProperty :hasScale .

:DrawnByField rdf:type skos:Concept ;
    rdfs:label "Drawn By Field" ;
    skos:definition "The individual who drew/authored the drawing, as distinct from the originating organisation (see Originator Field)."@en ;
    skos:prefLabel "Drawn By"@en , "Gezeichnet"@de ;
    skos:altLabel "Author"@en , "drawn"@en , "Verfasser"@de , "Bearb."@de ;
    skos:inScheme :TitleblockFieldScheme ;
    aprov:expectedRange :Person ;
    aprov:mapsToFieldProperty :isAuthoredBy .

:CheckedByField rdf:type skos:Concept ;
    rdfs:label "Checked By Field" ;
    skos:definition "The individual who checked the drawing."@en ;
    skos:prefLabel "Checked By"@en , "Geprüft"@de ;
    skos:altLabel "checked"@en , "Gepr."@de ;
    skos:inScheme :TitleblockFieldScheme ;
    aprov:expectedRange :Person ;
    aprov:mapsToFieldProperty :isCheckedBy .

:ApprovedByField rdf:type skos:Concept ;
    rdfs:label "Approved By Field" ;
    skos:definition "The individual who approved/authorised the drawing for issue."@en ;
    skos:prefLabel "Approved By"@en , "Genehmigt"@de ;
    skos:altLabel "approved"@en , "authorised"@en ;
    skos:inScheme :TitleblockFieldScheme ;
    aprov:expectedRange :Person ;
    aprov:mapsToFieldProperty :isApprovedBy .

:RevisionCodeField rdf:type skos:Concept ;
    rdfs:label "Revision Code Field" ;
    skos:definition "The revision identifier of the drawing (or its current revision), e.g. 'A', 'P01', '00'."@en ;
    skos:prefLabel "Revision Code"@en , "Revisionsstand"@de ;
    skos:altLabel "Rev."@en , "Revision"@en , "Rev"@en , "Index"@de ;
    skos:example "A" , "P01" , "00" ;
    skos:inScheme :TitleblockFieldScheme ;
    aprov:expectedRange xsd:string ;
    aprov:mapsToFieldProperty :revisionCode .

:IssueDateField rdf:type skos:Concept ;
    rdfs:label "Issue Date Field" ;
    skos:definition "The date the drawing (or its current revision) was issued."@en ;
    skos:prefLabel "Issue Date"@en , "Datum"@de ;
    skos:altLabel "Date"@en , "date"@en , "issued"@en ;
    skos:inScheme :TitleblockFieldScheme ;
    aprov:expectedRange xsd:date ;
    aprov:mapsToFieldProperty :issueDate .

:DisciplineField rdf:type skos:Concept ;
    rdfs:label "Discipline Field" ;
    skos:definition "The engineering/design discipline the drawing belongs to, e.g. Architecture, Structures, Mechanical."@en ;
    skos:prefLabel "Discipline"@en , "Fachbereich"@de ;
    skos:altLabel "discipline"@en , "Gewerk"@de ;
    skos:example "A" , "S" , "M" ;
    skos:inScheme :TitleblockFieldScheme ;
    aprov:expectedRange xsd:string ;
    rdfs:comment "No dedicated ADIRO property yet (no mapsToFieldProperty); a candidate to model - possibly reusing aec_domain_common:Discipline - tracked with the wider title-block relationship work (GitHub issue #69)." .

:ProjectTitleField rdf:type skos:Concept ;
    rdfs:label "Project Title Field" ;
    skos:definition "The name of the project the drawing belongs to."@en ;
    skos:prefLabel "Project Title"@en , "Bauvorhaben"@de ;
    skos:altLabel "Project"@en , "Projekt"@de ;
    skos:inScheme :TitleblockFieldScheme ;
    aprov:expectedRange xsd:string ;
    aprov:mapsToFieldProperty :projectName .

:ProjectNumberField rdf:type skos:Concept ;
    rdfs:label "Project Number Field" ;
    skos:definition "The number assigned to the project the drawing belongs to."@en ;
    skos:prefLabel "Project Number"@en , "Projektnummer"@de ;
    skos:altLabel "Project No."@en , "Proj. No."@en ;
    skos:inScheme :TitleblockFieldScheme ;
    aprov:expectedRange xsd:string ;
    aprov:mapsToFieldProperty :projectNumber .

:SheetSizeField rdf:type skos:Concept ;
    rdfs:label "Sheet Size Field" ;
    skos:definition "The paper/sheet size designation of the drawing."@en ;
    skos:prefLabel "Sheet Size"@en , "Blattgröße"@de ;
    skos:altLabel "Size"@en , "Format"@en ;
    skos:example "A1" , "A0" ;
    skos:inScheme :TitleblockFieldScheme ;
    aprov:expectedRange xsd:string ;
    aprov:mapsToFieldProperty :sheetSize .

:DrawingPackageField rdf:type skos:Concept ;
    rdfs:label "Drawing Package Field" ;
    skos:definition "The package, volume or submission grouping the drawing belongs to."@en ;
    skos:prefLabel "Drawing Package"@en ;
    skos:altLabel "Package"@en , "Component / Package"@en , "volume"@en ;
    skos:inScheme :TitleblockFieldScheme ;
    aprov:expectedRange xsd:string ;
    aprov:mapsToFieldProperty :packageName .

:StatusField rdf:type skos:Concept ;
    rdfs:label "Status Field" ;
    skos:definition "The issue status / suitability of the drawing, e.g. IFC (Issued for Construction), IFR (Issued for Review), AFC (Approved for Construction)."@en ;
    skos:prefLabel "Status"@en ;
    skos:altLabel "Suitability"@en , "Issue"@en , "status code"@en , "Status"@de ;
    skos:example "IFC" , "IFR" , "AFC" ;
    skos:inScheme :TitleblockFieldScheme ;
    aprov:expectedRange xsd:string ;
    aprov:mapsToFieldProperty :statusLabel .

#################################################################
#    Unidentified-field sentinel
#
#    The field kind an extracted title-block field is bound to when its kind
#    cannot be matched to any member of the TitleblockFieldScheme. It is a
#    skos:Concept (so it is a valid aprov:assertsFieldKind target) but is
#    DELIBERATELY NOT skos:inScheme :TitleblockFieldScheme - it is an output
#    sentinel, never a field an extraction pipeline searches for. See the
#    field-kind assertion/provenance model in Discussion #72.
#################################################################

:UnidentifiedField rdf:type skos:Concept ;
    rdfs:label "Unidentified Field" ;
    skos:definition "Sentinel field kind for an extracted title-block field whose kind could not be matched to any member of the TitleblockFieldScheme. A FieldAssertion asserting this kind keeps the printed caption (aprov:capturedCaption) and the raw value so nothing is lost, and is deliberately not promoted to a direct property (it carries no aprov:mapsToFieldProperty). The proportion of assertions bound to it is a red-flag / coverage metric: a high rate signals either missing ADIRO coverage for a real field or a failure upstream in extraction. Not a member of any field-kind scheme, so it is never itself a field the pipeline searches for."@en .
