You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jena.apache.org by "ASF subversion and git services (Jira)" <ji...@apache.org> on 2020/05/01 13:56:00 UTC
[jira] [Commented] (JENA-1891) Shacl MinLength and MaxLength
constraints have opposite resultMessage values
[ https://issues.apache.org/jira/browse/JENA-1891?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17097379#comment-17097379 ]
ASF subversion and git services commented on JENA-1891:
-------------------------------------------------------
Commit 39cc6a702292bd5ac1baa31c75b82cd41cea96b0 in jena's branch refs/heads/master from Laurence Foley
[ https://gitbox.apache.org/repos/asf?p=jena.git;h=39cc6a7 ]
JENA-1891 reversed resultMessage values
> Shacl MinLength and MaxLength constraints have opposite resultMessage values
> ----------------------------------------------------------------------------
>
> Key: JENA-1891
> URL: https://issues.apache.org/jira/browse/JENA-1891
> Project: Apache Jena
> Issue Type: Bug
> Components: SHACL
> Reporter: Laurence Foley
> Priority: Minor
> Time Spent: 1h 10m
> Remaining Estimate: 0h
>
> While using {{Jena}} {{SHACL}} validation, I see that the {{resultMessage}} produced for [{{StrMinLengthConstraint}}|https://github.com/apache/jena/blob/master/jena-shacl/src/main/java/org/apache/jena/shacl/engine/constraint/StrMinLengthConstraint.java#L48] and [{{StrMaxLengthConstraint}}|https://github.com/apache/jena/blob/master/jena-shacl/src/main/java/org/apache/jena/shacl/engine/constraint/StrMaxLengthConstraint.java#L48] are reversed:
> {noformat}
> @prefix fld: <https://api.mysite.com/fields/> .
> @prefix sh: <http://www.w3.org/ns/shacl#> .
> [ a sh:ValidationResult ;
> sh:focusNode <https://api.mysite.com/datasets/dataset/snapshots/126/records/271> ;
> sh:resultMessage "MinLengthConstraint[5]: String too long: 0" ;
> sh:resultPath fld:myfield4 ;
> sh:resultSeverity sh:Violation ;
> sh:sourceConstraintComponent sh:MinLengthConstraintComponent ;
> sh:sourceShape <https://api.mysite.com/schemas/myfield4PropertyShape> ;
> sh:value "0"^^xsd:token
> ] .
> [ a sh:ValidationResult ;
> sh:focusNode <https://api.mysite.com/datasets/dataset/snapshots/126/records/225> ;
> sh:resultMessage "MaxLengthConstraint[12]: String too short: abcdefghijklm" ;
> sh:resultPath fld:myfield8 ;
> sh:resultSeverity sh:Violation ;
> sh:sourceConstraintComponent sh:MaxLengthConstraintComponent ;
> sh:sourceShape <https://api.mysite.com/schemas/myfield8PropertyShape> ;
> sh:value "abcdefghijklm"^^xsd:token
> ] .
> {noformat}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)