-
Notifications
You must be signed in to change notification settings - Fork 15
Expand file tree
/
Copy pathdrafting.ttl
More file actions
238 lines (225 loc) · 7.11 KB
/
Copy pathdrafting.ttl
File metadata and controls
238 lines (225 loc) · 7.11 KB
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
@prefix co: <http://purl.org/co/> .
@prefix drafting: <http://example.org/ontology/drafting/> .
@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 sh: <http://www.w3.org/ns/shacl#> .
@prefix uco-action: <https://ontology.unifiedcyberontology.org/uco/action/> .
@prefix uco-core: <https://ontology.unifiedcyberontology.org/uco/core/> .
@prefix uco-observable: <https://ontology.unifiedcyberontology.org/uco/observable/> .
@prefix uco-types: <https://ontology.unifiedcyberontology.org/uco/types/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
drafting:DiskPartitionFacet
a
owl:Class ,
sh:NodeShape
;
rdfs:subClassOf uco-core:Facet ;
rdfs:label "DiskPartitionFacet"@en ;
rdfs:comment "A disk partition facet is a grouping of characteristics unique to a particular managed region on a storage mechanism."@en ;
sh:property
[
sh:datatype xsd:string ;
sh:maxCount "1"^^xsd:integer ;
sh:nodeKind sh:Literal ;
sh:path drafting:partitionStatus ;
] ,
[
sh:datatype xsd:string ;
sh:maxCount "1"^^xsd:integer ;
sh:nodeKind sh:Literal ;
sh:path drafting:partitionName ;
]
;
sh:targetClass drafting:DiskPartitionFacet ;
.
drafting:DiskPartitionSystem
a
owl:Class ,
sh:NodeShape
;
rdfs:subClassOf uco-observable:ObservableObject ;
rdfs:label "DiskPartitionSystem"@en ;
rdfs:comment "A partition system is an ordered structured list of areas on storage media segmented for file systems or swap space."@en ;
sh:targetClass drafting:DiskPartitionSystem ;
.
drafting:DiskPartitionSystemFacet
a
owl:Class ,
sh:NodeShape
;
rdfs:subClassOf uco-core:Facet ;
rdfs:label "DiskPartitionSystemFacet"@en ;
rdfs:comment "def"@en ;
sh:property
[
sh:class uco-observable:DiskPartition ;
sh:description "The contents of ordered items in the Disk Partition linked by DiskPartitionSystem must be partition objects."@en ;
sh:path (
drafting:partitionList
co:item
co:itemContent
) ;
] ,
[
sh:class uco-observable:DiskPartition ;
sh:description "The contents of ordered items in the Disk Partition linked by DiskPartitionSystem must be partition objects."@en ;
sh:path (
drafting:partitionList
drafting:partitionOriginItem
co:itemContent
) ;
] ,
[
sh:class uco-observable:DiskPartition ;
sh:description "The contents of ordered items in the Disk Partition linked by DiskPartitionSystem must be partition objects."@en ;
sh:path (
drafting:partitionList
drafting:partitionTerminalItem
co:itemContent
) ;
] ,
[
sh:class uco-observable:DiskPartition ;
sh:description "The contents of unordered items in the Disk Partition linked by DiskPartitionSystem must be partition objects."@en ;
sh:path (
drafting:partitionList
co:element
) ;
] ,
[
sh:class co:List ;
sh:maxCount "1"^^xsd:integer ;
sh:nodeKind sh:IRI ;
sh:path drafting:partitionList ;
] ,
[
sh:class uco-observable:DiskPartition ;
sh:maxCount "1"^^xsd:integer ;
sh:nodeKind sh:IRI ;
sh:path uco-observable:partition ;
]
;
sh:targetClass drafting:DiskPartitionSystemFacet ;
.
drafting:buildID
a owl:DatatypeProperty ;
rdfs:range xsd:string ;
.
drafting:buildID-objects-shape
a sh:NodeShape ;
sh:datatype xsd:string ;
sh:nodeKind sh:Literal ;
sh:targetObjectsOf drafting:buildID ;
.
drafting:partitionList
a owl:ObjectProperty ;
rdfs:label "Partition List"@en ;
rdfs:comment "The list of partitions."@en ;
rdfs:seeAlso <https://github.com/ucoProject/UCO/issues/376> ;
rdfs:range co:List ;
.
drafting:partitionName
a owl:DatatypeProperty ;
rdfs:label "Partition Name"@en ;
rdfs:comment "The name assigned to a partition."@en ;
rdfs:seeAlso <https://github.com/ucoProject/UCO/issues/376> ;
rdfs:range xsd:string ;
.
drafting:partitionStatus
a owl:DatatypeProperty ;
rdfs:label "Partition Status"@en ;
rdfs:comment "The status field indicates whether the volume is readable, writable, a system partition, a startup partition, etc."@en ;
rdfs:seeAlso <https://github.com/ucoProject/UCO/issues/376> ;
rdfs:range xsd:string ;
.
drafting:result-objects-inverse-shape
a sh:NodeShape ;
sh:description "This shape enforces that no object be the result of two different Actions, which maps to a PROV-CONSTRAINTs violation of unique Generation."@en ;
sh:property [
a sh:PropertyShape ;
sh:maxCount "1"^^xsd:integer ;
sh:path [
sh:inversePath uco-action:result ;
] ;
] ;
sh:targetObjectsOf uco-action:result ;
.
drafting:temp-partition-nesting-shape
a sh:NodeShape ;
sh:description "This shape is a temporary shape for data consistency within the CASE-Examples illustration 'partitions'."@en ;
sh:sparql [
a sh:SPARQLConstraint ;
sh:description "Find all disk partition objects that are not tied to and related to a partition system generated by the same InvestigativeAction."@en ;
sh:message "Focus node is not in partition system found by their shared generating action."@en ;
sh:select """
PREFIX case-investigation: <https://ontology.caseontology.org/case/investigation/>
PREFIX co: <http://purl.org/co/>
PREFIX drafting: <http://example.org/ontology/drafting/>
PREFIX uco-action: <https://ontology.unifiedcyberontology.org/uco/action/>
PREFIX uco-core: <https://ontology.unifiedcyberontology.org/uco/core/>
SELECT $this ?value
WHERE {
?nAction
uco-action:result
$this ,
?value
;
.
?value
a drafting:DiskPartitionSystem ;
.
FILTER NOT EXISTS {
?value
uco-core:hasFacet / drafting:partitionList ?nPartitionList ;
.
?nPartitionList
co:element $this ;
co:item / co:itemContent $this ;
.
}
}
""" ;
] ;
sh:targetClass uco-observable:DiskPartition ;
.
drafting:temp-partition-relationship-to-partitionsystem-shape
a sh:NodeShape ;
sh:description "This shape is a temporary shape for data consistency within the CASE-Examples illustration 'partitions'."@en ;
sh:sparql [
a sh:SPARQLConstraint ;
sh:description "Find all disk partition objects that are not related to a partition system with a Relationship object."@en ;
sh:message "Focus node does not have a Contained_Within Relationship object tying to its partition system."@en ;
sh:select """
PREFIX co: <http://purl.org/co/>
PREFIX drafting: <http://example.org/ontology/drafting/>
PREFIX uco-core: <https://ontology.unifiedcyberontology.org/uco/core/>
SELECT $this ?value
WHERE {
?value
uco-core:hasFacet / drafting:partitionList / co:element $this ;
.
FILTER NOT EXISTS {
?nRelationship
uco-core:kindOfRelationship "Contained_Within" ;
uco-core:source $this ;
uco-core:target ?value ;
.
}
}
""" ;
] ;
sh:targetClass uco-observable:DiskPartition ;
.
uco-observable:DiskPartition
sh:property [
a sh:PropertyShape ;
sh:description "This shape confirms a DiskPartition does not have two instances of DiskPartitionFacet."@en ;
sh:path uco-core:hasFacet ;
sh:qualifiedMaxCount "1"^^xsd:integer ;
sh:qualifiedValueShape [
a sh:NodeShape ;
sh:class uco-observable:DiskPartitionFacet ;
] ;
] ;
.