Hi Holger,

Understood, I think I see how it works.

On a different issue (sorry if I'm overloading this topic, I can raise a 
new one if it's better), I am getting unexpected results trying a 
sh:filterShape.

@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

avidtx:Test a rdfs:Class .

avids:TestShape
a sh:Shape ;
sh:scopeClass avidtx:Test ;
sh:property [
   a sh:PropertyConstraint ;
sh:predicate dc:title ;
sh:datatype sh:text ;
sh:minCount 1 ;
sh:maxCount 1 ;
sh:filterShape [
   a sh:Shape ;
            sh:predicate avidc:isComplete ;
            sh:hasValue "true"^^xsd:boolean ;
] ;
]  .

#succeed
<urn:avid:object:17324310-1787-4a7d-BB62-4179CABF0963> a avidtx:Test ;
        dc:title "Test Title 1" ;
        avidc:isComplete "true"^^xsd:boolean .

#succeed, should not fail dc:title constraint because avidc:isComplete is 
not true
<urn:avid:object:17324310-1787-4a7d-BB62-4179CABF0973> a avidtx:Test ;
        avidc:isComplete "false"^^xsd:boolean .

#fail, dc:title constraint is violated
<urn:avid:object:17324310-1787-4a7d-BB62-4179CABF0983> a avidtx:Test ;
        avidc:isComplete "true"^^xsd:boolean .


The third resource fails validation as expected, but the second one fails, 
too, and I can't figure out why.  The filter shape should prevent the 
dc:title property constraint from being checked, correct?  I don't know 
what the error is here, do you have any advice?

Thanks,

Roger


On Tuesday, September 29, 2015 at 11:16:52 PM UTC-4, Holger Knublauch wrote:
>
> Yes, the shapes graph would know that sh:ShapeClass is a subclass of 
> sh:Shape, yet the data graph does not know that unless you also merge the 
> SHACL system vocabulary into the data graph. The SHACL engine uses the 
> shapes graph to figure out which constraints to run, but it relies on the 
> data graph to contain the relevant rdfs:subClassOf triples to find all 
> instances of the classes affected by the constraints.
>
> All this requires better explanations and tool support - apologies if this 
> is very early in the process.
>
> The ValidateSquareExample was already doing the right thing AFAIK - it was 
> just using the square file as data graph. So maybe there is something else 
> going on that I don't see. Have you tried to run your file through TBC 
> 5.0.1 validation? Otherwise, feel free to send me the files.
>
> Holger
>
>

-- 
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.

Reply via email to