Adl conv correct atcode numbering#582
Conversation
…d, which enables a cheap method of detecting conversion differences between different runs of Archie.
…es retain their numeric value rather than being incremented as at-codes mapped to id-codes and also ac-codes are.
pieterbos
left a comment
There was a problem hiding this comment.
This needs to be configurable to do the previous or current conversion, because the migration process between this and the newer coding is NOT trivial and requires time. So, do NOT merge before this.
We also need code to migrate data to and from the old and new version, and convert ADL2 archetypes to whatever we call the new coding scheme.
Also I think we need some kind of version number in the ADL to indicate the used at-code-strategy
| return null; | ||
| } | ||
|
|
||
| File adl4convertedDir = new File("src/test/resources/adl14converted"); |
There was a problem hiding this comment.
Apart from the variable name needing to be adl14ConvertedDir - why write all these files, and why commit them all?
if committed, needs a clear marking to which ADL 2 version these are converted in the directory structure.
There was a problem hiding this comment.
I included the generated files because you can run a conversion (with or without source code changes) and see in the Git diffs if the conversion changed anything compared to the previous run.
I had not originally envisaged that there would need to be two variants of the at-code conversion, since the SEC seems to agree on the mapping method within which at000N codes are not renumbered in the upgrade to ADL2 codes. But of course the Nedap system actually contains ADL2 archetypes converted from ADL1.4 archetypes, with the previous rule, i.e. 'add one to all codes'.
How we call these various conversions is a question for SEC, so I'll post there. But I agree that we probably need two output directories to distinguish the two forms of code conversion.
Modify ADL14 to ADL2 code conversion rules such that top-level at-codes retain their numeric value rather than being incremented as at-codes mapped to id-codes and also ac-codes are.
Add a simple method of saving converted test files to resources area, so that regression errors can be detected as diffs.