Re: the current situation with respect to ISSUE-134

On 04/07/2016 05:53 PM, Holger Knublauch wrote:
> 
> 
> On 8/04/2016 0:08, Peter F. Patel-Schneider wrote:
>> Here is my understanding of the intent of the current situation.  I don't
>> believe that all of these are supported by explicit wording in the current
>> document.
>>
>> 1/ OK.  The constraint has an explicit rdf:type link to
>> sh:PropertyConstraint providing the valid type.
>>
>> @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
>> @prefix sh: <http://www.w3.org/ns/shacl#> .
>> @prefix ex: <http://ex.com/> .
>>
>> ex:s1 a sh:Shape ;
>>   sh:property [ rdf:type sh:PropertyConstraint ;
>>              sh:predicate ex:p ;
>>            sh:nodeKind sh:IRI ] .
>>
>> 2/ OK. There is no rdf:type link for the constraint so default value type
>> processing comes into play which provides the valid type.
>>
>> @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
>> @prefix sh: <http://www.w3.org/ns/shacl#> .
>> @prefix ex: <http://ex.com/> .
>>
>> ex:s1 a sh:Shape ;
>>   sh:property [
>>              sh:predicate ex:p ;
>>            sh:nodeKind sh:IRI ] .
>>
>> 3/ Not OK.  The explicit rdf:type link prevents default value type
>> processing from having an effect so there is no valid type.
>>
>> @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
>> @prefix sh: <http://www.w3.org/ns/shacl#> .
>> @prefix ex: <http://ex.com/> .
>>
>> ex:s1 a sh:Shape ;
>>   sh:property [ rdf:type ex:PropertyConstraint ;
>>              sh:predicate ex:p ;
>>            sh:nodeKind sh:IRI ] .
>>
>> 4/ Not OK.  Even though the class here is the universal class the explicit
>> rdf:type link prevents default value type processing from having an effect
>> so there is no valid type.
>>
>> @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
>> @prefix sh: <http://www.w3.org/ns/shacl#> .
>> @prefix ex: <http://ex.com/> .
>>
>> ex:s1 a sh:Shape ;
>>   sh:property [ rdf:type rdfs:Resource ;
>>              sh:predicate ex:p ;
>>            sh:nodeKind sh:IRI ] .
>>
>> 5/ Not OK.  There is no valid type even though the constraint is a SHACL
>> instance of sh:PropertyConstraint.
>>
>> @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
>> @prefix sh: <http://www.w3.org/ns/shacl#> .
>> @prefix ex: <http://ex.com/> .
>>
>> ex:PropertyConstraint rdfs:subClassOf sh:PropertyConstraint .
>>
>> ex:s1 a sh:Shape ;
>>   sh:property [ rdf:type ex:PropertyConstraint ;
>>              sh:predicate ex:p ;
>>            sh:nodeKind sh:IRI ] .
>>
>> 6/ OK.  There is an explicit rdf:type link to sh:PropertyConstraint so the
>> constraint has a valid type
>>
>> @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
>> @prefix sh: <http://www.w3.org/ns/shacl#> .
>> @prefix ex: <http://ex.com/> .
>>
>> ex:s1 a sh:Shape ;
>>   sh:Property [ rdf:type sh:PropertyConstraint ;
>>              rdf:type ex:InversePropertyConstraint ;
>>              sh:predicate ex:p ;
>>            sh:nodeKind sh:IRI ] .
> 
> So far so good. (except sh:property is not uppercase).
> 
>>
>> 7/ Unknown.  There is an explicit rdf:type link to sh:PropertyConstraint so
>> the constraint has a valid type.  However, the constraint is a SHACL
>> instance of both sh:PropertyConstraint and sh:InversePropertyConstraint.
>>
>> @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
>> @prefix sh: <http://www.w3.org/ns/shacl#> .
>> @prefix ex: <http://ex.com/> .
>>
>> ex:InversePropertyConstraint rdfs:subClassOf sh:InversePropertyConstraint .
>>
>> ex:s1 a sh:Shape ;
>>   sh:Property [ rdf:type sh:PropertyConstraint ;
>>              rdf:type ex:InversePropertyConstraint ;
>>              sh:predicate ex:p ;
>>            sh:nodeKind sh:IRI ] .
> 
> This is a valid example. The current spec states that
> - the classes only count as disjoint if they have rdf:type triples (i.e.
> subtype inference is not applied)

The spec does not so state.

> - one of the values of rdf:type is sh:PropertyConstraint, so that will be used.

>> 8/ Unknown.  There is an explicit rdf:type link to sh:PropertyConstraint so
>> the constraint has a valid type.  However, the constraint is an
>> instance of both sh:PropertyConstraint and sh:InversePropertyConstraint.
>>
>> @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
>> @prefix sh: <http://www.w3.org/ns/shacl#> .
>> @prefix ex: <http://ex.com/> .
>>
>> ex:subClassOf rdfs:subPropertyOf rdfs:subClassOf .
>> ex:InversePropertyConstraint ex:subClassOf sh:InversePropertyConstraint .
>>
>> ex:s1 a sh:Shape ;
>>   sh:Property [ rdf:type sh:PropertyConstraint ;
>>              rdf:type ex:InversePropertyConstraint ;
>>              sh:predicate ex:p ;
>>            sh:nodeKind sh:IRI ] .
> 
> This is valid as 7 is, and rdfs:subPropertyOf rdfs:subClassOf is ignored
> (because we don't claim RDFS inferencing will be used).
> 
>>
>>
>> The situation with sh:constraint is even more murky, as its name seems to
>> indicate that its natural range should be sh:Constraint but instead it is
>> sh:NodeConstraint.
> 
> sh:constraint will also be the place for extensions, e.g. sh:SPARQLConstraint.
> Furthermore, it should be legal to use it for sh:PropertyConstraints - the
> meaning being similar to sh:property but with a different intent: sh:property
> declares a "relevant" property for that shape, while sh:constraint would
> merely add a constraint in case that property happens to be used (but it's not
> a relevant or recommended property).
> 
> Overall, if you have specific suggestions on what is missing, please send
> instructions on what needs to be edited.
> 
> Holger
> 
> 

Received on Monday, 11 April 2016 14:38:12 UTC