- From: Holger Knublauch <holger@topquadrant.com>
- Date: Mon, 27 Oct 2014 08:13:29 +1000
- To: public-data-shapes-wg@w3.org
On 10/27/14, 6:21 AM, Peter F. Patel-Schneider wrote:
> What I am trying to get at is how SPIN constraints interact with OWL
> constructs, and RDFS constructs as well. The reason I ask is that
> there has been talk of SPIN constraints working with OWL and RDFS
> constructs.
>
> Maybe there is no interaction. Maybe the way things work is that SPIN
> constraints work directly on an RDF graph (i.e., there is neither RDF
> inference nor RDFS inference nor OWL inference of any kind). However,
> then there has to be some careful description of how SPIN constraints
> are implemented, as they are attached to classes, and class instance
> is generally tied up with RDFS inference.
Yes. The only kind of built-in "inferencing" is the handling of
rdfs:subClassOf when walking down the class hierarchy to find matching
classes with instances by the engine. Also, it is legal to use
sub-properties of spin:constraint - this is sometimes useful to create
better maintainable code.
> There has also been discussion of SPIN constraints involving at least
> three different kinds of input, all of which appear to be treated
> differently. However, it appears that this division cannot be
> maintained in the way that SPIN constraints appear to need. The
> example that I gave is that ontologies can include individual objects,
> which I think should be considered by constraints.
Yes, the WHERE clause is executed over the owl:imports closure of the
instances graph. This is often needed, e.g. to walk up or down class
hierarchies to figure out whether a resource is a (transitive) instance
of a given class with rdfs:subClassOf* in SPARQL. And the owl:oneOf use
case would work similarly. However, spin:imports will not be visible in
the WHERE clause.
HTH
Holger
> Maybe this distinction is only used to make some discussion easier,
> and does not have any real impact on SPIN constraints. However, some
> of the distinction appears to have an important role in SPIN constraints.
>
> peter
>
> On 10/26/2014 12:44 PM, Irene Polikoff wrote:
>> Peter,
>>
>> When I read your constraints originally, I thought you were just
>> using a short hand for convenience - there are supposed to be more
>> triple patterns in the WHERE clauses that actually say what is the
>> constraint and you are skipping writing these down to save time.
>>
>> Now I am beginning to think that what you have been identifying as
>> constraints is exactly what is in the WHERE clause, meaning that
>> these classes should have no instances at all.
>>
>> Which one is true?
>>
>> Irene
>>
>> -----Original Message-----
>> From: Peter F. Patel-Schneider [mailto:pfpschneider@gmail.com]
>> Sent: Sunday, October 26, 2014 12:21 PM
>> To: Holger Knublauch; public-data-shapes-wg@w3.org
>> Subject: Re: Relevant documents on SPIN
>>
>>
>>
>> On 10/25/2014 08:37 PM, Holger Knublauch wrote:
>>> On 10/26/2014 9:54, Peter F. Patel-Schneider wrote:
>>>> Consider the following situation:
>>>>
>>>> Domain graph:
>>>> a rdf:type A .
>>>> Ontology
>>>> B = { b }
>>>> Constraints
>>>> spin:constraint [ sp:text """ CONSTRUCT { _:cv a
>>>> spin:ConstraintViolation } WHERE { ?this rdf:type B } """ ]
>>>>
>>>> Is there a constraint violation here or not? Where is this behaviour
>>>> specified?
>>>
>>> [I assume you meant to write a rdf:type B above].
>>
>> No. What I may have stupidly forgotten was to put B as the subject
>> of the constraint.
>>
>> The point is that individuals may come from the OWL ontology, not the
>> domain graph.
>>
>>> It would be a constraint violation, because there would be a SPIN
>>> constraint that looks for owl:oneOf triples under closed-world
>>> interpretation.
>>
>> [...]
>>
>>> Holger
>>>
>>>
>>
>>
>> peter
>>
>>
Received on Sunday, 26 October 2014 22:14:04 UTC