ADAPT / Standard

ADAPT Standard data model issue management
https://adaptstandard.org
MIT License
7 stars 1 forks source link

Presentations in the Data Type Definition Model #90

Open knelson-farmbeltnorth opened 1 year ago

knelson-farmbeltnorth commented 1 year ago

This is a sub-issue of #88 covering the Presentation concept.

  1. From the current concept as introduced in the ASABE Context Item paper and ADAPT C# implementation, I separated the display Regex and validation Regex so that only the former lives in this object. The latter belongs as a Text type attribute of the DTD itself per my understanding of its purpose.

  2. In addition, I added a. Language code(s) (ISO 639-1), to cover an example where a DTD has the GeoPoliticalContext of "CA," but the modeler wishes to provide separate Presentations for en-CA and fr-CA. b. UOM Code, replacing UserDefinedUnitOfMeasure in the current system c. Numeric Scale and Offset, providing optional scaling information for numeric types

  3. I introduced this same concept on the Logged Variable itself, since arguably it will be more common for an implementer to provide a desired presentation vs. the existence of a a list of canonical presentations on the published standard. I'm inclined to question whether even it belongs on the DTD itself (are there indeed examples of standard presentations we wish to document?)

knelson-farmbeltnorth commented 1 year ago

Preliminary agreement in 5 April 2023 meeting to remove this concept from the model.

strhea commented 1 year ago

If we separate out the validation regex from the presentation object, would we still be able to support cultures that use a comma instead of a decimal point?

knelson-farmbeltnorth commented 1 year ago

@strhea General display of numbers in a UI doesn't seem like something that would belong in ADAPT. Provided we are storing numbers as numbers, their display would be governed by something higher level than our model. Also, if we discard Presentations (as is the preliminary agreement), it is a moot point.

strhea commented 1 year ago

Fair enough. I was trying to remember why we had put the validation regex there in the first place. I think that comma vs decimal was the original argument.

knelson-farmbeltnorth commented 1 year ago

Final agreement in 19 April 2023 meeting that we will remove Presentations from ADAPT.