Re: example of recursive shapes

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I can't tell whether this does or not, as there appears to be a missing bit
after ldom:predicate.   However, I don't think that it could, as least so
far as I understand LDOM, as the class definition below appears tp require
that ex:Polentoni is asserted on some individuals, and the point of the
example is that there are no assertions involving ex:Polentoni in the input.

If LDOM does work by doing recognition, then this should be highlighted.

peter


On 01/24/2015 04:35 PM, Holger Knublauch wrote:
> ex:Polentoni a rdfs:Class ; # or ldom:Shape, or nothing ldom:constraint
> [ ldom:sparql """ ASK { FILTER NOT EXISTS { ?this ex:livesIn
> ex:NorthernItaly } }""" ldom:predicate ex: ] ; ldom:constraint [ a
> ldom:ShapeConstraint ; ldom:predicate ex:knows ; ldom:all ex:Polentoni ; 
> ] .
> 
> The evaluation is started using the built-in function
> 
> ldom:violatesConstraints(ex:Enrico, ex:Polontoni)
> 
> The function checks if the given instance fulfills all constraints for
> the given class. The implementation of ldom:all recursively calls 
> ldom:violatesConstraints. (The engine needs to make sure it doesn't run
> into infinite loops, so this requires work).
> 
> (This example also indicates that we should have a template for the 
> owl:hasValue equivalent, so that people don't need to write the ugly
> SPARQL. I will add such a thing).
> 
> Does this address your use case?
> 
> Holger
> 
> 
> 
> 
> On 1/25/15, 3:18 AM, Peter F. Patel-Schneider wrote: Here is an example
> of recursive shapes and constraints based on them.  I have purposefully
> removed typing information and domains and ranges from the RDF graph
> given at the beginning.  A version of the RDF graph that is more likely
> to actually occur is given at the end.  The extra information does not
> change anything.
> 
> 
> Reduced RDF Graph
> 
> ex:Enrico ex:livesIn ex:NorthernItaly . ex:Diego ex:livesIn
> ex:NorthernItaly . ex:Alessandro ex:livesIn ex:NorthernItaly . ex:Sergio
> ex:livesIn ex:NorthernItaly . ex:John ex:livesIn ex:NorthernItaly . 
> ex:Maurizio ex:livesIn ex:SouthernItaly .
> 
> ex:Enrico ex:knows ex:John . ex:John ex:knows ex:Maurizio . ex:Diego
> ex:knows ex:Alessandro . ex:Alessandro ex:knows ex:Diego . ex:Alessandro
> ex:knows ex:Sergio
> 
> 
> Shapes and Constraints (informal)
> 
> Polentoni are those who live in Northern Italy and who only know those
> who are Polentoni.  Enrico is not Polentoni.  Diego is Polentoni.
> 
> 
> Shapes and Constraints (in OWL Constraints with Closed-World
> Recognition)
> 
> Polentoni = (ex:livesIn : ex:NorthernItaly) & (all ex:knows Polentoni) 
> ex:Enrico not in Polentoni ex:Diego in Polentoni
> 
> 
> Shapes and Constraints (in ShExC plus OSLC controls)
> 
> <Polentoni> { ex:livesIn ( ex:NorthernItaly ), ex:knows @<Polentoni>* }
> 
> ex:Diego oslc:instanceShape <Polentoni> .
> 
> I don't believe that this setup can require that Enrico is not
> Polentoni.
> 
> 
> Natural RDF Graph
> 
> ex:Person rdf:type rdfs:Class . ex:Region rdf:type rdfs:Class . 
> ex:livesIn rdf:type rdf:Property . ex:knows rdf:type rdf:Property . 
> ex:livesIn rdfs:domain ex:Person . ex:livesIn rdfs:range ex:Region . 
> ex:knows rdfs:domain ex:Person . ex:knows rdfs:range ex:Person .
> 
> ex:NorthernItaly rdf:type ex:Region . ex:SouthernItaly rdf:type ex:Region
> .
> 
> ex:Enrico rdf:type ex:Person . ex:Diego rdf:type ex:Person . 
> ex:Alessandro rdf:type ex:Person . ex:Sergio rdf:type ex:Person . ex:John
> rdf:type ex:Person . ex:Maurizio rdf:type ex:Person .
> 
> ex:Enrico ex:livesIn ex:NorthernItaly . ex:Diego ex:livesIn
> ex:NorthernItaly . ex:Alessandro ex:livesIn ex:NorthernItaly . ex:Sergio
> ex:livesIn ex:NorthernItaly . ex:John ex:livesIn ex:NorthernItaly . 
> ex:Maurizio ex:livesIn ex:SouthernItaly .
> 
> ex:Enrico ex:knows ex:John . ex:John ex:knows ex:Maurizio . ex:Diego
> ex:knows ex:Alessandro . ex:Alessandro ex:knows ex:Diego . ex:Alessandro
> ex:knows ex:Sergio
>> 
> 
> 
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iQEcBAEBAgAGBQJUxEt1AAoJECjN6+QThfjzj3oIAMs1NKHaPf9VTh1IgIx7U8T2
0kqnYtdDZoWRKKH7LRKL4vSduNHyFzoAOSRehM4H2bapEQQUiKQfitwlyoDYaaGR
BfG60OzWjbU5ts+a3Luf61FQIDQgomJRGnFN79v3P8vMyTii3z/V4zoTpVF7VM2f
yPWXVesF7f4xIm0/YAWnVaK0KOra0wOXKHTCep2S0i+YmEI8qFYGaAP5BjzvrPsN
rgWA6uH5A2Mrn5osMylggx+lWJyvLN8n5AszzJDrCQquW+qxtGQxmNnzg0ddGxS/
SrNe8hXdFj3CdNqBz10HIKMsrG9NxunXitK/6vzKSTdcfLrTXITDjvq8Yk4V73E=
=PfJx
-----END PGP SIGNATURE-----

Received on Sunday, 25 January 2015 01:49:12 UTC