...
- convert the 'ontology' section to be named 'terminology'
- add the new id_definitions section into the archetype terminology
- for all at-codes used as node ids, renumber and reformat them as follows:
- at0000 => at1id1; at0000.1 => id1.1 and so on
- at000N => idN+1 e.g. at0003 => id4, at0022 => id23
- move all id codes from the term_definitions section to the new id_definitions section
- for all other at-codes, reformat by removing leading zeroes in the top level of the codes
- interior nodes that are missing codes get codes in the 5000 range, i.e. new codes like id5001 are created [UPDATE: as Diego points out below, this might not be desirable; investigating using normal id-codes]
- this is done a) to easily guarantee no clashes with existing codes and b) to be able to easily spot nodes whose ids were created new
- in specialised archetypes, the same nodes are matched and if no constraint overrides are detected, the same code is reused
- leaf C_PRIMITIVE_OBJECT nodes always get the code id9999.
...