Skip to content

Commit

Permalink
Convert mimeType references to objects
Browse files Browse the repository at this point in the history
The objects will temporarily use the drafting namespace while the
taxonomy is being implemented.

This review also caught a typo of MIME types - JPEGs should be
`image/jpeg`, not `image/jpg`.

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

References:
* ucoProject/UCO#363

Signed-off-by: Alex Nelson <[email protected]>
  • Loading branch information
ajnelson-nist committed May 10, 2022
1 parent b7a364a commit 95418fe
Show file tree
Hide file tree
Showing 4 changed files with 68 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
"@context": {
"@vocab": "http://example.org/local#",
"kb": "http://example.org/kb/",
"draft": "http://example.org/draft#",
"drafting": "http://example.org/ontology/drafting/",
"rdfs": "http://www.w3.org/2000/01/rdf-schema#",
"skos": "http://www.w3.org/2004/02/skos/core#",
"uco-core": "https://ontology.unifiedcyberontology.org/uco/core/",
"uco-observable": "https://ontology.unifiedcyberontology.org/uco/observable/",
"uco-types": "https://ontology.unifiedcyberontology.org/uco/types/",
Expand Down Expand Up @@ -104,6 +106,14 @@
}
]
},
{
"@id": "drafting:application/x-compressed",
"@type": "uco-types:NonIANAMediaType",
"rdfs:seeAlso": {
"@id": "https://github.com/ucoProject/UCO/Issues/363"
},
"skos:notation": "application/x-compressed"
},
{
"@id": "kb:decompressed_gzip0",
"@type": "uco-observable:ContentData",
Expand All @@ -115,7 +125,9 @@
"@value": "Big-endian"
},
"uco-observable:magicNumber": "H4s=",
"uco-observable:mimeType": "application/x-compressed",
"uco-observable:mimeType": {
"@id": "drafting:application/x-compressed"
},
"uco-observable:sizeInBytes": 17605,
"uco-observable:hash": [
{
Expand Down
14 changes: 13 additions & 1 deletion examples/illustrations/exif_data/exif_data.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
"kb": "http://example.org/kb/",
"case-investigation": "https://ontology.caseontology.org/case/investigation/",
"draft": "http://example.org/draft#",
"rdfs": "http://www.w3.org/2000/01/rdf-schema#",
"skos": "http://www.w3.org/2004/02/skos/core#",
"uco-action": "https://ontology.unifiedcyberontology.org/uco/action/",
"uco-core": "https://ontology.unifiedcyberontology.org/uco/core/",
"uco-identity": "https://ontology.unifiedcyberontology.org/uco/identity/",
Expand Down Expand Up @@ -53,6 +55,14 @@
}
]
},
{
"@id": "drafting:image/jpeg",
"@type": "uco-types:IANAMediaType",
"rdfs:seeAlso": {
"@id": "https://github.com/ucoProject/UCO/Issues/363"
},
"skos:notation": "image/jpeg"
},
{
"@id": "kb:digital_photograph1",
"@type": "uco-observable:File",
Expand All @@ -72,7 +82,9 @@
"@value": "Big-endian"
},
"uco-observable:magicNumber": "/9j/ww==",
"uco-observable:mimeType": "image/jpg",
"uco-observable:mimeType": {
"@id": "drafting:image/jpeg"
},
"uco-observable:sizeInBytes": 35000,
"uco-observable:dataPayload": "<base 64 encoded data of the file>",
"uco-observable:hash": [
Expand Down
27 changes: 24 additions & 3 deletions examples/illustrations/file/file.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@
"@vocab": "http://example.org/local#",
"kb": "http://example.org/kb/",
"acme": "http://custompb.acme.org/core#",
"draft": "http://example.org/draft#",
"drafting": "http://example.org/ontology/drafting/",
"rdfs": "http://www.w3.org/2000/01/rdf-schema#",
"skos": "http://www.w3.org/2004/02/skos/core#",
"uco-core": "https://ontology.unifiedcyberontology.org/uco/core/",
"uco-identity": "https://ontology.unifiedcyberontology.org/uco/identity/",
"uco-observable": "https://ontology.unifiedcyberontology.org/uco/observable/",
Expand Down Expand Up @@ -60,6 +61,14 @@
}
]
},
{
"@id": "drafting:image/jpeg",
"@type": "uco-types:IANAMediaType",
"rdfs:seeAlso": {
"@id": "https://github.com/ucoProject/UCO/Issues/363"
},
"skos:notation": "image/jpeg"
},
{
"@id": "kb:decoded_attachment",
"@type": "uco-observable:ContentData",
Expand All @@ -72,7 +81,9 @@
},
"uco-observable:sizeInBytes": 3500,
"uco-observable:magicNumber": "/9j/ww==",
"uco-observable:mimeType": "image/jpg",
"uco-observable:mimeType": {
"@id": "drafting:image/jpeg"
},
"uco-observable:dataPayload": "<base 64 encoded data of the file>",
"uco-observable:hash": [
{
Expand Down Expand Up @@ -182,6 +193,14 @@
}
]
},
{
"@id": "drafting:application/x-tar",
"@type": "uco-types:NonIANAMediaType",
"rdfs:seeAlso": {
"@id": "https://github.com/ucoProject/UCO/Issues/363"
},
"skos:notation": "application/x-tar"
},
{
"@id": "kb:decrypted_blob",
"@type": "uco-observable:ContentData",
Expand All @@ -191,7 +210,9 @@
"uco-observable:sizeInBytes": 23000,
"uco-observable:dataPayload": "<base 64 encoded data of the file>",
"uco-observable:magicNumber": "NzUgNzMgNzQgNjEgNzI=",
"uco-observable:mimeType": "application/x-tar",
"uco-observable:mimeType": {
"@id": "drafting:application/x-tar"
},
"uco-observable:hash": [
{
"@type": "uco-types:Hash",
Expand Down
20 changes: 17 additions & 3 deletions examples/illustrations/raw_data/raw_data.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,24 @@
"@context": {
"@vocab": "http://example.org/local#",
"kb": "http://example.org/kb/",
"draft": "http://example.org/draft#",
"drafting": "http://example.org/ontology/drafting/",
"rdfs": "http://www.w3.org/2000/01/rdf-schema#",
"skos": "http://www.w3.org/2004/02/skos/core#",
"uco-core": "https://ontology.unifiedcyberontology.org/uco/core/",
"uco-observable": "https://ontology.unifiedcyberontology.org/uco/observable/",
"uco-types": "https://ontology.unifiedcyberontology.org/uco/types/",
"uco-vocabulary": "https://ontology.unifiedcyberontology.org/uco/vocabulary/",
"xsd": "http://www.w3.org/2001/XMLSchema#"
},
"@graph": [
{
"@id": "drafting:image/jpeg",
"@type": "uco-types:IANAMediaType",
"rdfs:seeAlso": {
"@id": "https://github.com/ucoProject/UCO/Issues/363"
},
"skos:notation": "image/jpeg"
},
{
"@id": "kb:digital_photograph_thumbnail1",
"rdfs:seeAlso": {
Expand All @@ -23,7 +33,9 @@
{
"@type": "uco-observable:ContentDataFacet",
"uco-observable:magicNumber": "/9j/4AAQSkZ",
"uco-observable:mimeType": "image/jpg",
"uco-observable:mimeType": {
"@id": "drafting:image/jpeg"
},
"uco-observable:hash": [
{
"@type": "uco-types:Hash",
Expand Down Expand Up @@ -68,7 +80,9 @@
{
"@type": "uco-observable:ContentDataFacet",
"uco-observable:magicNumber": "/9j/4AAQSkZ",
"uco-observable:mimeType": "image/jpg"
"uco-observable:mimeType": {
"@id": "drafting:image/jpeg"
}
}
]
}
Expand Down

0 comments on commit 95418fe

Please sign in to comment.