### Entry Manager

This manager is an abstract component, extensions of which are used for several different purposes in the system. The main function of this component is to maintain a set of entities, their storage and retrieval. This component supplies an environment where the user can arrange the entities in logical unions, which in turn, give better management capabilities for the data. Here the hierarchical model is exploited intensively.

The Entry Manager is used in three important components in the system:

- Internal Document Manager - the database of all documents saved in the system;
- Grammar Manager - the database of all Grammar definitions in the system;
- Value Constraints Manager - the database of all Value Constraints in the system.

Each Entry Manager represents a set of repositories, called Corpora which contain the corresponding entities. The different corpora are identified by unique (user supplied) names. Each corpus contains a set of entities which are stored independently from the entities of other corpora. No entities can be saved outside a corpus. The entities within a corpus are identified by unique names, i.e. no two entities can have the same name. If it is necessary that two or more entities should share the same name, they must be stored in different corpora.

The possible operations on corpora are:

- Creating a new corpus

  The user supplies a new corpus name which hasn't been used yet for another corpus.

- Removing a corpus

  The user selects a corpus to be removed. All entities contained in the selected corpus are removed as well. The removal is preceded by a confirmation warning message. There is one system protected corpus which can not be removed. It is always presented in the system and it is used as a default corpus.

- Renaming a corpus

  The user can rename an existing corpus by supplying a new unique name. The system corpus is protected from renaming.

Corpora are entities containers only, so it is not possible a corpus to contain another corpus. Each corpus has its own internal logical structure which facilitates the maintenance of many entities at the same time. The entities within a corpus are organized in groups. Each group can contain a set of entities as well as a set of subgroups. Each group is identified by an unique name within the group in which it is included, but not necessary unique for the containing corpus. The supported operations on groups are: creating a new group or a subgroup of a group; renaming a group and removing a group. The user can include or exclude entries in/from a group.

The groups are logical unions of entities which do not impact physically the entities themselves. This means that if an entity is removed (excluded) from a group, the entity itself is not deleted from the database, but just excluded from this union. Thus the same entity can be included in more than one group, as well as an entity can be included in none.

Note: technically said, the groups contain not entities, but references to entities. In this way, if an entity is presented in more than one group, the entity itself is not multiplied for each containing group, but the single instance is referred by links from each group entry.

The Entry Manager offers three views on the data:

- by logical tree structure - the hierarchical structure is visualized in a way that on the topmost level the set of available corpora is shown and under each of them the groups tree structure is visualized. Selecting a point in the hierarchy causes a visualization of its content in a separate window.
- by all entries in a corpus - all entities which are presented in a certain corpus are represented in a table, showing their names and some other information. The user can switch to another corpus in order to see its content in a table. In this view the groups information can not be observed.
- by all entries in the whole database - all entities from all corpora are represented in one table. The information shown in the table is the same as the one from the previous view, plus a source corpus name for each entry.

Here is one example picture of the Entry Manager window in By Groups mode:

The manager window consists of two main parts:

1. The panel on the left. It contains the tree representations of the group hierarchy: Root Entry Group, Group A, Group B, Group C. When the user selects a node in this tree, the content of the corresponding group is loaded in the component on the right side.
2. Current group monitor. This is the panel situated on the right side of the window. It is a list with the content of the currently selected group in the tree. The list components, which are in blue color, are sub-groups. The other ones are the entries included in this group. They are colored in black or red, depending on whether they are valid or not according to their DTDs or other criteria. The user can sort all the entries in a group by clicking on the Name column of the table header. It is possible to rearrange the entries in a group by simply using drag-and-drop technique, i.e. pressing a entry and moving upwards or downwords until the desired position is reached.

There are six additional buttons which can be used for modification the content of the current group:

- New Group - creates a new sub-group of the current one. The user is asked to give a name for it;
- Remove - removes the selected entries from the list. The removal is preceded by a confirmation message. If the selection includes sub-groups, they are also removed with their entire contents.
- Rename - gives a new name for the selected entry and/or groups from the list.
- Copy - saves the data of the selected entry from the list with different name given by the user.
- Add Entry - gives a list of all entities which are not presented in the current group. The user is expected to choose one or more entries to be included in the current group.
- Delete! - this function can be used for removing entries from the entities database. It can be applied only to single entries, not to whole groups. Groups are excluded from any selections. The removal of entries is preceded by a confirmation message. The entries to be removed, are excluded from all the groups they may belong to.

Navigation in the group structure can be made also in the panel on the right. When the user wants to see the content of a certain sub-group of the current group, s/he just has to perform a double click on the desired sub-group. This will change the current group to the new one. This represents the movement from a group to a sub-group. The movement in the other direction is also possible. For each entity group (excluding the corpus root), a special sub-group is included, named: ". .". By performing a double click on it, similarly to most file systems, the current group is changed to its parent one.

The Entry Manager also provides two additional views for the entries in a table form. The first one shows all entries included in a certain corpus. The second view shows all entries from all corpora in one table.

The following information appears for each entry: its name, the corpus it is included in, the time of the last modification, its DTD and some other specific information. For the documents in the internal documents database, if a document is a query, the corresponding tool name is shown.

The user can sort all the entries by clicking on a corresponding column header.

In these views, the right button of the mouse can be used for manipulation of the selected entries in the table. Having pressed the right mouse button, the following pop-up menu appears:

- Info

  This item shows the following information about the selected entries:

  - entry name
  - entry size
  - entry's dtd name
  - whether the entry is valid
  - group of the entry
- Add In Group... - This item shows a dialog with the hierarchical structure for the groups in the system and the user can choose a group in which to place all the selected entries.
- Delete! - It is described above.
- Rename - It is described above.
- Copy - It is described above.

Here is one example picture of all entries in a corpus: