-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathdoap.n3.dist
684 lines (629 loc) · 24.2 KB
/
doap.n3.dist
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
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
@prefix xsd: <http://www.w3.org/2001/XMLSchema#>.
@prefix doap: <http://usefulinc.com/ns/doap#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix owconfig: <http://ns.ontowiki.net/SysOnt/ExtensionConfig/> .
@prefix extension: <http://ns.ontowiki.net/Extensions/> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix : <https://github.com/AKSW/cubeviz/raw/master/doap.n3#> .
<> foaf:primaryTopic :cubeviz .
:cubeviz a doap:Project ;
doap:release :v1-0 ;
doap:description "" ;
doap:name "CubeViz" ;
rdfs:label "CubeViz" ;
owconfig:authorLabel "Michael Martin" ;
owconfig:authorLabel "Konrad Abicht" ;
owconfig:enabled "true"^^xsd:boolean ;
owconfig:hasModule :Default ;
owconfig:privateNamespace <https://github.com/AKSW/cubeviz/raw/master/doap.n3#> ;
owconfig:templates "public/templates" ;
owconfig:languages "languages/" ;
owconfig:config :AnalyzeActionConfig ;
:context "production"^^xsd:string ;
# If number of result entries is higher as this number, no TitleHelper will be used
:titleHelperLimit "1000"^^xsd:integer ;
# Limit the number of dimension elements to this number. Affects the number of
# possible observation! The lower the better the performance.
:dimensionElementLimit "100"^^xsd:integer ;
#
# Activate / deactivate certain functionalities
# true = activated
# false = deactivated
#
:useAnalyzeTool "true"^^xsd:boolean ;
:showAnalyzeToolDataSets "true"^^xsd:boolean ;
:useExport "true"^^xsd:boolean ;
#
# Adapt user interface
# true = activated
# false = deactivated
#
# If true, replace model label by data set label
:uiUseDataSetInsteadOfModel "true"^^xsd:boolean .
:Default a owconfig:Module ;
rdfs:label "Default" ;
owconfig:caching "true"^^xsd:boolean ;
owconfig:priority "1" ;
owconfig:context "main.sidewindows" .
:v1-0 a doap:Version ;
doap:revision "1.0" .
#
# Analyze Action - Configuration
#
# This page provides an overview about the DataCube information in a selected
# DataCube. The following stuff gives you the possibility to change / add / remove
# existing queries to the Store and their representation in the frontend.
#
:AnalyzeActionConfig a owconfig:Config; owconfig:id "AnalyzeActionConfig";
#
# Each entry is structured as an entry of an associative array
# Its purpose is to collect general information about a DataCube
#
# icon - Name of the file with extension.
#
# label - Its not to label itself, but a tag which has a translation
# associated language file.
#
# query - The query can ask for everything, in the end, only the number
# of elements (?element) will be used.
#
owconfig:config [ a owconfig:Config; owconfig:id "generalInformation";
#
# Data Structure Definitions
#
owconfig:config [
a owconfig:Config;
owconfig:id "Data Structure Definitions" ;
:icon "" ;
:label "AnalyzeAction_DataStructureDefinitions" ;
:query "SELECT DISTINCT ?element WHERE {
?element <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://purl.org/linked-data/cube#DataStructureDefinition>.
}"
];
#
# Data Sets
#
owconfig:config [
a owconfig:Config;
owconfig:id "Data Sets" ;
:icon "dataset2.png" ;
:label "AnalyzeAction_DataSets" ;
:query "SELECT DISTINCT ?element WHERE {
?element <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://purl.org/linked-data/cube#DataSet>.
}"
];
#
# Dimensions
#
owconfig:config [
a owconfig:Config;
owconfig:id "Dimensions" ;
:icon "dimension.png" ;
:label "AnalyzeAction_Dimensions" ;
:query "SELECT DISTINCT ?element WHERE {
?element <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://purl.org/linked-data/cube#ComponentSpecification>.
?element <http://purl.org/linked-data/cube#dimension> ?comptype.
}"
];
#
# Measures
#
owconfig:config [
a owconfig:Config;
owconfig:id "Measure Properties" ;
:icon "measure2.png" ;
:label "AnalyzeAction_MeasureProperties" ;
:query "SELECT DISTINCT ?element WHERE {
?element <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://purl.org/linked-data/cube#ComponentSpecification>.
?element <http://purl.org/linked-data/cube#measure> ?comptype.
}"
];
#
# Attributes
#
owconfig:config [
a owconfig:Config;
owconfig:id "Attribute Properties" ;
:icon "attribute2.png" ;
:label "AnalyzeAction_AttributeProperties" ;
:query "SELECT DISTINCT ?element WHERE {
?element <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://purl.org/linked-data/cube#ComponentSpecification>.
?element <http://purl.org/linked-data/cube#attribute> ?comptype.
}"
];
#
# Observations
#
owconfig:config [
a owconfig:Config;
owconfig:id "Observations" ;
:icon "observation.png" ;
:label "AnalyzeAction_Observations" ;
:query "PREFIX qb:<http://purl.org/linked-data/cube#>
SELECT DISTINCT ?element
WHERE {
?element a qb:Observation .
?element qb:dataSet ?dataset .
?element ?dimension ?dimelement .
?element ?measure ?value .
?dataset a qb:DataSet .
?dataset qb:structure ?datastructuredefintion .
?dimensionspecification a qb:ComponentSpecification .
?dimensionpecification qb:dimension ?dimension .
?measurespecification a qb:ComponentSpecification .
?measurespecification qb:measure ?measure .
}"
];
#
# Slices
#
owconfig:config [
a owconfig:Config;
owconfig:id "Slices" ;
:icon "observation.png" ;
:label "AnalyzeAction_Slices" ;
:query "SELECT DISTINCT ?element
WHERE {{
?element <http://purl.org/linked-data/cube#sliceStructure> ?sliceKey .
} UNION {
?dataSet <http://purl.org/linked-data/cube#Slice> ?element .
}}"
]
];
#
# http://www.w3.org/TR/vocab-data-cube/#wf
#
# There are 21 checks for a valid DataCube. All of them are listed below.
# Each entry-description is plain copied from http://www.w3.org/TR/vocab-data-cube/#wf-rules!
#
# label - Tag for the label, used for translation
# descrption - Tag for the description, used for translation
#
owconfig:config [ a owconfig:Config; owconfig:id "integrityConstraints";
#
# Unique DataSet
#
owconfig:config [
a owconfig:Config;
owconfig:id "Unique DataSet" ;
:shortLabel "IC-1" ;
:label "AnalyzeAction_UniqueDataSet" ;
:description "AnalyzeAction_UniqueDataSetDescription" ;
:query "PREFIX qb:<http://purl.org/linked-data/cube#>
ASK {{
?obs a qb:Observation .
FILTER NOT EXISTS { ?obs qb:dataSet ?dataset1 . }
} UNION {
?obs a qb:Observation ;
qb:dataSet ?dataset1, ?dataset2 .
FILTER (?dataset1 != ?dataset2)
}}"
];
#
# Unique DSD
#
owconfig:config [
a owconfig:Config;
owconfig:id "Unique DSD" ;
:shortLabel "IC-2" ;
:label "AnalyzeAction_UniqueDSD" ;
:description "AnalyzeAction_UniqueDSDDescription" ;
:query "PREFIX qb:<http://purl.org/linked-data/cube#>
ASK {{
?dataset a qb:DataSet .
FILTER NOT EXISTS { ?dataset qb:structure ?dsd . }
} UNION {
?dataset a qb:DataSet ;
qb:structure ?dsd1, ?dsd2 .
FILTER (?dsd1 != ?dsd2)
}}"
];
#
# DSD includes measure
#
owconfig:config [
a owconfig:Config;
owconfig:id "DSD includes measure" ;
:shortLabel "IC-3" ;
:label "AnalyzeAction_DSDIncludesMeasure" ;
:description "AnalyzeAction_DSDIncludesMeasureDescription" ;
:query "PREFIX qb:<http://purl.org/linked-data/cube#>
ASK {
?dsd a qb:DataStructureDefinition .
FILTER NOT EXISTS {
?dsd qb:component [qb:componentProperty [a qb:MeasureProperty]]
}
}"
];
#
# Dimensions have range
#
owconfig:config [
a owconfig:Config;
owconfig:id "Dimensions have range" ;
:shortLabel "IC-4" ;
:label "AnalyzeAction_DimensionsHaveRange" ;
:description "AnalyzeAction_DimensionsHaveRangeDescription" ;
:query "PREFIX qb:<http://purl.org/linked-data/cube#>
ASK {
?dim a qb:DimensionProperty .
FILTER NOT EXISTS {
?dim rdfs:range []
}
}"
];
#
# Concept dimensions have code lists
#
owconfig:config [
a owconfig:Config;
owconfig:id "Concept dimensions have code lists" ;
:shortLabel "IC-5" ;
:label "AnalyzeAction_ConceptDimensionsHaveCodeLists" ;
:description "AnalyzeAction_ConceptDimensionsHaveCodeListsDescription" ;
:query "PREFIX qb:<http://purl.org/linked-data/cube#>
ASK {
?dsd qb:component ?componentSpec .
?componentSpec qb:componentRequired \"false\"^^xsd:boolean ;
qb:componentProperty ?component .
FILTER NOT EXISTS {
?component a qb:AttributeProperty
}
}"
];
#
# Only attributes may be optional
#
owconfig:config [
a owconfig:Config;
owconfig:id "Only attributes may be optional" ;
:shortLabel "IC-6" ;
:label "AnalyzeAction_OnlyAttributesMayBeOptional" ;
:description "AnalyzeAction_OnlyAttributesMayBeOptionalDescription" ;
:query "PREFIX qb:<http://purl.org/linked-data/cube#>
ASK {
?dsd qb:component ?componentSpec .
?componentSpec qb:componentRequired \"false\"^^xsd:boolean ;
qb:componentProperty ?component .
FILTER NOT EXISTS {
?component a qb:AttributeProperty
}
}"
];
#
# Slice Keys must be declared
#
owconfig:config [
a owconfig:Config;
owconfig:id "Slice Keys must be declared" ;
:shortLabel "IC-7" ;
:label "AnalyzeAction_SliceKeysMustBeDeclared" ;
:description "AnalyzeAction_SliceKeysMustBeDeclaredDescription" ;
:query "PREFIX qb:<http://purl.org/linked-data/cube#>
ASK {
?sliceKey a qb:SliceKey .
FILTER NOT EXISTS {
[a qb:DataStructureDefinition] qb:sliceKey ?sliceKey
}
}"
];
#
# Slice Keys consistent with DSD
#
owconfig:config [
a owconfig:Config;
owconfig:id "Slice Keys consistent with DSD" ;
:shortLabel "IC-8" ;
:label "AnalyzeAction_SliceKeysConsistentWithDSD" ;
:description "AnalyzeAction_SliceKeysConsistentWithDSDDescription" ;
:query "PREFIX qb:<http://purl.org/linked-data/cube#>
ASK {
?slicekey a qb:SliceKey;
qb:componentProperty ?prop .
?dsd qb:sliceKey ?sliceKey .
FILTER NOT EXISTS {
?dsd qb:component [qb:componentProperty ?prop]
}
}"
];
#
# Unique slice structure
#
owconfig:config [
a owconfig:Config;
owconfig:id "Unique slice structure" ;
:shortLabel "IC-9" ;
:label "AnalyzeAction_UniqueSliceStructure" ;
:description "AnalyzeAction_UniqueSliceStructureDescription" ;
:query "PREFIX qb:<http://purl.org/linked-data/cube#>
ASK {{
?slice a qb:Slice .
FILTER NOT EXISTS {
?slice qb:sliceStructure ?key
}
} UNION {
?slice a qb:Slice ;
qb:sliceStructure ?key1;
qb:sliceStructure ?key2.
FILTER (?key1 != ?key2)
}}"
];
#
# Slice dimensions complete
#
owconfig:config [
a owconfig:Config;
owconfig:id "Slice dimensions complete" ;
:shortLabel "IC-10" ;
:label "AnalyzeAction_SliceDimensionsComplete" ;
:description "AnalyzeAction_SliceDimensionsCompleteDescription" ;
:query "PREFIX qb:<http://purl.org/linked-data/cube#>
ASK {
?slice qb:sliceStructure [qb:componentProperty ?dim] .
FILTER NOT EXISTS {
?slice ?dim []
}
}"
];
#
# All dimensions required
#
owconfig:config [
a owconfig:Config;
owconfig:id "All dimensions required" ;
:shortLabel "IC-11" ;
:label "AnalyzeAction_AllDimensionsRequired" ;
:description "AnalyzeAction_AllDimensionsRequiredDescription" ;
:query "PREFIX qb:<http://purl.org/linked-data/cube#>
ASK {
?obs qb:dataSet ?dim .
?obs qb:structure ?dsd .
?dsd qb:component ?c .
?c qb:componentProperty ?dim .
?dim a qb:DimensionProperty .
FILTER NOT EXISTS {
?obs ?dim []
}
}"
];
#
# No duplicate observations
#
# SPARQL not working!
#
# Required attributes
#
owconfig:config [
a owconfig:Config;
owconfig:id "Required attributes" ;
:shortLabel "IC-13" ;
:label "AnalyzeAction_RequiredAttributes" ;
:description "AnalyzeAction_RequiredAttributesDescription" ;
:query "PREFIX qb:<http://purl.org/linked-data/cube#>
ASK {
?obs qb:dataSet ?ds .
?ds qb:structure ?dsd .
?dsd qb:component ?component .
?component qb:componentRequired \"true\"^^xsd:boolean ;
qb:componentProperty ?attr .
FILTER NOT EXISTS {
?obs ?attr []
}
}"
];
#
# All measures present
#
owconfig:config [
a owconfig:Config;
owconfig:id "All measures present" ;
:shortLabel "IC-14" ;
:label "AnalyzeAction_AllMeasuresPresent" ;
:description "AnalyzeAction_AllMeasuresPresentDescription" ;
:query "PREFIX qb:<http://purl.org/linked-data/cube#>
ASK {
?obs qb:dataSet ?ds .
?ds qb:structure ?dsd .
FILTER NOT EXISTS {
?dsd qb:component ?c .
?c qb:componentProperty qb:measureType .
}
?dsd qb:component ?c .
?c qb:componentProperty ?measure .
?measure a qb:MeasureProperty .
FILTER NOT EXISTS {
?obs ?measure []
}
}"
];
#
# Measure dimension consistent
#
owconfig:config [
a owconfig:Config;
owconfig:id "Measure dimension consistent" ;
:shortLabel "IC-15" ;
:label "AnalyzeAction_MeasureDimensionConsistent" ;
:description "AnalyzeAction_MeasureDimensionConsistentDescription" ;
:query "PREFIX qb:<http://purl.org/linked-data/cube#>
ASK {
?obs qb:dataSet ?ds .
?ds qb:structure ?dsd ;
qb:measureType ?measure .
?dsd qb:component ?c .
?c qb:componentProperty qb:measureType .
FILTER NOT EXISTS {
?obs ?measure []
}
}"
];
#
# Single measure on measure dimension observation
#
owconfig:config [
a owconfig:Config;
owconfig:id "Single measure on measure dimension observation" ;
:shortLabel "IC-16" ;
:label "AnalyzeAction_SingleMeasureOnMeasureDimensionObservation" ;
:description "AnalyzeAction_SingleMeasureOnMeasureDimensionObservationDescription" ;
:query "PREFIX qb:<http://purl.org/linked-data/cube#>
ASK {
?obs qb:dataSet ?ds .
?ds qb:structure ?dsd ;
qb:measureType ?measure ;
?omeasure [] .
?dsd qb:component ?c .
?c qb:componentProperty qb:measureType ;
qb:component ?c;
qb:componentProperty ?omeasure .
?omeasure a qb:MeasureProperty .
FILTER (
?omeasure != ?measure
)
}"
];
#
# All measures present in measures dimension cube
#
# SPARQL not working!
#
# Consistent data set links
#
owconfig:config [
a owconfig:Config;
owconfig:id "Consistent data set links" ;
:shortLabel "IC-18" ;
:label "AnalyzeAction_ConsistentDataSetLinks" ;
:description "AnalyzeAction_ConsistentDataSetLinksDescription" ;
:query "PREFIX qb:<http://purl.org/linked-data/cube#>
ASK {
?dataset qb:slice ?slice .
?slice qb:observation ?obs .
FILTER NOT EXISTS {
?obs qb:dataSet ?dataset .
}
}"
];
#
# Codes from code list 1
#
owconfig:config [
a owconfig:Config;
owconfig:id "Codes from code list 1" ;
:shortLabel "IC-19" ;
:label "AnalyzeAction_CodesFromCodeList1" ;
:description "AnalyzeAction_CodesFromCodeList1Description" ;
:query "PREFIX qb:<http://purl.org/linked-data/cube#>
ASK {
?obs qb:dataSet ?ds .
?ds qb:structure ?dsd .
?dsd qb:component ?c .
?c qb:componentProperty ?dim .
?dim a qb:DimensionProperty ;
qb:codeList ?list .
?list a skos:ConceptScheme .
?obs ?dim ?v .
FILTER NOT EXISTS {
?v a skos:Concept ;
skos:inScheme ?list
}
}"
];
#
# Codes from code list 2
#
# TODO: skos:member ===> skos:member+
owconfig:config [
a owconfig:Config;
owconfig:id "Codes from code list 2" ;
:shortLabel "IC-19-2" ;
:label "AnalyzeAction_CodesFromCodeList2" ;
:description "AnalyzeAction_CodesFromCodeList2Description" ;
:query "PREFIX qb:<http://purl.org/linked-data/cube#>
ASK {
?obs qb:dataSet ?ds .
?ds qb:structure ?dsd .
?dsd qb:component ?c .
?c qb:componentProperty ?dim .
?dim a qb:DimensionProperty ;
qb:codeList ?list .
?list a skos:Collection .
?obs ?dim ?v .
FILTER NOT EXISTS {
?v a skos:Concept .
?list skos:member ?v
}
}"
];
#
# Codes from hierarchy
#
owconfig:config [
a owconfig:Config;
owconfig:id "Codes from hierarchy" ;
:shortLabel "IC-20" ;
:label "AnalyzeAction_CodesFromHierarchy" ;
:description "AnalyzeAction_CodesFromHierarchyDescription" ;
:query "PREFIX qb:<http://purl.org/linked-data/cube#>
SELECT ?p
WHERE {
?hierarchy a qb:HierarchicalCodeList ;
qb:parentChildProperty ?p .
FILTER (
isIRI(?p)
)
}";
:template "PREFIX qb:<http://purl.org/linked-data/cube#>
ASK {
?obs qb:dataSet ?ds .
?ds qb:structure ?dsd .
?dsd qb:component ?c .
?c qb:componentProperty ?dim .
?dim a qb:DimensionProperty ;
qb:codeList ?list .
?list a qb:HierarchicalCodeList .
?obs ?dim ?v .
FILTER NOT EXISTS {
?list qb:hierarchyRoot ?hr .
?hr $element ?v
}
}"
];
#
# Codes from hierarchy (inverse)
#
# TODO: $element ===> FILTER NOT EXISTS { ?list qb:hierarchyRoot/(^<$p>)* ?v }
owconfig:config [
a owconfig:Config;
owconfig:id "Codes from hierarchy (inverse)" ;
:shortLabel "IC-21" ;
:label "AnalyzeAction_CodesFromHierarchyInverse" ;
:description "AnalyzeAction_CodesFromHierarchyInverseDescription" ;
:query "PREFIX qb:<http://purl.org/linked-data/cube#>
SELECT ?p
WHERE {
?hierarchy a qb:HierarchicalCodeList;
qb:parentChildProperty ?pcp .
FILTER(
isBlank(?pcp)
)
?pcp owl:inverseOf ?p .
FILTER( isIRI(?p) )
}";
:template "PREFIX qb:<http://purl.org/linked-data/cube#>
ASK {
?obs qb:dataSet ?ds .
?ds qb:structure ?dsd .
?dsd qb:component ?c .
?c qb:componentProperty ?dim .
?dim a qb:DimensionProperty ;
qb:codeList ?list .
?list a qb:HierarchicalCodeList .
?obs ?dim ?v .
FILTER NOT EXISTS {
?list qb:hierarchyRoot ?hr .
?hr $element ?v
}
}"
]
] .