/
exampleLinksetQuality20160530.ttl
369 lines (305 loc) · 16.8 KB
/
exampleLinksetQuality20160530.ttl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix dcterms: <http://purl.org/dc/terms/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix vann: <http://purl.org/vocab/vann/> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix qb: <http://purl.org/linked-data/cube#> .
@prefix daq: <http://purl.org/eis/vocab/daq#> .
@prefix voaf: <http://purl.org/vocommons/voaf#> .
@prefix oa: <http://www.w3.org/ns/oa#> .
@prefix duv: <http://www.w3.org/ns/duv#> .
@prefix skos: <http://www.w3.org/2004/02/skos/core#> .
@prefix dqv: <http://www.w3.org/ns/dqv#> .
@prefix dcat: <http://www.w3.org/ns/dcat#> .
@prefix void: <http://rdfs.org/ns/void#> .
@prefix sdmx-attribute: <http://purl.org/linked-data/sdmx/2009/attribute#> .
@prefix ex: <http://example.org/> .
############################
### Metadata section #######
############################
<http://www.w3.org/ns/dqv> a voaf:Vocabulary;
dcterms:title "Data Quality Vocabulary";
dcterms:description "The Data Quality Vocabulary (DQV) is seen as an extension to DCAT to cover the quality of the data, how frequently is it updated, whether it accepts user corrections, persistence commitments etc. When used by publishers, this vocabulary will foster trust in the data amongst developers."@en;
vann:preferredNamespaceUri "http://www.w3.org/ns/dqv";
vann:preferredNamespacePrefix "dqv";
foaf:homepage <http://www.w3.org/TR/vocab-dqv/> ;
dcterms:created "2015-12-17"^^xsd:date;
dcterms:modified "2015-04-15"^^xsd:date;
dcterms:publisher <http://www.w3.org/data#W3C>;
dcterms:type <http://purl.org/adms/assettype/Ontology>;
dcterms:creator [foaf:name "Antoine Isaac"], [foaf:name "Riccardo Albertoni"] ;
dcterms:contributor [foaf:name "Jeremy Debattista"], [foaf:name "Makx Dekkers"], [foaf:name "Christophe Guéret"], [foaf:name "Deirdre Lee"], [foaf:name "Nandana Mihindukulasooriya"], [foaf:name "Amrapali Zaveri"] .
######################
### Classes here #####
######################
dqv:QualityMeasurement a owl:Class, rdfs:Class ;
rdfs:label "Quality Measurement"@en ;
rdfs:comment "A quality measurement represents the evaluation of a given dataset (or dataset distribution) against a specific quality metric."@en ;
owl:equivalentClass daq:Observation;
rdfs:subClassOf qb:Observation .
dqv:Metric a owl:Class, rdfs:Class;
rdfs:label "Metric"@en ;
rdfs:comment "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 .
dqv:Dimension a owl:Class, rdfs: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:inDimension property."@en ;
rdfs:subClassOf skos:Concept ;
owl:equivalentClass daq:Dimension .
dqv:Category a owl:Class, rdfs: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 ;
rdfs:subClassOf skos:Concept ;
owl:equivalentClass daq:Category .
dqv:QualityMeasurementDataset a owl:Class, rdfs:Class ;
rdfs:label "Quality Measurement Dataset"@en ;
rdfs:comment "Represents a dataset of quality measurements, evaluations of a given dataset (or dataset distribution) against a specific quality metric."@en ;
rdfs:subClassOf qb:DataSet ;
owl:equivalentClass daq:QualityGraph .
dqv:QualityPolicy a owl:Class, rdfs: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:Class ;
rdfs:label "Quality Annotation"@en ;
rdfs:comment "Represents quality annotations, including rating, quality certificate, 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), which reflects a quality assessment purpose. We define this instance as dqv:qualityAssessment."@en ;
rdfs:subClassOf oa:Annotation ;
owl:equivalentClass
[ rdf:type owl:Restriction ;
owl:onProperty oa:motivation ;
owl:hasValue dqv:qualityAssessment
] .
dqv:QualityCertificate a owl:Class, rdfs:Class ;
rdfs:label "Quality certificate"@en ;
rdfs:comment "Represents annotations that associate datasets or distributions to quality certificate."@en ;
rdfs:subClassOf dqv:QualityAnnotation.
dqv:UserQualityFeedback a owl:Class, rdfs:Class ;
rdfs:label "User Quality feedback"@en ;
rdfs:comment "Represents feedback users might want to associate to 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:QualityMetadata a owl:Class, rdfs: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 ;
rdfs:subClassOf <http://www.w3.org/2004/03/trix/rdfg-1/Graph> ;
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 a dedicated property of their choice to link instances of dqv:QualityMetadata with instances of other DQV classes. For example using (a subproperty of) dcterms:hasPart"@en
.
###########################
### Properties here #######
###########################
dqv:isMeasurementOf a rdf:Property, qb:DimensionProperty ;
rdfs:label "is measurement of"@en ;
rdfs:comment "Indicates the metric being observed."@en ;
rdfs:domain qb:Observation ;
rdfs:range dqv:Metric ;
owl:equivalentProperty daq:metric .
# this property is still defined in the qb: namespace, the re-definition is therefore commented for now
# dqv:dataSet a rdf:Property ;
# rdfs:label "data set"@en ;
# rdfs:comment "Indicates the dataset to a quality measure (which is an RDF Data Cube observation) belongs."@en ;
# rdfs:domain qb:Observation ;
# rdfs:range qb:DataSet .
dqv:computedOn a rdf:Property, qb:DimensionProperty ;
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 and dcat:Distribution."@en ;
rdfs:domain dqv:QualityMeasurement ;
rdfs:range rdfs:Resource ;
owl:equivalentProperty daq:computedOn;
owl:inverseOf dqv:hasQualityMeasurement .
dqv:value a rdf:Property, qb:MeasureProperty, owl:DatatypeProperty ;
rdfs:label "value"@en ;
rdfs:comment "Refers to values computed by metric."@en ;
rdfs:domain dqv:QualityMeasurement ;
owl:equivalentProperty daq:value .
dqv:expectedDataType a rdf:Property ;
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 ;
rdfs:domain dqv:Metric ;
rdfs:domain xsd:anySimpleType ;
owl:equivalentProperty daq:expectedDataType .
dqv:inCategory a rdf:Property ;
rdfs:label "in category"@en ;
rdfs:comment "Represents the category a dimension is grouped in."@en ;
rdfs:domain dqv:Dimension ;
rdfs:range dqv:Category ;
owl:inverseOf daq:hasDimension ;
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 .
dqv:inDimension a rdf:Property ;
rdfs:label "in dimension"@en ;
rdfs:comment "Represents the dimension a metric allows a measurement of."@en ;
rdfs:range dqv:Dimension ;
## to add the equivalence to SubObjectPropertyOf( ObjectInverseOf( daq:hasMetric ) dqv:inDimension)
vann:usageNote "Dimensions are meant to systematically organize metrics. The Data Quality Vocabulary define no specific cardinality constraints for dqv:hasDimension, 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 measures should try to avoid this as much as possible and assign only one dimension to the metrics they define."@en .
dqv:hasQualityMeasurement a rdf:Property ;
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 and dcat:Distribution."@en ;
rdfs:range dqv:QualityMeasurement ;
owl:inverseOf dqv:computedOn .
###########################
### Instances here #######
###########################
dqv:qualityAssessment a oa:Motivation ;
skos:prefLabel "Quality assessment"@en ;
skos:definition "Motivation that must be specified for quality annotations"@en ;
skos:closeMatch oa:moderating .
dqv:precision a oa:Motivation ;
skos:prefLabel "Precision"@en ;
skos:definition "Precision is a quality dimension which refers to the recorded level of details. It represents the exactness of measurement or description."@en
.
#########################################################
########################## EXAMPLE #######################
#########################################################
### Dataset and Linkset
ex:myDataset1
a dcat:Dataset ;
dcterms:title "My dataset 1"
.
ex:myDataset2
a dcat:Dataset ;
dcterms:title "My dataset 2"
.
ex:myLinkset
a dcat:Dataset, void:Linkset ;
dcterms:title "A Linkset between My dataset 1 and My dataset 2";
void:linkPredicate skos:exactMatch ;
void:target ex:myDataset1 ;
void:target ex:myDataset2
.
# Definition of instances for Metric, Dimension and Category.
ex:importingForPropertyPercentage
a dqv:Metric ;
skos:definition "Ratio between novel preferred or alternative labels gained via skos:exactMatch links and preferred or alternative labels already in the dataset."@en ;
dqv:expectedDataType xsd:double ;
dqv:inDimension ex:completeness .
ex:completenessGain
a dqv:Dimension ;
skos:prefLabel "Completeness Gain"@en ;
skos:definition "Degree to which a linkset contributes to obtaining all required information in a particular dataset."@en ;
dqv:inCategory ex:complementationGain
.
ex:complementationGain
a dqv:Category ;
skos:definition "Category that groups dimensions measuring the data quality gain obatined by exploiting linksets."@en
.
ex:onLanguage
a qb:DimensionProperty, owl:DataProperty ;
rdfs:comment "language on which label importing is assessed."@en ;
rdfs:domain dqv:QualityMeasurement;
rdfs:range xsd:string ;
rdfs:label "label import assessment language"@en
.
ex:onProperty
a qb:DimensionProperty, rdf:Property ;
rdfs:comment "property on which label importing is assessed."@en ;
rdfs:domain dqv:QualityMeasurement ;
rdfs:label "label import assessment property"@en ;
rdfs:range rdf:Property
.
#####Quality Assessment
ex:qualityMeasurementDataset a dqv:QualityMeasurementDataset ;
qb:structure ex:dsd .
ex:importingForPropertyPercentage
dqv:hasObservation ex:measurement_exactMatchAltLabelItDataset1,
ex:measurement_exactMatchAltLabelItDataset2,
ex:measurement_exactMatchAltLabelEnDataset1,
ex:measurement_exactMatchAltLabelEnDataset2,
ex:measurement_exactMatchPrefLabelItDataset1,
ex:measurement_exactMatchprefLabelItDataset2 .
#Adding quality observations
## for Italian alternative labels
ex:measurement_exactMatchAltLabelItDataset1
a dqv:QualityMeasurement;
dqv:computedOn ex:myLinkset ;
dqv:value "1.0"^^xsd:double ;
dcterms:date "2016-01-10"^^xsd:date ;
dqv:isMeasurementOf ex:importingForPropertyPercentage ;
qb:dataSet ex:qualityMeasurementDataset;
ex:onLanguage "it" ;
ex:onProperty skos:altLabel .
ex:measurement_exactMatchAltLabelItDataset2
a dqv:QualityMeasurement;
dqv:computedOn ex:myLinkset ;
dqv:value "1.0"^^xsd:double ;
dcterms:date "2016-03-10"^^xsd:date ;
dqv:isMeasurementOf ex:importingForPropertyPercentage ;
qb:dataSet ex:qualityMeasurementDataset;
ex:onLanguage "it" ;
ex:onProperty skos:altLabel .
## for English alternative labels
ex:measurement_exactMatchAltLabelEnDataset1
a dqv:QualityMeasurement;
dqv:computedOn ex:myLinkset ;
dqv:value "0.1"^^xsd:double ;
dcterms:date "2016-01-10"^^xsd:date ;
dqv:isMeasurementOf ex:importingForPropertyPercentage ;
qb:dataSet ex:qualityMeasurementDataset;
ex:onLanguage "en" ;
ex:onProperty skos:altLabel .
ex:measurement_exactMatchAltLabelEnDataset2
a dqv:QualityMeasurement;
dqv:computedOn ex:myLinkset ;
dqv:value "1.0"^^xsd:double ;
dcterms:date "2016-03-10"^^xsd:date ;
dqv:isMeasurementOf ex:importingForPropertyPercentage ;
qb:dataSet ex:qualityMeasurementDataset;
ex:onLanguage "en" ;
ex:onProperty skos:altLabel .
## for Italian preferred labels
ex:measurement_exactMatchPrefLabelItDataset1
a dqv:QualityMeasurement;
dqv:computedOn ex:myLinkset ;
dqv:value "0.5"^^xsd:double ;
dcterms:date "2016-01-10"^^xsd:date ;
dqv:isMeasurementOf ex:importingForPropertyPercentage ;
qb:dataSet ex:qualityMeasurementDataset;
ex:onLanguage "it" ;
ex:onProperty skos:prefLabel .
ex:measurement_exactMatchprefLabelItDataset2
a dqv:QualityMeasurement;
dqv:computedOn ex:myLinkset ;
dqv:value "0.5"^^xsd:double ;
dqv:isMeasurementOf ex:importingForPropertyPercentage ;
qb:dataSet ex:qualityMeasurementDataset;
ex:onLanguage "it" ;
dcterms:date "2016-03-10"^^xsd:date ;
ex:onProperty skos:prefLabel .
ex:dsd a qb:DataStructureDefinition ;
##Copying the structure of daq:dsq
##the dimensions
qb:component [ qb:dimension dqv:computedOn ;
qb:order 2
] ;
qb:component [ qb:dimension dcterms:date;
qb:order 3
] ;
qb:component [ qb:dimension dqv:isMeasurementOf ;
qb:order 1
] ;
#The measure
qb:component [ qb:measure dqv:value ; ] ;
# Attribute (here: unit of measurement)
qb:component [
qb:attribute sdmx-attribute:unitMeasure
;
qb:componentRequired false ;
qb:componentAttachment qb:DataSet ; ] ;
##Extending the structure of lds:dsq with two new dimensions
qb:component [ qb:dimension ex:onProperty ;
qb:order 4
] ;
qb:component [ qb:dimension ex:onLanguage ;
qb:order 5
] .
######### Adding dataset #######
ex:qualityMeasurementDataset a qb:DataSet;
rdfs:label "Linkset quality"@en;
rdfs:comment "Example of linkset quality DQV encoding"@en;
qb:structure ex:dsd
.
###########################
#### Using the validator http://computex.herokuapp.com/
### All the properties that are dimensions must have a range --- > so we need to add rage for onProperty onLanguage, and also dqv:value dqv:computedOn
### two observations in the same cube can't have the same value for all dimensions ---> so we need to add the dimension dcterms:date in the data cube structure,
<http://purl.org/dc/terms/date> rdfs:range xsd:date.
#### Perhaps we should add also info about qb:dataSet, if we want to make this example browsable for example by http://km.aifb.kit.edu/projects/ldcx/