Skip to content

Commit

Permalink
Define DownloadableObjects hierarchy and DownloadableRelation
Browse files Browse the repository at this point in the history
This patch re-introduces `DownloadableFile`, as well as some related
classes, to describe a concept IRI that behaves as a file-yielding URL.

This patch removes a qualified SHACL constraint that had been written on
a conflated-classes guess that instigated UCO Issue 534.  After
discussion on Issue 534, this shape should have been removed, but it
wasn't until pySHACL Issue 213 was addressed that the shape started
triggering and raising awareness it was still around.

Hand-maintained data, as well as the Digital Corpora rendering script,
have been updated to accommodate the new shapes around
`DownloadableObject` and `DownloadableRelation`.  A later patch will
need to add the `DownloadableRelation`s to the chain of custody.

A follow-on patch will regenerate Make-managed files.

References:
* RDFLib/pySHACL#213
* ucoProject/UCO#534

Signed-off-by: Alex Nelson <alexander.nelson@nist.gov>
  • Loading branch information
ajnelson-nist committed Nov 15, 2023
1 parent 035ec5e commit 9d0b2c6
Show file tree
Hide file tree
Showing 10 changed files with 505 additions and 94 deletions.
16 changes: 14 additions & 2 deletions catalog/catalog.ttl
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,19 @@
owl:imports <http://example.org/shapes/case-corpora-local> ;
.

kb:DownloadableRelation-db9bbe6f-8a71-41b4-bab2-122d7a048ca0
a case-corpora:DownloadableRelation ;
uco-core:isDirectional "true"^^xsd:boolean ;
uco-core:kindOfRelationship "Downloadable_From" ;
uco-core:source <https://raw.githubusercontent.com/casework/CASE-Corpora/main/catalog/kb-all.ttl> ;
uco-core:target kb:URL-1816262c-bd39-458a-b7a9-face4a0a35bb ;
.

kb:URL-1816262c-bd39-458a-b7a9-face4a0a35bb
a uco-observable:URL ;
uco-core:hasFacet kb:url-facet-9b081add-c597-4bf4-80d6-2a391eba3a50 ;
.

kb:catalog-f4ffe9dd-9f19-4756-ad7f-24356e5e9752
a case-corpora:Catalog ;
case-corpora:hasDistribution kb:distribution-adc5fd35-e9fa-4d1b-8598-f5ce3bba3e9c ;
Expand Down Expand Up @@ -64,7 +77,6 @@ kb:url-facet-9b081add-c597-4bf4-80d6-2a391eba3a50
.

<https://raw.githubusercontent.com/casework/CASE-Corpora/main/catalog/kb-all.ttl>
a uco-observable:URL ;
uco-core:hasFacet kb:url-facet-9b081add-c597-4bf4-80d6-2a391eba3a50 ;
a case-corpora:DownloadableObject ;
.

145 changes: 127 additions & 18 deletions catalog/datasets/crossover/supplemental.ttl
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
@prefix case-corpora: <http://example.org/ontology/case-corpora/> .
@prefix drafting: <http://example.org/ontology/drafting/> .
@prefix kb: <http://example.org/kb/> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
Expand All @@ -8,6 +9,123 @@
@prefix wd: <http://www.wikidata.org/entity/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .

kb:DownloadableRelation-0d749b77-bb7a-4fd7-adbd-ebafae6ae9ee
a case-corpora:DownloadableRelation ;
uco-core:isDirectional "true"^^xsd:boolean ;
uco-core:kindOfRelationship "Downloadable_From" ;
uco-core:source <https://drive.switch.ch/index.php/s/0c7BiyQZRKOtMMq/download?path=%2Ffiles=Part1_Computer-USB.md5> ;
uco-core:target kb:URL-55a8eeff-4609-451e-b29b-3f4528d09054 ;
.

kb:DownloadableRelation-2aa6c5fe-ea85-4e5f-a398-5a743222ec94
a case-corpora:DownloadableRelation ;
uco-core:isDirectional "true"^^xsd:boolean ;
uco-core:kindOfRelationship "Downloadable_From" ;
uco-core:source <https://drive.switch.ch/index.php/s/0c7BiyQZRKOtMMq/download?path=%2Ffiles=Part1_Computer-USB.sha256> ;
uco-core:target kb:URL-28ebac3b-bd82-47a9-98fa-c5eade040705 ;
.

kb:DownloadableRelation-374af858-bfe4-4419-a1c9-02dc68fc01b5
a case-corpora:DownloadableRelation ;
uco-core:isDirectional "true"^^xsd:boolean ;
uco-core:kindOfRelationship "Downloadable_From" ;
uco-core:source <https://drive.switch.ch/index.php/s/0c7BiyQZRKOtMMq/download?path=%2Ffiles=Part2_Samsung_UFDR.sha256> ;
uco-core:target kb:URL-650ec343-ae9f-4889-9dfd-0f45606f526b ;
.

kb:DownloadableRelation-3b1752c2-7806-4cb5-926a-f58067fb68c7
a case-corpora:DownloadableRelation ;
uco-core:isDirectional "true"^^xsd:boolean ;
uco-core:kindOfRelationship "Downloadable_From" ;
uco-core:source <https://drive.switch.ch/index.php/s/0c7BiyQZRKOtMMq/download?path=%2Ffiles=Part2_Samsung.sha256> ;
uco-core:target kb:URL-3585f3b1-8279-4f8c-8e1e-3b18010cafcd ;
.

kb:DownloadableRelation-3ed4592e-e33a-4e6c-893f-6ac7973156c4
a case-corpora:DownloadableRelation ;
uco-core:isDirectional "true"^^xsd:boolean ;
uco-core:kindOfRelationship "Downloadable_From" ;
uco-core:source <https://drive.switch.ch/index.php/s/0c7BiyQZRKOtMMq/download?path=%2Ffiles=Part2_Samsung_UFDR.zip> ;
uco-core:target kb:URL-11ebee68-c7bc-4130-be73-1298181575a1 ;
.

kb:DownloadableRelation-44907477-cfa5-4e37-a407-379a58627ccb
a case-corpora:DownloadableRelation ;
uco-core:isDirectional "true"^^xsd:boolean ;
uco-core:kindOfRelationship "Downloadable_From" ;
uco-core:source <https://drive.switch.ch/index.php/s/0c7BiyQZRKOtMMq/download?path=%2Ffiles=Part2_Samsung.zip> ;
uco-core:target kb:URL-f1cec27b-b243-4a98-8d57-719376b059d1 ;
.

kb:DownloadableRelation-73e77820-e08f-4196-a1f0-5bfb95fb07a6
a case-corpora:DownloadableRelation ;
uco-core:isDirectional "true"^^xsd:boolean ;
uco-core:kindOfRelationship "Downloadable_From" ;
uco-core:source <https://drive.switch.ch/index.php/s/0c7BiyQZRKOtMMq/download?path=%2Ffiles=Part2_Samsung.md5> ;
uco-core:target kb:URL-05e18d67-0d0d-4522-8c73-c4fc73a37585 ;
.

kb:DownloadableRelation-a1696319-ae91-4741-895b-19e23e6bc387
a case-corpora:DownloadableRelation ;
uco-core:isDirectional "true"^^xsd:boolean ;
uco-core:kindOfRelationship "Downloadable_From" ;
uco-core:source <https://drive.switch.ch/index.php/s/0c7BiyQZRKOtMMq/download?path=%2Ffiles=Part2_Samsung_UFDR.md5> ;
uco-core:target kb:URL-0ceb353f-d908-478d-8f8d-07d75589046c ;
.

kb:DownloadableRelation-e73e5990-d2e6-45fa-b801-dbdf1b96838e
a case-corpora:DownloadableRelation ;
uco-core:isDirectional "true"^^xsd:boolean ;
uco-core:kindOfRelationship "Downloadable_From" ;
uco-core:source <https://drive.switch.ch/index.php/s/0c7BiyQZRKOtMMq/download?path=%2Ffiles=Part1_Computer-USB.zip> ;
uco-core:target kb:URL-44c35322-f850-4338-969e-45d9fb5e511e ;
.

kb:URL-05e18d67-0d0d-4522-8c73-c4fc73a37585
a uco-observable:URL ;
uco-core:hasFacet kb:url-facet-88fc82c0-3994-434c-8ec7-8e2261060d71 ;
.

kb:URL-0ceb353f-d908-478d-8f8d-07d75589046c
a uco-observable:URL ;
uco-core:hasFacet kb:url-facet-a1647374-f59d-48c1-b763-b93b37d32536 ;
.

kb:URL-11ebee68-c7bc-4130-be73-1298181575a1
a uco-observable:URL ;
uco-core:hasFacet kb:url-facet-bc8514bd-3852-4c91-a45f-5e587b0062e9 ;
.

kb:URL-28ebac3b-bd82-47a9-98fa-c5eade040705
a uco-observable:URL ;
uco-core:hasFacet kb:url-facet-2645d00d-1b22-44c6-bd39-82550044a50f ;
.

kb:URL-3585f3b1-8279-4f8c-8e1e-3b18010cafcd
a uco-observable:URL ;
uco-core:hasFacet kb:url-facet-92bc17e0-745c-48bb-acc0-ea634746711a ;
.

kb:URL-44c35322-f850-4338-969e-45d9fb5e511e
a uco-observable:URL ;
uco-core:hasFacet kb:url-facet-74e92a95-d670-454f-b606-4ad7135dbb73 ;
.

kb:URL-55a8eeff-4609-451e-b29b-3f4528d09054
a uco-observable:URL ;
uco-core:hasFacet kb:url-facet-0fa77d25-7669-4486-bc57-02b9f2fe5a6f ;
.

kb:URL-650ec343-ae9f-4889-9dfd-0f45606f526b
a uco-observable:URL ;
uco-core:hasFacet kb:url-facet-abc1e0e4-c4b3-42f6-b83d-e0f6567c2903 ;
.

kb:URL-f1cec27b-b243-4a98-8d57-719376b059d1
a uco-observable:URL ;
uco-core:hasFacet kb:url-facet-9aa3ffbf-0251-4d56-b22e-dbe6f9cbda2d ;
.

kb:device-facet-1ee161fc-5b41-48e0-bbdc-69ffa8c03230
a uco-observable:DeviceFacet ;
uco-observable:manufacturer wd:Q20716 ;
Expand Down Expand Up @@ -66,47 +184,38 @@ kb:url-facet-bc8514bd-3852-4c91-a45f-5e587b0062e9
.

<https://drive.switch.ch/index.php/s/0c7BiyQZRKOtMMq/download?path=%2Ffiles=Part1_Computer-USB.md5>
a uco-observable:URL ;
uco-core:hasFacet kb:url-facet-0fa77d25-7669-4486-bc57-02b9f2fe5a6f ;
a case-corpora:DownloadableFile ;
.

<https://drive.switch.ch/index.php/s/0c7BiyQZRKOtMMq/download?path=%2Ffiles=Part1_Computer-USB.sha256>
a uco-observable:URL ;
uco-core:hasFacet kb:url-facet-2645d00d-1b22-44c6-bd39-82550044a50f ;
a case-corpora:DownloadableFile ;
.

<https://drive.switch.ch/index.php/s/0c7BiyQZRKOtMMq/download?path=%2Ffiles=Part1_Computer-USB.zip>
a uco-observable:URL ;
uco-core:hasFacet kb:url-facet-74e92a95-d670-454f-b606-4ad7135dbb73 ;
a case-corpora:DownloadableFile ;
.

<https://drive.switch.ch/index.php/s/0c7BiyQZRKOtMMq/download?path=%2Ffiles=Part2_Samsung.md5>
a uco-observable:URL ;
uco-core:hasFacet kb:url-facet-88fc82c0-3994-434c-8ec7-8e2261060d71 ;
a case-corpora:DownloadableFile ;
.

<https://drive.switch.ch/index.php/s/0c7BiyQZRKOtMMq/download?path=%2Ffiles=Part2_Samsung.sha256>
a uco-observable:URL ;
uco-core:hasFacet kb:url-facet-92bc17e0-745c-48bb-acc0-ea634746711a ;
a case-corpora:DownloadableFile ;
.

<https://drive.switch.ch/index.php/s/0c7BiyQZRKOtMMq/download?path=%2Ffiles=Part2_Samsung.zip>
a uco-observable:URL ;
uco-core:hasFacet kb:url-facet-9aa3ffbf-0251-4d56-b22e-dbe6f9cbda2d ;
a case-corpora:DownloadableFile ;
.

<https://drive.switch.ch/index.php/s/0c7BiyQZRKOtMMq/download?path=%2Ffiles=Part2_Samsung_UFDR.md5>
a uco-observable:URL ;
uco-core:hasFacet kb:url-facet-a1647374-f59d-48c1-b763-b93b37d32536 ;
a case-corpora:DownloadableFile ;
.

<https://drive.switch.ch/index.php/s/0c7BiyQZRKOtMMq/download?path=%2Ffiles=Part2_Samsung_UFDR.sha256>
a uco-observable:URL ;
uco-core:hasFacet kb:url-facet-abc1e0e4-c4b3-42f6-b83d-e0f6567c2903 ;
a case-corpora:DownloadableFile ;
.

<https://drive.switch.ch/index.php/s/0c7BiyQZRKOtMMq/download?path=%2Ffiles=Part2_Samsung_UFDR.zip>
a uco-observable:URL ;
uco-core:hasFacet kb:url-facet-bc8514bd-3852-4c91-a45f-5e587b0062e9 ;
a case-corpora:DownloadableFile ;
.

65 changes: 57 additions & 8 deletions catalog/datasets/dfrws2017-challenge/supplemental.ttl
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
@prefix case-corpora: <http://example.org/ontology/case-corpora/> .
@prefix kb: <http://example.org/kb/> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix prov: <http://www.w3.org/ns/prov#> .
Expand All @@ -8,6 +9,58 @@
@prefix wd: <http://www.wikidata.org/entity/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .

kb:DownloadableRelation-03131d31-e559-49d5-a3a6-e75d2fbf0ee3
a case-corpora:DownloadableRelation ;
uco-core:isDirectional "true"^^xsd:boolean ;
uco-core:kindOfRelationship "Downloadable_From" ;
uco-core:source <https://www.dropbox.com/s/vvkza954gn9sx89/001-SmartTV-RaspberryPi.zip?dl=0> ;
uco-core:target kb:URL-d7608b02-86e1-4973-ad57-0e7b3e16256a ;
.

kb:DownloadableRelation-45729df9-dbb6-402f-a946-121b78af234f
a case-corpora:DownloadableRelation ;
uco-core:isDirectional "true"^^xsd:boolean ;
uco-core:kindOfRelationship "Downloadable_From" ;
uco-core:source <https://github.com/dfrws/dfrws2017-challenge/blob/master/materials/005-Amazon-Echo-Alexa-Web-Scrape.zip> ;
uco-core:target kb:URL-f21d9735-65ea-41a3-a032-ce7afae23455 ;
.

kb:DownloadableRelation-aca66eb5-d2d0-4c4a-a96e-1153008fd05a
a case-corpora:DownloadableRelation ;
uco-core:isDirectional "true"^^xsd:boolean ;
uco-core:kindOfRelationship "Downloadable_From" ;
uco-core:source <https://github.com/dfrws/dfrws2017-challenge/blob/master/materials/004-Onhub-diagnostic-report> ;
uco-core:target kb:URL-69e88242-f05e-43fb-b94d-74a03023e372 ;
.

kb:DownloadableRelation-f3f089bb-ac1c-4250-b006-da46e89cd230
a case-corpora:DownloadableRelation ;
uco-core:isDirectional "true"^^xsd:boolean ;
uco-core:kindOfRelationship "Downloadable_From" ;
uco-core:source <https://github.com/dfrws/dfrws2017-challenge/blob/master/materials/IoT_Net_Traffic.zip> ;
uco-core:target kb:URL-7023cbc0-a453-4972-84ce-58f8c1636407 ;
.

kb:URL-69e88242-f05e-43fb-b94d-74a03023e372
a uco-observable:URL ;
uco-core:hasFacet kb:url-facet-2f2958a3-7e9d-4d14-b31f-4148d35ab52c ;
.

kb:URL-7023cbc0-a453-4972-84ce-58f8c1636407
a uco-observable:URL ;
uco-core:hasFacet kb:url-facet-9b9d4a1a-059e-47f8-aee0-d93edf61b5f2 ;
.

kb:URL-d7608b02-86e1-4973-ad57-0e7b3e16256a
a uco-observable:URL ;
uco-core:hasFacet kb:url-facet-d9e4bbae-4b47-4d8c-b547-9e524d3a4ca0 ;
.

kb:URL-f21d9735-65ea-41a3-a032-ce7afae23455
a uco-observable:URL ;
uco-core:hasFacet kb:url-facet-785c662e-8261-4a17-8031-114f86f99af1 ;
.

kb:device-650599c6-701f-4f2e-becb-74398b366ba3
a uco-observable:Device ;
uco-core:description "Google OnHub wifi router connected to SmartThings Hub and IPTime switch" ;
Expand Down Expand Up @@ -85,22 +138,18 @@ kb:url-facet-d9e4bbae-4b47-4d8c-b547-9e524d3a4ca0
.

<https://github.com/dfrws/dfrws2017-challenge/blob/master/materials/004-Onhub-diagnostic-report>
a uco-observable:URL ;
uco-core:hasFacet kb:url-facet-2f2958a3-7e9d-4d14-b31f-4148d35ab52c ;
a case-corpora:DownloadableFile ;
.

<https://github.com/dfrws/dfrws2017-challenge/blob/master/materials/005-Amazon-Echo-Alexa-Web-Scrape.zip>
a uco-observable:URL ;
uco-core:hasFacet kb:url-facet-785c662e-8261-4a17-8031-114f86f99af1 ;
a case-corpora:DownloadableFile ;
.

<https://github.com/dfrws/dfrws2017-challenge/blob/master/materials/IoT_Net_Traffic.zip>
a uco-observable:URL ;
uco-core:hasFacet kb:url-facet-9b9d4a1a-059e-47f8-aee0-d93edf61b5f2 ;
a case-corpora:DownloadableFile ;
.

<https://www.dropbox.com/s/vvkza954gn9sx89/001-SmartTV-RaspberryPi.zip?dl=0>
a uco-observable:URL ;
uco-core:hasFacet kb:url-facet-d9e4bbae-4b47-4d8c-b547-9e524d3a4ca0 ;
a case-corpora:DownloadableFile ;
.

8 changes: 7 additions & 1 deletion catalog/kb-datasets-shapes.ttl
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
@prefix case-corpora: <http://example.org/ontology/case-corpora/> .
@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#> .
Expand All @@ -10,8 +11,13 @@
rdfs:comment "This file contains adjustments to make solely for validating kb-datasets.ttl."@en ;
.

case-corpora:DownloadableObject
sh:deactivated "true"^^xsd:boolean ;
sh:description "This shape is deactivated for kb-datasets.ttl, so each distribution.ttl can make references to download URLs without needing to specify DownloadRelations." ;
.

sh-case-corpora:hasDownloadURL-range-shape
sh:deactivated "true"^^xsd:boolean ;
sh:description "This shape is deactivated for kb-datasets.ttl, so each distribution.ttl can make references to download URLs without needing to fully specify the URLs." ;
sh:description "This shape is deactivated for kb-datasets.ttl, so each distribution.ttl can make references to download URLs without needing to fully specify the \"download URL's\" class." ;
.

Loading

0 comments on commit 9d0b2c6

Please sign in to comment.