@prefix : <https://ontology.inferal.com/modules/json-values/> .
@prefix dcterms: <http://purl.org/dc/terms/> .
@prefix mod: <https://w3id.org/mod#> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix pubacc: <https://ontology.inferal.com/modules/publication-access/> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix vann: <http://purl.org/vocab/vann/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .

:
    a owl:Ontology, pubacc:PublicationManagedOntology ;
    dcterms:accessRights pubacc:PublicAccess ;
    dcterms:title "JSON Values Ontology" ;
    dcterms:description "Terms for representing actual JSON values as RDF resources, including objects, arrays, strings, numbers, booleans, and null." ;
    dcterms:license <https://creativecommons.org/licenses/by/4.0/> ;
    vann:preferredNamespacePrefix "json" ;
    vann:preferredNamespaceUri "https://ontology.inferal.com/modules/json-values/" ;
    mod:status "draft" ;
    rdfs:comment "This module provides a small RDF/OWL vocabulary for loss-preserving JSON value graphs. It models objects and arrays through explicit member and element nodes, and preserves JSON number lexical forms instead of forcing a numeric datatype interpretation." ;
    owl:versionInfo "0.1.0" .

:Value
    a rdfs:Class ;
    rdfs:label "JSON value" ;
    rdfs:comment "Any JSON value: object, array, string, number, boolean, or null." .

:Object
    a rdfs:Class ;
    rdfs:subClassOf :Value ;
    rdfs:label "JSON object" ;
    rdfs:comment "A JSON object represented as a resource with zero or more first-class member occurrences." .

:Array
    a rdfs:Class ;
    rdfs:subClassOf :Value ;
    rdfs:label "JSON array" ;
    rdfs:comment "A JSON array represented as a resource with zero or more indexed element occurrences." .

:String
    a rdfs:Class ;
    rdfs:subClassOf :Value ;
    rdfs:label "JSON string" ;
    rdfs:comment "A JSON string value represented by exactly one RDF string literal." .

:Number
    a rdfs:Class ;
    rdfs:subClassOf :Value ;
    rdfs:label "JSON number" ;
    rdfs:comment "A JSON number represented by its JSON lexical form. The lexical form is preserved because JSON numbers do not carry an RDF datatype in source JSON." .

:Boolean
    a rdfs:Class ;
    rdfs:subClassOf :Value ;
    rdfs:label "JSON boolean" ;
    rdfs:comment "A JSON boolean value represented by exactly one xsd:boolean literal." .

:Null
    a rdfs:Class ;
    rdfs:subClassOf :Value ;
    rdfs:label "JSON null value kind" ;
    rdfs:comment "The class of the canonical JSON null value. This ontology represents null with the singleton individual json:null." .

:Member
    a rdfs:Class ;
    rdfs:label "JSON object member" ;
    rdfs:comment "A first-class occurrence of a name/value pair in a JSON object. Explicit member nodes allow duplicate names and member order to be represented when source-preserving JSON capture requires them." .

:Element
    a rdfs:Class ;
    rdfs:label "JSON array element" ;
    rdfs:comment "A first-class occurrence of an indexed value in a JSON array." .

:null
    a :Null ;
    rdfs:label "JSON null" ;
    rdfs:comment "The singleton individual used to represent the JSON null value." .

:hasMember
    a rdf:Property ;
    rdfs:label "has JSON member" ;
    rdfs:comment "Connects a JSON object to one of its member occurrences." ;
    rdfs:domain :Object ;
    rdfs:range :Member .

:memberOfObject
    a rdf:Property ;
    rdfs:label "member of JSON object" ;
    rdfs:comment "Connects a JSON object member occurrence to the object that contains it." ;
    rdfs:domain :Member ;
    rdfs:range :Object .

:memberName
    a rdf:Property ;
    rdfs:label "JSON member name" ;
    rdfs:comment "The member name of a JSON object member occurrence." ;
    rdfs:domain :Member ;
    rdfs:range xsd:string .

:memberValue
    a rdf:Property ;
    rdfs:label "JSON member value" ;
    rdfs:comment "The JSON value associated with a JSON object member occurrence." ;
    rdfs:domain :Member ;
    rdfs:range :Value .

:memberIndex
    a rdf:Property ;
    rdfs:label "JSON member index" ;
    rdfs:comment "Optional zero-based source-order index for a JSON object member occurrence. JSON object order is not normally semantic, but this property supports source-preserving captures." ;
    rdfs:domain :Member ;
    rdfs:range xsd:integer .

:hasElement
    a rdf:Property ;
    rdfs:label "has JSON element" ;
    rdfs:comment "Connects a JSON array to one of its element occurrences." ;
    rdfs:domain :Array ;
    rdfs:range :Element .

:elementOfArray
    a rdf:Property ;
    rdfs:label "element of JSON array" ;
    rdfs:comment "Connects a JSON array element occurrence to the array that contains it." ;
    rdfs:domain :Element ;
    rdfs:range :Array .

:elementIndex
    a rdf:Property ;
    rdfs:label "JSON element index" ;
    rdfs:comment "The zero-based index of a JSON array element occurrence." ;
    rdfs:domain :Element ;
    rdfs:range xsd:integer .

:elementValue
    a rdf:Property ;
    rdfs:label "JSON element value" ;
    rdfs:comment "The JSON value associated with a JSON array element occurrence." ;
    rdfs:domain :Element ;
    rdfs:range :Value .

:stringValue
    a rdf:Property ;
    rdfs:label "JSON string value" ;
    rdfs:comment "The Unicode character content of a JSON string." ;
    rdfs:domain :String ;
    rdfs:range xsd:string .

:numberLexicalForm
    a rdf:Property ;
    rdfs:label "JSON number lexical form" ;
    rdfs:comment "The JSON grammar lexical form of a JSON number, preserved as a string." ;
    rdfs:domain :Number ;
    rdfs:range xsd:string .

:booleanValue
    a rdf:Property ;
    rdfs:label "JSON boolean value" ;
    rdfs:comment "The truth value of a JSON boolean." ;
    rdfs:domain :Boolean ;
    rdfs:range xsd:boolean .
