Skip to content

Commit

Permalink
Regenerate Make-managed files
Browse files Browse the repository at this point in the history
References:
* #629

Signed-off-by: Alex Nelson <[email protected]>
  • Loading branch information
ajnelson-nist committed Aug 13, 2024
1 parent aea0c04 commit 6d385ba
Show file tree
Hide file tree
Showing 2 changed files with 86 additions and 141 deletions.
70 changes: 70 additions & 0 deletions tests/examples/hash_PASS_validation.ttl
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,80 @@
@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 types: <https://ontology.unifiedcyberontology.org/uco/types/> .
@prefix vocabulary: <https://ontology.unifiedcyberontology.org/uco/vocabulary/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .

[]
a sh:ValidationReport ;
sh:conforms "true"^^xsd:boolean ;
sh:result
[
a sh:ValidationResult ;
sh:focusNode "1"^^xsd:integer ;
sh:resultMessage "Value is not member of the vocabulary HashNameVocab." ;
sh:resultSeverity sh:Info ;
sh:sourceConstraintComponent sh:InConstraintComponent ;
sh:sourceShape types:hashMethod-objects-in-shape ;
sh:value "1"^^xsd:integer ;
] ,
[
a sh:ValidationResult ;
sh:focusNode "CUSTOM_hash" ;
sh:resultMessage "Value is not member of the vocabulary HashNameVocab." ;
sh:resultSeverity sh:Info ;
sh:sourceConstraintComponent sh:InConstraintComponent ;
sh:sourceShape types:hashMethod-objects-in-shape ;
sh:value "CUSTOM_hash" ;
] ,
[
a sh:ValidationResult ;
sh:focusNode "SHA-1" ;
sh:resultMessage "Value is not member of the vocabulary HashNameVocab." ;
sh:resultSeverity sh:Info ;
sh:sourceConstraintComponent sh:InConstraintComponent ;
sh:sourceShape types:hashMethod-objects-in-shape ;
sh:value "SHA-1" ;
] ,
[
a sh:ValidationResult ;
sh:focusNode "SHA1"^^vocabulary:HashNameVocab ;
sh:resultMessage "Value is not member of the vocabulary HashNameVocab." ;
sh:resultSeverity sh:Info ;
sh:sourceConstraintComponent sh:InConstraintComponent ;
sh:sourceShape types:hashMethod-objects-in-shape ;
sh:value "SHA1"^^vocabulary:HashNameVocab ;
] ,
[
a sh:ValidationResult ;
sh:focusNode <http://example.org/kb/hash-b7eca8de-142d-4aa9-b546-0796a268afa4> ;
sh:resultMessage "As of UCO 1.4.0, the datatype to use for types:hashMethod should be xsd:string. Not using xsd:string will be an error in UCO 2.0.0." ;
sh:resultPath types:hashMethod ;
sh:resultSeverity sh:Warning ;
sh:sourceConstraintComponent sh:DatatypeConstraintComponent ;
sh:sourceShape [
sh:datatype xsd:string ;
sh:message "As of UCO 1.4.0, the datatype to use for types:hashMethod should be xsd:string. Not using xsd:string will be an error in UCO 2.0.0." ;
sh:path types:hashMethod ;
sh:severity sh:Warning ;
] ;
sh:value "SHA1"^^vocabulary:HashNameVocab ;
] ,
[
a sh:ValidationResult ;
sh:focusNode <http://example.org/kb/hash-f46c714f-559a-4325-bf8a-4ef60c92c771> ;
sh:resultMessage "As of UCO 1.4.0, the datatype to use for types:hashMethod should be xsd:string. Not using xsd:string will be an error in UCO 2.0.0." ;
sh:resultPath types:hashMethod ;
sh:resultSeverity sh:Warning ;
sh:sourceConstraintComponent sh:DatatypeConstraintComponent ;
sh:sourceShape [
sh:datatype xsd:string ;
sh:message "As of UCO 1.4.0, the datatype to use for types:hashMethod should be xsd:string. Not using xsd:string will be an error in UCO 2.0.0." ;
sh:path types:hashMethod ;
sh:severity sh:Warning ;
] ;
sh:value "1"^^xsd:integer ;
]
;
.

157 changes: 16 additions & 141 deletions tests/examples/hash_XFAIL_validation.ttl
Original file line number Diff line number Diff line change
Expand Up @@ -3,151 +3,26 @@
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix sh: <http://www.w3.org/ns/shacl#> .
@prefix types: <https://ontology.unifiedcyberontology.org/uco/types/> .
@prefix vocabulary: <https://ontology.unifiedcyberontology.org/uco/vocabulary/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .

[]
a sh:ValidationReport ;
sh:conforms "false"^^xsd:boolean ;
sh:result
[
a sh:ValidationResult ;
sh:focusNode <http://example.org/kb/hash-04dcd1dc-6920-4977-a898-e242870249a4> ;
sh:resultMessage "Value is outside the default vocabulary HashNameVocab." ;
sh:resultPath types:hashMethod ;
sh:resultSeverity sh:Info ;
sh:sourceConstraintComponent sh:DatatypeConstraintComponent ;
sh:sourceShape [
sh:datatype vocabulary:HashNameVocab ;
sh:message "Value is outside the default vocabulary HashNameVocab." ;
sh:path types:hashMethod ;
sh:severity sh:Info ;
] ;
sh:value "CUSTOM_hash" ;
] ,
[
a sh:ValidationResult ;
sh:focusNode <http://example.org/kb/hash-af4b0c85-b042-4e2d-a213-210b3d7f115c> ;
sh:resultMessage "Value is not member of the vocabulary HashNameVocab." ;
sh:resultPath types:hashMethod ;
sh:resultSeverity sh:Violation ;
sh:sourceConstraintComponent sh:OrConstraintComponent ;
sh:sourceShape [
sh:message "Value is not member of the vocabulary HashNameVocab." ;
sh:or (
[
sh:datatype vocabulary:HashNameVocab ;
sh:in (
"MD5"^^vocabulary:HashNameVocab
"MD6"^^vocabulary:HashNameVocab
"SHA1"^^vocabulary:HashNameVocab
"SHA224"^^vocabulary:HashNameVocab
"SHA256"^^vocabulary:HashNameVocab
"SHA3-224"^^vocabulary:HashNameVocab
"SHA3-256"^^vocabulary:HashNameVocab
"SHA3-384"^^vocabulary:HashNameVocab
"SHA3-512"^^vocabulary:HashNameVocab
"SHA384"^^vocabulary:HashNameVocab
"SHA512"^^vocabulary:HashNameVocab
"SSDEEP"^^vocabulary:HashNameVocab
) ;
]
[
sh:datatype xsd:string ;
]
) ;
sh:path types:hashMethod ;
] ;
sh:value "SHA-1"^^vocabulary:HashNameVocab ;
] ,
[
a sh:ValidationResult ;
sh:focusNode <http://example.org/kb/hash-e97431ea-6fb8-46d9-9c23-94be4b7cc977> ;
sh:resultMessage "Value is outside the default vocabulary HashNameVocab." ;
sh:resultPath types:hashMethod ;
sh:resultSeverity sh:Info ;
sh:sourceConstraintComponent sh:DatatypeConstraintComponent ;
sh:sourceShape [
sh:datatype vocabulary:HashNameVocab ;
sh:message "Value is outside the default vocabulary HashNameVocab." ;
sh:path types:hashMethod ;
sh:severity sh:Info ;
] ;
sh:value "SHA1" ;
] ,
[
a sh:ValidationResult ;
sh:focusNode <http://example.org/kb/hash-f46c714f-559a-4325-bf8a-4ef60c92c771> ;
sh:resultMessage 'Node Literal("1", datatype=xsd:integer) does not conform to one or more shapes in [ sh:datatype vocabulary:HashNameVocab ] , [ sh:datatype xsd:string ]' ;
sh:resultPath types:hashMethod ;
sh:resultSeverity sh:Violation ;
sh:sourceConstraintComponent sh:OrConstraintComponent ;
sh:sourceShape [
sh:maxCount "1"^^xsd:integer ;
sh:minCount "1"^^xsd:integer ;
sh:nodeKind sh:Literal ;
sh:or (
[
sh:datatype vocabulary:HashNameVocab ;
]
[
sh:datatype xsd:string ;
]
) ;
sh:path types:hashMethod ;
] ;
sh:value "1"^^xsd:integer ;
] ,
[
a sh:ValidationResult ;
sh:focusNode <http://example.org/kb/hash-f46c714f-559a-4325-bf8a-4ef60c92c771> ;
sh:resultMessage "Value is not member of the vocabulary HashNameVocab." ;
sh:resultPath types:hashMethod ;
sh:resultSeverity sh:Violation ;
sh:sourceConstraintComponent sh:OrConstraintComponent ;
sh:sourceShape [
sh:message "Value is not member of the vocabulary HashNameVocab." ;
sh:or (
[
sh:datatype vocabulary:HashNameVocab ;
sh:in (
"MD5"^^vocabulary:HashNameVocab
"MD6"^^vocabulary:HashNameVocab
"SHA1"^^vocabulary:HashNameVocab
"SHA224"^^vocabulary:HashNameVocab
"SHA256"^^vocabulary:HashNameVocab
"SHA3-224"^^vocabulary:HashNameVocab
"SHA3-256"^^vocabulary:HashNameVocab
"SHA3-384"^^vocabulary:HashNameVocab
"SHA3-512"^^vocabulary:HashNameVocab
"SHA384"^^vocabulary:HashNameVocab
"SHA512"^^vocabulary:HashNameVocab
"SSDEEP"^^vocabulary:HashNameVocab
) ;
]
[
sh:datatype xsd:string ;
]
) ;
sh:path types:hashMethod ;
] ;
sh:value "1"^^xsd:integer ;
] ,
[
a sh:ValidationResult ;
sh:focusNode <http://example.org/kb/hash-f46c714f-559a-4325-bf8a-4ef60c92c771> ;
sh:resultMessage "Value is outside the default vocabulary HashNameVocab." ;
sh:resultPath types:hashMethod ;
sh:resultSeverity sh:Info ;
sh:sourceConstraintComponent sh:DatatypeConstraintComponent ;
sh:sourceShape [
sh:datatype vocabulary:HashNameVocab ;
sh:message "Value is outside the default vocabulary HashNameVocab." ;
sh:path types:hashMethod ;
sh:severity sh:Info ;
] ;
sh:value "1"^^xsd:integer ;
]
;
sh:result [
a sh:ValidationResult ;
sh:focusNode <http://example.org/kb/hash-66954988-aa9a-4f0d-8ad1-380700c830fc> ;
sh:resultMessage "Value is not Literal with datatype xsd:hexBinary" ;
sh:resultPath types:hashValue ;
sh:resultSeverity sh:Violation ;
sh:sourceConstraintComponent sh:DatatypeConstraintComponent ;
sh:sourceShape [
sh:datatype xsd:hexBinary ;
sh:maxCount "1"^^xsd:integer ;
sh:minCount "1"^^xsd:integer ;
sh:nodeKind sh:Literal ;
sh:path types:hashValue ;
] ;
sh:value "da39a3ee5e6b4b0d3255bfef95601890afd80709" ;
] ;
.

0 comments on commit 6d385ba

Please sign in to comment.