hale icon indicating copy to clipboard operation
hale copied to clipboard

Add validator to check if nilReason values are provided according to INSPIRE

Open JohannaOtt opened this issue 5 years ago • 5 comments

Version 4.0.0.SNAPSHOT Build 640814825

The XML validation, that is currently available in hale studio, does not give a warning, if an attribute with cardinality 1 (or more) that is marked as voidable (nillable = "true" attribute in xsd, interpreted as NillableFlag = true in Properties:Constraint view in hale studio) in INSPIRE is not filled and no nilReason value is given. This means, for all attributes that have the stereotype 'voidable' in the INSPIRE model, there is no check if they are existing - either filled with a value or with a value for the relevant nilReason. Therefore, users are not aware that there are indications missing until the created target data is validated in the INSPIRE Validator. The new validator should check the occurring cardinalities of attributes and give different warnings - depending on if the attribute needs a value (no voidable stereotype) or if the indication of a nilReason value would be sufficient (voidable stereotype).

JohannaOtt avatar Feb 10 '20 11:02 JohannaOtt

I always thought that the nilReason attributes are generated automatically if you do not set them manually? At least it used to be like that. There is a setting in the GML exporter for that under the section "nilReason": grafik

thorsten-reitz avatar Feb 10 '20 11:02 thorsten-reitz

That functionality does the opposite. If a nilReason is given in the transformation, but the attribute actually has a value, the nilReason is omitted. See also http://help.halestudio.org/latest/index.jsp?topic=%2Feu.esdihumboldt.hale.doc.user.ioproviders%2Fioproviders%2Feu.esdihumboldt.hale.io.wfs.fc.write-2.0.html&resultof=%22%67%6d%6c%22%20%22%77%66%73%22%20%22%32%2e%30%22%20%22%66%65%61%74%75%72%65%22%20%22%66%65%61%74%75%72%22%20

JohannaOtt avatar Feb 10 '20 11:02 JohannaOtt

I remember somewhere in the INSPIRE documents (probably in the GML encoding rules) an example with an omitted nilReason, mentioning that in this case the default "unknown" applies. According to that there would be no need for such a check.

stempler avatar Feb 19 '20 16:02 stempler

If that is the case, the INSPIRE validator should not throw an exception for missing nilReasons, right? Also, for INSPIRE data, in most of the cases 'other:unpopulated' would need to be applied if no nilReason is given explicitely, so the automatic application of 'unknown' would be misleading.

JohannaOtt avatar Feb 20 '20 07:02 JohannaOtt

This issue has been automatically marked as stale because it has not had activity in the last 60 days. It will be closed in two weeks if no further activity occurs. Thank you for your contributions.

github-actions[bot] avatar May 13 '24 02:05 github-actions[bot]