From cf312965d142693c14cadacf6459c4a7b02a792c Mon Sep 17 00:00:00 2001 From: Alex Nelson Date: Tue, 8 Jun 2021 20:14:01 -0400 Subject: [PATCH 1/6] Update CASE-Examples-QC pointer to include CASE 0.4.0 updates References: * [AC-183] Apply minimal CASE-Utilities-Python updates to use CASE 0.4.0 and UCO 0.6.0 --- dependencies/CASE-Examples-QC | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dependencies/CASE-Examples-QC b/dependencies/CASE-Examples-QC index 574a6a1..7a678bc 160000 --- a/dependencies/CASE-Examples-QC +++ b/dependencies/CASE-Examples-QC @@ -1 +1 @@ -Subproject commit 574a6a14920f43c7a7b06db1cfca5c96b37cf1b7 +Subproject commit 7a678bc0bb99b9a722b6e5ba4b05ec4cd7525bd3 From 491aee63a0de68bf1c0d507a39970a3ddbeca2f5 Mon Sep 17 00:00:00 2001 From: Alex Nelson Date: Tue, 8 Jun 2021 20:34:59 -0400 Subject: [PATCH 2/6] Have clean recipe remove download flag files Signed-off-by: Alex Nelson --- Makefile | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Makefile b/Makefile index 8d36eba..4661b8e 100644 --- a/Makefile +++ b/Makefile @@ -48,6 +48,12 @@ clean: @$(MAKE) \ --directory tests \ clean + @rm -f \ + .git_submodule_init.done.log + @#Remove flag files that are normally set after deeper submodules and rdf-toolkit are downloaded. + @rm -f \ + dependencies/CASE-Examples-QC/.git_submodule_init.done.log \ + dependencies/CASE-Examples-QC/.lib.done.log distclean: \ clean From 034874cccc7914d24f3b17895964aa052db23a09 Mon Sep 17 00:00:00 2001 From: Alex Nelson Date: Tue, 8 Jun 2021 20:36:52 -0400 Subject: [PATCH 3/6] Update rdf-toolkit pointer to use update to original download location References: * [AC-183] Apply minimal CASE-Utilities-Python updates to use CASE 0.4.0 and UCO 0.6.0 Signed-off-by: Alex Nelson --- tests/case_file/Makefile | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/tests/case_file/Makefile b/tests/case_file/Makefile index e917f0a..cbbcc2f 100644 --- a/tests/case_file/Makefile +++ b/tests/case_file/Makefile @@ -19,9 +19,7 @@ tests_srcdir := $(top_srcdir)/tests qc_srcdir := $(top_srcdir)/dependencies/CASE-Examples-QC -case_srcdir := $(qc_srcdir)/dependencies/CASE-Examples/dependencies/CASE - -RDF_TOOLKIT_JAR := $(case_srcdir)/lib/rdf-toolkit.jar +RDF_TOOLKIT_JAR := $(qc_srcdir)/dependencies/CASE-Examples/dependencies/CASE-0.3.0/CASE/lib/rdf-toolkit.jar COMM ?= $(shell which gcomm 2>/dev/null || which comm) ifeq ($(COMM),) From 0e875c9ba6ddf52df556cc535f25e970086d015c Mon Sep 17 00:00:00 2001 From: Alex Nelson Date: Tue, 8 Jun 2021 20:42:53 -0400 Subject: [PATCH 4/6] Remove xsd:long usage References: * [AC-183] Apply minimal CASE-Utilities-Python updates to use CASE 0.4.0 and UCO 0.6.0 * [UCO OC-19] (CP-24) UCO might not need xsd:long Signed-off-by: Alex Nelson --- case_utils/case_file/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/case_utils/case_file/__init__.py b/case_utils/case_file/__init__.py index 174b539..7d07afb 100644 --- a/case_utils/case_file/__init__.py +++ b/case_utils/case_file/__init__.py @@ -87,7 +87,7 @@ def create_file_node(graph, filepath, node_iri=None, node_prefix=DEFAULT_PREFIX, graph.add(( n_file_facet, NS_UCO_OBSERVABLE.sizeInBytes, - rdflib.Literal(file_stat.st_size, datatype=NS_XSD.long) + rdflib.Literal(int(file_stat.st_size)) )) graph.add(( n_file, @@ -174,7 +174,7 @@ def create_file_node(graph, filepath, node_iri=None, node_prefix=DEFAULT_PREFIX, graph.add(( n_contentdata_facet, NS_UCO_OBSERVABLE.sizeInBytes, - rdflib.Literal(successful_hashdict["filesize"], datatype=NS_XSD.long) + rdflib.Literal(successful_hashdict["filesize"]) )) # Add confirmed hashes into graph. From 4ec8086943d6458376075d21d910e36e14240305 Mon Sep 17 00:00:00 2001 From: Alex Nelson Date: Tue, 8 Jun 2021 21:06:57 -0400 Subject: [PATCH 5/6] Update demonstration output to show removed xsd:long This was done manually after review of generated files, due to noisy and uninformative blank node renames being introduced for unknown reasons. References: * [AC-183] Apply minimal CASE-Utilities-Python updates to use CASE 0.4.0 and UCO 0.6.0 * [UCO OC-19] (CP-24) UCO might not need xsd:long Signed-off-by: Alex Nelson --- tests/case_file/kb.json | 6 +++--- tests/case_file/kb.ttl | 6 +++--- tests/case_file/sample.txt-disable_hashes.ttl | 2 +- tests/case_file/sample.txt-nocompact.json | 12 +++--------- tests/case_file/sample.txt.json | 12 +++--------- tests/case_file/sample.txt.ttl | 4 ++-- 6 files changed, 15 insertions(+), 27 deletions(-) diff --git a/tests/case_file/kb.json b/tests/case_file/kb.json index 454e492..a2d427a 100644 --- a/tests/case_file/kb.json +++ b/tests/case_file/kb.json @@ -19,7 +19,7 @@ "@value": "2010-01-02T03:04:56+00:00" }, "uco-observable:sizeInBytes": { - "@type": "xsd:long", + "@type": "xsd:integer", "@value": "4" } } @@ -77,7 +77,7 @@ } ], "uco-observable:sizeInBytes": { - "@type": "xsd:long", + "@type": "xsd:integer", "@value": "4" } }, @@ -89,7 +89,7 @@ "@value": "2010-01-02T03:04:56+00:00" }, "uco-observable:sizeInBytes": { - "@type": "xsd:long", + "@type": "xsd:integer", "@value": "4" } } diff --git a/tests/case_file/kb.ttl b/tests/case_file/kb.ttl index ccd47b8..4e0b8a8 100644 --- a/tests/case_file/kb.ttl +++ b/tests/case_file/kb.ttl @@ -14,7 +14,7 @@ kb:file-16d49634-ba5d-5f46-ab4e-7a577a4e096d a uco-observable:FileFacet ; uco-observable:fileName "sample.txt" ; uco-observable:modifiedTime "2010-01-02T03:04:56+00:00"^^xsd:dateTime ; - uco-observable:sizeInBytes "4"^^xsd:long ; + uco-observable:sizeInBytes "4"^^xsd:integer ; ] ; . @@ -45,13 +45,13 @@ kb:file-57400969-69d0-5d5d-95c4-9dd7de330d3d uco-types:hashValue "ee26b0dd4af7e749aa1a8ee3c10ae9923f618980772e473f8819a5d4940e0db27ac185f8a0e1d5f84f88bc887fd67b143732c304cc5fa9ad8e6f57f50028a8ff"^^xsd:hexBinary ; ] ; - uco-observable:sizeInBytes "4"^^xsd:long ; + uco-observable:sizeInBytes "4"^^xsd:integer ; ] , [ a uco-observable:FileFacet ; uco-observable:fileName "sample.txt" ; uco-observable:modifiedTime "2010-01-02T03:04:56+00:00"^^xsd:dateTime ; - uco-observable:sizeInBytes "4"^^xsd:long ; + uco-observable:sizeInBytes "4"^^xsd:integer ; ] ; . diff --git a/tests/case_file/sample.txt-disable_hashes.ttl b/tests/case_file/sample.txt-disable_hashes.ttl index 97a0180..4462c33 100644 --- a/tests/case_file/sample.txt-disable_hashes.ttl +++ b/tests/case_file/sample.txt-disable_hashes.ttl @@ -12,7 +12,7 @@ kb:file-16d49634-ba5d-5f46-ab4e-7a577a4e096d a uco-observable:FileFacet ; uco-observable:fileName "sample.txt" ; uco-observable:modifiedTime "2010-01-02T03:04:56+00:00"^^xsd:dateTime ; - uco-observable:sizeInBytes "4"^^xsd:long ; + uco-observable:sizeInBytes "4"^^xsd:integer ; ] ; . diff --git a/tests/case_file/sample.txt-nocompact.json b/tests/case_file/sample.txt-nocompact.json index 3b2a1fb..563291d 100644 --- a/tests/case_file/sample.txt-nocompact.json +++ b/tests/case_file/sample.txt-nocompact.json @@ -40,10 +40,7 @@ "@id": "_:Na99d1f2a83814ac491c9b02662ea8587" } ], - "https://unifiedcyberontology.org/ontology/uco/observable#sizeInBytes": { - "@type": "http://www.w3.org/2001/XMLSchema#long", - "@value": "4" - } + "https://unifiedcyberontology.org/ontology/uco/observable#sizeInBytes": 4 }, { "@id": "_:Nad6171b4933a4a84b83faa5d48fd4ddb", @@ -101,10 +98,7 @@ "@type": "http://www.w3.org/2001/XMLSchema#dateTime", "@value": "2010-01-02T03:04:56+00:00" }, - "https://unifiedcyberontology.org/ontology/uco/observable#sizeInBytes": { - "@type": "http://www.w3.org/2001/XMLSchema#long", - "@value": "4" - } + "https://unifiedcyberontology.org/ontology/uco/observable#sizeInBytes": 4 } ] -} \ No newline at end of file +} diff --git a/tests/case_file/sample.txt.json b/tests/case_file/sample.txt.json index f56d602..dfc3075 100644 --- a/tests/case_file/sample.txt.json +++ b/tests/case_file/sample.txt.json @@ -40,10 +40,7 @@ "@id": "_:N77e79676ee5449ea9f6db813fb9dc095" } ], - "uco-observable:sizeInBytes": { - "@type": "xsd:long", - "@value": "4" - } + "uco-observable:sizeInBytes": 4 }, { "@id": "_:N839986b2d63a4963beafbb65016449da", @@ -101,10 +98,7 @@ "@type": "xsd:dateTime", "@value": "2010-01-02T03:04:56+00:00" }, - "uco-observable:sizeInBytes": { - "@type": "xsd:long", - "@value": "4" - } + "uco-observable:sizeInBytes": 4 } ] -} \ No newline at end of file +} diff --git a/tests/case_file/sample.txt.ttl b/tests/case_file/sample.txt.ttl index f9ecfa8..f5d275b 100644 --- a/tests/case_file/sample.txt.ttl +++ b/tests/case_file/sample.txt.ttl @@ -35,13 +35,13 @@ kb:file-57400969-69d0-5d5d-95c4-9dd7de330d3d uco-types:hashValue "ee26b0dd4af7e749aa1a8ee3c10ae9923f618980772e473f8819a5d4940e0db27ac185f8a0e1d5f84f88bc887fd67b143732c304cc5fa9ad8e6f57f50028a8ff"^^xsd:hexBinary ; ] ; - uco-observable:sizeInBytes "4"^^xsd:long ; + uco-observable:sizeInBytes "4"^^xsd:integer ; ] , [ a uco-observable:FileFacet ; uco-observable:fileName "sample.txt" ; uco-observable:modifiedTime "2010-01-02T03:04:56+00:00"^^xsd:dateTime ; - uco-observable:sizeInBytes "4"^^xsd:long ; + uco-observable:sizeInBytes "4"^^xsd:integer ; ] ; . From 5e3f5d1ae07c38632aa44f58d62ccf7bc876a0bd Mon Sep 17 00:00:00 2001 From: Alex Nelson Date: Tue, 8 Jun 2021 21:11:56 -0400 Subject: [PATCH 6/6] Bump implemented CASE version References: * [AC-183] Apply minimal CASE-Utilities-Python updates to use CASE 0.4.0 and UCO 0.6.0 Signed-off-by: Alex Nelson --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 8d1e38a..3852c7f 100644 --- a/README.md +++ b/README.md @@ -58,8 +58,8 @@ This project follows [SEMVER 2.0.0](https://semver.org/) where versions are decl This repository supports the ontology versions that are linked as submodules in the [CASE Examples QC](https://github.com/ajnelson-nist/CASE-Examples-QC) repository. Currently, the ontology versions are: -* CASE - 0.3.0 -* UCO - 0.5.0 +* CASE - 0.4.0 +* UCO - 0.6.0 ## Repository locations