-
Notifications
You must be signed in to change notification settings - Fork 0
/
labels-comments.rdfunit.ttl
48 lines (47 loc) · 1.97 KB
/
labels-comments.rdfunit.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
@prefix dc: <http://purl.org/dc/elements/1.1/> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix rlog: <http://persistence.uni-leipzig.org/nlp2rdf/ontologies/rlog#> .
@prefix rutg: <http://rdfunit.aksw.org/data/generators#> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rut: <http://rdfunit.aksw.org/ns/core#> .
@prefix rutp: <http://rdfunit.aksw.org/data/patterns#> .
@prefix rutt: <http://rdfunit.aksw.org/data/tests#> .
@prefix dcterms: <http://purl.org/dc/terms/> .
@prefix vann: <http://purl.org/vocab/vann/> .
@prefix sh: <http://www.w3.org/ns/shacl#> .
@prefix skos: <http://www.w3.org/2004/02/skos/core#> .
rutt:resources-have-labels-and-comments
a rut:ManualTestCase ;
dcterms:description "All defined resources should have at least one rdfs:label and an rdfs:comment" ;
rut:appliesTo rut:Schema ;
rut:generated rut:ManuallyGenerated ;
rut:references rdfs:label, rdfs:comment ;
rut:source <http://www.w3.org/2000/01/rdf-schema#> ;
rut:sparqlWhere """ {
?ontology a owl:Ontology .
?this rdfs:isDefinedBy ?ontology .
?this rdf:type ?type .
MINUS { ?this rdf:type <http://www.w3.org/2004/02/skos/core#Concept> . }
MINUS { ?this rdf:type <http://www.w3.org/2004/02/skos/core#ConceptScheme> . }
OPTIONAL {
?this rdfs:label ?label .
FILTER(
STRLEN(?label) > 0
)
}
OPTIONAL {
?this rdfs:comment ?comment .
FILTER(
STRLEN(?comment) > 0
)
}
FILTER (
!bound(?label) || !bound(?comment)
)} """ ;
rut:sparqlPrevalence """ SELECT (count(?this) AS ?total) WHERE {
?ontology a owl:Ontology .
?this rdfs:isDefinedBy ?ontology .
?this rdf:type ?type . } """ ;
rut:testCaseLogLevel
rlog:ERROR .