@prefix skos: <http://www.w3.org/2004/02/skos/core#> .
@prefix dcterms: <http://purl.org/dc/terms/> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix mcr: <https://registry.apicrafter.io/vocab#> .
@prefix dt: <https://registry.apicrafter.io/datatype/> .
@prefix cat: <https://registry.apicrafter.io/category/> .
@prefix country: <https://registry.apicrafter.io/country/> .
@prefix tool: <https://registry.apicrafter.io/tool/> .

<https://registry.apicrafter.io/vocab> a owl:Ontology ;
    dcterms:title "Metacrafter Registry vocabulary"@en ;
    dcterms:description "Terms that describe how to recognize values of the registry's datatypes, and the tools that support them. Used in /registry.ttl and /datatype/<id>.ttl."@en ;
    rdfs:seeAlso <https://registry.apicrafter.io/registry.ttl> .

mcr:Tool a owl:Class ;
    rdfs:label "tool"@en ;
    rdfs:comment "Software that detects, masks or catalogs values of registry datatypes. Each tool is described at /tool/<id>."@en ;
    rdfs:isDefinedBy <https://registry.apicrafter.io/vocab> .

mcr:supportedType a owl:ObjectProperty ;
    rdfs:label "supported type"@en ;
    rdfs:comment "A registry datatype or pattern that the tool supports."@en ;
    rdfs:isDefinedBy <https://registry.apicrafter.io/vocab> ;
    rdfs:domain mcr:Tool ;
    rdfs:range skos:Concept .

mcr:status a owl:DatatypeProperty ;
    rdfs:label "status"@en ;
    rdfs:comment "Review status of the record: draft (not reviewed yet), stable (reviewed) or deprecated."@en ;
    rdfs:isDefinedBy <https://registry.apicrafter.io/vocab> ;
    rdfs:domain skos:Concept ;
    rdfs:range xsd:string .

mcr:isPII a owl:DatatypeProperty ;
    rdfs:label "is personal data"@en ;
    rdfs:comment "True when values of this type are personal data (PII)."@en ;
    rdfs:isDefinedBy <https://registry.apicrafter.io/vocab> ;
    rdfs:domain skos:Concept ;
    rdfs:range xsd:boolean .

mcr:classification a owl:DatatypeProperty ;
    rdfs:label "classification"@en ;
    rdfs:comment "identifier when a value identifies an entity, categorical when values come from a closed list of codes or categories."@en ;
    rdfs:isDefinedBy <https://registry.apicrafter.io/vocab> ;
    rdfs:domain skos:Concept ;
    rdfs:range xsd:string .

mcr:regexp a owl:DatatypeProperty ;
    rdfs:label "regular expression"@en ;
    rdfs:comment "Regular expression in Python re syntax that a whole value matches, usually anchored with ^ and $. It is not an XML Schema or XPath pattern."@en ;
    rdfs:isDefinedBy <https://registry.apicrafter.io/vocab> ;
    rdfs:domain skos:Concept ;
    rdfs:range xsd:string .

mcr:checksum a owl:DatatypeProperty ;
    rdfs:label "check-digit algorithm"@en ;
    rdfs:comment "Name of the check-digit algorithm that validates a value, for example luhn or iban_mod97."@en ;
    rdfs:isDefinedBy <https://registry.apicrafter.io/vocab> ;
    rdfs:domain skos:Concept ;
    rdfs:range xsd:string .
