@prefix did:  <https://www.w3.org/ns/did#> .
@prefix as:   <https://www.w3.org/ns/activitystreams#> .
@prefix sec:  <https://w3id.org/security#> .
@prefix rdf:  <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix xsd:  <http://www.w3.org/2001/XMLSchema#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix owl:  <http://www.w3.org/2002/07/owl#> .

did: a owl:Ontology ;
    rdfs:comment "For historical reasons, most of the terms are in the 'sec:' namespace rather than the 'did:' namespace. These terms do not describe/define any cryptographic primitives and are formally defined in the DID Core specification. Future Working Group may define a formal specification for the complete 'sec:' vocabulary."
.

#################################################################
#    Classes
#################################################################

did:DIDSubject a rdfs:Class ;
    rdfs:comment "Top level class for resources identified via a DID subject" ;
    rdfs:isDefinedBy <https://www.w3.org/TR/did-core/#core-properties> ;
    rdfs:label "DID Document" ;
.

did:VerificationMethod a rdfs:Class ;
    rdfs:comment "Superclass for all specific verification Methods. It is an 'abstract' class, never used by itself." ;
    rdfs:isDefinedBy <https://www.w3.org/TR/did-core/#verification-methods> ;
    rdfs:label "Verification Method" ;
.

did:Service a rdfs:Class ;
    rdfs:comment "Service endpoints are used in DID documents to express ways of communicating with the DID subject or associated entities" ;
    rdfs:isDefinedBy <https://www.w3.org/TR/did-core/#services> ;
    rdfs:label "Service Endpoint" ;
.


#################################################################
#    Properties
#################################################################

as:alsoKnownAs a rdf:Property ;
    rdfs:isDefinedBy <https://www.w3.org/TR/did-core/#also-known-as> ;
    rdfs:comment "This relationship is a statement that the subject of this identifier is also identified by one or more other identifiers." ;
.

sec:controller a rdf:Property ;
    rdfs:isDefinedBy <https://www.w3.org/TR/did-core/#control> ;
    rdfs:comment "An entity that is authorized to make changes to a DID Document" ;
.

sec:verificationMethod a rdf:Property ;
    rdfs:range did:VerificationMethod ;
    rdfs:comment "A generic method to refer to a Verification Method" ;
    rdfs:isDefinedBy <https://www.w3.org/TR/did-core/#verification-methods> ;
.

sec:authenticationMethod a rdf:Property ;
    rdfs:range did:VerificationMethod ;
    rdfs:comment "Authentication is a verification relationship which an entity can use to prove it is the DID subject or acting on behalf of the DID Subject as a DID Controller." ;
    rdfs:isDefinedBy <https://www.w3.org/TR/did-core/#authentication> ;
.

sec:assertionMethod a rdf:Property ;
    rdfs:range did:VerificationMethod ;
    rdfs:comment "The assertionMethod property is used to express a verification relationship which indicates that a verification method can be used to verify a proof that a statement was asserted on behalf of the DID subject." ;
    rdfs:isDefinedBy <https://www.w3.org/TR/did-core/#assertion> ;
.

sec:keyAgreementMethod a rdf:Property ;
    rdfs:range did:VerificationMethod ;
    rdfs:comment "The keyAgreement property is used to express a verification relationship which an entity can use to engage in key agreement protocols on behalf of the DID subject." ;
    rdfs:isDefinedBy <https://www.w3.org/TR/did-core/#key-agreement> ;
.

sec:capabilityDelegationMethod a rdf:Property ;
    rdfs:range did:VerificationMethod ;
    rdfs:comment "The capabilityDelegation property is used to express a verification relationship which an entity can use to grant capabilities as the DID subject or on behalf of the DID subject to other capability invokers. " ;
    rdfs:isDefinedBy <https://www.w3.org/TR/did-core/#capability-delegation> ;
.

sec:capabilityInvocationMethod a rdf:Property ;
    rdfs:range did:VerificationMethod ;
    rdfs:comment "The capabilityInvocation property is used to express a verification relationship which an entity can use to invoke capabilities as the DID subject or on behalf of the DID subject." ;
    rdfs:isDefinedBy <https://www.w3.org/TR/did-core/#capability-invocation> ;
.

sec:publicKeyJwk a rdf:Property, owl:DatatypeProperty ;
    rdfs:domain did:VerificationMethod ;
    rdfs:range rdf:JSON ;
    rdfs:isDefinedBy <https://www.w3.org/TR/did-core/#verification-methods> ;
    rdfs:label "Public Key in JWK" ;
.

sec:publicKeyMultibase a rdf:Property, owl:DatatypeProperty ;
    rdfs:domain did:VerificationMethod ;
    rdfs:range xsd:string ;
    rdfs:isDefinedBy <https://www.w3.org/TR/did-core/#verification-methods> ;
    rdfs:label "A string that conforms to a multibase encoded public key" ;
.

did:service a rdf:Property ;
    rdfs:domain did:DIDSubject ;
    rdfs:range did:Service ;
    rdfs:isDefinedBy <https://www.w3.org/TR/did-core/#services> ;
.

did:serviceEndpoint a rdf:Property ;
    rdfs:domain did:Service ;
    rdfs:isDefinedBy <https://www.w3.org/TR/did-core/#services> ;
.
