6.2 Template loading

Template loading is carried out automatically when a corpus is (re-)loaded (cf. subsection 2.1). For template developers, this means that you have to reload the corpus in order to make changes of the template definitions known to the TIGERSearch tool.

The template definitions which are associated with a corpus are loaded from the given template path in the following order:

depth-first

Files from subdirectories will be loaded before the .tig files in the given directory.

alphabetical order

Subdirectories resp. files are loaded in alphabetical order.

Please note: Based on the above order, only the first template definition for a template head (template name/arity) will be loaded. All other definitions for the same template head will be ignored.

For faster processing, templates are translated ('compiled') into Java objects. In order to avoid unnecessary recompilation steps, compiled template code is stored on the hard disk in binary form (files with extension .tgc). The compilation of a template source file filename.tig is triggered automatically during the template loading process, in the following situations:

The compiled file filename.tgc does not exist yet.

The compiled file filename.tgc is older than source file filename.tig.

The TIGERSearch system has been updated in the meantime, i.e. the internal data structures of the compiled files are outdated.

The fact that compiled code is written on hard-disk means that file access properties have to be set in an appropriate manner (cf. subsection 6.1).