kinow commented on issue #586: JENA-1733: SHACL engine, command line validator 
and Fuseki service.
URL: https://github.com/apache/jena/pull/586#issuecomment-514545297
 
 
   Tested running in Eclipse `shacl.shacl` from jena-cmds, with `validate 
--shapes 
/home/kinow/Development/java/jena/jena/jena-fuseki2/jena-fuseki-main/testing/ShaclValidation/shapes1.ttl
 --data 
/home/kinow/Development/java/jena/jena/jena-fuseki2/jena-fuseki-main/testing/ShaclValidation/data1.ttl`.
   
   Output:
   
   ```
   @prefix sh:    <http://www.w3.org/ns/shacl#> .
   @prefix rdf:   <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
   @prefix rdfs:  <http://www.w3.org/2000/01/rdf-schema#> .
   
   [ a            sh:ValidationReport ;
     sh:conforms  false ;
     sh:result    [ a                             sh:ValidationResult ;
                    sh:focusNode                  <http://example/s1> ;
                    sh:resultMessage              
"DatatypeConstraint[xsd:string] : Got datatype 
http://www.w3.org/2001/XMLSchema#integer : Node 60" ;
                    sh:resultPath                 <http://example/ns#p> ;
                    sh:resultSeverity             sh:Violation ;
                    sh:sourceConstraintComponent  
sh:DatatypeConstraintComponent ;
                    sh:sourceShape                _:b0 ;
                    sh:value                      60
                  ] ;
     sh:result    [ a                             sh:ValidationResult ;
                    sh:focusNode                  <http://example/s1> ;
                    sh:resultMessage              "maxCount[1]: Invalid 
cardinality: expected max 1: Got count = 2" ;
                    sh:resultPath                 <http://example/ns#p> ;
                    sh:resultSeverity             sh:Violation ;
                    sh:sourceConstraintComponent  
sh:MaxCountConstraintComponent ;
                    sh:sourceShape                _:b0
                  ]
   ] .
   ```
   
   Removing the block after the comment that says "Invalid", it outputs:
   
   ```
   @prefix sh:    <http://www.w3.org/ns/shacl#> .
   @prefix rdf:   <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
   @prefix xsd:   <http://www.w3.org/2001/XMLSchema#> .
   @prefix rdfs:  <http://www.w3.org/2000/01/rdf-schema#> .
   
   [ a            sh:ValidationReport ;
     sh:conforms  true
   ] .
   ```
   
   Had a quick look at the SHACL docs. Unfortunately don't have a use case and 
don't know SHACL enough, but tried to at least read the code as much as I could 
before dinner :)
   
   Cheers
   Bruno

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to