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

Field cardinality in generated form is incorrect when using DCAT-AP 3.0.0 shapes. #139

Open
kburger opened this issue Aug 8, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@kburger
Copy link

kburger commented Aug 8, 2023

In DCAT-AP 3.0.0 the property shape constraints are split into separate instances, where each instance defines a constraint on the target sh:path. For example, the cardinality is separated from a datatype constraint. The resulting generated form in the client is not in sync with the underlying shapes.

As an example:

<https://semiceu.github.io//DCAT-AP/releases/3.0.0#CatalogueRecordShape> a shacl:NodeShape;
  shacl:closed false;
  shacl:property <https://semiceu.github.io//DCAT-AP/releases/3.0.0#CatalogueRecordShape/1c4ac0cf94e6a9152035ed86f73590b6b516dfef>,
    <https://semiceu.github.io//DCAT-AP/releases/3.0.0#CatalogueRecordShape/4b28ec6b7000fa7ccd38127f115952dd990d7d9c>,
    <https://semiceu.github.io//DCAT-AP/releases/3.0.0#CatalogueRecordShape/8c70e4513eeeeacaf9fdbc9e2cf3df16973e24c0>;
  shacl:targetClass dcat:CatalogRecord .

<https://semiceu.github.io//DCAT-AP/releases/3.0.0#CatalogueRecordShape/1c4ac0cf94e6a9152035ed86f73590b6b516dfef> rdfs:seeAlso "https://semiceu.github.io//DCAT-AP/releases/3.0.0#CatalogueRecord.changetype";
  shacl:description "The status of the catalogue record in the context of editorial flow of the dataset and data service descriptions."@en;
  shacl:maxCount 1;
  shacl:name "change type"@en;
  shacl:path <http://www.w3.org/ns/adms#status>;
  <https://purl.eu/ns/shacl#message> "Maximally 1 values allowed for change type"@en .

<https://semiceu.github.io//DCAT-AP/releases/3.0.0#CatalogueRecordShape/4b28ec6b7000fa7ccd38127f115952dd990d7d9c> rdfs:seeAlso "https://semiceu.github.io//DCAT-AP/releases/3.0.0#CatalogueRecord.changetype";
  shacl:class skos:Concept;
  shacl:description "The status of the catalogue record in the context of editorial flow of the dataset and data service descriptions."@en;
  shacl:name "change type"@en;
  shacl:path <http://www.w3.org/ns/adms#status>;
  <https://purl.eu/ns/shacl#message> "The range of change type must be of type <http://www.w3.org/2004/02/skos/core#Concept>."@en .

<https://semiceu.github.io//DCAT-AP/releases/3.0.0#CatalogueRecordShape/8c70e4513eeeeacaf9fdbc9e2cf3df16973e24c0> rdfs:seeAlso "https://semiceu.github.io//DCAT-AP/releases/3.0.0#CatalogueRecord.changetype";
  shacl:description "The status of the catalogue record in the context of editorial flow of the dataset and data service descriptions."@en;
  shacl:name "change type"@en;
  shacl:nodeKind shacl:BlankNodeOrIRI;
  shacl:path <http://www.w3.org/ns/adms#status>;
  <https://purl.eu/ns/shacl#message> "The expected value for change type is a rdfs:Resource (URI or blank node)"@en .

Maybe shape organised this way should be merged based on sh:targetClass and sh:path? But then messages are combined as well, resulting in information loss. To counter that, maybe they could be combined with sh:and dynamically at validation time?

@kburger kburger added the bug Something isn't working label Aug 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant