Hello all, I downloaded the shacl Java library from GitHub, but I'm having a problem with what should be a simple example.
I copied the SquareExample test, and tried run the validator with a very simple model. After playing with it for some time, it seems that the validator fails if I'm defining a sh:Shape resource that has a sh:scopeClass property, but works with a sh:ShapeClass resource. Here is the input: @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . @prefix xsd: <http://www.w3.org/2001/XMLSchema#> . @prefix avidc: <http://meta.avid.com/vocab/common#> . @prefix avidtx: <http://meta.avid.com/class#> . @prefix avids: <http://meta.avid.com/shapes#> . @prefix sh: <http://www.w3.org/ns/shacl#>. @prefix dc: <http://purl.org/dc/1.1/elements/> @prefix xmpDM: <http://ns.adobe.com/xmp/1.0/DynamicMedia/> # The sh:Graph ---------------------------------------------------------------- <http://avid.com/examples/test> a sh:Graph ; sh:shapesGraph <http://www.w3.org/ns/shacl> ; rdfs:label "SHACL Test" ; rdfs:comment "A simple example model." ; . # TestShape example does not validate avids:TestShape a sh:Shape ; sh:scopeClass avidtx:Test ; sh:property [ sh:predicate dc:title ; sh:datatype sh:text ; sh:minCount 1 ; sh:maxCount 1 ; ] . <urn:avid:object:17324310-1787-4a7d-BB62-4179CABF0963> a avidtx:Test ; dc:title "Test Title 1" . avidtx:Test a rdfs:Class . # Test2 example validates (changed Shape to ShapeClass) avids:Test2 a sh:ShapeClass ; sh:property [ sh:predicate dc:title ; sh:datatype sh:text ; sh:minCount 1 ; sh:maxCount 1 ; ] . <urn:avid:object:17324310-1787-4a7d-BB62-4179CABF0964> a avidtx:Test2 ; dc:title "Test Title 2" . The output from the validator is as follows: [ a <http://www.w3.org/ns/shacl#ValidationResult> ; <http://www.w3.org/ns/shacl#focusNode> <http://meta.avid.com/shapes#TestShape> ; <http://www.w3.org/ns/shacl#message> "Values must be instances of sh:PropertyConstraint"^^<http://www.w3.org/2001/XMLSchema#string> ; <http://www.w3.org/ns/shacl#object> [] ; <http://www.w3.org/ns/shacl#predicate> <http://www.w3.org/ns/shacl#property> ; <http://www.w3.org/ns/shacl#severity> <http://www.w3.org/ns/shacl#Violation> ; <http://www.w3.org/ns/shacl#sourceConstraint> [] ; <http://www.w3.org/ns/shacl#sourceShape> <http://www.w3.org/ns/shacl#Shape> ; <http://www.w3.org/ns/shacl#sourceTemplate> <http://www.w3.org/ns/shacl#AbstractValueClassPropertyConstraint> ; <http://www.w3.org/ns/shacl#subject> <http://meta.avid.com/shapes#TestShape> ] . I'm hoping that I have made a simple mistake, is there anything additional I need to declare to fix the violation? Thanks, Roger -- You received this message because you are subscribed to the Google Group "TopBraid Suite Users", the topics of which include Enterprise Vocabulary Network (EVN), Reference Data Manager (RDM), TopBraid Composer, TopBraid Live, TopBraid Insight, SPARQLMotion, SPARQL Web Pages and SPIN. To post to this group, send email to [email protected] --- You received this message because you are subscribed to the Google Groups "TopBraid Suite Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
