Skip to content

Commit

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

Signed-off-by: Alex Nelson <[email protected]>
  • Loading branch information
ajnelson-nist committed May 4, 2022
1 parent d75d307 commit 9902977
Show file tree
Hide file tree
Showing 2 changed files with 109 additions and 0 deletions.
37 changes: 37 additions & 0 deletions tests/examples/mime_PASS_validation.ttl
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
@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 xsd: <http://www.w3.org/2001/XMLSchema#> .

[]
a sh:ValidationReport ;
sh:conforms "true"^^xsd:boolean ;
sh:result
[
a sh:ValidationResult ;
sh:focusNode <urn:example:mime:uco:image/example.image.type.without.notation> ;
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:mimeType <urn:example:mime:dcterms:application/gzip> ;
] ;
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 <urn:example:mime:dcterms:application/gzip> ;
]
;
.

72 changes: 72 additions & 0 deletions tests/examples/mime_XFAIL_validation.ttl
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
@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 xsd: <http://www.w3.org/2001/XMLSchema#> .

[]
a sh:ValidationReport ;
sh:conforms "false"^^xsd:boolean ;
sh:result
[
a sh:ValidationResult ;
sh:focusNode "application/gzip" ;
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:mimeType "application/gzip" ;
] ;
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/gzip" ;
] ,
[
a sh:ValidationResult ;
sh:focusNode [
a observable:ContentDataFacet ;
observable:mimeType "application/gzip" ;
] ;
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/gzip" ;
] ,
[
a sh:ValidationResult ;
sh:focusNode [
a observable:ContentDataFacet ;
observable:mimeType "application/gzip" ;
] ;
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/gzip" ;
]
;
.

0 comments on commit 9902977

Please sign in to comment.