@prefix cve: <http://www.motherhacker.me/kgcs/ontology/cve#> .
@prefix kgcs: <http://www.motherhacker.me/kgcs/ontology/core#> .

@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#> .

#################################################################
# Ontology Declaration
#################################################################

cve:CVEOntology a owl:Ontology ;
    rdfs:label "KGCS CVE Ontology v1.0" ;
    rdfs:comment "CVE/NVD vulnerability identifiers, metadata, and compatibility predicates for graph-facing systems views." ;
    owl:imports <http://www.motherhacker.me/kgcs/ontology/core#> .

#################################################################
# Object Properties
#################################################################

cve:affects a owl:ObjectProperty ;
    rdfs:domain kgcs:Vulnerability ;
    rdfs:range kgcs:PlatformConfiguration ;
    rdfs:label "affects" ;
    rdfs:comment "Compatibility predicate (Vulnerability -> PlatformConfiguration), inverse of Core affected_by." ;
    owl:inverseOf kgcs:affected_by .

cve:references a owl:ObjectProperty ;
    rdfs:domain kgcs:Vulnerability ;
    rdfs:range kgcs:Reference ;
    rdfs:label "references" ;
    rdfs:comment "Compatibility predicate aligned with REFERENCES graph edge and Core references semantics." ;
    rdfs:subPropertyOf kgcs:references ;
    owl:inverseOf cve:referencedBy .

cve:referencedBy a owl:ObjectProperty ;
    rdfs:domain kgcs:Reference ;
    rdfs:range kgcs:Vulnerability ;
    rdfs:label "referenced by" ;
    rdfs:comment "Inverse of cve:references for systems-agent compatibility mapping." ;
    owl:inverseOf cve:references .

#################################################################
# Datatype Properties
#################################################################

cve:cveId a owl:DatatypeProperty ;
    rdfs:domain kgcs:Vulnerability ;
    rdfs:range xsd:string ;
    rdfs:label "cve id" ;
    rdfs:comment "Canonical CVE identifier from NVD/MITRE CVE records." .

cve:published a owl:DatatypeProperty ;
    rdfs:domain kgcs:Vulnerability ;
    rdfs:range xsd:dateTime ;
    rdfs:label "published" ;
    rdfs:comment "Publication timestamp from authoritative CVE metadata." .

cve:lastModified a owl:DatatypeProperty ;
    rdfs:domain kgcs:Vulnerability ;
    rdfs:range xsd:dateTime ;
    rdfs:label "last modified" ;
    rdfs:comment "Last modification timestamp from authoritative CVE metadata." .

cve:source a owl:DatatypeProperty ;
    rdfs:domain kgcs:Vulnerability ;
    rdfs:range xsd:string ;
    rdfs:label "source" ;
    rdfs:comment "Authoritative source system for vulnerability data (e.g., NVD)." .
