@prefix db:      <https://darrinbaines.org/ns/identity#> .
@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 schema:  <https://schema.org/> .
@prefix dcterms: <http://purl.org/dc/terms/> .
@prefix vann:    <http://purl.org/vocab/vann/> .
@prefix prov:    <http://www.w3.org/ns/prov#> .

<https://darrinbaines.org/ns/identity>
    a owl:Ontology ;
    dcterms:title "Darrin Baines Identity Vocabulary"@en ;
    dcterms:description "Terms for describing a canonical web identity and its authority tier, extending W3C PROV-O for reified verification of that identity by external authorities."@en ;
    dcterms:creator <https://orcid.org/0000-0001-9502-4678> ;
    dcterms:license <https://creativecommons.org/licenses/by/4.0/> ;
    dcterms:modified "2026-07-27"^^xsd:date ;
    vann:preferredNamespacePrefix "db" ;
    vann:preferredNamespaceUri "https://darrinbaines.org/ns/identity#" ;
    rdfs:seeAlso <https://darrinbaines.org/profile#me> , <http://www.w3.org/ns/prov#> .

# ---- Classes ----

db:CanonicalIdentityNode a owl:Class ;
    rdfs:label "Canonical Identity Node"@en ;
    rdfs:comment "A primary, authoritative web presence for an entity, with persistent identifiers and linked data. This is a web resource that is schema:about the entity, NOT the entity itself."@en ;
    rdfs:isDefinedBy <https://darrinbaines.org/ns/identity> .

db:VerificationAssertion a owl:Class ;
    rdfs:label "Verification Assertion"@en ;
    rdfs:comment "A prov:Attribution specialised for identity verification: the record that an authority attests a person's identity, carrying by what method and at what level. The 'who' and 'when' are the standard prov:agent and prov:atTime, not reimplemented here."@en ;
    rdfs:subClassOf prov:Attribution ;
    rdfs:isDefinedBy <https://darrinbaines.org/ns/identity> .

# ---- Datatype properties on a canonical identity node ----
# Creation and modification dates use the standard dcterms:created / dcterms:modified.

# ---- The verification relation and its provenance ----
# The relation itself and its agent/time are standard PROV-O, asserted
# directly in instance data as:
#   <person> prov:wasAttributedTo <registry> ;
#            prov:qualifiedAttribution <person>/id#verification-x .
#   <person>/id#verification-x
#       a db:VerificationAssertion, prov:Attribution ;
#       prov:agent <registry> ;
#       db:verifiedIdentifier <the specific record checked> ;
#       db:verificationMethod "..." ;
# Name the registry once on the registry resource itself, for example
# <https://orcid.org> rdfs:label "ORCID" — do not repeat it as a string
# on every assertion (that was db:verifierAuthority, now retired).

db:verifiedIdentifier a owl:ObjectProperty ;
    rdfs:label "verified identifier"@en ;
    rdfs:comment "The specific identifier record, for example the ORCID iD, that was checked in the verification. No PROV-O equivalent; this is domain-specific to identity verification."@en ;
    rdfs:domain prov:Attribution ;
    rdfs:isDefinedBy <https://darrinbaines.org/ns/identity> .

db:verificationMethod a owl:DatatypeProperty ;
    rdfs:label "verification method"@en ;
    rdfs:comment "How the verification was carried out, for example institutional-registration or library-authority-file. No PROV-O equivalent."@en ;
    rdfs:domain prov:Attribution ; rdfs:range xsd:string ;
    rdfs:isDefinedBy <https://darrinbaines.org/ns/identity> .

# ---- The validation relation (authority over a body of knowledge) ----
# The link from a verified person to knowledge they validate and
# sign off. Distinct from verification of identity above.

db:validates a owl:ObjectProperty ;
    rdfs:label "validates"@en ;
    rdfs:comment "Links a person or authority to a body of knowledge (a defined term set, vocabulary or dataset) whose accuracy that person validates and signs off. The knowledge side records the same relation as dbn:validatedBy pointing back to that person."@en ;
    rdfs:domain schema:Person ;
    rdfs:range schema:CreativeWork ;
    rdfs:isDefinedBy <https://darrinbaines.org/ns/identity> .
