Oracle8 ConText Cartridge Administrator's Guide Release 2.3 A58165-01 |
|
This chapter describes the ConText data dictionary objects provided with ConText for text loading.
The topics discussed in this chapter are:
This section provides conceptual, as well as reference, information about text loading sources, which are stored in the ConText data dictionary:
A source is a logical grouping of three text loading preferences (one preference for each of the supported categories), assigned to a column in the database. A source specifies the options used by ConText to load text automatically into a column using ctxload and ConText servers with the Loader personality.
Sources can be created by any ConText user with the CTXAPP role. Sources are stored in the ConText data dictionary. In addition to the preferences for a source, users specify a name and text column for the source. Users can also specify a description and a refresh rate for directory scanning.
The sources created by a user must be unique for the user. As such, the same source for a user cannot be assigned to more than one column.
See Also:
For an example of automated text loading with ConText servers, see "Loading Text" in "Setting Up and Managing Text". For more information about text loading preferences, see "Preferences for Text Loading" in this chapter. |
To define a source, a user specifies a name and column for the source, and optionally a description and refresh rate for the source.
The column in the source indicates the column to which text is loaded by ConText servers.
To define a source, the user specifies a preference for each of the three supported categories.
A preference can be used in more than one source; however, two preferences from the same category cannot be used in the same source.
If a preference for one of the categories is not specified when the source is created, the default, predefined preference for the category is used in the source.
This section provides conceptual, as well as reference, information for text loading preferences, which are stored in the ConText data dictionary:
Text loading preferences specify the options that ConText uses to load text (in batch mode). Each preference represents one (and only one) text loading option.
A preference consists of a ConText Tile and one or more attributes (and their corresponding values) for the Tile.
In addition, each preference is grouped into one of three types or categories, which determine the text loading operation that the preference controls.
When creating a source, three preferences are specified for the source, one for each of the three categories.
See Also:
For more information about Tiles in sources, see "Reader Tiles", "Engine Tiles", or "Translator Tiles" in this chapter. |
A ConText user with the CTXAPP role can create their own preferences by setting the required attributes for one of the Tiles provided by ConText, then calling CTX_DDL.CREATE_PREFERENCE and specifying the name of the Tile.
ConText provides predefined preferences for each category. These predefined preferences can be used by any ConText user with the CTXAPP role to create sources without first creating preferences.
ConText provides a single predefined Reader preference for text loading: DEFAULT_READER.
This preference calls the DIRECTORY READER Tile, which specifies a dummy directory for the Tile.
ConText provides a single predefined Engine preference, DEFAULT_LOADER, for text loading.
This preference calls the GENERIC LOADER Tile, which indicates the preference can be used to load text from files in a operating system directory.
ConText provides a single predefined Translator preference, DEFAULT_TRANSLATOR, for text loading.
This preference calls the NULL TRANSLATOR Tile, which indicates no translation is performed on the files to be loaded; the files are in the format required by ctxload.
The Reader Tiles are used to specify the location of the files to be loaded.
ConText provides the a single Reader Tile for creating preferences for text loading sources:
Tile | Attributes | Attribute Values |
---|---|---|
DIRECTORY READER |
directories |
pathname for the directory where text loading files are located |
The DIRECTORY READER Tile is used to specify the location of files to be loaded when the files are located in the local operating system.
DIRECTORY READER has the following attribute(s):
The directories attribute specifies the full pathname for the directory that the ConText server with the Loader personality scans when looking for new files to load into a column in a table or view.
The structure of the value for directories will vary depending on the directory naming conventions used by your operating system.
ConText provides a single Engine Tile for creating preferences for text loading sources:
The GENERIC LOADER Tile is used to specify the loader (ctxload) for loading text.
GENERIC LOADER has the following attribute(s).
The separate attribute specifies whether the -separate option for ctxload is enabled. When the -separate option is enabled, the load files do not contain the actual text of the documents to be loaded, but, rather, contain pointers to separate files where the text of the documents is stored.
The default for separate is N.
The longsize attribute specifies a value for the -longsize option for ctxload. The -longsize option specifies the maximum size, in kilobytes, allowed for text loaded by ctxload.
See Also:
For more information about how the -separate and -longsize options work in ctxload for loading text, see "Command-line Syntax" in Chapter 10, "Text Loading Utility". |
ConText provides the following Translator Tiles for creating preferences for text loading sources:
Tile | Attributes | Attribute Values |
---|---|---|
NULL TRANSLATOR |
** none ** |
N/A |
USER TRANSLATOR |
command |
executable for translator program |
The NULL TRANSLATOR Tile is used to specify that the load files for the loader (ctxload) are already in the format required by the loader. It has no attributes.
The USER TRANSLATOR Tile is used to specify a translator program that converts load files into the format required by the loader (ctxload).
USER TRANSLATOR has the following attribute(s):
The command attribute specifies the executable name of the translator program used to convert a load file into the format required by ctxload.