@prefix : <https://ontology.inferal.com/modules/rdf-delta/> .
@prefix dcterms: <http://purl.org/dc/terms/> .
@prefix mod: <https://w3id.org/mod#> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix prov: <http://www.w3.org/ns/prov#> .
@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 sd: <http://www.w3.org/ns/sparql-service-description#> .
@prefix ss: <https://ontology.inferal.com/modules/scoped-statements/> .
@prefix vann: <http://purl.org/vocab/vann/> .
@prefix voaf: <http://purl.org/vocommons/voaf#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .

:
    a owl:Ontology, pubacc:PublicationManagedOntology ;
    dcterms:accessRights pubacc:PublicAccess ;
    owl:imports
        prov: ,
        sd: ,
        ss: ;
    dcterms:title "RDF Dataset Delta Ontology"@en ;
    dcterms:alternative "RDF Delta Ontology"@en ;
    dcterms:description "A small RDF vocabulary for exact quad additions and removals observed between two identified RDF dataset snapshots, with bidirectional delta membership and a dataset-preserving reference constructor."@en ;
    dcterms:issued "2026-07-21"^^xsd:date ;
    dcterms:modified "2026-07-23"^^xsd:date ;
    dcterms:license <https://creativecommons.org/licenses/by/4.0/> ;
    dcterms:source
        <https://www.w3.org/TR/rdf12-concepts/> ,
        <https://www.w3.org/TR/sparql11-service-description/> ,
        <https://www.w3.org/TR/sparql12-service-description/> ,
        <https://www.w3.org/TR/rdf-canon/> ;
    dcterms:references
        <https://afs.github.io/rdf-patch/> ,
        <https://vocab.org/changeset/> ,
        <https://www.w3.org/TR/sparql11-query/> ,
        <https://www.w3.org/TR/sparql12-query/> ,
        <https://www.w3.org/DesignIssues/Diff> ;
    vann:preferredNamespacePrefix "delta" ;
    vann:preferredNamespaceUri "https://ontology.inferal.com/modules/rdf-delta/" ;
    voaf:reliesOn prov:, sd:, ss: ;
    mod:status "draft" ;
    rdfs:label "RDF Dataset Delta Ontology"@en ;
    rdfs:comment "Represents an unordered structural delta between identified RDF dataset snapshots. It delegates dataset composition to SPARQL Service Description, provenance to PROV-O, and exact quad targeting, including optional RDF 1.2 reifier views of the triple component, to the Scoped Statements Ontology."@en ;
    rdfs:seeAlso
        <https://ontology.inferal.com/modules/artifact-evolution/> ,
        <https://ontology.inferal.com/modules/scoped-statements/spec/> ;
    owl:versionInfo "0.1.0" .

# Delta identity and endpoints

:DatasetDelta
    a rdfs:Class ;
    rdfs:subClassOf prov:Entity ;
    rdfs:label "dataset delta"@en ;
    rdfs:comment "An unordered, possibly empty description of structural additions and removals between one baseline RDF dataset snapshot and one result RDF dataset snapshot."@en ;
    dcterms:description "A dataset delta describes asserted quad membership under an externally declared comparison regime. It is not an ordered patch program, a comparison activity, or evidence that the compared snapshots are semantically equivalent under an entailment regime."@en ;
    rdfs:isDefinedBy : .

:baselineDataset
    a rdf:Property ;
    rdfs:domain :DatasetDelta ;
    rdfs:range sd:Dataset, prov:Entity ;
    rdfs:label "baseline dataset"@en ;
    rdfs:comment "Identifies the immutable RDF dataset snapshot whose fixed asserted quad membership is treated as the starting state of the delta."@en ;
    dcterms:description "Using this property entails that the endpoint is both an sd:Dataset and a prov:Entity. A mutable dataset service is not itself a conforming endpoint unless its IRI denotes one fixed snapshot."@en ;
    rdfs:isDefinedBy : .

:resultDataset
    a rdf:Property ;
    rdfs:domain :DatasetDelta ;
    rdfs:range sd:Dataset, prov:Entity ;
    rdfs:label "result dataset"@en ;
    rdfs:comment "Identifies the immutable RDF dataset snapshot whose fixed asserted quad membership is treated as the resulting state of the delta."@en ;
    dcterms:description "Using this property entails that the endpoint is both an sd:Dataset and a prov:Entity. When asserted quad membership changes, the new state requires a different snapshot IRI."@en ;
    rdfs:isDefinedBy : .

# Primitive changes and exact targets

:Change
    a rdfs:Class ;
    rdfs:subClassOf prov:Entity ;
    rdfs:label "change"@en ;
    rdfs:comment "A first-class description of one exact RDF quad being added to or removed from a dataset delta."@en ;
    dcterms:description "A change is structural and contextual: its addition or removal meaning is relative to every dataset delta that includes it. Describing a change does not assert the targeted RDF statement in the graph that describes the delta."@en ;
    rdfs:isDefinedBy : .

:Addition
    a rdfs:Class ;
    rdfs:subClassOf :Change ;
    rdfs:label "addition"@en ;
    rdfs:comment "A change whose target quad is absent from the baseline snapshot and present in the result snapshot under the applicable comparison regime."@en ;
    rdfs:isDefinedBy : .

:Removal
    a rdfs:Class ;
    rdfs:subClassOf :Change ;
    rdfs:label "removal"@en ;
    rdfs:comment "A change whose target quad is present in the baseline snapshot and absent from the result snapshot under the applicable comparison regime."@en ;
    rdfs:isDefinedBy : .

:changeTarget
    a rdf:Property ;
    rdfs:domain :Change ;
    rdfs:range ss:QuadTarget ;
    rdfs:label "change target"@en ;
    rdfs:comment "Identifies the exact RDF triple or named-graph quad added or removed by a change. The target describes RDF terms without asserting the targeted statement."@en ;
    rdfs:isDefinedBy : .

# Bidirectional membership

:hasChange
    a rdf:Property ;
    rdfs:domain :DatasetDelta ;
    rdfs:range :Change ;
    rdfs:label "has change"@en ;
    rdfs:comment "Connects a dataset delta to an addition or removal included in that delta."@en ;
    rdfs:isDefinedBy : .

:inDelta
    a rdf:Property ;
    rdfs:domain :Change ;
    rdfs:range :DatasetDelta ;
    rdfs:label "in delta"@en ;
    rdfs:comment "Connects an addition or removal to a dataset delta that includes it. It is the inverse direction of has change."@en ;
    rdfs:isDefinedBy : .
