Localizing SDEJ Code Table Files

It is possible to localize or modify the codetable files shipped with the SDEJ. These codetable files are located in the codetable directory of the SDEJ and are in the same format as Cúram application codetable files but with the extension .itx.

To localize these files copy the particular .itx codetable file to be modified from the SDEJ to the codetable directory of a component in your Cúram application, for example, SERVER_DIR/components/custom/codetable. The .itx codetable file can then be modified in the same way as any codetable file; overriding a code or adding a new locale for all the codes.
Note: If the package attribute in the codetable file is modified the localization will not work.

The ctgen target, when run, will merge the localized .itx codetable file with the original one located in the SDEJ. The localized codetable file will have the higher precedence order. It will then generate the sql files only. No Java artefacts will be generated for codetable files with the extension .itx.

The datamanager_config.xml file, located in the project/config directory specifies the location of the common directory for generated SQL artefacts. There is no requirement to update this entry for localized code tables as all .sql files are generated to the same location.

Figure 1. Datamanager entry for the code table SQL artefacts location
< entry
  name="build/svr/codetable/sql/"
  type="sql"
  base="basedir"/>
Note: The <description> sub-element is an optional element for the <codetables> element in the codetable (CTX) files. The <description> element is mainly used to define a description for the code tables for developers information. The description is not saved into any database tables for normal code tables. However, for Code Table Hierarchies, if the description is defined in the CTX file, then the <description> value is saved to the description attribute in the CODETABLEHIERARCHY table. This value will be displayed on the Code Table Hierarchy page of the Cúram Administration screens.