Extracting Metadata from Lotus Notes

For Lotus Notes components (see LotusReader, LotusWriter for further info), it is required to provide metadata for Lotus data you will be working with. The LotusReader component needs metadata to properly read data from Lotus views. Metadata describes how many columns there are in a view and assigns names and types to the columns. The LotusWriter component uses metadata to determine the types of written data fields.

Metadata can be obtained from Lotus views either as internal or external metadata. See sections Internal Metadata and External (Shared) Metadata to learn how to create internal and external metadata.

Specifying Lotus Notes connection for metadata extraction

Figure 32.28. Specifying Lotus Notes connection for metadata extraction

On the first page of Lotus Notes metadata extraction Wizard, you are asked to provide details of a connection to Lotus Notes or Lotus Domino server. You can either select an existing Lotus connection, load an external connection by using the Load from file button, or define a new connection by selecting <custom> from the connection menu.

See Lotus Connections for description of connection details.

Finally, to be able to extract metadata, you need to specify the View from which the metadata will be extracted.

The extraction process prepares metadata with the same number of fields as is the number of columns in the selected View. It will also assign names to the fields based on the names of the View columns. All columns in Lotus views have internal (programmatic) names. Some columns can have user-defined names for better readability. The extraction wizard will use user-defined names where possible, in the latter case it will use the internal programmatic name of the column.

The metadata extraction process will set types of all fields to String. This is because Lotus View columns do not have types assigned to them. The value in a column can contain arbitrary type, for example based on certain condition or result of complex calculation.

Lotus Notes metadata extraction wizard, page 2

Figure 32.29. Lotus Notes metadata extraction wizard, page 2

The second page of Lotus Notes metadata extraction Wizard is separated into two parts. In the upper part, there is standard Metadata editor available to customize the result of metadata extraction. In the lower part, there is a preview of the data contained in the View.

On this page you can, for example, change the names of fields or change the types of fields from default String type to something specific. In such a case, you must be sure you can guarantee the incoming data will be convertible to selected data type. The LotusReader component will always succeed in converting Lotus data to strings. However, it may fail if an invalid conversion is attempted. For example, an attempt to convert Integer to Date data type would result in a data conversion exception and the whole reading process would fail.

If you are extracting internal metadata, this was the last page of the Lotus Notes metadata extraction wizard. Clicking Finish will add internal metadata to the currently opened graph. In case you were extracting external metadata, on the following page, you will be asked to specify the location to store the extracted metadata.