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

Adl conv correct atcode numbering #582

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

wolandscat
Copy link
Member

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.

…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.
Copy link
Collaborator

@pieterbos pieterbos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@@ -217,5 +221,23 @@ private Archetype parse(Map<String, Exception> exceptions, Map<String, ANTLRPars
return null;
}

File adl4convertedDir = new File("src/test/resources/adl14converted");
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants