# Editable RDFS vocabulary source. Assemble distributions with scripts/build_rdf.py.
# Copyright (c) 2026 CoreStory, Inc. — Apache-2.0

@prefix export: <https://ontologies.corestory.ai/sao/export/> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix sao: <https://ontologies.corestory.ai/sao/> .
@prefix skos: <http://www.w3.org/2004/02/skos/core#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .

sao:ScreenDefinition a rdfs:Class ;
    rdfs:label "ScreenDefinition" ;
    rdfs:comment "A terminal screen or map definition for character-mode UIs" ;
    rdfs:isDefinedBy sao: ;
    rdfs:subClassOf sao:NamedEntity ;
    skos:note "Captures the layout and structure of character-mode user interfaces, enabling UI-to-program traceability and modernization analysis." .

sao:ScreenField a rdfs:Class ;
    rdfs:label "ScreenField" ;
    rdfs:comment "A field on a terminal screen definition" ;
    rdfs:isDefinedBy sao: ;
    rdfs:subClassOf sao:NamedEntity .

sao:attribute_byte a rdf:Property ;
    rdfs:label "attribute_byte" ;
    rdfs:comment "Display attribute (bright, dark, protected, etc.)",
        "[ScreenField] Display attribute (bright, dark, protected, etc.)" ;
    rdfs:domain sao:ScreenField ;
    rdfs:isDefinedBy sao: ;
    rdfs:range xsd:string .

sao:column a rdf:Property ;
    rdfs:label "column" ;
    rdfs:comment "Column position on screen.",
        "[ScreenField] Column position on screen." ;
    rdfs:domain sao:ScreenField ;
    rdfs:isDefinedBy sao: ;
    rdfs:range xsd:integer .

sao:contains_screen_fields a rdf:Property ;
    rdfs:label "contains_screen_fields" ;
    rdfs:comment "Fields defined on this screen.",
        "[ScreenDefinition] Fields defined on this screen." ;
    rdfs:domain sao:ScreenDefinition ;
    rdfs:isDefinedBy sao: ;
    rdfs:range sao:ScreenField .

sao:field_on_screen a rdf:Property ;
    rdfs:label "field_on_screen" ;
    rdfs:comment "The screen this field belongs to.",
        "[ScreenField] The screen this field belongs to." ;
    rdfs:domain sao:ScreenField ;
    rdfs:isDefinedBy sao: ;
    rdfs:range sao:ScreenDefinition .

sao:initial_value a rdf:Property ;
    rdfs:label "initial_value" ;
    rdfs:comment "Default display value.",
        "[ScreenField] Default display value." ;
    rdfs:domain sao:ScreenField ;
    rdfs:isDefinedBy sao: ;
    rdfs:range xsd:string .

sao:is_input a rdf:Property ;
    rdfs:label "is_input" ;
    rdfs:comment "Whether the user can type into this field.",
        "[ScreenField] Whether the user can type into this field." ;
    rdfs:domain sao:ScreenField ;
    rdfs:isDefinedBy sao: ;
    rdfs:range xsd:boolean .

sao:is_protected a rdf:Property ;
    rdfs:label "is_protected" ;
    rdfs:comment "Whether the field is protected from modification.",
        "[ScreenField] Whether the field is protected from modification." ;
    rdfs:domain sao:ScreenField ;
    rdfs:isDefinedBy sao: ;
    rdfs:range xsd:boolean .

sao:length a rdf:Property ;
    rdfs:label "length" ;
    rdfs:comment "Field length in characters.",
        "[ScreenField] Field length in characters." ;
    rdfs:domain sao:ScreenField ;
    rdfs:isDefinedBy sao: ;
    rdfs:range xsd:integer .

sao:maps_to_data_element a rdf:Property ;
    rdfs:label "maps_to_data_element" ;
    rdfs:comment "Data element mapped to this field.",
        "[ScreenField] Data element mapped to this field." ;
    rdfs:domain sao:ScreenField ;
    rdfs:isDefinedBy sao: ;
    rdfs:range sao:DataElement .

sao:program_uses_screens a rdf:Property ;
    rdfs:label "program_uses_screens" ;
    rdfs:comment "Programs that use this screen.",
        "[ScreenDefinition] Programs that use this screen." ;
    rdfs:domain sao:ScreenDefinition ;
    rdfs:isDefinedBy sao: ;
    rdfs:range sao:EncapsulationUnit .

sao:row a rdf:Property ;
    rdfs:label "row" ;
    rdfs:comment "Row position on screen.",
        "[ScreenField] Row position on screen." ;
    rdfs:domain sao:ScreenField ;
    rdfs:isDefinedBy sao: ;
    rdfs:range xsd:integer .

sao:rows a rdf:Property ;
    rdfs:label "rows" ;
    rdfs:comment "Number of screen rows.",
        "[ScreenDefinition] Number of screen rows." ;
    rdfs:domain sao:ScreenDefinition ;
    rdfs:isDefinedBy sao: ;
    rdfs:range xsd:integer .

sao:screen_defined_in_container a rdf:Property ;
    rdfs:label "screen_defined_in_container" ;
    rdfs:comment "Container where this screen is defined.",
        "[ScreenDefinition] Container where this screen is defined." ;
    rdfs:domain sao:ScreenDefinition ;
    rdfs:isDefinedBy sao: ;
    rdfs:range sao:CodeContainer .

sao:screen_type a rdf:Property ;
    rdfs:label "screen_type" ;
    rdfs:comment "The type of screen definition.",
        "[ScreenDefinition] The type of screen definition." ;
    rdfs:domain sao:ScreenDefinition ;
    rdfs:isDefinedBy sao: ;
    rdfs:range sao:ScreenType .

sao:ScreenType a rdfs:Datatype ;
    rdfs:label "ScreenType" ;
    rdfs:comment "Types of terminal/screen definitions" ;
    rdfs:isDefinedBy sao: ;
    rdfs:subClassOf rdfs:Literal ;
    export:permissibleValue <https://ontologies.corestory.ai/sao/export/values/ScreenType/bms_map>,
        <https://ontologies.corestory.ai/sao/export/values/ScreenType/character_terminal>,
        <https://ontologies.corestory.ai/sao/export/values/ScreenType/form_based>,
        <https://ontologies.corestory.ai/sao/export/values/ScreenType/rpg_display_file>,
        <https://ontologies.corestory.ai/sao/export/values/ScreenType/tui> .

<https://ontologies.corestory.ai/sao/export/values/ScreenType/bms_map> rdf:value "bms_map" ;
    rdfs:comment "CICS Basic Mapping Support map" .

<https://ontologies.corestory.ai/sao/export/values/ScreenType/character_terminal> rdf:value "character_terminal" ;
    rdfs:comment "Generic character-mode terminal" .

<https://ontologies.corestory.ai/sao/export/values/ScreenType/form_based> rdf:value "form_based" ;
    rdfs:comment "Form-based screen definition" .

<https://ontologies.corestory.ai/sao/export/values/ScreenType/rpg_display_file> rdf:value "rpg_display_file" ;
    rdfs:comment "RPG display file (DSPF)" .

<https://ontologies.corestory.ai/sao/export/values/ScreenType/tui> rdf:value "tui" ;
    rdfs:comment "Text User Interface (ncurses, etc.)" .

