JBoss.orgCommunity Documentation

Chapter 5. Editors

5.1. Model Editor
5.1.1. Diagram Editor
5.1.2. Table Editor
5.1.3. Simple Datatypes Editor
5.1.4. Semantic Editor
5.1.5. Source Editor
5.1.6. Model Object Editors
5.2. VDB Editor
5.2.1. Editing Data Roles
5.2.2. Editing Translator Overrides

Editors are the UI components designed to assist editing your models and to maintain the state for a given model or resource in your workspace. When editing a model, the model will be opened in a Model Editor. Editing a property value, for instance, will require an open editor prior to actually changing the property.

Any number of editors can be open at once, but only one can be active at a time. The main menu bar and toolbar for Teiid Designer may contain operations that are applicable to the active editor (and removed when editor becomes inactive).

Tabs in the editor area indicate the names of models that are currently open for editing. An asterisk (*) indicates that an editor has unsaved changes.

Editor Tabs

Figure 5.1. Editor Tabs

By default, editors are stacked in the editors area, but you can choose to tile them vertically, and or horizontally in order to view multiple models simultaneously.

Viewing Multiple Editors

Figure 5.2. Viewing Multiple Editors

The Teiid Designer provides main editor views for XMI models and VDBs.

The Model Editor contains sub-editors which provide different views of the data or parts of data within an XMI model. These sub-editors, specific to model types are listed below.

  • Diagram Editor - All models except XML Schema models.

  • Table Editor - All models.

  • Simple Datatypes Editor - XML Schema models only.

  • Semantics Editor - XML Schema models only.

  • Source Editor - XML Schema models only.

The VDB Editor is a single page editor containing panels for editing description, model contents and data roles.

In addition to general Editors for models, there are detailed editors designed for editing specific model object types. These "object" editors include:

  • Transformation Editor - Manages Transformation SQL for Relational View Base Tables, Procedures and XML Web Service Operations.

  • Choice Editor - Manages properties and criteria for XML choice elements in XML Document View models.

  • Input Editor - Manages Input Set parameters used between Mapping Classes in XML Document View models.

  • Recursion Editor - Manages recursion properties for recursive XML Elements in XML Document View models.

  • Operation Editor - Manages SQL and Input Variables for Web Service Operations.

The Model Editor is comprised of sub-editors which provide multiple views of your data. The Diagram Editor provides a graphical while the Table Editor provides spreadsheet-like editing capabilities. This section describes these various sub-editors.

The Diagram Editor provides a graphical view of the a set of model components and their relationships.

Several types of diagrams are available depending on model type. They include:

You can customize various diagram visual properties via Diagram Preferences.

Each diagram provides actions via the Main toolbar, diagram toolbar and selection-based context menus. These actions will be discussed below in detail for each diagram type.

When a Diagram Editor is in focus, a set of common diagram actions is added to the application's main toolbar.

The Table Editor provides a table-based object type structured view of the contents of a model. The figure below shows a relational model viewed in the Table Editor. Common object types are displayed in individual folders/tables. All base tables, for instance, are shown in one table independent of their parentage.

You can customize Table Editor properties via Table Editor Preferences.

These are the primary features of the Table Editor:

  • Edit existing properties.

  • Add, remove or edit objects, via the main Edit menu and context menu ( Cut, Copy, Paste, Clone, Delete, Rename, Insert Rows ).

  • Paste information from your clipboard into the table.

  • Print your tables.

When a Table Editor is in focus, the Insert Table Rows action is added to the application's main toolbar.

A few Table Editor actions are contributed to the right-click menu for selected table rows. These actions, described and shown below include:

  • Table Paste - Paste common spreadsheet data (like Microsoft Excel) to set object properties.

  • Table Editor Preferences - Change table editor preferences, including customizing visible properties.

  • Insert Rows - Create multiple new sibling objects.

  • Refresh Table - Refreshes the contents of the current Table Editor to insure it is in sync with the model.

A VDB, or virtual database is a container for components used to integrate data from multiple data sources, so that they can be accessed in a federated manner through a single, uniform API. A VDB contains models, which define the structural characteristics of data sources, views, and Web services. The VDB Editor, provides the means to manage the contents of the VDB as well as its deployable (validation) state.

The VDB Editor, shown below, contains a upper and lower panels. The upper panel contains the Models tab and an Other Files tab. The lower panel contains tabs for managing Data Roles, the VDB Description and Translator Overrides.

You can manage your VDB contents by using the Add or Remove models via the buttons at the right.

Set individual model visibility via the Visibility checkbox for each model. This provides low level data access security by removing specific models and their metadata contents from schema exposed in GUI tools.

In order for a VDB to be fully queryable the "Source Name", "Translator" and "JNDI Names" must have valid values and represent deployed artifacts on your Teiid server.

If you have Designer runtime plugins installed, and have a Teiid server running, you can select a source model in the VDB Editor and right-click select "Change Translator" or "Change JNDI Data Source" which will allow you to select any applicable artifacts on your server.

If you have a default Teiid server instance defined and connected the translator and JNDI table cells will contain drop-down lists of available translator and JNDI names available on that server.

Teiid Designer provides a means to create, edit and manage translator override properties specific to a VDB via the Tranlator Overrides tab. A translator override is a set of non-default properties targeted for a specific source model's data source. So each translator override requires a target translator name like "oracle", db2, mysql, etc. and a set of non-default key-value property sets.

The VDB Editor contains a Tranlator Overrides section consisting of a List of current tranlator overrides on the left, a properties editor panel on the right and Add (+) and Remove (-) action buttons on the lower part of the panel.

To override a specific translator type, select the add translator action (+). If a default Teiid server instance is connected and available the Add Translator Override dialog (below) is presented, the user selects an existing tranlator type and clicks OK. Note that the override is only applicable to sources within the VDB, so be sure and select a translator type that corresponds to one of the VDB's source models. The properties panel on the right side of the panel will contain editiable cells for each property type based on the data-type of the property. (i.e. boolean, integer, string, etc.).

If no default Teiid server instance is available, the "Add New Translator Override" dialog is presented. Enter a unique name for the tranlator override (i.e. "oracle_override"), a valid translator type name (i.e. "oracle") and click OK. The properties panel on the right side of the panel will allow adding, editing and removing key-value string-based property sets. When editing these properties all values will be treated as type string.