# The C4 view ontology (presentation module) of c4-model-agentic-plugin.
#
# How the architecture explorer draws a model: the order of every list, grid positions, colours and dashes,
# the view the page opens with, the pinned board, the legend, level names, toolbar texts and source-link
# templates. With the core module (c4.ttl) an exported graph holds everything needed to redraw every diagram:
# the map at every level, the lifecycles, and every scenario as a collaboration or sequence diagram.
#
# Kept apart from c4.ttl in the spirit of BPMN DI (Diagram Interchange): the core says what the architecture
# is, this module says how one tool shows it. A consumer that only cares about the architecture ignores every
# c4v: triple and loses nothing of its meaning.
#
# Every c4v: property is an owl:AnnotationProperty on purpose: none of them changes what the architecture
# means, so an OWL reasoner draws no conclusions from them. Their rdfs:range is documentation only; the
# SHACL shapes (c4-shapes.ttl, "view module") check the values.
#
# Ordered lists are rdf:Lists (Turtle: ( "a" "b" )). Where the core or the data module has one triple per value
# (c4:note, c4:technology, c4:inVariant, c4:precondition, c4d:allowedValue, c4d:definedBy, c4d:reads, c4d:writes) and
# order matters to the page, the list sits next to it, for two values or more.
#
# The data module (c4-data.ttl, c4d:) is drawn with the same terms: c4v:order for schemas, entities, relations and
# indexes, c4v:column and c4v:row for an entity's place in its schema's cluster, c4v:tone for a schema's colour,
# c4v:dashed for an entity, c4v:icon for a schema's cluster and an entity's card.
#
# Icons (c4v:icon, c4v:iconColor, c4v:IconDefinition) are presentation too: a logo or a glyph says nothing a
# c4:technology does not; an icon's reference is enough to fetch a library icon again, so only the model's own
# icons are written out with their SVG.

@prefix c4v:     <https://caviri.github.io/c4-model-agentic-plugin/ontology/c4-view#> .
@prefix c4:      <https://caviri.github.io/c4-model-agentic-plugin/ontology/c4#> .
@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 dcterms: <http://purl.org/dc/terms/> .
@prefix skos:    <http://www.w3.org/2004/02/skos/core#> .
@prefix vann:    <http://purl.org/vocab/vann/> .

<https://caviri.github.io/c4-model-agentic-plugin/ontology/c4-view>
    a owl:Ontology ;
    owl:imports <https://caviri.github.io/c4-model-agentic-plugin/ontology/c4> ;
    dcterms:title "C4 view ontology"@en ;
    dcterms:description """Presentation module of the C4 architecture ontology: what the architecture explorer of c4-model-agentic-plugin needs, beyond the architecture itself, to redraw every diagram exactly (order, layout, colours, view defaults, pinned board, legend, level names)."""@en ;
    dcterms:creator "caviri" ;
    dcterms:license <https://www.apache.org/licenses/LICENSE-2.0> ;
    dcterms:created "2026-11-19"^^xsd:date ;
    dcterms:modified "2026-11-27"^^xsd:date ;
    owl:versionInfo "0.1.0" ;
    vann:preferredNamespacePrefix "c4v" ;
    vann:preferredNamespaceUri "https://caviri.github.io/c4-model-agentic-plugin/ontology/c4-view#" ;
    rdfs:seeAlso <https://caviri.github.io/c4-model-agentic-plugin/ontology/c4-view/> , <https://www.omg.org/spec/BPMN/2.0.2/> .

dcterms:title       a owl:AnnotationProperty .
dcterms:description a owl:AnnotationProperty .
dcterms:creator     a owl:AnnotationProperty .
dcterms:license     a owl:AnnotationProperty .
dcterms:created     a owl:AnnotationProperty .
dcterms:modified    a owl:AnnotationProperty .
skos:definition     a owl:AnnotationProperty .
skos:example        a owl:AnnotationProperty .
vann:preferredNamespacePrefix a owl:AnnotationProperty .
vann:preferredNamespaceUri    a owl:AnnotationProperty .

#################################################################
#  Class
#################################################################

c4v:LegendEntry a owl:Class ;
    rdfs:label "Legend entry"@en ;
    skos:definition "What one colour or line style means in this model's legend: a key (a colour kind such as teal, or dashed) and its label."@en ;
    rdfs:isDefinedBy <https://caviri.github.io/c4-model-agentic-plugin/ontology/c4-view> .

c4v:Dismissal a owl:Class ;
    rdfs:label "Dismissal"@en ;
    skos:definition "A coherence finding the model dismisses, with the reason (view.coherence.ignore): the rule (c4v:coherenceRule), the finding's key or * for every finding of that rule (c4v:focusKey), why (dcterms:description), and optionally who dismissed it (dcterms:creator: reader, agent or a name) and when (dcterms:date, YYYY-MM-DD). The explorer still lists the finding, marked dismissed. The rules: ontology/c4-coherence-shapes.ttl."@en ;
    rdfs:isDefinedBy <https://caviri.github.io/c4-model-agentic-plugin/ontology/c4-view> .

#################################################################
#  Order and layout
#################################################################

c4v:order a owl:AnnotationProperty ;
    rdfs:label "order"@en ;
    skos:definition "The position, from 1, of an element, a relationship, a scenario, a variant, a schema, an entity or a relation (c4d:) in the model's list of them, of an index among the indexes of its entity, or of an image (schema:ImageObject) among the images of what it shows. The explorer's automatic layout, merged arrow labels, the scenario picker, the default variant and flow colours, the Data view's clusters and cards, and the order of a gallery follow it."@en ;
    rdfs:comment "Not the order of a scenario's steps or of an entity's fields: that is part of what they are, schema:position in the core and data modules."@en ;
    rdfs:range xsd:positiveInteger ;
    rdfs:isDefinedBy <https://caviri.github.io/c4-model-agentic-plugin/ontology/c4-view> .

c4v:column a owl:AnnotationProperty ;
    rdfs:label "column"@en ;
    skos:definition "Grid column of an element inside its parent, or of an entity inside its schema's cluster in the Data view (the first number of `at`). Columns are sorted ordinals, not pixels."@en ;
    # no range: a number, an integer in practice (xsd:integer, or xsd:double for 0.5)
    rdfs:isDefinedBy <https://caviri.github.io/c4-model-agentic-plugin/ontology/c4-view> .

c4v:row a owl:AnnotationProperty ;
    rdfs:label "row"@en ;
    skos:definition "Grid row of an element inside its parent, or of an entity inside its schema's cluster (the second number of `at`). Always given together with c4v:column."@en ;
    rdfs:isDefinedBy <https://caviri.github.io/c4-model-agentic-plugin/ontology/c4-view> .

c4v:noteList a owl:AnnotationProperty ;
    rdfs:label "notes in order"@en ;
    skos:definition "The notes (c4:note) of an element, a schema or an entity as an rdf:List, in the order the panel shows them. Written for two notes or more."@en ;
    rdfs:isDefinedBy <https://caviri.github.io/c4-model-agentic-plugin/ontology/c4-view> .

c4v:technologyList a owl:AnnotationProperty ;
    rdfs:label "technologies in order"@en ;
    skos:definition "The technologies (c4:technology) of an element or a schema as an rdf:List, in the order of their chips. Written for two or more."@en ;
    rdfs:isDefinedBy <https://caviri.github.io/c4-model-agentic-plugin/ontology/c4-view> .

c4v:variantList a owl:AnnotationProperty ;
    rdfs:label "variants in order"@en ;
    skos:definition "The variants of an element, relationship or step (c4:inVariant) as an rdf:List in the model's order; the first one gives a variant-only arrow its colour. Written for two or more."@en ;
    rdfs:isDefinedBy <https://caviri.github.io/c4-model-agentic-plugin/ontology/c4-view> .

c4v:preconditionList a owl:AnnotationProperty ;
    rdfs:label "preconditions in order"@en ;
    skos:definition "The scenario's preconditions (c4:precondition) as an rdf:List, in the order the panel shows them. Written for two or more."@en ;
    rdfs:isDefinedBy <https://caviri.github.io/c4-model-agentic-plugin/ontology/c4-view> .

c4v:valueList a owl:AnnotationProperty ;
    rdfs:label "allowed values in order"@en ;
    skos:definition "The allowed values (c4d:allowedValue) of a field or an enumeration as an rdf:List, in the order the Data view lists them. Written for two or more."@en ;
    rdfs:isDefinedBy <https://caviri.github.io/c4-model-agentic-plugin/ontology/c4-view> .

c4v:definedByList a owl:AnnotationProperty ;
    rdfs:label "defined by, in order"@en ;
    skos:definition "The code elements that define an entity (c4d:definedBy) as an rdf:List, in the order its panel lists them. Written for two or more."@en ;
    rdfs:isDefinedBy <https://caviri.github.io/c4-model-agentic-plugin/ontology/c4-view> .

c4v:readList a owl:AnnotationProperty ;
    rdfs:label "reads in order"@en ;
    skos:definition "What a step or a relationship reads (c4d:reads) as an rdf:List, in the order of its chips. Written for two or more."@en ;
    rdfs:isDefinedBy <https://caviri.github.io/c4-model-agentic-plugin/ontology/c4-view> .

c4v:writeList a owl:AnnotationProperty ;
    rdfs:label "writes in order"@en ;
    skos:definition "What a step or a relationship writes (c4d:writes) as an rdf:List, in the order of its chips. Written for two or more."@en ;
    rdfs:isDefinedBy <https://caviri.github.io/c4-model-agentic-plugin/ontology/c4-view> .

#################################################################
#  Look of boxes and arrows, variants
#################################################################

c4v:style a owl:AnnotationProperty ;
    rdfs:label "colour style"@en ;
    skos:definition "The colour of a box or an arrow when it is not the default of its type: highlight (an element a reader must not miss), plain, the look of another type (person, system, container, store, code, ext, sibling, state), or a tone (teal, orange, green, violet, rose, blue, gold, brown). Arrows: ink, accent or a tone. The model field `kind`."@en ;
    rdfs:range xsd:string ;
    rdfs:isDefinedBy <https://caviri.github.io/c4-model-agentic-plugin/ontology/c4-view> .

c4v:dashed a owl:AnnotationProperty ;
    rdfs:label "dashed"@en ;
    skos:definition "True for a dashed border or arrow: optional, planned, conditional, asynchronous or indirect; on an entity (c4d:Entity), a dashed card. Written only when true."@en ;
    rdfs:range xsd:boolean ;
    rdfs:isDefinedBy <https://caviri.github.io/c4-model-agentic-plugin/ontology/c4-view> .

c4v:shortName a owl:AnnotationProperty ;
    rdfs:label "short name"@en ;
    skos:definition "A shorter name of a variant, for the margin of sequence diagrams."@en ;
    rdfs:range xsd:string ;
    rdfs:isDefinedBy <https://caviri.github.io/c4-model-agentic-plugin/ontology/c4-view> .

c4v:tone a owl:AnnotationProperty ;
    rdfs:label "tone"@en ;
    skos:definition "A colour of the palette: teal, orange, green, violet, rose, blue, gold or brown. On a variant, its colour (by default by c4v:order, in that sequence). On a scenario, its flow colour: the colour of its arrows, numbers and current step in the Dynamic view and of its steps painted on the map (the model field `color`). On a schema (c4d:Schema), the tint of its cluster in the Data view, instead of its kind's default (the model field `color`). A scenario without one gets the next of blue, gold, violet, teal, brown, rose, orange, green that no scenario names, in scenario order."@en ;
    rdfs:range xsd:string ;
    rdfs:isDefinedBy <https://caviri.github.io/c4-model-agentic-plugin/ontology/c4-view> .

#################################################################
#  Icons: a small picture in a box's header, on an arrow's label, on a schema's cluster or an entity's card
#################################################################

c4v:IconDefinition a owl:Class ;
    rdfs:label "Icon definition"@en ;
    skos:definition "An icon the model carries itself (the model field `icons`): its key, the SVG markup, and where it comes from and under which licence. A c4v:icon that names the key draws it. Icons from a library (Tabler Icons, Simple Icons) are named by their reference alone (tabler:<name>, si:<slug>) and need no definition: a tool fetches them again from the reference."@en ;
    rdfs:isDefinedBy <https://caviri.github.io/c4-model-agentic-plugin/ontology/c4-view> .

c4v:icon a owl:AnnotationProperty ;
    rdfs:label "icon"@en ;
    skos:definition "The icon of an element, a relationship, a scenario, a schema or an entity (c4d:), as a reference: a built-in name of the explorer (database, user, server …, the Tabler Icons names), tabler:<name> (any Tabler Icons icon, MIT), si:<slug> (a Simple Icons brand logo, CC0; the logo stays a trademark of its owner), the c4v:iconKey of a c4v:IconDefinition of the model, a path next to the model (img/icons/gpu.svg), an https URL or a data: URI. Purely presentational: it says nothing about what the element is (c4:technology does)."@en ;
    skos:example "si:postgresql" , "database" , "tabler:cloud-upload" ;
    rdfs:range xsd:string ;
    rdfs:isDefinedBy <https://caviri.github.io/c4-model-agentic-plugin/ontology/c4-view> .

c4v:iconColor a owl:AnnotationProperty ;
    rdfs:label "icon colour"@en ;
    skos:definition "How an icon is coloured: brand (a logo in its own colours: the brand colour of a Simple Icons logo) or a tone (teal, orange, green, violet, rose, blue, gold, brown). Without it the icon takes the ink colour of its box or arrow, or the brand colour when the page shows icons in brand colours (c4v:iconStyle brand)."@en ;
    rdfs:range xsd:string ;
    rdfs:isDefinedBy <https://caviri.github.io/c4-model-agentic-plugin/ontology/c4-view> .

c4v:iconDefinition a owl:AnnotationProperty ;
    rdfs:label "icon definition"@en ;
    skos:definition "A c4v:IconDefinition the model carries: a custom icon, or a library icon stored with the model so that it draws offline."@en ;
    rdfs:range c4v:IconDefinition ;
    rdfs:isDefinedBy <https://caviri.github.io/c4-model-agentic-plugin/ontology/c4-view> .

c4v:iconKey a owl:AnnotationProperty ;
    rdfs:label "icon key"@en ;
    skos:definition "The key of a c4v:IconDefinition: what a c4v:icon names to draw it (gpu, si:postgresql)."@en ;
    rdfs:range xsd:string ;
    rdfs:isDefinedBy <https://caviri.github.io/c4-model-agentic-plugin/ontology/c4-view> .

c4v:svg a owl:AnnotationProperty ;
    rdfs:label "SVG markup"@en ;
    skos:definition "The SVG of a c4v:IconDefinition, as text (<svg viewBox=\"0 0 24 24\">…</svg>). The explorer draws only shapes from it (svg, g, path, circle, ellipse, rect, line, polyline, polygon and their geometry, fill and stroke attributes) and drops the rest: no scripts, event attributes, links or external references."@en ;
    rdfs:range xsd:string ;
    rdfs:isDefinedBy <https://caviri.github.io/c4-model-agentic-plugin/ontology/c4-view> .

c4v:iconStyle a owl:AnnotationProperty ;
    rdfs:label "icon style"@en ;
    skos:definition "How the page shows icons by default: mono (the default: each icon in the ink colour of its box or arrow, or its c4v:iconColor) or brand (logos in their brand colours). The reader can switch."@en ;
    rdfs:range xsd:string ;
    rdfs:isDefinedBy <https://caviri.github.io/c4-model-agentic-plugin/ontology/c4-view> .

c4v:showIcons a owl:AnnotationProperty ;
    rdfs:label "show icons"@en ;
    skos:definition "False when the page opens with icons hidden (the model field `view.showIcons: false`). Written only when false: icons show by default."@en ;
    rdfs:range xsd:boolean ;
    rdfs:isDefinedBy <https://caviri.github.io/c4-model-agentic-plugin/ontology/c4-view> .

#################################################################
#  The page: titles, opening view, pinned board, legend, level names
#################################################################

c4v:subtitle a owl:AnnotationProperty ;
    rdfs:label "subtitle"@en ;
    skos:definition "The small line above the page title, typically org/repo."@en ;
    rdfs:range xsd:string ;
    rdfs:isDefinedBy <https://caviri.github.io/c4-model-agentic-plugin/ontology/c4-view> .

c4v:toolbarTitle a owl:AnnotationProperty ;
    rdfs:label "toolbar title"@en ;
    skos:definition "The big title in the toolbar; Architecture map when absent."@en ;
    rdfs:range xsd:string ;
    rdfs:isDefinedBy <https://caviri.github.io/c4-model-agentic-plugin/ontology/c4-view> .

c4v:placeholder a owl:AnnotationProperty ;
    rdfs:label "placeholder"@en ;
    skos:definition "True only for the sample model shipped with the explorer template."@en ;
    rdfs:range xsd:boolean ;
    rdfs:isDefinedBy <https://caviri.github.io/c4-model-agentic-plugin/ontology/c4-view> .

c4v:startLevel a owl:AnnotationProperty ;
    rdfs:label "start level"@en ;
    skos:definition "The level, 1 to 4, the map opens at; 2 when absent."@en ;
    rdfs:range xsd:positiveInteger ;
    rdfs:isDefinedBy <https://caviri.github.io/c4-model-agentic-plugin/ontology/c4-view> .

c4v:openElements a owl:AnnotationProperty ;
    rdfs:label "open elements"@en ;
    skos:definition "An rdf:List of the elements the map opens with, instead of a start level."@en ;
    rdfs:isDefinedBy <https://caviri.github.io/c4-model-agentic-plugin/ontology/c4-view> .

c4v:edgeStyle a owl:AnnotationProperty ;
    rdfs:label "arrow style"@en ;
    skos:definition "How the map draws arrows: orthogonal (the default) or straight."@en ;
    rdfs:range xsd:string ;
    rdfs:isDefinedBy <https://caviri.github.io/c4-model-agentic-plugin/ontology/c4-view> .

c4v:theme a owl:AnnotationProperty ;
    rdfs:label "theme"@en ;
    skos:definition "The default colour theme of the page (auto when absent)."@en ;
    rdfs:range xsd:string ;
    rdfs:isDefinedBy <https://caviri.github.io/c4-model-agentic-plugin/ontology/c4-view> .

c4v:defaultPins a owl:AnnotationProperty ;
    rdfs:label "default pins"@en ;
    skos:definition "An rdf:List of the elements on the Pinned board when a reader first opens the page."@en ;
    rdfs:isDefinedBy <https://caviri.github.io/c4-model-agentic-plugin/ontology/c4-view> .

c4v:levelNames a owl:AnnotationProperty ;
    rdfs:label "level names"@en ;
    skos:definition "An rdf:List of four strings that rename the levels System context, Containers, Components and Code."@en ;
    rdfs:isDefinedBy <https://caviri.github.io/c4-model-agentic-plugin/ontology/c4-view> .

c4v:legendEntry a owl:AnnotationProperty ;
    rdfs:label "legend entry"@en ;
    skos:definition "A c4v:LegendEntry of the model."@en ;
    rdfs:range c4v:LegendEntry ;
    rdfs:isDefinedBy <https://caviri.github.io/c4-model-agentic-plugin/ontology/c4-view> .

c4v:legendKey a owl:AnnotationProperty ;
    rdfs:label "legend key"@en ;
    skos:definition "The colour kind or line style a legend entry explains: a tone, a type's look, highlight, plain, or dashed. Its rdfs:label is the explanation."@en ;
    rdfs:range xsd:string ;
    rdfs:isDefinedBy <https://caviri.github.io/c4-model-agentic-plugin/ontology/c4-view> .

c4v:dismissal a owl:AnnotationProperty ;
    rdfs:label "dismissal"@en ;
    skos:definition "A c4v:Dismissal of the model: a coherence finding it dismisses."@en ;
    rdfs:range c4v:Dismissal ;
    rdfs:isDefinedBy <https://caviri.github.io/c4-model-agentic-plugin/ontology/c4-view> .

c4v:coherenceRule a owl:AnnotationProperty ;
    rdfs:label "coherence rule"@en ;
    skos:definition "The id of the coherence rule a c4v:Dismissal dismisses a finding of, such as flow.step-without-arrow."@en ;
    rdfs:range xsd:string ;
    rdfs:isDefinedBy <https://caviri.github.io/c4-model-agentic-plugin/ontology/c4-view> .

c4v:focusKey a owl:AnnotationProperty ;
    rdfs:label "focus key"@en ;
    skos:definition "The key of the dismissed finding: what the finding is about, in model ids (a box id, from>to for an arrow, scenario#step for a step, entity:id for an entity, a|b for a pair), or * for every finding of the rule."@en ;
    rdfs:range xsd:string ;
    rdfs:isDefinedBy <https://caviri.github.io/c4-model-agentic-plugin/ontology/c4-view> .

#################################################################
#  Source links and the RDF settings of the model
#################################################################

c4v:sourceHost a owl:AnnotationProperty ;
    rdfs:label "source host"@en ;
    skos:definition "Which code host builds the source links: github, gitlab or bitbucket. Detected from the repository URL when absent."@en ;
    rdfs:range xsd:string ;
    rdfs:isDefinedBy <https://caviri.github.io/c4-model-agentic-plugin/ontology/c4-view> .

c4v:fileTemplate a owl:AnnotationProperty ;
    rdfs:label "file link template"@en ;
    skos:definition "URL template for a link to a file, with {repo}, {branch} and {path}."@en ;
    rdfs:range xsd:string ;
    rdfs:isDefinedBy <https://caviri.github.io/c4-model-agentic-plugin/ontology/c4-view> .

c4v:dirTemplate a owl:AnnotationProperty ;
    rdfs:label "directory link template"@en ;
    skos:definition "URL template for a link to a directory, with {repo}, {branch} and {path}."@en ;
    rdfs:range xsd:string ;
    rdfs:isDefinedBy <https://caviri.github.io/c4-model-agentic-plugin/ontology/c4-view> .

c4v:lineTemplate a owl:AnnotationProperty ;
    rdfs:label "line link template"@en ;
    skos:definition "What is appended to a file link for a line, with {line}."@en ;
    skos:example "#L{line}" ;
    rdfs:range xsd:string ;
    rdfs:isDefinedBy <https://caviri.github.io/c4-model-agentic-plugin/ontology/c4-view> .

c4v:linkLabel a owl:AnnotationProperty ;
    rdfs:label "link label"@en ;
    skos:definition "The text of source links, such as Open on GitHub."@en ;
    rdfs:range xsd:string ;
    rdfs:isDefinedBy <https://caviri.github.io/c4-model-agentic-plugin/ontology/c4-view> .

c4v:base a owl:AnnotationProperty ;
    rdfs:label "base IRI"@en ;
    skos:definition "The base IRI of the model's resources, when the model sets one (MODEL.rdf.base)."@en ;
    rdfs:range xsd:anyURI ;
    rdfs:isDefinedBy <https://caviri.github.io/c4-model-agentic-plugin/ontology/c4-view> .

c4v:vocabulary a owl:AnnotationProperty ;
    rdfs:label "vocabulary override"@en ;
    skos:definition "The namespace used instead of c4: when a model overrides it (MODEL.rdf.vocab). A graph that carries it no longer uses the published core ontology, and the SHACL shapes, which target c4: classes, do not apply to it."@en ;
    rdfs:range xsd:anyURI ;
    rdfs:isDefinedBy <https://caviri.github.io/c4-model-agentic-plugin/ontology/c4-view> .
