To make sure that all triples in a data graph conform to at least one shape, I think you will need to go outside of SHACL Core and either use SHACL-SPARQL or SHACL custom targets (part of SHACL-AF [1]). In particular, assuming you have a number of shapes, and all of them are sh:closed true, then you could try (untested):

ex:GraphClosureShape
    sh:target [
        sh:SPARQLTarget ;
        sh:select "SELECT DISTINCT ?this { ?this ?p ?o }" ;
    ] ;
    sh:or ( ex:Shape1 ex:Shape2 ex:Shape3 )
.

Basically this would iterate over all subjects in the graph and check that they conform to at least one of the enumerated node shapes. If all of them are sh:closed then they cannot legally have any other triples.

Note that this only traverses triples in the "forward" direction, and it would be more complicating if you have closed shapes that also use sh:path expressions to walk in an inverse direction...

Holger

[1] https://w3c.github.io/shacl/shacl-af/#SPARQLTarget

On 8/10/2019 03:26, JD wrote:
Hello
I am searching for an answer to what seems like an obvious question.

Is there a way to make sure everything is part of a shape? Meaning, in my closed world, I don't want any triple that doesn't match something in my shapes graph.

I know how to target and validate things (classes, properties, nodes) that I know about.
How do you in-validate the things that you don't know?

Is there a way to target every node?

Thanks
--
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] <mailto:[email protected]>. To view this discussion on the web visit https://groups.google.com/d/msgid/topbraid-users/29d5ec0c-86c2-41df-ac25-a01e4ada1a68%40googlegroups.com <https://groups.google.com/d/msgid/topbraid-users/29d5ec0c-86c2-41df-ac25-a01e4ada1a68%40googlegroups.com?utm_medium=email&utm_source=footer>.

--
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].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/topbraid-users/d03c84ac-d971-e7a7-b22a-7b2d6b13e006%40topquadrant.com.

Reply via email to