W3C Data on the Web Best Practices - Data Quality Policy

From ODRL Initiative

Example from the W3C Working Group Data on the Web Best Practices (https://www.w3.org/2013/dwbp/), more specifically for the Data Quality Vocabulary (https://www.w3.org/TR/vocab-dqv/). This example specifies that the serviceProvider grants the permission to access the dataset and commits to serve the data with a certain quality, more concretely, 99% availability of a SPARQL endpoint associated with the dataset. This is expressed as a duty on the service provider with a constraint that is defined using a DQV metric (:sparqlEndpointUptime) that has to be greater than a certain value (99). The odrl:assignee is the Party is the recipient of the policy statement and the odrl:assigner is the Party is the issuer of the policy statement.

For discussion about this example see http://lists.w3.org/Archives/Public/public-odrl/2016Feb/0000.html

NB: The latest version of this example can be seen on the latest DQV draft or the latest DQV published version.

 # relevant metric, dimension, and category definitions  
 :accessibility a dqv:Category .
 :availability a dqv:Dimension .
 :sparqlEndpointUptime a dqv:Metric .
 # dataset and distribution
 :myDataset a  dcat:Dataset ;
   dcat:distribution :myDatasetSparqlDistribution ;
 :myDatasetSparqlDistribution a dcat:Distribution .
 # concrete metric values
 :myDatasetSparqlDistribution dqv:hasQualityMeasurement :measurement1 .
 :measurement1 a dqv:QualityMeasurement ;
   dqv:isMeasurementOf :sparqlEndpointUptime ;
   dqv:value "99"^^xsd:double .
 # the parties
 :serviceProvider a odrl:Party.
 # the quality policy itself
 :policy1 a odrl:Offer, dqv:QualityPolicy ;
   odrl:permission [
     a odrl:Permission ;
     odrl:target :myDataset ;
     odrl:action odrl:read ;
     odrl:assigner :serviceProvider;    
     odrl:duty [
       a odrl:Duty;
       odrl:assignee :serviceProvider;
       odrl:target :myDatasetSparqlDistribution ;
       odrl:constraint [
         a odrl:Constraint ;
         prov:wasDerivedFrom :sparqlEndpointUptime;
         odrl:percentage  "99"^^xsd:double ;
         odrl:operator odrl:gteq
       ]     
     ]
  ]

NB: The expression of constraints in ODRL seems quite unfit with expressing general constraints on values in RDF graphs, as we would require here. However, ODRL can be easily extended, and is schedule to undergo refinement in the context of the W3C Permissions & Obligations Expression Working Group. In the future DQV implementers should investigate whether a general constraint expression language like the coming SHACL provides a more appropriate mechanism to be used on top of ODRL permissions and duties.