Skip to content

Commit b7ea257

Browse files
Merge pull request #5 from casework/AC-183
Ac 183
2 parents f530add + 5e3f5d1 commit b7ea257

File tree

11 files changed

+27
-35
lines changed

11 files changed

+27
-35
lines changed

Makefile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,12 @@ clean:
4848
@$(MAKE) \
4949
--directory tests \
5050
clean
51+
@rm -f \
52+
.git_submodule_init.done.log
53+
@#Remove flag files that are normally set after deeper submodules and rdf-toolkit are downloaded.
54+
@rm -f \
55+
dependencies/CASE-Examples-QC/.git_submodule_init.done.log \
56+
dependencies/CASE-Examples-QC/.lib.done.log
5157

5258
distclean: \
5359
clean

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,8 @@ This project follows [SEMVER 2.0.0](https://semver.org/) where versions are decl
5858

5959
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:
6060

61-
* CASE - 0.3.0
62-
* UCO - 0.5.0
61+
* CASE - 0.4.0
62+
* UCO - 0.6.0
6363

6464

6565
## Repository locations

case_utils/case_file/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ def create_file_node(graph, filepath, node_iri=None, node_prefix=DEFAULT_PREFIX,
8787
graph.add((
8888
n_file_facet,
8989
NS_UCO_OBSERVABLE.sizeInBytes,
90-
rdflib.Literal(file_stat.st_size, datatype=NS_XSD.long)
90+
rdflib.Literal(int(file_stat.st_size))
9191
))
9292
graph.add((
9393
n_file,
@@ -174,7 +174,7 @@ def create_file_node(graph, filepath, node_iri=None, node_prefix=DEFAULT_PREFIX,
174174
graph.add((
175175
n_contentdata_facet,
176176
NS_UCO_OBSERVABLE.sizeInBytes,
177-
rdflib.Literal(successful_hashdict["filesize"], datatype=NS_XSD.long)
177+
rdflib.Literal(successful_hashdict["filesize"])
178178
))
179179

180180
# Add confirmed hashes into graph.

dependencies/CASE-Examples-QC

Submodule CASE-Examples-QC updated 138 files

tests/case_file/Makefile

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,7 @@ tests_srcdir := $(top_srcdir)/tests
1919

2020
qc_srcdir := $(top_srcdir)/dependencies/CASE-Examples-QC
2121

22-
case_srcdir := $(qc_srcdir)/dependencies/CASE-Examples/dependencies/CASE
23-
24-
RDF_TOOLKIT_JAR := $(case_srcdir)/lib/rdf-toolkit.jar
22+
RDF_TOOLKIT_JAR := $(qc_srcdir)/dependencies/CASE-Examples/dependencies/CASE-0.3.0/CASE/lib/rdf-toolkit.jar
2523

2624
COMM ?= $(shell which gcomm 2>/dev/null || which comm)
2725
ifeq ($(COMM),)

tests/case_file/kb.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
"@value": "2010-01-02T03:04:56+00:00"
2020
},
2121
"uco-observable:sizeInBytes": {
22-
"@type": "xsd:long",
22+
"@type": "xsd:integer",
2323
"@value": "4"
2424
}
2525
}
@@ -77,7 +77,7 @@
7777
}
7878
],
7979
"uco-observable:sizeInBytes": {
80-
"@type": "xsd:long",
80+
"@type": "xsd:integer",
8181
"@value": "4"
8282
}
8383
},
@@ -89,7 +89,7 @@
8989
"@value": "2010-01-02T03:04:56+00:00"
9090
},
9191
"uco-observable:sizeInBytes": {
92-
"@type": "xsd:long",
92+
"@type": "xsd:integer",
9393
"@value": "4"
9494
}
9595
}

tests/case_file/kb.ttl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ kb:file-16d49634-ba5d-5f46-ab4e-7a577a4e096d
1414
a uco-observable:FileFacet ;
1515
uco-observable:fileName "sample.txt" ;
1616
uco-observable:modifiedTime "2010-01-02T03:04:56+00:00"^^xsd:dateTime ;
17-
uco-observable:sizeInBytes "4"^^xsd:long ;
17+
uco-observable:sizeInBytes "4"^^xsd:integer ;
1818
] ;
1919
.
2020

@@ -45,13 +45,13 @@ kb:file-57400969-69d0-5d5d-95c4-9dd7de330d3d
4545
uco-types:hashValue "ee26b0dd4af7e749aa1a8ee3c10ae9923f618980772e473f8819a5d4940e0db27ac185f8a0e1d5f84f88bc887fd67b143732c304cc5fa9ad8e6f57f50028a8ff"^^xsd:hexBinary ;
4646
]
4747
;
48-
uco-observable:sizeInBytes "4"^^xsd:long ;
48+
uco-observable:sizeInBytes "4"^^xsd:integer ;
4949
] ,
5050
[
5151
a uco-observable:FileFacet ;
5252
uco-observable:fileName "sample.txt" ;
5353
uco-observable:modifiedTime "2010-01-02T03:04:56+00:00"^^xsd:dateTime ;
54-
uco-observable:sizeInBytes "4"^^xsd:long ;
54+
uco-observable:sizeInBytes "4"^^xsd:integer ;
5555
]
5656
;
5757
.

tests/case_file/sample.txt-disable_hashes.ttl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ kb:file-16d49634-ba5d-5f46-ab4e-7a577a4e096d
1212
a uco-observable:FileFacet ;
1313
uco-observable:fileName "sample.txt" ;
1414
uco-observable:modifiedTime "2010-01-02T03:04:56+00:00"^^xsd:dateTime ;
15-
uco-observable:sizeInBytes "4"^^xsd:long ;
15+
uco-observable:sizeInBytes "4"^^xsd:integer ;
1616
] ;
1717
.
1818

tests/case_file/sample.txt-nocompact.json

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,7 @@
4040
"@id": "_:Na99d1f2a83814ac491c9b02662ea8587"
4141
}
4242
],
43-
"https://unifiedcyberontology.org/ontology/uco/observable#sizeInBytes": {
44-
"@type": "http://www.w3.org/2001/XMLSchema#long",
45-
"@value": "4"
46-
}
43+
"https://unifiedcyberontology.org/ontology/uco/observable#sizeInBytes": 4
4744
},
4845
{
4946
"@id": "_:Nad6171b4933a4a84b83faa5d48fd4ddb",
@@ -101,10 +98,7 @@
10198
"@type": "http://www.w3.org/2001/XMLSchema#dateTime",
10299
"@value": "2010-01-02T03:04:56+00:00"
103100
},
104-
"https://unifiedcyberontology.org/ontology/uco/observable#sizeInBytes": {
105-
"@type": "http://www.w3.org/2001/XMLSchema#long",
106-
"@value": "4"
107-
}
101+
"https://unifiedcyberontology.org/ontology/uco/observable#sizeInBytes": 4
108102
}
109103
]
110-
}
104+
}

tests/case_file/sample.txt.json

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,7 @@
4040
"@id": "_:N77e79676ee5449ea9f6db813fb9dc095"
4141
}
4242
],
43-
"uco-observable:sizeInBytes": {
44-
"@type": "xsd:long",
45-
"@value": "4"
46-
}
43+
"uco-observable:sizeInBytes": 4
4744
},
4845
{
4946
"@id": "_:N839986b2d63a4963beafbb65016449da",
@@ -101,10 +98,7 @@
10198
"@type": "xsd:dateTime",
10299
"@value": "2010-01-02T03:04:56+00:00"
103100
},
104-
"uco-observable:sizeInBytes": {
105-
"@type": "xsd:long",
106-
"@value": "4"
107-
}
101+
"uco-observable:sizeInBytes": 4
108102
}
109103
]
110-
}
104+
}

tests/case_file/sample.txt.ttl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,13 @@ kb:file-57400969-69d0-5d5d-95c4-9dd7de330d3d
3535
uco-types:hashValue "ee26b0dd4af7e749aa1a8ee3c10ae9923f618980772e473f8819a5d4940e0db27ac185f8a0e1d5f84f88bc887fd67b143732c304cc5fa9ad8e6f57f50028a8ff"^^xsd:hexBinary ;
3636
]
3737
;
38-
uco-observable:sizeInBytes "4"^^xsd:long ;
38+
uco-observable:sizeInBytes "4"^^xsd:integer ;
3939
] ,
4040
[
4141
a uco-observable:FileFacet ;
4242
uco-observable:fileName "sample.txt" ;
4343
uco-observable:modifiedTime "2010-01-02T03:04:56+00:00"^^xsd:dateTime ;
44-
uco-observable:sizeInBytes "4"^^xsd:long ;
44+
uco-observable:sizeInBytes "4"^^xsd:integer ;
4545
]
4646
;
4747
.

0 commit comments

Comments
 (0)