File tree Expand file tree Collapse file tree 5 files changed +96
-2
lines changed
tests/case_utils/case_validate Expand file tree Collapse file tree 5 files changed +96
-2
lines changed Original file line number Diff line number Diff line change 51
51
NS_OWL = rdflib .OWL
52
52
NS_RDF = rdflib .RDF
53
53
NS_RDFS = rdflib .RDFS
54
+ NS_SH = rdflib .SH
54
55
55
56
_logger = logging .getLogger (os .path .basename (__file__ ))
56
57
@@ -189,6 +190,9 @@ def main() -> None:
189
190
NS_OWL .DatatypeProperty ,
190
191
NS_OWL .ObjectProperty ,
191
192
NS_RDFS .Datatype ,
193
+ NS_SH .NodeShape ,
194
+ NS_SH .PropertyShape ,
195
+ NS_SH .Shape ,
192
196
]:
193
197
for ontology_triple in ontology_graph .triples (
194
198
(None , NS_RDF .type , n_structural_class )
Original file line number Diff line number Diff line change @@ -27,14 +27,17 @@ tests_srcdir := $(top_srcdir)/tests
27
27
all : \
28
28
all-cli \
29
29
all-case_test_examples \
30
- all-uco_test_examples
30
+ all-uco_test_examples \
31
+ all-shape_disabling
31
32
32
33
.PHONY : \
33
34
all-case_test_examples \
34
35
all-cli \
36
+ all-shape_disabling \
35
37
all-uco_test_examples \
36
38
check-case_test_examples \
37
39
check-cli \
40
+ check-shape_disabling \
38
41
check-uco_test_examples
39
42
40
43
all-case_test_examples :
@@ -45,14 +48,19 @@ all-cli:
45
48
$(MAKE ) \
46
49
--directory cli
47
50
51
+ all-shape_disabling :
52
+ $(MAKE ) \
53
+ --directory shape_disabling
54
+
48
55
all-uco_test_examples :
49
56
$(MAKE ) \
50
57
--directory uco_test_examples
51
58
52
59
check : \
53
60
check-cli \
54
61
check-case_test_examples \
55
- check-uco_test_examples
62
+ check-uco_test_examples \
63
+ check-shape_disabling
56
64
57
65
check-case_test_examples :
58
66
$(MAKE ) \
@@ -64,13 +72,21 @@ check-cli:
64
72
--directory cli \
65
73
check
66
74
75
+ check-shape_disabling :
76
+ $(MAKE ) \
77
+ --directory shape_disabling \
78
+ check
79
+
67
80
check-uco_test_examples : \
68
81
uco_monolithic.ttl
69
82
$(MAKE) \
70
83
--directory uco_test_examples \
71
84
check
72
85
73
86
clean :
87
+ @$(MAKE ) \
88
+ --directory shape_disabling \
89
+ clean
74
90
@$(MAKE ) \
75
91
--directory case_test_examples \
76
92
clean
Original file line number Diff line number Diff line change
1
+ # !/usr/bin/make -f
2
+
3
+ # This software was developed at the National Institute of Standards
4
+ # and Technology by employees of the Federal Government in the course
5
+ # of their official duties. Pursuant to title 17 Section 105 of the
6
+ # United States Code this software is not subject to copyright
7
+ # protection and is in the public domain. NIST assumes no
8
+ # responsibility whatsoever for its use by other parties, and makes
9
+ # no guarantees, expressed or implied, about its quality,
10
+ # reliability, or any other characteristic.
11
+ #
12
+ # We would appreciate acknowledgement if the software is used.
13
+
14
+ SHELL := /bin/bash
15
+
16
+ top_srcdir := $(shell cd ../../../.. ; pwd)
17
+
18
+ tests_srcdir := $(top_srcdir ) /tests
19
+
20
+ all : \
21
+ validation_with_uuid_shape_disabled.txt \
22
+ validation_with_uuid_shape_enabled.txt
23
+
24
+ check : \
25
+ validation_with_uuid_shape_disabled.txt \
26
+ validation_with_uuid_shape_enabled.txt
27
+
28
+ clean :
29
+ @rm -f \
30
+ * .txt \
31
+ _*
32
+
33
+ validation_with_uuid_shape_disabled.txt : \
34
+ $(tests_srcdir)/.venv.done.log \
35
+ disable_shape.ttl \
36
+ example.ttl
37
+ source $(tests_srcdir)/venv/bin/activate \
38
+ && case_validate \
39
+ --ontology disable_shape.ttl \
40
+ example.ttl \
41
+ > _$@
42
+ mv _$@ $@
43
+
44
+ validation_with_uuid_shape_enabled.txt : \
45
+ $(tests_srcdir)/.venv.done.log \
46
+ example.ttl
47
+ source $(tests_srcdir)/venv/bin/activate \
48
+ && case_validate \
49
+ --allow-infos \
50
+ example.ttl \
51
+ > _$@
52
+ mv _$@ $@
Original file line number Diff line number Diff line change
1
+ @prefix owl: <http://www.w3.org/2002/07/owl#> .
2
+ @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
3
+ @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
4
+ @prefix sh: <http://www.w3.org/ns/shacl#> .
5
+ @prefix uco-core: <https://ontology.unifiedcyberontology.org/uco/core/> .
6
+ @prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
7
+
8
+ uco-core:UcoThing-identifier-regex-shape
9
+ sh:deactivated " true" ^^xsd:boolean ;
10
+ .
11
+
Original file line number Diff line number Diff line change
1
+ @prefix owl: <http://www.w3.org/2002/07/owl#> .
2
+ @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
3
+ @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
4
+ @prefix uco-core: <https://ontology.unifiedcyberontology.org/uco/core/> .
5
+ @prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
6
+
7
+ <urn:example:thing-1>
8
+ a uco-core:UcoThing ;
9
+ rdfs:comment " This node's IRI is designed to trigger a UUID review shape." @en ;
10
+ .
11
+
You can’t perform that action at this time.
0 commit comments