halestudio / hale

(Spatial) data harmonisation with hale»studio (formerly HUMBOLDT Alignment Editor)
143 stars 44 forks source link

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

Open JohannaOtt opened 4 years ago

JohannaOtt commented 4 years ago

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).

thorsten-reitz commented 4 years ago

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

JohannaOtt commented 4 years ago

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

stempler commented 4 years ago

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.

JohannaOtt commented 4 years ago

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.

github-actions[bot] commented 4 months ago

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.