You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@jena.apache.org by "Andy Seaborne (Jira)" <ji...@apache.org> on 2022/03/22 14:01:00 UTC

[jira] [Assigned] (JENA-2315) SHACL: bug in execution of SPARQL validation for a specified focusNode via validation API

     [ https://issues.apache.org/jira/browse/JENA-2315?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andy Seaborne reassigned JENA-2315:
-----------------------------------

    Assignee: Andy Seaborne

> SHACL: bug in execution of  SPARQL validation for a specified focusNode via validation API
> ------------------------------------------------------------------------------------------
>
>                 Key: JENA-2315
>                 URL: https://issues.apache.org/jira/browse/JENA-2315
>             Project: Apache Jena
>          Issue Type: Bug
>          Components: SHACL
>    Affects Versions: Jena 4.4.0
>            Reporter: Jakub Wach
>            Assignee: Andy Seaborne
>            Priority: Minor
>         Attachments: SHACL__bug_in_execution_of__SPARQL_validation_for_a_specified_focusNode_via_validation_API.patch
>
>
> *Description:* 
> While running validation focused on single explicit focus node.  It seems that due to the missing return statement validation will never be effective at all.
> *Reproduction:*
> While running validation focused on single resource node. E.g. by calling:
> ```
> new ShaclPlainValidator().validate(shapes, data, node);
> ```
> *Example data:* 
> ```
> <{color:#0000ff}someResource{color}>
>      a <{color:#0000ff}someClass{color}> ;
>     <{color:#0000ff}someunknownProperty{color}> <{color:#0000ff}someUnimportantValue{color}> ;
> .
> ```
> *Example shape:*
> ```
> <propertyShape
>     a              sh:NodeShape ;
>     sh:severity    sh:Warning ;
>     sh:target [
>                   a sh:SPARQLTarget ;   
>                   sh:select """
>                         SELECT DISTINCT ?node
>                         WHERE {
>                             ?node a ?class .
>                         }
>                         """ ;
>               ] ;    
>     sh:sparql      [ sh:message "Resource \{$this} has unknown property \{$path}" ;
>                      sh:select """
>                             SELECT DISTINCT $this ?path
>                             WHERE {
>                                 $this ?path ?value .
>                                 $this a ?class .
>                                 FILTER NOT EXISTS {
>                                      ?path <http://www.w3.org/2000/01/rdf-schema#domain> ?class
>                                 }
>                             }
>                         """ ] ;
> .
> ```



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

---------------------------------------------------------------------
To unsubscribe, e-mail: jira-unsubscribe@jena.apache.org
For additional commands, e-mail: jira-help@jena.apache.org