How the Thesaurus validates terms

There are two types of term validation with the Thesaurus - when a user:

  1. Inserts a record into the Thesaurus
  2. Takes a term from the Thesaurus for use in another module

When a term is inserted into a thesaurus a query is performed to ensure that it is unique within that thesaurus. Every term must also have an acronym associated with it, e.g. AAT, which identifies which thesaurus the term belongs to. If users wish to create their own thesaurus, a default can be setup to insert their acronym for them. The query performed to test for uniqueness queries on both the term and the acronym. If a record already exists with this term and acronym, the user is informed and they are unable to save the record; if one does not exist, the record is saved. This means that every term stored in the Thesaurus module is not guaranteed to be unique because the same term may occur in different thesauri; however it will always be unique within a thesaurus.

When a thesaurus term is used in another module the following tests take place to ensure that it is valid:

  • The internal hierarchy is checked to ensure that it is valid for this field

    Each field that uses the thesaurus must define entry terms and from these it is possible to determine whether or not a term exists in a sub-tree. This is made possible by looking at the internal hierarchy of the entry terms. If the internal hierarchy of the selected term starts with the internal hierarchy of the entry term, the term is valid. As an example, an entry term has an internal hierarchy of 12:54. A term with an internal hierarchy of 12:54:87:26 would be valid whereas one with 25:54:37 would not.

  • The term is then checked to determine if it has any Use references

    If it does, the Use terms are queried for and added to the matching set.

  • The term is checked to see if it is valid (valid flag set to "Y")

    Therefore for a term to be valid for a given field it must have a matching internal hierarchy and have its valid flag set to yes.