PREFIX owl: <http://www.w3.org/2002/07/owl#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX dqv: <http://www.w3.org/ns/dqv#>
PREFIX linkml: <https://w3id.org/linkml/>
PREFIX daq: <http://purl.org/eis/vocab/daq#>
PREFIX cube: <http://purl.org/linked-data/cube#>
PREFIX vann: <http://purl.org/vocab/vann/>
PREFIX voaf: <http://purl.org/vocommons/voaf#>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX rdfg1: <http://www.w3.org/2004/03/trix/rdfg-1/>
PREFIX duv: <http://www.w3.org/ns/duv#>
PREFIX oa: <http://www.w3.org/ns/oa#>
PREFIX schema: <http://schema.org/>
PREFIX sh: <http://www.w3.org/ns/shacl#>

<http://www.w3.org/ns/dqv> a owl:Ontology ;
  schema:inLanguage "en" ;
  vann:preferredNamespacePrefix "dqv" ;
  vann:preferredNamespaceUri "http://www.w3.org/ns/dqv#"^^xsd:anyURI ;
  sh:declare [
    sh:prefix "dqv" ;
    sh:namespace "http://www.w3.org/ns/dqv#"^^xsd:anyURI
  ] , [
    sh:prefix "linkml" ;
    sh:namespace "https://w3id.org/linkml/"^^xsd:anyURI
  ] , [
    sh:prefix "daq" ;
    sh:namespace "http://purl.org/eis/vocab/daq#"^^xsd:anyURI
  ] , [
    sh:prefix "cube" ;
    sh:namespace "http://purl.org/linked-data/cube#"^^xsd:anyURI
  ] , [
    sh:prefix "vann" ;
    sh:namespace "http://purl.org/vocab/vann/"^^xsd:anyURI
  ] , [
    sh:prefix "voaf" ;
    sh:namespace "http://purl.org/vocommons/voaf#"^^xsd:anyURI
  ] , [
    sh:prefix "xsd" ;
    sh:namespace "http://www.w3.org/2001/XMLSchema#"^^xsd:anyURI
  ] , [
    sh:prefix "skos" ;
    sh:namespace "http://www.w3.org/2004/02/skos/core#"^^xsd:anyURI
  ] , [
    sh:prefix "rdfg1" ;
    sh:namespace "http://www.w3.org/2004/03/trix/rdfg-1/"^^xsd:anyURI
  ] , [
    sh:prefix "duv" ;
    sh:namespace "http://www.w3.org/ns/duv#"^^xsd:anyURI
  ] , [
    sh:prefix "oa" ;
    sh:namespace "http://www.w3.org/ns/oa#"^^xsd:anyURI
  ] .

dqv:UserQualityFeedback a owl:Class ;
  rdfs:label "User Quality feedback"@en ;
  rdfs:comment "Represents feedback that users have on the quality of datasets or distributions. Besides dqv:qualityAssessment, which is the motivation required by all quality annotations, one of the predefined instances of oa:Motivation should be indicated as motivation to distinguish among the different kinds of feedback, e.g., classifications, questions."@en ;
  rdfs:subClassOf dqv:QualityAnnotation , duv:UserFeedback .

dqv:Category a owl:Class ;
  rdfs:label "Category"@en ;
  rdfs:comment "Represents a group of quality dimensions in which a common type of information is used as quality indicator."@en ;
  owl:equivalentClass daq:Category ;
  rdfs:subClassOf skos:Concept .

dqv:QualityPolicy a owl:Class ;
  rdfs:label "Quality Policy"@en ;
  rdfs:comment "Represents a policy or agreement that is chiefly governed by data quality concerns."@en .

dqv:QualityAnnotation a owl:Class ;
  rdfs:label "Quality Annotation"@en ;
  rdfs:comment "Represents quality annotations, including ratings, quality certificates or feedback that can be associated to datasets or distributions. Quality annotations must have one oa:motivatedBy statement with an instance of oa:Motivation (and skos:Concept) that reflects a quality assessment purpose. We define this instance as dqv:qualityAssessment."@en ;
  rdfs:subClassOf oa:Annotation , [
    a owl:Restriction ;
    owl:onProperty oa:motivation ;
    owl:hasValue dqv:qualityAssessment
  ] .

dqv:QualityMetadata a owl:Class ;
  rdfs:label "Quality Metadata"@en ;
  rdfs:comment "Represents quality metadata, it is defined to group quality certificates, policies, measurements and annotations under a named graph."@en ;
  vann:usageNote "QualityMetadata containers do not necessary include all types of quality statements DQV can support. Implementers decide the granularity of containment. In the current version of DQV, we also leave open the choice of the containment technique. Implementers can use (RDF) graph containment. They may also use an appropriate property of their choice — for example (a subproperty of) dcterms:hasPart — to link instances of dqv:QualityMetadata with instances of other DQV classes."@en ;
  rdfs:subClassOf rdfg1:Graph .

dqv:QualityCertificate a owl:Class ;
  rdfs:label "Quality Certificate"@en ;
  rdfs:comment "An annotation that associates a resource (especially, a dataset or a distribution) to another resource (for example, a document) that certifies the resource's quality according to a set of quality assessment rules."@en ;
  rdfs:subClassOf dqv:QualityAnnotation .

dqv:Metric a owl:Class ;
  rdfs:label "Metric"@en ;
  rdfs:comment "Represents a standard to measure a quality dimension. An observation (instance of dqv:QualityMeasurement) assigns a value in a given unit to a Metric."@en ;
  owl:equivalentClass daq:Metric ;
  rdfs:subClassOf [
    a owl:Restriction ;
    owl:onProperty dqv:expectedDataType ;
    owl:allValuesFrom xsd:anySimpleType
  ] .

dqv:QualityMeasurement a owl:Class ;
  rdfs:label "Quality Measurement"@en ;
  rdfs:comment "Represents the evaluation of a given dataset (or dataset distribution) against a specific quality metric."@en ;
  vann:usageNote "The unit of measure in quality measurement should be specified through the property sdmx-attribute:unitMeasure as recommended by RDF Data Cube. The Ontology of units of Measure (OM) by Rijgersberg Et Al provides a list of HTTP dereferenceable unit of measures, which can be exploited as values for sdmx-attribute:unitMeasure."@en ;
  owl:equivalentClass daq:Observation ;
  rdfs:subClassOf cube:Observation , [
    a owl:Restriction ;
    owl:onProperty dqv:computedOn ;
    owl:allValuesFrom owl:Thing
  ] , [
    a owl:Restriction ;
    owl:onProperty dqv:value ;
    owl:allValuesFrom rdfs:Literal
  ] .

dqv:QualityMeasurementDataset a owl:Class ;
  rdfs:label "Quality Measurement Dataset"@en ;
  rdfs:comment "Represents a dataset of quality measurements, evaluations of one or more datasets (or dataset distributions) against specific quality metrics."@en ;
  owl:equivalentClass daq:QualityGraph ;
  rdfs:subClassOf cube:DataSet .

dqv:Dimension a owl:Class ;
  rdfs:label "Dimension"@en ;
  rdfs:comment "Represents criteria relevant for assessing quality. Each quality dimension must have one or more metric to measure it. A dimension is linked with a category using the dqv:inCategory property."@en ;
  owl:equivalentClass daq:Dimension ;
  rdfs:subClassOf skos:Concept , [
    a owl:Restriction ;
    owl:onProperty dqv:inCategory ;
    owl:allValuesFrom dqv:Category
  ] .

cube:DimensionProperty a owl:Class .

duv:UserFeedback a owl:Class .

skos:Concept a owl:Class .

daq:Category a owl:Class .

oa:Motivation a owl:Class .

cube:Observation a owl:Class ;
  rdfs:subClassOf [
    a owl:Restriction ;
    owl:onProperty dqv:isMeasurementOf ;
    owl:allValuesFrom dqv:Metric
  ] .

oa:Annotation a owl:Class .

rdfg1:Graph a owl:Class .

daq:Metric a owl:Class .

daq:Observation a owl:Class .

cube:MeasureProperty a owl:Class .

voaf:Vocabulary a owl:Class .

cube:DataSet a owl:Class .

daq:QualityGraph a owl:Class .

daq:Dimension a owl:Class .

dqv:hasQualityMeasurement a owl:ObjectProperty ;
  rdfs:label "has quality measurement"@en ;
  rdfs:comment "Refers to the performed quality measurements. Quality measurements can be performed to any kind of resource (e.g., a dataset, a linkset, a graph, a set of triples). However, in the DQV context, this property is generally expected to be used in statements in which subjects are instances of dcat:Dataset or dcat:Distribution."@en ;
  rdfs:range dqv:QualityMeasurement .

dqv:computedOn a owl:ObjectProperty ;
  rdfs:label "computed on"@en ;
  rdfs:comment "Refers to the resource (e.g., a dataset, a linkset, a graph, a set of triples) on which the quality measurement is performed. In the DQV context, this property is generally expected to be used in statements in which objects are instances of dcat:Dataset or dcat:Distribution."@en ;
  skos:exactMatch daq:computedOn ;
  owl:inverseOf dqv:hasQualityMeasurement ;
  rdfs:domain dqv:QualityMeasurement .

dqv:inCategory a owl:ObjectProperty ;
  rdfs:label "in category"@en ;
  rdfs:comment "Represents the category a dimension is grouped in."@en ;
  vann:usageNote "Categories are meant to systematically organize dimensions. The Data Quality Vocabulary defines no specific cardinality constraints for dqv:inCategory, since distinct quality frameworks might have different perspectives over a dimension. A dimension may therefore be associated to more than one category. However, those who define new quality metrics should try to avoid this as much as possible and assign only one category to the dimensions they define."@en ;
  rdfs:range dqv:Category ;
  rdfs:domain dqv:Dimension .

dqv:isMeasurementOf a owl:ObjectProperty ;
  rdfs:label "is measurement of"@en ;
  rdfs:comment "Indicates the metric being observed."@en ;
  skos:exactMatch daq:metric ;
  rdfs:range dqv:Metric ;
  rdfs:domain cube:Observation .

dqv:inDimension a owl:ObjectProperty ;
  rdfs:label "in dimension"@en ;
  rdfs:comment "Represents the dimensions a quality metric, certificate and annotation allow a measurement of."@en ;
  vann:usageNote "Dimensions are meant to systematically organize metrics, quality certificates and quality annotations. The Data Quality Vocabulary defines no specific cardinality constraints for dqv:inDimension, since distinct quality frameworks might have different perspectives over a metric. A metric may therefore be associated to more than one dimension. However, those who define new quality metrics should try to avoid this as much as possible and assign only one dimension to the metrics they define. More than one dimension can be indicated for each quality annotation or certificate."@en ;
  rdfs:range dqv:Dimension .

dqv:expectedDataType a owl:DatatypeProperty ;
  rdfs:label "expected data type"@en ;
  rdfs:comment "Represents the expected data type for metric's observed value (e.g. xsd:boolean, xsd:double etc...)"@en ;
  skos:exactMatch daq:expectedDataType ;
  rdfs:range xsd:anySimpleType ;
  rdfs:domain dqv:Metric .

dqv:hasQualityMetadata a owl:ObjectProperty ;
  rdfs:label "has quality metadata"@en ;
  rdfs:comment "Refers to a grouping of quality information such as certificates, policies, measurements and annotations as a named graph. Quality information represented in such a grouping can pertain to any kind of resource (e.g., a dataset, a linkset, a graph, a set of triples). However, in the DQV context, this property is generally expected to be used in statements in which subjects are instances of dcat:Dataset or dcat:Distribution."@en ;
  rdfs:range dqv:QualityMetadata .

dqv:hasQualityAnnotation a owl:ObjectProperty ;
  rdfs:label "has quality annotation"@en ;
  rdfs:comment "Refers to a quality annotation. Quality annotation can be applied to any kind of resource, e.g., a dataset, a linkset, a graph, a set of triples. However, in the DQV context, this property is generally expected to be used in statements in which subjects are instances of dcat:Dataset or dcat:Distribution."@en ;
  rdfs:range dqv:QualityAnnotation .

dqv:value a owl:DatatypeProperty ;
  rdfs:label "value"@en ;
  rdfs:comment "Refers to values computed by metric."@en ;
  skos:exactMatch daq:value ;
  rdfs:domain dqv:QualityMeasurement .

oa:motivation a owl:ObjectProperty .

schema:inLanguage a owl:AnnotationProperty .

vann:preferredNamespacePrefix a owl:AnnotationProperty .

vann:preferredNamespaceUri a owl:AnnotationProperty .

vann:usageNote a owl:AnnotationProperty .

skos:exactMatch a owl:AnnotationProperty .

sh:declare a owl:AnnotationProperty .

sh:prefix a owl:AnnotationProperty .

sh:namespace a owl:AnnotationProperty .

xsd:anySimpleType a rdfs:Datatype .
