Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add shacl comment to shacl violation message #94

Open
takemikami opened this issue Jan 28, 2020 · 0 comments
Open

add shacl comment to shacl violation message #94

takemikami opened this issue Jan 28, 2020 · 0 comments
Labels
enhancement New feature or request

Comments

@takemikami
Copy link
Member

現状のメッセージは汎用的な内容なので、
その制約がある背景なども分かるように、対応するShapeのコメントを出力するとわかりやすいと思われる。
(im@sparqlの場合、Shapeのrdfs:comment,rdfs:labelに説明があるので)

現状のメッセージの例

SHACLで定義された制約に違反しています: "Value has 2 shapes out of 2 in the sh:xone enumeration" (http://www.w3.org/ns/shacl#XoneConstraintComponent) (line: 37, col: 1, triple: https://sparql.crssnky.xyz/imasrdf/RDFs/detail/Amami_Haruka - http://xmlns.com/foaf/0.1/age - "-17"^^http://www.w3.org/2001/XMLSchema#integer)

対応するShape

imas-shape:IdolShape a sh:NodeShape;
    sh:targetClass imas:Idol;
    sh:property [
        rdfs:label "年齢の制約";
        rdfs:comment "何人かのアイドルは年齢が数値じゃない";
        sh:path foaf:age;
        sh:xone (
            [
                sh:datatype xsd:integer;
                sh:minInclusive 0;
            ]
            [
                sh:datatype rdf:langString;
                sh:languageIn ("ja")
            ]
        );
        sh:maxCount 1;
    ];
@takemikami takemikami added the enhancement New feature or request label Jan 28, 2020
@takemikami takemikami changed the title SHACLの問題メッセージに、SHACLのコメントで指定した内容を出力したい add shacl comment to shacl violation message May 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant