Lexicon Module Builder view

TheLexicon Module Builder view allows you to bundle multiple lexicon files into a module for ease of distribution.

The lexicons available for use are those lexicon files (modulename.lexicon) located in the appropriate !lexicon subfolder for the target locale. For example, !lexicon/fr is the subfolder which would contain French lexicon files.

You can build new lexicon modules or replace existing ones.

In this view there are text fields for defining module information, a Browse button that allows you to locate existing lexicon modules, a selection table of available lexicon files that can be selected for inclusion, a check box to delete source files after the build is completed, and a Build Module button to initiate the build, as shown here.

Figure 7.   Lexicon module builder
Image

The text fields in this view allow you to provide basic information for the module. Several of these fields are required. Leaving a required field empty will result in a failed build. The required fields are:

  • Module Name

    Recommended naming conventions for new modules are: “customLexicon<Xxxx>” or “<Vendor>Lexicon<Xxxx>” or “<Brand>Lexicon<Xxxx>”.

  • Preferred Symbol

    An abbreviation (1 to 8 alphabetic characters) of the module name.

  • Vendor Name

    A text string to describe the vendor.

  • Version

    An integer or integers separated by periods, for example 1 or 1.4.2.

Brand Pattern, an optional text field, allows you to specify a “brand” attribute for this module. The Lexicon system refers to this field at runtime, comparing it to the brand for the current system (controller platform or Workbench). If you provide a brand name in this field, the set of lexicon files in your module will be available for loading only if this value matches the runtime brand identifier defined as part of the license.

 NOTE: Providing a Brand Pattern value is optional. A lexicon module with no brand pattern will always be available for use. 

Located just below the brand pattern text field is a check box option to delete lexicon files after the build is completed. If you select this option, when you click the Build Module button you will be prompted to confirm that you want to delete files in the !lexicon folder.

As mentioned earlier, the selection table in the lower half of the view lists the lexicons available for use. Click a check box in the left column of a table row to mark a lexicon file for inclusion in the module. Double-clicking an entry in the selection table will switch to the Lexicon Editor view for the selected language-module combination. Switching between the lexicon views will retain your selections (text box values, selected table rows, check box values) unless a module was loaded from the Module Chooser. In that case, the module must be re-loaded in order to re-populate the selection table with the lexicons within that module.

If rebuilding an existing lexicon module, click the Browse button to open a Module Chooser dialog box. Once you select a module in the Chooser and click OK, it fills in the context of that module in the available text fields in the Lexicon Module Builder view and the module’s existing lexicon files are added to the selection table, as shown below. Clicking the Cancel button in the Chooser closes the dialog box. When you click the Build Module button, you will get separate confirmation dialog boxes to overwrite the existing module, to delete the lexicon files, and indicating the module was rebuilt successfully.

 NOTE: Lexicon modules can be rebuilt multiple times. 
Figure 8.   Browse to select existing lexicon modules

Image
Image

 NOTE: A lexicon module edited with the Lexicon Module Builder must adhere to the following restrictions:
  • Module may not contain Java class files (compiled Java code).
  • Module may not contain default lexicon modules (niagaraLexicon<xx>.jar files in the !modules folder).
  • Source files selected for inclusion in the module must be uniquely named. For example, selecting a file-based lexicon and a module-based lexicon both of which are named control.lexicon will result in an error message.
 

On completion of the build, you will see a confirmation message indicating that the module was constructed and placed in the !modules folder.