aboutsummaryrefslogtreecommitdiffstats
path: root/test/validate
diff options
context:
space:
mode:
Diffstat (limited to 'test/validate')
-rw-r--r--test/validate/bad-all-values-from.ttl14
-rw-r--r--test/validate/bad-anyuri.ttl13
-rw-r--r--test/validate/bad-cardinality-high.ttl1
-rw-r--r--test/validate/bad-cardinality-low.ttl1
-rw-r--r--test/validate/bad-cardinality.ttl1
-rw-r--r--test/validate/bad-class-type-undefined.ttl5
-rw-r--r--test/validate/bad-class-type.ttl9
-rw-r--r--test/validate/bad-datatype-property.ttl11
-rw-r--r--test/validate/bad-deprecated-class.ttl12
-rw-r--r--test/validate/bad-deprecated-property.ttl13
-rw-r--r--test/validate/bad-domain.ttl18
-rw-r--r--test/validate/bad-literal-pattern.ttl19
-rw-r--r--test/validate/bad-literal-value-high-exclusive.ttl2
-rw-r--r--test/validate/bad-literal-value-high-inclusive.ttl2
-rw-r--r--test/validate/bad-literal-value-low-exclusive.ttl2
-rw-r--r--test/validate/bad-literal-value-low-inclusive.ttl2
-rw-r--r--test/validate/bad-literal-value.ttl7
-rw-r--r--test/validate/bad-object-property.ttl6
-rw-r--r--test/validate/bad-pattern.ttl12
-rw-r--r--test/validate/bad-plain-literal.ttl2
-rw-r--r--test/validate/bad-predicate-type-undefined.ttl (renamed from test/validate/bad-unknown-property.ttl)1
-rw-r--r--test/validate/bad-predicate-type.ttl9
-rw-r--r--test/validate/bad-range-instance-not-literal.ttl3
-rw-r--r--test/validate/bad-range-instance.ttl6
-rw-r--r--test/validate/bad-range-literal-not-instance.ttl3
-rw-r--r--test/validate/bad-range-literal.ttl12
-rw-r--r--test/validate/bad-some-values-from.ttl1
-rw-r--r--test/validate/bad-string-literal-value-high.ttl2
-rw-r--r--test/validate/bad-string-literal-value-low.ttl2
-rw-r--r--test/validate/bad-subclass-cycle.ttl13
-rw-r--r--test/validate/bad-subproperty-cycle.ttl14
-rw-r--r--test/validate/bad-superclass-restriction.ttl22
-rw-r--r--test/validate/good-anyuri.ttl13
-rw-r--r--test/validate/good-cardinality.ttl1
-rw-r--r--test/validate/good-literal-value-high-inclusive.ttl2
-rw-r--r--test/validate/good-literal-value-low-inclusive.ttl2
-rw-r--r--test/validate/good-owl-thing.ttl16
-rw-r--r--test/validate/good-pattern.ttl2
-rw-r--r--test/validate/good-rdfs-resource.ttl12
-rw-r--r--test/validate/good-some-values-from.ttl1
-rw-r--r--test/validate/good-string-literal-value-low.ttl2
-rw-r--r--test/validate/manifest.ttl226
42 files changed, 429 insertions, 88 deletions
diff --git a/test/validate/bad-all-values-from.ttl b/test/validate/bad-all-values-from.ttl
index e8243423..4d82bf3d 100644
--- a/test/validate/bad-all-values-from.ttl
+++ b/test/validate/bad-all-values-from.ttl
@@ -2,17 +2,23 @@
@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#> .
+
+eg:index
+ a rdf:Property ;
+ rdfs:label "index" .
eg:Thing
a rdfs:Class ;
+ rdfs:label "Thing" ;
rdfs:subClassOf [
a owl:Restriction ;
- owl:onProperty rdfs:label ;
- owl:allValuesFrom rdf:PlainLiteral
+ owl:onProperty eg:index ;
+ owl:allValuesFrom xsd:nonNegativeInteger
] .
eg:s
a eg:Thing ;
- rdfs:label "plain" ,
- "not plain"^^rdf:XMLLiteral .
+ eg:index 1.2 ,
+ 3 .
diff --git a/test/validate/bad-anyuri.ttl b/test/validate/bad-anyuri.ttl
new file mode 100644
index 00000000..ae5e88f0
--- /dev/null
+++ b/test/validate/bad-anyuri.ttl
@@ -0,0 +1,13 @@
+@prefix eg: <http://example.org/> .
+@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#> .
+
+eg:uri
+ a rdf:Property ;
+ rdfs:label "uri" ;
+ rdfs:range xsd:anyURI .
+
+eg:s
+ eg:uri _:blank .
+
diff --git a/test/validate/bad-cardinality-high.ttl b/test/validate/bad-cardinality-high.ttl
index 7e1605c3..2ff8ede3 100644
--- a/test/validate/bad-cardinality-high.ttl
+++ b/test/validate/bad-cardinality-high.ttl
@@ -5,6 +5,7 @@
eg:Thing
a rdfs:Class ;
+ rdfs:label "Thing" ;
rdfs:subClassOf [
a owl:Restriction ;
owl:onProperty rdf:value ;
diff --git a/test/validate/bad-cardinality-low.ttl b/test/validate/bad-cardinality-low.ttl
index 93dd0051..60bfc9f8 100644
--- a/test/validate/bad-cardinality-low.ttl
+++ b/test/validate/bad-cardinality-low.ttl
@@ -5,6 +5,7 @@
eg:Thing
a rdfs:Class ;
+ rdfs:label "Thing" ;
rdfs:subClassOf [
a owl:Restriction ;
owl:onProperty rdf:value ;
diff --git a/test/validate/bad-cardinality.ttl b/test/validate/bad-cardinality.ttl
index 481fe456..5300e566 100644
--- a/test/validate/bad-cardinality.ttl
+++ b/test/validate/bad-cardinality.ttl
@@ -5,6 +5,7 @@
eg:Thing
a rdfs:Class ;
+ rdfs:label "Thing" ;
rdfs:subClassOf [
a owl:Restriction ;
owl:onProperty rdf:value ;
diff --git a/test/validate/bad-class-type-undefined.ttl b/test/validate/bad-class-type-undefined.ttl
new file mode 100644
index 00000000..1e3c5eba
--- /dev/null
+++ b/test/validate/bad-class-type-undefined.ttl
@@ -0,0 +1,5 @@
+@prefix eg: <http://example.org/> .
+
+eg:s
+ a eg:Undefined .
+
diff --git a/test/validate/bad-class-type.ttl b/test/validate/bad-class-type.ttl
new file mode 100644
index 00000000..a0ddf454
--- /dev/null
+++ b/test/validate/bad-class-type.ttl
@@ -0,0 +1,9 @@
+@prefix eg: <http://example.org/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+
+eg:nonClass
+ a rdf:Bag .
+
+eg:s
+ a eg:nonClass .
+
diff --git a/test/validate/bad-datatype-property.ttl b/test/validate/bad-datatype-property.ttl
index a3e993f3..3c2f7a9f 100644
--- a/test/validate/bad-datatype-property.ttl
+++ b/test/validate/bad-datatype-property.ttl
@@ -3,16 +3,17 @@
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
-eg:value
- rdfs:label "value" ;
- a owl:DatatypeProperty .
+eg:name
+ a owl:DatatypeProperty ;
+ rdfs:label "name" .
eg:Thing
- a rdfs:Class .
+ a rdfs:Class ;
+ rdfs:label "Thing" .
eg:s1
a eg:Thing .
eg:s2
- eg:value eg:s1 .
+ eg:name eg:s1 .
diff --git a/test/validate/bad-deprecated-class.ttl b/test/validate/bad-deprecated-class.ttl
new file mode 100644
index 00000000..51d76d8f
--- /dev/null
+++ b/test/validate/bad-deprecated-class.ttl
@@ -0,0 +1,12 @@
+@prefix eg: <http://example.org/> .
+@prefix owl: <http://www.w3.org/2002/07/owl#> .
+@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
+
+eg:Square
+ a rdfs:Class ;
+ owl:deprecated true ;
+ rdfs:label "Square" .
+
+eg:square
+ a eg:Square .
+
diff --git a/test/validate/bad-deprecated-property.ttl b/test/validate/bad-deprecated-property.ttl
new file mode 100644
index 00000000..b2bd392c
--- /dev/null
+++ b/test/validate/bad-deprecated-property.ttl
@@ -0,0 +1,13 @@
+@prefix eg: <http://example.org/> .
+@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#> .
+
+eg:stuff
+ a rdf:Property ;
+ owl:deprecated true ;
+ rdfs:label "stuff" .
+
+eg:s
+ eg:stuff eg:o .
+
diff --git a/test/validate/bad-domain.ttl b/test/validate/bad-domain.ttl
index d36b5652..52c1849c 100644
--- a/test/validate/bad-domain.ttl
+++ b/test/validate/bad-domain.ttl
@@ -1,19 +1,27 @@
@prefix eg: <http://example.org/> .
+@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#> .
eg:Thing
- a rdfs:Class .
+ a rdfs:Class ;
+ rdfs:subClassOf [
+ a owl:Restriction ;
+ owl:onProperty rdf:value ;
+ owl:cardinality 1
+ ] ;
+ rdfs:label "Thing" .
eg:NonThing
- a rdfs:Class .
+ a rdfs:Class ;
+ rdfs:label "NonThing" .
-eg:value
+eg:thingName
a rdf:Property ;
- rdfs:label "value" ;
+ rdfs:label "thing name" ;
rdfs:domain eg:Thing .
eg:nonthing
a eg:NonThing ;
- eg:value 42 .
+ eg:thingName "nonthing" .
diff --git a/test/validate/bad-literal-pattern.ttl b/test/validate/bad-literal-pattern.ttl
index 40f9eec0..fda954ed 100644
--- a/test/validate/bad-literal-pattern.ttl
+++ b/test/validate/bad-literal-pattern.ttl
@@ -1,7 +1,22 @@
@prefix eg: <http://example.org/> .
+@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#> .
-eg:s
- rdf:value "no"^^xsd:boolean .
+eg:CapitalLiteral
+ a rdfs:Datatype ;
+ rdfs:label "Capital Literal" ;
+ owl:withRestrictions (
+ [
+ xsd:pattern "[A-Z][a-z]*"
+ ]
+ ) .
+
+eg:value
+ a rdf:Property ;
+ rdfs:label "value" ;
+ rdfs:range eg:CapitalLiteral .
+eg:s
+ eg:value "lowercase"^^eg:CapitalLiteral .
diff --git a/test/validate/bad-literal-value-high-exclusive.ttl b/test/validate/bad-literal-value-high-exclusive.ttl
index f83d2216..fafc74c8 100644
--- a/test/validate/bad-literal-value-high-exclusive.ttl
+++ b/test/validate/bad-literal-value-high-exclusive.ttl
@@ -6,7 +6,7 @@
eg:Normal
a rdfs:Datatype ;
- rdfs:label "normal" ;
+ rdfs:label "Normal" ;
owl:onDatatype xsd:double ;
owl:withRestrictions (
[
diff --git a/test/validate/bad-literal-value-high-inclusive.ttl b/test/validate/bad-literal-value-high-inclusive.ttl
index c0753250..db19f1cd 100644
--- a/test/validate/bad-literal-value-high-inclusive.ttl
+++ b/test/validate/bad-literal-value-high-inclusive.ttl
@@ -6,7 +6,7 @@
eg:Normal
a rdfs:Datatype ;
- rdfs:label "normal" ;
+ rdfs:label "Normal" ;
owl:onDatatype xsd:double ;
owl:withRestrictions (
[
diff --git a/test/validate/bad-literal-value-low-exclusive.ttl b/test/validate/bad-literal-value-low-exclusive.ttl
index 09ca9f93..082ae9d9 100644
--- a/test/validate/bad-literal-value-low-exclusive.ttl
+++ b/test/validate/bad-literal-value-low-exclusive.ttl
@@ -6,7 +6,7 @@
eg:Normal
a rdfs:Datatype ;
- rdfs:label "normal" ;
+ rdfs:label "Normal" ;
owl:onDatatype xsd:double ;
owl:withRestrictions (
[
diff --git a/test/validate/bad-literal-value-low-inclusive.ttl b/test/validate/bad-literal-value-low-inclusive.ttl
index 6ae5758b..c7203c81 100644
--- a/test/validate/bad-literal-value-low-inclusive.ttl
+++ b/test/validate/bad-literal-value-low-inclusive.ttl
@@ -6,7 +6,7 @@
eg:Normal
a rdfs:Datatype ;
- rdfs:label "normal" ;
+ rdfs:label "Normal" ;
owl:onDatatype xsd:double ;
owl:withRestrictions (
[
diff --git a/test/validate/bad-literal-value.ttl b/test/validate/bad-literal-value.ttl
new file mode 100644
index 00000000..4c33175f
--- /dev/null
+++ b/test/validate/bad-literal-value.ttl
@@ -0,0 +1,7 @@
+@prefix eg: <http://example.org/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+
+eg:s
+ rdf:value "one"^^xsd:integer .
+
diff --git a/test/validate/bad-object-property.ttl b/test/validate/bad-object-property.ttl
index b4a31f9d..335db339 100644
--- a/test/validate/bad-object-property.ttl
+++ b/test/validate/bad-object-property.ttl
@@ -3,10 +3,10 @@
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
-eg:value
- rdfs:label "value" ;
+eg:child
+ rdfs:label "child" ;
a owl:ObjectProperty .
eg:s
- eg:value "literal" .
+ eg:child "literal" .
diff --git a/test/validate/bad-pattern.ttl b/test/validate/bad-pattern.ttl
index 1b764c78..fef79aeb 100644
--- a/test/validate/bad-pattern.ttl
+++ b/test/validate/bad-pattern.ttl
@@ -6,18 +6,18 @@
eg:BrokenLiteral
a rdfs:Datatype ;
- rdfs:label "broken literal" ;
+ rdfs:label "Broken Literal" ;
owl:withRestrictions (
[
xsd:pattern "["
]
) .
-eg:value
- a rdf:Property ;
- rdfs:label "value" ;
- rdfs:range eg:BinaryLiteral .
+# eg:value
+# a rdf:Property ;
+# rdfs:label "value" ;
+# rdfs:range eg:BrokenLiteral .
eg:s
- eg:value "no match"^^eg:BrokenLiteral .
+ rdf:value "no match"^^eg:BrokenLiteral .
diff --git a/test/validate/bad-plain-literal.ttl b/test/validate/bad-plain-literal.ttl
index 116faac0..c6f60c2c 100644
--- a/test/validate/bad-plain-literal.ttl
+++ b/test/validate/bad-plain-literal.ttl
@@ -8,5 +8,5 @@ eg:value
rdfs:range rdf:PlainLiteral .
eg:s
- eg:value "literal"^^rdf:XMLLiteral .
+ eg:value "typed"^^rdf:XMLLiteral .
diff --git a/test/validate/bad-unknown-property.ttl b/test/validate/bad-predicate-type-undefined.ttl
index 0db1e85c..246594ee 100644
--- a/test/validate/bad-unknown-property.ttl
+++ b/test/validate/bad-predicate-type-undefined.ttl
@@ -1,5 +1,4 @@
@prefix eg: <http://example.org/> .
-@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
eg:s
eg:undefined 0 .
diff --git a/test/validate/bad-predicate-type.ttl b/test/validate/bad-predicate-type.ttl
new file mode 100644
index 00000000..84163d64
--- /dev/null
+++ b/test/validate/bad-predicate-type.ttl
@@ -0,0 +1,9 @@
+@prefix eg: <http://example.org/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+
+eg:nonProperty
+ a rdf:Bag .
+
+eg:s
+ eg:nonProperty 0 .
+
diff --git a/test/validate/bad-range-instance-not-literal.ttl b/test/validate/bad-range-instance-not-literal.ttl
index ea7803f6..5132a70f 100644
--- a/test/validate/bad-range-instance-not-literal.ttl
+++ b/test/validate/bad-range-instance-not-literal.ttl
@@ -3,7 +3,8 @@
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
eg:Thing
- a rdfs:Class .
+ a rdfs:Class ;
+ rdfs:label "Thing" .
eg:value
a rdf:Property ;
diff --git a/test/validate/bad-range-instance.ttl b/test/validate/bad-range-instance.ttl
index a04a5476..74403d49 100644
--- a/test/validate/bad-range-instance.ttl
+++ b/test/validate/bad-range-instance.ttl
@@ -3,10 +3,12 @@
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
eg:Thing
- a rdfs:Class .
+ a rdfs:Class ;
+ rdfs:label "Thing" .
eg:NonThing
- a rdfs:Class .
+ a rdfs:Class ;
+ rdfs:label "NonThing" .
eg:value
a rdf:Property ;
diff --git a/test/validate/bad-range-literal-not-instance.ttl b/test/validate/bad-range-literal-not-instance.ttl
index f46de8ce..039fcea8 100644
--- a/test/validate/bad-range-literal-not-instance.ttl
+++ b/test/validate/bad-range-literal-not-instance.ttl
@@ -3,7 +3,8 @@
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
eg:Thing
- a rdfs:Class .
+ a rdfs:Class ;
+ rdfs:label "Thing" .
eg:value
a rdf:Property ;
diff --git a/test/validate/bad-range-literal.ttl b/test/validate/bad-range-literal.ttl
index 10750391..d656aa16 100644
--- a/test/validate/bad-range-literal.ttl
+++ b/test/validate/bad-range-literal.ttl
@@ -6,22 +6,22 @@
eg:Normal
a rdfs:Datatype ;
- rdfs:label "normal" ;
+ rdfs:label "Normal" ;
owl:onDatatype xsd:double ;
owl:withRestrictions (
[
- xsd:maxExclusive 1.0
+ xsd:maxInclusive 1.0
] [
- xsd:minExclusive 0.0
+ xsd:minInclusive 0.0
]
) .
-eg:value
+eg:scaled
a rdf:Property ;
- rdfs:label "value" ;
+ rdfs:label "scaled" ;
rdfs:range eg:Normal .
eg:s
- eg:value 2.0 .
+ eg:scaled 2.0 .
diff --git a/test/validate/bad-some-values-from.ttl b/test/validate/bad-some-values-from.ttl
index 259bfb88..9a8ee849 100644
--- a/test/validate/bad-some-values-from.ttl
+++ b/test/validate/bad-some-values-from.ttl
@@ -5,6 +5,7 @@
eg:Thing
a rdfs:Class ;
+ rdfs:label "Thing" ;
rdfs:subClassOf [
a owl:Restriction ;
owl:onProperty rdfs:label ;
diff --git a/test/validate/bad-string-literal-value-high.ttl b/test/validate/bad-string-literal-value-high.ttl
index 6622c35b..93e675ef 100644
--- a/test/validate/bad-string-literal-value-high.ttl
+++ b/test/validate/bad-string-literal-value-high.ttl
@@ -6,7 +6,7 @@
eg:startsWithC
a rdfs:Datatype ;
- rdfs:label "starts with C" ;
+ rdfs:label "Starts With C" ;
owl:onDatatype xsd:string ;
owl:withRestrictions (
[
diff --git a/test/validate/bad-string-literal-value-low.ttl b/test/validate/bad-string-literal-value-low.ttl
index 06833a46..2b6985f8 100644
--- a/test/validate/bad-string-literal-value-low.ttl
+++ b/test/validate/bad-string-literal-value-low.ttl
@@ -6,7 +6,7 @@
eg:betweenBAndD
a rdfs:Datatype ;
- rdfs:label "between B and D" ;
+ rdfs:label "Between B and D" ;
owl:onDatatype xsd:string ;
owl:withRestrictions (
[
diff --git a/test/validate/bad-subclass-cycle.ttl b/test/validate/bad-subclass-cycle.ttl
new file mode 100644
index 00000000..1e702832
--- /dev/null
+++ b/test/validate/bad-subclass-cycle.ttl
@@ -0,0 +1,13 @@
+@prefix eg: <http://example.org/> .
+@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
+
+eg:Square
+ a rdfs:Class ;
+ rdfs:subClassOf eg:Rectangle ;
+ rdfs:label "Square" .
+
+eg:Rectangle
+ a rdfs:Class ;
+ rdfs:subClassOf eg:Square ;
+ rdfs:label "Rectangle" .
+
diff --git a/test/validate/bad-subproperty-cycle.ttl b/test/validate/bad-subproperty-cycle.ttl
new file mode 100644
index 00000000..eb3bbee4
--- /dev/null
+++ b/test/validate/bad-subproperty-cycle.ttl
@@ -0,0 +1,14 @@
+@prefix eg: <http://example.org/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
+
+eg:stuff
+ a rdf:Property ;
+ rdfs:subPropertyOf eg:things ;
+ rdfs:label "stuff" .
+
+eg:things
+ a rdf:Property ;
+ rdfs:subPropertyOf eg:stuff ;
+ rdfs:label "things" .
+
diff --git a/test/validate/bad-superclass-restriction.ttl b/test/validate/bad-superclass-restriction.ttl
new file mode 100644
index 00000000..bd820de4
--- /dev/null
+++ b/test/validate/bad-superclass-restriction.ttl
@@ -0,0 +1,22 @@
+@prefix eg: <http://example.org/> .
+@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#> .
+
+eg:SuperThing
+ a rdfs:Class ;
+ rdfs:label "SuperThing" ;
+ rdfs:subClassOf [
+ a owl:Restriction ;
+ owl:onProperty rdf:value ;
+ owl:minCardinality 1
+ ] .
+
+eg:Thing
+ a rdfs:Class ;
+ rdfs:label "Thing" ;
+ rdfs:subClassOf eg:SuperThing .
+
+eg:s
+ a eg:Thing .
+
diff --git a/test/validate/good-anyuri.ttl b/test/validate/good-anyuri.ttl
new file mode 100644
index 00000000..e05f8b71
--- /dev/null
+++ b/test/validate/good-anyuri.ttl
@@ -0,0 +1,13 @@
+@prefix eg: <http://example.org/> .
+@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#> .
+
+eg:uri
+ a rdf:Property ;
+ rdfs:label "uri" ;
+ rdfs:range xsd:anyURI .
+
+eg:s
+ eg:uri <http://example.org> .
+
diff --git a/test/validate/good-cardinality.ttl b/test/validate/good-cardinality.ttl
index 6b0b87da..74615fdc 100644
--- a/test/validate/good-cardinality.ttl
+++ b/test/validate/good-cardinality.ttl
@@ -5,6 +5,7 @@
eg:Thing
a rdfs:Class ;
+ rdfs:label "Thing" ;
rdfs:subClassOf [
a owl:Restriction ;
owl:onProperty rdf:value ;
diff --git a/test/validate/good-literal-value-high-inclusive.ttl b/test/validate/good-literal-value-high-inclusive.ttl
index bbaa84a2..18cbed0e 100644
--- a/test/validate/good-literal-value-high-inclusive.ttl
+++ b/test/validate/good-literal-value-high-inclusive.ttl
@@ -6,7 +6,7 @@
eg:Normal
a rdfs:Datatype ;
- rdfs:label "normal" ;
+ rdfs:label "Normal" ;
owl:onDatatype xsd:double ;
owl:withRestrictions (
[
diff --git a/test/validate/good-literal-value-low-inclusive.ttl b/test/validate/good-literal-value-low-inclusive.ttl
index 61943a36..e6ad334c 100644
--- a/test/validate/good-literal-value-low-inclusive.ttl
+++ b/test/validate/good-literal-value-low-inclusive.ttl
@@ -6,7 +6,7 @@
eg:Normal
a rdfs:Datatype ;
- rdfs:label "normal" ;
+ rdfs:label "Normal" ;
owl:onDatatype xsd:double ;
owl:withRestrictions (
[
diff --git a/test/validate/good-owl-thing.ttl b/test/validate/good-owl-thing.ttl
new file mode 100644
index 00000000..9c4b570d
--- /dev/null
+++ b/test/validate/good-owl-thing.ttl
@@ -0,0 +1,16 @@
+@prefix eg: <http://example.org/> .
+@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#> .
+
+eg:someThing
+ a rdf:Property ;
+ rdfs:label "some thing" ;
+ rdfs:range owl:Thing .
+
+eg:thisThing
+ rdfs:label "this thing" .
+
+eg:s
+ eg:someThing eg:thisThing .
+
diff --git a/test/validate/good-pattern.ttl b/test/validate/good-pattern.ttl
index 569cd424..740ec22c 100644
--- a/test/validate/good-pattern.ttl
+++ b/test/validate/good-pattern.ttl
@@ -6,7 +6,7 @@
eg:CapitalLiteral
a rdfs:Datatype ;
- rdfs:label "capital literal" ;
+ rdfs:label "Capital Literal" ;
owl:withRestrictions (
[
xsd:pattern "[A-Z][a-z]*"
diff --git a/test/validate/good-rdfs-resource.ttl b/test/validate/good-rdfs-resource.ttl
new file mode 100644
index 00000000..26310553
--- /dev/null
+++ b/test/validate/good-rdfs-resource.ttl
@@ -0,0 +1,12 @@
+@prefix eg: <http://example.org/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
+
+eg:resource
+ a rdf:Property ;
+ rdfs:label "resource" ;
+ rdfs:range rdfs:Resource .
+
+eg:s
+ eg:resource <http://example.org> .
+
diff --git a/test/validate/good-some-values-from.ttl b/test/validate/good-some-values-from.ttl
index 1da49270..23f977fd 100644
--- a/test/validate/good-some-values-from.ttl
+++ b/test/validate/good-some-values-from.ttl
@@ -5,6 +5,7 @@
eg:Thing
a rdfs:Class ;
+ rdfs:label "Thing" ;
rdfs:subClassOf [
a owl:Restriction ;
owl:onProperty rdfs:label ;
diff --git a/test/validate/good-string-literal-value-low.ttl b/test/validate/good-string-literal-value-low.ttl
index 5bfd6a9e..7d71856b 100644
--- a/test/validate/good-string-literal-value-low.ttl
+++ b/test/validate/good-string-literal-value-low.ttl
@@ -6,7 +6,7 @@
eg:betweenBAndD
a rdfs:Datatype ;
- rdfs:label "between B and D" ;
+ rdfs:label "Between B and D" ;
owl:onDatatype xsd:string ;
owl:withRestrictions (
[
diff --git a/test/validate/manifest.ttl b/test/validate/manifest.ttl
index 68853073..05c0a10d 100644
--- a/test/validate/manifest.ttl
+++ b/test/validate/manifest.ttl
@@ -1,205 +1,349 @@
+@prefix checks: <http://drobilla.net/ns/serd/checks#> .
@prefix mf: <http://www.w3.org/2001/sw/DataAccess/tests/test-manifest#> .
+@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 rdft: <http://www.w3.org/ns/rdftest#> .
@prefix serd: <http://drobilla.net/ns/serd#> .
+rdft:Test
+ rdfs:subClassOf mf:ManifestEntry .
+
serd:TestTurtleNegativeValidate
a rdfs:Class ;
- rdfs:subClassOf rdft:Test .
+ rdfs:label "Turtle Negative Validation" ;
+ rdfs:subClassOf rdft:Test ,
+ [
+ rdf:type owl:Restriction ;
+ owl:onProperty serd:triggersCheck ;
+ owl:minCardinality 1
+ ] .
serd:TestTurtlePositiveValidate
a rdfs:Class ;
+ rdfs:label "Turtle Positive Validation" ;
rdfs:subClassOf rdft:Test .
+serd:triggersCheck
+ a rdf:Property ;
+ rdfs:label "triggers check" ;
+ rdfs:range serd:ValidatorCheck .
+
<>
- rdf:type mf:Manifest ;
+ a mf:Manifest ;
rdfs:comment "Serd validation test cases" ;
mf:entries (
<#bad-all-values-from>
+ <#bad-anyuri>
<#bad-cardinality-high>
<#bad-cardinality-low>
<#bad-cardinality>
+ <#bad-class-type-undefined>
+ <#bad-class-type>
<#bad-datatype-property>
+ <#bad-deprecated-class>
+ <#bad-deprecated-property>
<#bad-domain>
<#bad-functional-property>
<#bad-inverse-functional-property>
<#bad-literal-pattern>
- <#bad-literal-value-high-inclusive>
- <#bad-literal-value-low-inclusive>
<#bad-literal-value-high-exclusive>
+ <#bad-literal-value-high-inclusive>
<#bad-literal-value-low-exclusive>
- <#bad-string-literal-value-high>
- <#bad-string-literal-value-low>
+ <#bad-literal-value-low-inclusive>
+ <#bad-literal-value>
<#bad-object-property>
<#bad-pattern>
<#bad-plain-literal>
+ <#bad-predicate-type-undefined>
+ <#bad-predicate-type>
<#bad-range-instance-not-literal>
<#bad-range-instance>
<#bad-range-literal-not-instance>
<#bad-range-literal>
<#bad-some-values-from>
+ <#bad-string-literal-value-high>
+ <#bad-string-literal-value-low>
+ <#bad-subclass-cycle>
+ <#bad-subproperty-cycle>
+ <#bad-superclass-restriction>
<#bad-unknown-datatype>
- <#bad-unknown-property>
+ <#good-anyuri>
<#good-cardinality>
<#good-literal-value-high-inclusive>
<#good-literal-value-low-inclusive>
+ <#good-owl-thing>
<#good-pattern>
+ <#good-rdfs-resource>
<#good-some-values-from>
<#good-string-literal-value-low>
) .
<#bad-all-values-from>
- rdf:type serd:TestTurtleNegativeValidate ;
+ a serd:TestTurtleNegativeValidate ;
+ serd:triggersCheck checks:allValuesFrom ,
+ checks:instanceType ;
mf:name "bad-all-values-from" ;
mf:action <bad-all-values-from.ttl> .
+<#bad-anyuri>
+ a serd:TestTurtleNegativeValidate ;
+ serd:triggersCheck checks:anyUri ,
+ checks:propertyRange ;
+ mf:name "bad-anyuri" ;
+ mf:action <bad-anyuri.ttl> .
+
+<#bad-class-type-undefined>
+ a serd:TestTurtleNegativeValidate ;
+ serd:triggersCheck checks:classType ;
+ mf:name "bad-class-type-undefined" ;
+ mf:action <bad-class-type-undefined.ttl> .
+
+<#bad-class-type>
+ a serd:TestTurtleNegativeValidate ;
+ serd:triggersCheck checks:classType ;
+ mf:name "bad-class-type" ;
+ mf:action <bad-class-type.ttl> .
+
<#bad-cardinality-low>
- rdf:type serd:TestTurtleNegativeValidate ;
+ a serd:TestTurtleNegativeValidate ;
+ serd:triggersCheck checks:cardinalityMin ,
+ checks:instanceType ;
mf:name "bad-cardinality-low" ;
mf:action <bad-cardinality-low.ttl> .
<#bad-cardinality-high>
- rdf:type serd:TestTurtleNegativeValidate ;
+ a serd:TestTurtleNegativeValidate ;
+ serd:triggersCheck checks:cardinalityMax ,
+ checks:instanceType ;
mf:name "bad-cardinality-high" ;
mf:action <bad-cardinality-high.ttl> .
<#bad-cardinality>
- rdf:type serd:TestTurtleNegativeValidate ;
+ a serd:TestTurtleNegativeValidate ;
+ serd:triggersCheck checks:cardinalityEqual ,
+ checks:instanceType ;
mf:name "bad-cardinality" ;
mf:action <bad-cardinality.ttl> .
<#bad-datatype-property>
- rdf:type serd:TestTurtleNegativeValidate ;
+ a serd:TestTurtleNegativeValidate ;
+ serd:triggersCheck checks:datatypeProperty ;
mf:name "bad-datatype-property" ;
mf:action <bad-datatype-property.ttl> .
+<#bad-deprecated-class>
+ a serd:TestTurtleNegativeValidate ;
+ serd:triggersCheck checks:deprecatedClass ;
+ mf:name "bad-deprecated-class" ;
+ mf:action <bad-deprecated-class.ttl> .
+
+<#bad-deprecated-property>
+ a serd:TestTurtleNegativeValidate ;
+ serd:triggersCheck checks:deprecatedProperty ;
+ mf:name "bad-deprecated-property" ;
+ mf:action <bad-deprecated-property.ttl> .
+
<#bad-domain>
- rdf:type serd:TestTurtleNegativeValidate ;
+ a serd:TestTurtleNegativeValidate ;
+ serd:triggersCheck checks:cardinalityEqual ,
+ checks:propertyDomain ;
mf:name "bad-domain" ;
mf:action <bad-domain.ttl> .
<#bad-functional-property>
- rdf:type serd:TestTurtleNegativeValidate ;
+ a serd:TestTurtleNegativeValidate ;
+ serd:triggersCheck checks:functionalProperty ;
mf:name "bad-functional-property" ;
mf:action <bad-functional-property.ttl> .
<#bad-inverse-functional-property>
- rdf:type serd:TestTurtleNegativeValidate ;
+ a serd:TestTurtleNegativeValidate ;
+ serd:triggersCheck checks:inverseFunctionalProperty ;
mf:name "bad-inverse-functional-property" ;
mf:action <bad-inverse-functional-property.ttl> .
<#bad-literal-pattern>
- rdf:type serd:TestTurtleNegativeValidate ;
+ a serd:TestTurtleNegativeValidate ;
+ serd:triggersCheck checks:literalPattern ;
mf:name "bad-literal-pattern" ;
mf:action <bad-literal-pattern.ttl> .
<#bad-literal-value-low-inclusive>
- rdf:type serd:TestTurtleNegativeValidate ;
+ a serd:TestTurtleNegativeValidate ;
+ serd:triggersCheck checks:literalMinInclusive ;
mf:name "bad-literal-value-low-inclusive" ;
mf:action <bad-literal-value-low-inclusive.ttl> .
<#bad-literal-value-high-inclusive>
- rdf:type serd:TestTurtleNegativeValidate ;
+ a serd:TestTurtleNegativeValidate ;
+ serd:triggersCheck checks:literalMaxInclusive ;
mf:name "bad-literal-value-high-inclusive" ;
mf:action <bad-literal-value-high-inclusive.ttl> .
<#bad-literal-value-low-exclusive>
- rdf:type serd:TestTurtleNegativeValidate ;
+ a serd:TestTurtleNegativeValidate ;
+ serd:triggersCheck checks:literalMinExclusive ;
mf:name "bad-literal-value-low-exclusive" ;
mf:action <bad-literal-value-low-exclusive.ttl> .
<#bad-literal-value-high-exclusive>
- rdf:type serd:TestTurtleNegativeValidate ;
+ a serd:TestTurtleNegativeValidate ;
+ serd:triggersCheck checks:literalMaxExclusive ;
mf:name "bad-literal-value-high-exclusive" ;
mf:action <bad-literal-value-high-exclusive.ttl> .
+<#bad-literal-value>
+ a serd:TestTurtleNegativeValidate ;
+ serd:triggersCheck checks:literalValue ;
+ mf:name "bad-literal-value" ;
+ mf:action <bad-literal-value.ttl> .
+
<#bad-string-literal-value-low>
- rdf:type serd:TestTurtleNegativeValidate ;
+ a serd:TestTurtleNegativeValidate ;
+ serd:triggersCheck checks:literalMinExclusive ;
mf:name "bad-string-literal-value-low" ;
mf:action <bad-string-literal-value-low.ttl> .
<#bad-string-literal-value-high>
- rdf:type serd:TestTurtleNegativeValidate ;
+ a serd:TestTurtleNegativeValidate ;
+ serd:triggersCheck checks:literalMaxExclusive ;
mf:name "bad-string-literal-value-high" ;
mf:action <bad-string-literal-value-high.ttl> .
+<#bad-subclass-cycle>
+ a serd:TestTurtleNegativeValidate ;
+ serd:triggersCheck checks:classCycle ;
+ mf:name "bad-subclass-cycle" ;
+ mf:action <bad-subclass-cycle.ttl> .
+
+<#bad-subproperty-cycle>
+ a serd:TestTurtleNegativeValidate ;
+ serd:triggersCheck checks:propertyCycle ;
+ mf:name "bad-subproperty-cycle" ;
+ mf:action <bad-subproperty-cycle.ttl> .
+
+<#bad-superclass-restriction>
+ a serd:TestTurtleNegativeValidate ;
+ serd:triggersCheck checks:instanceType ,
+ checks:cardinalityMin ;
+ mf:name "bad-superclass-restriction" ;
+ mf:action <bad-superclass-restriction.ttl> .
+
<#bad-object-property>
- rdf:type serd:TestTurtleNegativeValidate ;
+ a serd:TestTurtleNegativeValidate ;
+ serd:triggersCheck checks:objectProperty ;
mf:name "bad-object-property" ;
mf:action <bad-object-property.ttl> .
<#bad-pattern>
- rdf:type serd:TestTurtleNegativeValidate ;
+ a serd:TestTurtleNegativeValidate ;
+ serd:triggersCheck checks:literalPattern ;
mf:name "bad-pattern" ;
mf:action <bad-pattern.ttl> .
<#bad-plain-literal>
- rdf:type serd:TestTurtleNegativeValidate ;
+ a serd:TestTurtleNegativeValidate ;
+ serd:triggersCheck checks:plainLiteralDatatype ,
+ checks:propertyRange ;
mf:name "bad-plain-literal" ;
mf:action <bad-plain-literal.ttl> .
<#bad-range-instance-not-literal>
- rdf:type serd:TestTurtleNegativeValidate ;
+ a serd:TestTurtleNegativeValidate ;
+ serd:triggersCheck checks:instanceLiteral ,
+ checks:propertyRange ;
mf:name "bad-range-instance-not-literal" ;
mf:action <bad-range-instance-not-literal.ttl> .
<#bad-range-instance>
- rdf:type serd:TestTurtleNegativeValidate ;
+ a serd:TestTurtleNegativeValidate ;
+ serd:triggersCheck checks:instanceType ,
+ checks:propertyRange ;
mf:name "bad-range-instance" ;
mf:action <bad-range-instance.ttl> .
<#bad-range-literal-not-instance>
- rdf:type serd:TestTurtleNegativeValidate ;
+ a serd:TestTurtleNegativeValidate ;
+ serd:triggersCheck checks:literalInstance ,
+ checks:propertyRange ;
mf:name "bad-range-literal-not-instance" ;
mf:action <bad-range-literal-not-instance.ttl> .
<#bad-range-literal>
- rdf:type serd:TestTurtleNegativeValidate ;
+ a serd:TestTurtleNegativeValidate ;
+ serd:triggersCheck checks:literalMaxInclusive ,
+ checks:propertyRange ;
mf:name "bad-range-literal" ;
mf:action <bad-range-literal.ttl> .
<#bad-some-values-from>
- rdf:type serd:TestTurtleNegativeValidate ;
+ a serd:TestTurtleNegativeValidate ;
+ serd:triggersCheck checks:someValuesFrom ,
+ checks:instanceType ;
mf:name "bad-some-values-from" ;
mf:action <bad-some-values-from.ttl> .
<#bad-unknown-datatype>
- rdf:type serd:TestTurtleNegativeValidate ;
+ a serd:TestTurtleNegativeValidate ;
+ serd:triggersCheck checks:datatypeType ;
mf:name "bad-unknown-datatype" ;
mf:action <bad-unknown-datatype.ttl> .
-<#bad-unknown-property>
- rdf:type serd:TestTurtleNegativeValidate ;
- mf:name "bad-unknown-property" ;
- mf:action <bad-unknown-property.ttl> .
+<#bad-predicate-type-undefined>
+ a serd:TestTurtleNegativeValidate ;
+ serd:triggersCheck checks:predicateType ;
+ mf:name "bad-predicate-type-undefined" ;
+ mf:action <bad-predicate-type-undefined.ttl> .
+
+<#bad-predicate-type>
+ a serd:TestTurtleNegativeValidate ;
+ serd:triggersCheck checks:predicateType ;
+ mf:name "bad-predicate-type" ;
+ mf:action <bad-predicate-type.ttl> .
+
+<#good-anyuri>
+ a serd:TestTurtlePositiveValidate ;
+ mf:name "good-anyuri" ;
+ mf:action <good-anyuri.ttl> .
<#good-cardinality>
- rdf:type serd:TestTurtlePositiveValidate ;
+ a serd:TestTurtlePositiveValidate ;
mf:name "good-cardinality" ;
mf:action <good-cardinality.ttl> .
<#good-literal-value-low-inclusive>
- rdf:type serd:TestTurtlePositiveValidate ;
+ a serd:TestTurtlePositiveValidate ;
mf:name "good-literal-value-low-inclusive" ;
mf:action <good-literal-value-low-inclusive.ttl> .
<#good-literal-value-high-inclusive>
- rdf:type serd:TestTurtlePositiveValidate ;
+ a serd:TestTurtlePositiveValidate ;
mf:name "good-literal-value-high-inclusive" ;
mf:action <good-literal-value-high-inclusive.ttl> .
<#good-some-values-from>
- rdf:type serd:TestTurtlePositiveValidate ;
+ a serd:TestTurtlePositiveValidate ;
mf:name "good-some-values-from" ;
mf:action <good-some-values-from.ttl> .
+<#good-owl-thing>
+ a serd:TestTurtlePositiveValidate ;
+ mf:name "good-owl-thing" ;
+ mf:action <good-owl-thing.ttl> .
+
<#good-pattern>
- rdf:type serd:TestTurtlePositiveValidate ;
+ a serd:TestTurtlePositiveValidate ;
mf:name "good-pattern" ;
mf:action <good-pattern.ttl> .
+<#good-rdfs-resource>
+ a serd:TestTurtlePositiveValidate ;
+ mf:name "good-rdfs-resource" ;
+ mf:action <good-rdfs-resource.ttl> .
+
<#good-string-literal-value-low>
- rdf:type serd:TestTurtlePositiveValidate ;
+ a serd:TestTurtlePositiveValidate ;
mf:name "good-string-literal-value-low" ;
mf:action <good-string-literal-value-low.ttl> .
+