-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathindex.html
More file actions
841 lines (785 loc) · 29.9 KB
/
Copy pathindex.html
File metadata and controls
841 lines (785 loc) · 29.9 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
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
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
---
<!-- layout: blank -->
title: Urgent Evidence
jumbo_desc: CASE Sub-topic of Chain of Custody
---
<div class="row">
<div class="col-xs-12">
<h2>Introduction</h2>
<p>When evidence is submitted to a lab for analysis, the submitter has the option to submit the evidence as "Urgent" or "Rushed." This normally occurs when the evidence is known to have a quick turnaround (i.e. the case's scheduled court date occurs within a few days, or the evidence is needed to execute a search warrant, etc.). Indicating something as "Urgent" evidence requires examiners/analysts to push that evidence to the front of the analysis queue; that is, that evidence will be examined/analyzed next before continuing to work on any backlog cases/investigations.</p>
<p>An urgent submission which goes through the laboratory will follow an identical process to that of any submission, except in some cases urgent evidence may bypass a standard initial destination of an evidence vault, instead heading straight to processing. The chain of custody would need to accommodate this omitted visit, while still maintaining the integrity of the evidence's handling.</p>
<h2>Narrative</h2>
<p>An investigator receives evidence that a submitter has marked as urgent. The following table shows the timeline of this exhibit's processing, jumping straight to a processing kiosk instead of the evidence vault.</p>
<div class="table-responsive">
<table class="table table-bordered table-condensed">
<thead>
<tr>
<th>Date / Time</th>
<th>Action</th>
</tr>
</thead>
<tbody>
<tr>
<td>01/01/2019 14:00</td>
<td>Exhibit submitted for Kiosk examination</td>
</tr>
<tr>
<td>01/01/2019 14:05</td>
<td>Exhibit seal checks (passed) & Exhibit receipted in lab</td>
</tr>
<tr>
<td>01/01/2019 14:05</td>
<td>Exhibit assigned to Kiosk technician</td>
</tr>
<tr>
<td>01/01/2019 14:15</td>
<td>Sealed Exhibit Photographed</td>
</tr>
<tr>
<td>01/01/2019 14:20</td>
<td>Exhibit Unsealed</td>
</tr>
<tr>
<td>01/01/2019 14:21</td>
<td>Unsealed Exhibit Photographed</td>
</tr>
<tr>
<td>01/01/2019 14:25</td>
<td>Exhibit Connected to Kiosk & process started</td>
</tr>
<tr>
<td>01/01/2019 14:55</td>
<td>Exhibit Disconnected from Kiosk</td>
</tr>
<tr>
<td>01/01/2019 15:00</td>
<td>Exhibit Resealed</td>
</tr>
<tr>
<td>01/01/2019 15:03</td>
<td>Picture selected, via kiosk review screen, from those extracted from exhibit</td>
</tr>
<tr>
<td>01/01/2019 15:05</td>
<td>Report DVD Generated as associated exhibit</td>
</tr>
<tr>
<td>01/01/2019 15:10</td>
<td>DVD Report sealed</td>
</tr>
<tr>
<td>01/01/2019 15:15</td>
<td>Witness statement completed</td>
</tr>
<tr>
<td>01/01/2019 15:20</td>
<td>Sealed Exhibit handed the OIC & Transfer documentation signed</td>
</tr>
</tbody>
</table>
</div>
<h2>Discussion: Kiosk Investigations</h2>
<p>For a kiosk investigation the laboratory will not be part of the process, instead the interaction will be directly between the kiosk trained submitting officer and the kiosk used, and will follow a known sequence of steps either directed by a documented instruction/script or directly by the on-screen step processes built into the kiosk itself.</p>
<p>Therefore the only chain of custody information will be that which recorded on the kiosk during the sequence of steps, and would be along the lines of:
<ul>
<li>Date/Time Exhibit unsealed</li>
<li>Date/Time Exhibit photographs taken by officer are uploaded</li>
<li>Date/Time [Sub-]Exhibit (e.g. SIM Card, MemoryCard, Phone, etc.) is connected to kiosk</li>
<li>Date/Time of processes started & completed by Kiosk (may contain numerous entries depending on level of detail provided by vendor)</li>
<li>Date/Time [Sub-]Exhibit was disconnected from Kiosk</li>
<li>Date/Time Exhibit was resealed</li>
</ul>
<p>and would be automatically generated by the kiosk as part of the data exported in CASE format within the Report package contained on the DVD in the final steps above. The idea being that the kiosk activity could subsequently be imported into a Case Management System for review and quality control.</p>
<p><em>Note: The above chain of custody details (i.e. unseal, photograph, connect to forensic tool, image, process, disconnect from forensic tool, reseal) are effectively identical to the chain of custody typically used within the laboratory environment.</em></p>
<h2 id="queries">Illustrative Data and Queries</h2>
<p>The queries in this section, and their computed results, are backed by the data in <a href="urgent_evidence.json">urgent_evidence.json</a>.</p>
<p>Events, locations, tools, and people represented in this and other CASE narratives are presented, and at many times created, for illustration purposes only and do not necessarily represent real events, locations, tools, or people.</p>
<div class="card">
<h5 class="card-header" id="query-action_timeline">Action timeline</h5>
<div class="card-body">
<p class="card-text">According to the CASE report, what is the timeline of all of the recorded actions? (<a href="src/query-action_timeline.sparql">SPARQL source</a>)</p>
{% highlight sparql %}
PREFIX case-investigation: <https://ontology.caseontology.org/case/investigation/>
PREFIX uco-action: <https://ontology.unifiedcyberontology.org/uco/action/>
PREFIX uco-core: <https://ontology.unifiedcyberontology.org/uco/core/>
SELECT ?lStartTime ?lEndTime ?lDescription
WHERE
{
?nAction
a case-investigation:InvestigativeAction ;
uco-core:description ?lDescription ;
uco-action:endTime ?lEndTime ;
.
OPTIONAL
{
?nAction
uco-action:startTime ?lStartTime ;
.
}
}
ORDER BY ?lEndTime
{% endhighlight %}
<table border="1" class="dataframe table table-bordered table-condensed">
<thead>
<tr style="text-align: right;">
<th></th>
<th>?lStartTime</th>
<th>?lEndTime</th>
<th>?lDescription</th>
</tr>
</thead>
<tbody>
<tr>
<th>0</th>
<td></td>
<td>2019-01-01 14:00:00+00:00</td>
<td>Exhibit submitted for Kiosk examination</td>
</tr>
<tr>
<th>1</th>
<td></td>
<td>2019-01-01 14:05:00+00:00</td>
<td>Exhibit seal checks (passed) & Exhibit receipted in lab</td>
</tr>
<tr>
<th>2</th>
<td></td>
<td>2019-01-01 14:05:30+00:00</td>
<td>Exhibit assigned to Kiosk technician</td>
</tr>
<tr>
<th>3</th>
<td></td>
<td>2019-01-01 14:15:00+00:00</td>
<td>Sealed Exhibit Photographed</td>
</tr>
<tr>
<th>4</th>
<td></td>
<td>2019-01-01 14:20:00+00:00</td>
<td>Exhibit Unsealed</td>
</tr>
<tr>
<th>5</th>
<td></td>
<td>2019-01-01 14:21:00+00:00</td>
<td>Unsealed Exhibit Photographed</td>
</tr>
<tr>
<th>6</th>
<td>2019-01-01 14:25:00+00:00</td>
<td>2019-01-01 14:55:00+00:00</td>
<td>Exhibit Connected to Kiosk & process started; exhibit disconnected at conclusion</td>
</tr>
<tr>
<th>7</th>
<td></td>
<td>2019-01-01 15:00:00+00:00</td>
<td>Exhibit Resealed</td>
</tr>
<tr>
<th>8</th>
<td></td>
<td>2019-01-01 15:03:00+00:00</td>
<td>Picture selected, via kiosk review screen, from those extracted from exhibit</td>
</tr>
<tr>
<th>9</th>
<td></td>
<td>2019-01-01 15:05:00+00:00</td>
<td>Report DVD Generated as associated exhibit</td>
</tr>
<tr>
<th>10</th>
<td></td>
<td>2019-01-01 15:10:00+00:00</td>
<td>DVD Report sealed</td>
</tr>
<tr>
<th>11</th>
<td></td>
<td>2019-01-01 15:15:00+00:00</td>
<td>Witness statement completed</td>
</tr>
<tr>
<th>12</th>
<td></td>
<td>2019-01-01 15:20:00+00:00</td>
<td>Sealed Exhibit handed the OIC & Transfer documentation signed</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="card">
<h5 class="card-header" id="query-investigative_locations">Locations</h5>
<div class="card-body">
<p class="card-text">According to the CASE report, in what locations did the investigative actions take place? (<a href="src/query-investigative_locations.sparql">SPARQL source</a>)</p>
{% highlight sparql %}
PREFIX case-investigation: <https://ontology.caseontology.org/case/investigation/>
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/>
PREFIX uco-location: <https://ontology.unifiedcyberontology.org/uco/location/>
SELECT DISTINCT ?nLocation ?lRoomId ?lDescription
WHERE
{
?nAction
a case-investigation:InvestigativeAction ;
uco-action:location ?nLocation ;
.
?nLocation
a uco-location:Location ;
uco-core:description ?lDescription ;
uco-core:hasFacet [
a uco-location:SimpleAddressFacet ;
drafting:roomId ?lRoomId ;
]
.
}
ORDER BY ?nLocation
{% endhighlight %}
<table border="1" class="dataframe table table-bordered table-condensed">
<thead>
<tr style="text-align: right;">
<th></th>
<th>?nLocation</th>
<th>?lRoomId</th>
<th>?lDescription</th>
</tr>
</thead>
<tbody>
<tr>
<th>0</th>
<td>http://example.org/kb/location-uuid-1</td>
<td>1-001</td>
<td>(Room 1-001) Police station intake lab</td>
</tr>
<tr>
<th>1</th>
<td>http://example.org/kb/location-uuid-3</td>
<td>2-013</td>
<td>(Room 2-013) Police station evidence processing lab</td>
</tr>
<tr>
<th>2</th>
<td>http://example.org/kb/location-uuid-4</td>
<td>3-022</td>
<td>(Room 3-022) Desk of Officer Hudson</td>
</tr>
</tbody>
</table>
<p class="card-text">Of note:</p>
<ul>
<li class="card-text">CASE and UCO do not yet implement the concept of <code>roomId</code>. It is provided here to assist with future concept development.</li>
<li class="card-text">The evidence vault—room B-001—is not among these locations. The urgency of the processing caused that room to be bypassed.</li>
<li class="card-text">The witness statement is produced by the analyzing officer, following <a href="https://www.cps.gov.uk/legal-guidance/admitting-evidence-under-sections-9-and-10-criminal-justice-act-1967">UK Crown Prosecution Service Guidance</a>. (Were this a civil case, <a href="https://www.justice.gov.uk/courts/procedure-rules/civil/standard-directions/general/witness-statements">UK Ministry of Justice Guidance</a> would have been followed instead.) The officer's signed statement describes the officer's experience, role, and training, and describes and accompanies the chain of custody and analysis results up through the kiosk's processing conclusion in the evidence processing lab.</li>
</ul>
</div>
</div>
<div class="card">
<h5 class="card-header" id="query-investigative_personae">Investigative personae</h5>
<div class="card-body">
<p class="card-text">According to the provenance chain, who was involved in handling this evidence? (<a href="src/query-investigative_personae.sparql">SPARQL source</a>)</p>
<p class="card-text">The evidence exhibit number is <code>EXH-20190101-7</code>.</p>
{% highlight sparql %}
PREFIX case-investigation: <https://ontology.caseontology.org/case/investigation/>
PREFIX uco-action: <https://ontology.unifiedcyberontology.org/uco/action/>
PREFIX uco-core: <https://ontology.unifiedcyberontology.org/uco/core/>
PREFIX uco-identity: <https://ontology.unifiedcyberontology.org/uco/identity/>
SELECT DISTINCT ?lLastName
WHERE
{
# Many actions involve the exhibit's device.
# Look up the exhibit-device based on its exhibit number.
?nOriginalProvenanceRecord
a case-investigation:ProvenanceRecord ;
case-investigation:exhibitNumber "EXH-20190101-7" ;
uco-core:object ?nExhibitDevice ;
.
# Then, look up the people that produced other provenance records for this device.
?nInvestigativeAction
a case-investigation:InvestigativeAction ;
uco-action:performer ?nPerformer ;
uco-action:result ?nActionProvenanceRecord ;
.
# This query component ties the provenance records together
# by object-reference to the device.
?nActionProvenanceRecord
a case-investigation:ProvenanceRecord ;
uco-core:object ?nExhibitDevice ;
.
?nPerformer
a uco-identity:Person ;
uco-core:hasFacet ?nSimpleName ;
.
?nSimpleName
a uco-identity:SimpleNameFacet ;
uco-identity:familyName ?lLastName ;
.
}
ORDER BY ?lLastName
{% endhighlight %}
<table border="1" class="dataframe table table-bordered table-condensed">
<thead>
<tr style="text-align: right;">
<th></th>
<th>?lLastName</th>
</tr>
</thead>
<tbody>
<tr>
<th>0</th>
<td>Hudson</td>
</tr>
<tr>
<th>1</th>
<td>Smith</td>
</tr>
<tr>
<th>2</th>
<td>Walker</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="card">
<h5 class="card-header" id="query-exhibit_photos">Photographs of exhibits</h5>
<div class="card-body">
<p class="card-text">What photographs were taken of the exhibit and sub-exhibits? (<a href="src/query-exhibit_photos.sparql">SPARQL source</a>)</p>
{% highlight sparql %}
PREFIX case-investigation: <https://ontology.caseontology.org/case/investigation/>
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-tool: <https://ontology.unifiedcyberontology.org/uco/tool/>
PREFIX uco-types: <https://ontology.unifiedcyberontology.org/uco/types/>
SELECT ?lExhibitNumber ?lFileName ?lModifiedTime ?lHashValue
WHERE {
# This query uses sub-queries to prevent unnecessary joins.
# The first sub-query identifies for which graph nodes we will retrieve
# annotating properties.
# The files being returned are photographs that were created as the
# results of investigative actions, and are recorded in the generated
# provenance records.
# Retrieve the exhibit devices' nodes and the file objects' nodes.
{
SELECT ?nExhibitDevice ?nPictureFile
WHERE {
?nPictureFile
a/rdfs:subClassOf* uco-observable:ObservableObject ;
uco-core:hasFacet ?nRasterPictureFacet ;
.
?nInvestigativeAction
a case-investigation:InvestigativeAction ;
uco-action:instrument ?nCameraDevice ;
uco-action:object ?nExhibitDevice ;
uco-action:result ?nPictureFile ;
uco-action:result ?nProvenanceRecord ;
.
# To avoid confusing pictures taken of evidence with pictures
# extracted from evidence, identify the investigator's camera by
# merit of it being an analytic tool.
{
SELECT ?nCameraDevice
WHERE {
?nCameraDevice
a/rdfs:subClassOf* uco-observable:ObservableObject ;
a uco-tool:AnalyticTool ;
uco-core:hasFacet ?nCameraDeviceDeviceFacet ;
.
?nCameraDeviceDeviceFacet
a uco-observable:DeviceFacet ;
uco-observable:deviceType "camera" ;
.
}
} # Ends sub-query: SELECT ?nCameraDevice
# The provenance record confirms the picture file was recorded in
# the provenance chain.
?nProvenanceRecord
a case-investigation:ProvenanceRecord ;
uco-core:object ?nPictureFile ;
.
# The raster picture facet distinguishes these files as picture
# files.
?nRasterPictureFacet
a uco-observable:RasterPictureFacet ;
.
# Because provenance records are input to some actions, confirm
# that the exhibit device node has a Device facet, to prevent
# accidentally returning provenance records in this inner query's
# results.
# (These two blocks retrieving the facet can cause a Cartesian
# product if not run in a sub-, or at this point sub-sub-, query.)
{
SELECT ?nExhibitDevice
WHERE {
?nExhibitDevice
a/rdfs:subClassOf* uco-observable:Device ;
.
}
} # Ends sub-query: SELECT ?nExhibitDevice
}
} # Ends sub-query: SELECT ?nExhibitDevice ?nPictureFile
# The first returned property for the outer query is the label of the
# subject device, which must be retrieved by one of the provenance
# records that is not a result of taking the pictures.
# This is run in a SELECT DISTINCT sub-query because multiple
# provenance records of the subject device attach the exhibit number
# redundantly.
{
SELECT DISTINCT ?nExhibitDevice ?lExhibitNumber
WHERE {
?nLabellingProvenanceRecord
a case-investigation:ProvenanceRecord ;
case-investigation:exhibitNumber ?lExhibitNumber ;
uco-core:object ?nExhibitDevice ;
.
}
}
# The other properties being returned are characteristics of the
# files. Retrieve those properties once the sub-query has returned
# which files.
?nPictureFile
uco-core:hasFacet ?nContentDataFacet ;
uco-core:hasFacet ?nFileFacet ;
.
?nContentDataFacet
a uco-observable:ContentDataFacet ;
uco-observable:hash ?nHash ;
.
?nHash
uco-types:hashValue ?lHashValue ;
.
?nFileFacet
a uco-observable:FileFacet ;
uco-observable:fileName ?lFileName ;
uco-observable:modifiedTime ?lModifiedTime ;
.
}
ORDER BY ?lExhibitNumber ?lFileName
{% endhighlight %}
<table border="1" class="dataframe table table-bordered table-condensed">
<thead>
<tr style="text-align: right;">
<th></th>
<th>?lExhibitNumber</th>
<th>?lFileName</th>
<th>?lModifiedTime</th>
<th>?lHashValue</th>
</tr>
</thead>
<tbody>
<tr>
<th>0</th>
<td>EXH-20190101-7</td>
<td>IMG_4829.jpg</td>
<td>2019-01-01 14:14:07+00:00</td>
<td>6ba5b138057cca4e737a86083cf28426093f218efbef64967863a6c83138fe89</td>
</tr>
<tr>
<th>1</th>
<td>EXH-20190101-7</td>
<td>IMG_4830.jpg</td>
<td>2019-01-01 14:14:30+00:00</td>
<td>cadc54f42a9d01ecb5ecdc3a9a4824c73301d6ce9857eaa73fc28317ccd5d40f</td>
</tr>
<tr>
<th>2</th>
<td>EXH-20190101-7</td>
<td>IMG_4831.jpg</td>
<td>2019-01-01 14:15:00+00:00</td>
<td>ee3657ad73c09098312e71a31ca7ac468c1fb1b998b5d6647ad471dcc89c4141</td>
</tr>
<tr>
<th>3</th>
<td>EXH-20190101-7</td>
<td>IMG_4832.jpg</td>
<td>2019-01-01 14:20:07+00:00</td>
<td>132bfadcc46addedcafcd84653f1a56007eba2f27bfcb15824536cda65a49c9a</td>
</tr>
<tr>
<th>4</th>
<td>EXH-20190101-7</td>
<td>IMG_4833.jpg</td>
<td>2019-01-01 14:20:32+00:00</td>
<td>1929ec6c6186f43860da7c77c0c65d1b8543a5543572261a1b71084e7bf80a0e</td>
</tr>
<tr>
<th>5</th>
<td>EXH-20190101-7</td>
<td>IMG_4834.jpg</td>
<td>2019-01-01 14:21:00+00:00</td>
<td>fc0819ed4dcb2af9c85a041a0da11ea6a146dec0b108c09f5e0d41e8ea3bb041</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="card">
<h5 class="card-header" id="query-actions_to_artifact">Actions to artifact</h5>
<div class="card-body">
<p class="card-text">Among the artifacts extracted from the device, a picture file <code>IMG_1863.jpg</code> was extracted. Starting at initial evidence submission, what actions were taken to extract that file?</p>
<p class="card-text">This query inspects the derivation chains of artifacts. A supplemental graph of a <a href="https://www.w3.org/TR/prov-o/#wasInformedBy">predicate adapted from the W3C PROV Ontology</a> creates a chain of <code>InvestigativeAction</code>s that can be analyzed with a path operator. (SPARQL source for <a href="../src/query-construct-wasInformedBy.sparql"><code>wasInformedBy</code></a>.)</p>
{% highlight sparql %}
CONSTRUCT
{
# Identify all actions A, B chained together by passing some
# intermediary result, A -> result -> B.
#
# Since the latest provenance record for the object should be used,
# the generating action needs to be considered in the construction
# as well.
?nUsingAction case-investigation:wasInformedBy ?nMostRecentAction .
}
WHERE {
# ?nResult can only be generated by one action - i.e. can only be a
# result of one action.
?nGeneratingAction
a case-investigation:InvestigativeAction ;
uco-action:result ?nGenerationProvenanceRecord ;
uco-action:result ?nResult ;
.
# ?nResult might be processed by multiple actions, but cannot be
# generated by multiple actions. The designation for having been
# processed multiple times is to be a member of multiple provenance
# records.
#
# To allow for the case where ?nGeneratingAction is also
# ?nMostRecentAction, do not require ?nResult be an input to
# ?nMostRecentAction.
#
# The nested SELECT DISTINCT clause removes repetitions from multiple
# nResult nodes passed between activities. The nResult nodes are not
# included in the constructed results, so there's no sense making the
# results consumer loop through the same action pair once per distinct
# passed result. This sub-query reduces the inspection to all pairs
# of actions linked by passing some provenance record.
{
SELECT DISTINCT ?nMostRecentAction ?nUsingAction ?nMostRecentProvenanceRecord
WHERE {
?nMostRecentAction
a case-investigation:InvestigativeAction ;
uco-action:result ?nMostRecentProvenanceRecord ;
.
?nUsingAction
a case-investigation:InvestigativeAction ;
uco-action:object ?nMostRecentProvenanceRecord ;
.
?nMostRecentProvenanceRecord
a case-investigation:ProvenanceRecord ;
.
}
}
?nUsingAction
uco-action:object ?nResult ;
.
?nGenerationProvenanceRecord
a case-investigation:ProvenanceRecord ;
uco-core:object ?nResult ;
.
#It is possible that ?nMostRecentProvenanceRecord may also be
# ?nGenerationProvenanceRecord.
?nMostRecentProvenanceRecord
uco-core:object ?nResult ;
.
}
{% endhighlight %}
<p class="card-text">That graph is then analyzed with the <code>*</code> path operator. The query uses <code>*</code> instead of <code>+</code> in order to include the action that generated the file as well. (<a href="src/query-actions_to_artifact.sparql">SPARQL source</a>)</p>
{% highlight sparql %}
PREFIX case-investigation: <https://ontology.caseontology.org/case/investigation/>
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/>
SELECT DISTINCT ?nDerivingAction ?lDescription
WHERE {
# Identify action at end of path.
?nEndAction
uco-action:endTime ?lEndActionEndTime ;
uco-action:result/uco-core:hasFacet/uco-observable:fileName "IMG_1863.jpg" ;
.
# Identify all actions in chain.
?nEndAction case-investigation:wasInformedBy* ?nDerivingAction .
# Extract annotations of actions in chain.
?nDerivingAction
uco-core:description ?lDescription ;
uco-action:endTime ?lDerivingActionEndTime ;
.
}
ORDER BY ?lDerivingActionEndTime
{% endhighlight %}
<table border="1" class="dataframe table table-bordered table-condensed">
<thead>
<tr style="text-align: right;">
<th></th>
<th>?nDerivingAction</th>
<th>?lDescription</th>
</tr>
</thead>
<tbody>
<tr>
<th>0</th>
<td>http://example.org/kb/action-uuid-1</td>
<td>Exhibit submitted for Kiosk examination</td>
</tr>
<tr>
<th>1</th>
<td>http://example.org/kb/action-uuid-3</td>
<td>Exhibit assigned to Kiosk technician</td>
</tr>
<tr>
<th>2</th>
<td>http://example.org/kb/action-uuid-7</td>
<td>Exhibit Connected to Kiosk & process started; exhibit disconnected at conclusion</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="card">
<h5 class="card-header" id="query-initial_evidence_submission">Initial Evidence Submission</h5>
<div class="card-body">
<p class="card-text">What objects were the initial evidence submission(s) into the <code>ProvenanceRecord</code> chain? (<a href="src/query-initial_evidence_submission.sparql">SPARQL source</a>)</p>
{% highlight sparql %}
PREFIX case-investigation: <https://ontology.caseontology.org/case/investigation/>
PREFIX uco-core: <https://ontology.unifiedcyberontology.org/uco/core/>
SELECT DISTINCT ?nSourceObject
WHERE
{
# Locate the objects by crossing the rootExhibitNumber
# with the exhibitNumber, to find the source ProvenanceRecord.
?nProvenanceRecord
uco-core:object ?nSourceObject ;
case-investigation:rootExhibitNumber ?lExhibitNumber ;
case-investigation:exhibitNumber ?lExhibitNumber ;
.
}
{% endhighlight %}
<table border="1" class="dataframe table table-bordered table-condensed">
<thead>
<tr style="text-align: right;">
<th></th>
<th>?nSourceObject</th>
</tr>
</thead>
<tbody>
<tr>
<th>0</th>
<td>http://example.org/kb/subject-device-uuid-1</td>
</tr>
</tbody>
</table>
<div class="card">
<h5 class="card-header" id="query-selection_from_automated_exhibit_extraction">Selection from Automated Exhibit Extraction</h5>
<div class="card-body">
<p class="card-text">Several picture files were extracted by the kiosk, tracked in the internal process-record exhibit <code>EXH-20190101-7-KioskReport</code>. Some of them were selected by the investigator for presentation in exhibit <code>EXH-20190101-7-B</code>, after visual review of just some of the files. Which were extracted, displayed, and selected? (<a href="src/query-selection_from_automated_exhibit_extraction.sparql">SPARQL source</a>)</p>
{% highlight sparql %}
PREFIX case-investigation: <https://ontology.caseontology.org/case/investigation/>
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/>
SELECT DISTINCT ?lFileName ?lReviewStatus
WHERE {
# Use the requested exhibit numbers to identify provenance records
# that will contain the files of interest.
# The extraction provenance record:
?nExtractionProvenanceRecord
a case-investigation:ProvenanceRecord ;
case-investigation:exhibitNumber "EXH-20190101-7-KioskReport" ;
uco-core:object ?nFile ;
.
# The selection provenance record:
?nSelectionProvenanceRecord
a case-investigation:ProvenanceRecord ;
case-investigation:exhibitNumber "EXH-20190101-7-B" ;
.
# Find the selection action via the provenance records being some
# input and output.
?nSelectionAction
uco-action:object ?nExtractionProvenanceRecord ;
uco-action:result ?nSelectionProvenanceRecord ;
.
# Use duck-typing to filter down to the objects that have a
# RasterPictureFacet.
?nFile
uco-core:hasFacet / a uco-observable:RasterPictureFacet ;
uco-core:hasFacet / uco-observable:fileName ?lFileName ;
.
# Run a sub-query to find each requested status for the extracted
# files.
# Each will depend on the non-existence of some pattern.
{
SELECT ?nFile ?lReviewStatus
WHERE {
# Find the files in the extracted-set that were not inputs to the
# selection action.
# (This example chooses to represent a picture being displayed to
# the reviewer as being the threshold for consideration as an
# input to the action. Other systems may differ.)
FILTER NOT EXISTS {
?nSelectionAction
uco-action:object ?nFile ;
.
}
BIND ("Not displayed" AS ?lReviewStatus)
}
}
UNION
{
SELECT ?nFile ?lReviewStatus
WHERE {
?nSelectionAction
uco-action:object ?nFile ;
.
FILTER NOT EXISTS {
?nSelectionProvenanceRecord
uco-core:object ?nFile ;
.
}
BIND ("Displayed" AS ?lReviewStatus)
}
}
UNION
{
SELECT ?nFile ?lReviewStatus
WHERE {
?nSelectionProvenanceRecord
uco-core:object ?nFile ;
.
BIND ("Selected" AS ?lReviewStatus)
}
}
}
ORDER BY ?lFileName
{% endhighlight %}
<table border="1" class="dataframe table table-bordered table-condensed">
<thead>
<tr style="text-align: right;">
<th></th>
<th>?lFileName</th>
<th>?lReviewStatus</th>
</tr>
</thead>
<tbody>
<tr>
<th>0</th>
<td>IMG_1863.jpg</td>
<td>Selected</td>
</tr>
<tr>
<th>1</th>
<td>IMG_1864.jpg</td>
<td>Displayed</td>
</tr>
<tr>
<th>2</th>
<td>IMG_1865.jpg</td>
<td>Not displayed</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>