-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #71 from casework/uco-issues-357-363
UCO Issues 357 and 363
- Loading branch information
Showing
5 changed files
with
510 additions
and
5 deletions.
There are no files selected for viewing
Submodule UCO-unstable
updated
13 files
+11 −0 | ontology/core/core.ttl | |
+2 −0 | ontology/master/uco.ttl | |
+44 −15 | ontology/observable/observable.ttl | |
+33 −0 | ontology/types/types.ttl | |
+6 −0 | tests/examples/Makefile | |
+152 −0 | tests/examples/mime_PASS.json | |
+37 −0 | tests/examples/mime_PASS_validation.ttl | |
+28 −0 | tests/examples/mime_XFAIL.json | |
+72 −0 | tests/examples/mime_XFAIL_validation.ttl | |
+36 −0 | tests/examples/mime_prefix_PASS.json | |
+11 −0 | tests/examples/mime_prefix_PASS_validation.ttl | |
+98 −0 | tests/examples/test_mime.py | |
+29 −0 | tests/examples/test_validation.py |
89 changes: 88 additions & 1 deletion
89
...rations/bulk_extractor_forensic_path/bulk_extractor_forensic_path_validation-unstable.ttl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,98 @@ | ||
@prefix dcterms: <http://purl.org/dc/terms/> . | ||
@prefix observable: <https://ontology.unifiedcyberontology.org/uco/observable/> . | ||
@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#> . | ||
@prefix sh: <http://www.w3.org/ns/shacl#> . | ||
@prefix skos: <http://www.w3.org/2004/02/skos/core#> . | ||
@prefix types: <https://ontology.unifiedcyberontology.org/uco/types/> . | ||
@prefix vocabulary1: <https://ontology.unifiedcyberontology.org/uco/vocabulary/> . | ||
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> . | ||
|
||
[] | ||
a sh:ValidationReport ; | ||
sh:conforms "true"^^xsd:boolean ; | ||
sh:conforms "false"^^xsd:boolean ; | ||
sh:result | ||
[ | ||
a sh:ValidationResult ; | ||
sh:focusNode "application/x-compressed" ; | ||
sh:resultMessage "The used mimeType value is not a concept with a skos:notation. Some consumers of this data expect a string with the MIME 'type/subtype' format to be supplied with skos:notation. Please either add the skos:notation to your input graph or incorporate the UCO MIME Taxonomy."@en ; | ||
sh:resultPath skos:notation ; | ||
sh:resultSeverity sh:Warning ; | ||
sh:sourceConstraintComponent sh:MinCountConstraintComponent ; | ||
sh:sourceShape observable:mimeType-notation ; | ||
] , | ||
[ | ||
a sh:ValidationResult ; | ||
sh:focusNode [ | ||
a observable:ContentDataFacet ; | ||
observable:byteOrder "Big-endian"^^vocabulary1:EndiannessTypeVocab ; | ||
observable:hash [ | ||
a types:Hash ; | ||
types:hashMethod "SHA256"^^vocabulary1:HashNameVocab ; | ||
types:hashValue "8c8b39473c4064f6b4db11a67251ffdf65c42ebadc5c3e02a009f95f6cf7c9e8"^^xsd:hexBinary ; | ||
] ; | ||
observable:magicNumber "H4s=" ; | ||
observable:mimeType "application/x-compressed" ; | ||
observable:sizeInBytes "17605"^^xsd:integer ; | ||
] ; | ||
sh:resultMessage "Value does not have class dcterms:FileFormat" ; | ||
sh:resultPath observable:mimeType ; | ||
sh:resultSeverity sh:Violation ; | ||
sh:sourceConstraintComponent sh:ClassConstraintComponent ; | ||
sh:sourceShape [ | ||
sh:class dcterms:FileFormat ; | ||
sh:nodeKind sh:IRI ; | ||
sh:path observable:mimeType ; | ||
] ; | ||
sh:value "application/x-compressed" ; | ||
] , | ||
[ | ||
a sh:ValidationResult ; | ||
sh:focusNode [ | ||
a observable:ContentDataFacet ; | ||
observable:byteOrder "Big-endian"^^vocabulary1:EndiannessTypeVocab ; | ||
observable:hash [ | ||
a types:Hash ; | ||
types:hashMethod "SHA256"^^vocabulary1:HashNameVocab ; | ||
types:hashValue "8c8b39473c4064f6b4db11a67251ffdf65c42ebadc5c3e02a009f95f6cf7c9e8"^^xsd:hexBinary ; | ||
] ; | ||
observable:magicNumber "H4s=" ; | ||
observable:mimeType "application/x-compressed" ; | ||
observable:sizeInBytes "17605"^^xsd:integer ; | ||
] ; | ||
sh:resultMessage "Value is not an instance of types:MIMEFormat or one of its subclasses. Please consider using a value having type types:IANAMediaType or types:NonIANAMediaType."@en ; | ||
sh:resultPath observable:mimeType ; | ||
sh:resultSeverity sh:Info ; | ||
sh:sourceConstraintComponent sh:ClassConstraintComponent ; | ||
sh:sourceShape observable:mimeType-class-types-MIMEFormat ; | ||
sh:value "application/x-compressed" ; | ||
] , | ||
[ | ||
a sh:ValidationResult ; | ||
sh:focusNode [ | ||
a observable:ContentDataFacet ; | ||
observable:byteOrder "Big-endian"^^vocabulary1:EndiannessTypeVocab ; | ||
observable:hash [ | ||
a types:Hash ; | ||
types:hashMethod "SHA256"^^vocabulary1:HashNameVocab ; | ||
types:hashValue "8c8b39473c4064f6b4db11a67251ffdf65c42ebadc5c3e02a009f95f6cf7c9e8"^^xsd:hexBinary ; | ||
] ; | ||
observable:magicNumber "H4s=" ; | ||
observable:mimeType "application/x-compressed" ; | ||
observable:sizeInBytes "17605"^^xsd:integer ; | ||
] ; | ||
sh:resultMessage "Value is not of Node Kind sh:IRI" ; | ||
sh:resultPath observable:mimeType ; | ||
sh:resultSeverity sh:Violation ; | ||
sh:sourceConstraintComponent sh:NodeKindConstraintComponent ; | ||
sh:sourceShape [ | ||
sh:class dcterms:FileFormat ; | ||
sh:nodeKind sh:IRI ; | ||
sh:path observable:mimeType ; | ||
] ; | ||
sh:value "application/x-compressed" ; | ||
] | ||
; | ||
. | ||
|
92 changes: 91 additions & 1 deletion
92
examples/illustrations/exif_data/exif_data_validation-unstable.ttl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,101 @@ | ||
@prefix dcterms: <http://purl.org/dc/terms/> . | ||
@prefix observable: <https://ontology.unifiedcyberontology.org/uco/observable/> . | ||
@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#> . | ||
@prefix sh: <http://www.w3.org/ns/shacl#> . | ||
@prefix skos: <http://www.w3.org/2004/02/skos/core#> . | ||
@prefix types: <https://ontology.unifiedcyberontology.org/uco/types/> . | ||
@prefix vocabulary1: <https://ontology.unifiedcyberontology.org/uco/vocabulary/> . | ||
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> . | ||
|
||
[] | ||
a sh:ValidationReport ; | ||
sh:conforms "true"^^xsd:boolean ; | ||
sh:conforms "false"^^xsd:boolean ; | ||
sh:result | ||
[ | ||
a sh:ValidationResult ; | ||
sh:focusNode "image/jpg" ; | ||
sh:resultMessage "The used mimeType value is not a concept with a skos:notation. Some consumers of this data expect a string with the MIME 'type/subtype' format to be supplied with skos:notation. Please either add the skos:notation to your input graph or incorporate the UCO MIME Taxonomy."@en ; | ||
sh:resultPath skos:notation ; | ||
sh:resultSeverity sh:Warning ; | ||
sh:sourceConstraintComponent sh:MinCountConstraintComponent ; | ||
sh:sourceShape observable:mimeType-notation ; | ||
] , | ||
[ | ||
a sh:ValidationResult ; | ||
sh:focusNode [ | ||
a observable:ContentDataFacet ; | ||
observable:byteOrder "Big-endian"^^vocabulary1:EndiannessTypeVocab ; | ||
observable:dataPayload "<base 64 encoded data of the file>" ; | ||
observable:hash [ | ||
a types:Hash ; | ||
types:hashMethod "SHA256"^^vocabulary1:HashNameVocab ; | ||
types:hashValue "6b86b273ff34fce19d6b804eff5a3f5747ada4eaa22f1d49c01e52ddb7875b4b"^^xsd:hexBinary ; | ||
] ; | ||
observable:magicNumber "/9j/ww==" ; | ||
observable:mimeType "image/jpg" ; | ||
observable:sizeInBytes "35000"^^xsd:integer ; | ||
] ; | ||
sh:resultMessage "Value does not have class dcterms:FileFormat" ; | ||
sh:resultPath observable:mimeType ; | ||
sh:resultSeverity sh:Violation ; | ||
sh:sourceConstraintComponent sh:ClassConstraintComponent ; | ||
sh:sourceShape [ | ||
sh:class dcterms:FileFormat ; | ||
sh:nodeKind sh:IRI ; | ||
sh:path observable:mimeType ; | ||
] ; | ||
sh:value "image/jpg" ; | ||
] , | ||
[ | ||
a sh:ValidationResult ; | ||
sh:focusNode [ | ||
a observable:ContentDataFacet ; | ||
observable:byteOrder "Big-endian"^^vocabulary1:EndiannessTypeVocab ; | ||
observable:dataPayload "<base 64 encoded data of the file>" ; | ||
observable:hash [ | ||
a types:Hash ; | ||
types:hashMethod "SHA256"^^vocabulary1:HashNameVocab ; | ||
types:hashValue "6b86b273ff34fce19d6b804eff5a3f5747ada4eaa22f1d49c01e52ddb7875b4b"^^xsd:hexBinary ; | ||
] ; | ||
observable:magicNumber "/9j/ww==" ; | ||
observable:mimeType "image/jpg" ; | ||
observable:sizeInBytes "35000"^^xsd:integer ; | ||
] ; | ||
sh:resultMessage "Value is not an instance of types:MIMEFormat or one of its subclasses. Please consider using a value having type types:IANAMediaType or types:NonIANAMediaType."@en ; | ||
sh:resultPath observable:mimeType ; | ||
sh:resultSeverity sh:Info ; | ||
sh:sourceConstraintComponent sh:ClassConstraintComponent ; | ||
sh:sourceShape observable:mimeType-class-types-MIMEFormat ; | ||
sh:value "image/jpg" ; | ||
] , | ||
[ | ||
a sh:ValidationResult ; | ||
sh:focusNode [ | ||
a observable:ContentDataFacet ; | ||
observable:byteOrder "Big-endian"^^vocabulary1:EndiannessTypeVocab ; | ||
observable:dataPayload "<base 64 encoded data of the file>" ; | ||
observable:hash [ | ||
a types:Hash ; | ||
types:hashMethod "SHA256"^^vocabulary1:HashNameVocab ; | ||
types:hashValue "6b86b273ff34fce19d6b804eff5a3f5747ada4eaa22f1d49c01e52ddb7875b4b"^^xsd:hexBinary ; | ||
] ; | ||
observable:magicNumber "/9j/ww==" ; | ||
observable:mimeType "image/jpg" ; | ||
observable:sizeInBytes "35000"^^xsd:integer ; | ||
] ; | ||
sh:resultMessage "Value is not of Node Kind sh:IRI" ; | ||
sh:resultPath observable:mimeType ; | ||
sh:resultSeverity sh:Violation ; | ||
sh:sourceConstraintComponent sh:NodeKindConstraintComponent ; | ||
sh:sourceShape [ | ||
sh:class dcterms:FileFormat ; | ||
sh:nodeKind sh:IRI ; | ||
sh:path observable:mimeType ; | ||
] ; | ||
sh:value "image/jpg" ; | ||
] | ||
; | ||
. | ||
|
Oops, something went wrong.