Oracle8(TM) Getting Started for Windows NT
Release 8.0.3
A54894-01

Library

Product

Contents

Index

Prev Next

14
Oracle8 ConText Filters, Demos, and Workbench

This chapter describes how to use the Oracle8 ConText Filters and Oracle8 ConText Cartridge Demos that are provided as an addition to Oracle8 ConText Cartridge. It also describes how to set up and use the components of Oracle8 ConText Cartridge Workbench.

Specific topics discussed are:

Oracle8 ConText Filters

Oracle8 ConText Filters are provided as an addition to Oracle8 ConText Cartridge. These filters are installed and used on the server. You may also define your own filters (user defined filters). If so, the following list describes information specific to using user defined filters on Windows NT.

  1. On UNIX operating systems, Perl scripts and UNIX shell scripts can be executed as user defined filters. On Windows NT, only .EXEs, .CMDs, and .BATs are executed as user defined filters.
  2. To implement a filter on Windows NT, (for example, to run a Perl script FOO.PL), associate files with a .PL extension with PERL.EXE (if you have a Perl compiler). When the Oracle8 ConText Cartridge server process executes your FOO.PL user defined filter, it calls CCPERL.EXE FOO.PL input file output file.

Setting Up Oracle8 ConText Filters

This section provides instructions on setting up Oracle8 ConText Filters. On Windows NT, filters must be placed in the directory ORACLE_HOME\BIN. The following Oracle8 ConText Filters are supplied with Oracle8 ConText Cartridge for Windows NT.

Format   Version   Format ID   Filters  

AmiPro for Windows  

1,2,3  

19  

W033B16D.EXE  

Lotus Freelance for Windows  

2  

85  

W114B16D.EXE  

Lotus 123  

2,3,4,5  

20  

W020B16D.EXE  

Microsoft Excel  

5  

21  

W021B16D.EXE  

7  

-  

Microsoft PowerPoint for Windows  

2,3,4  

84  

W109B16D.EXE  

7  

-  

W116B16D.EXE  

Microsoft Word for MS-DOS  

5.0,5.5  

8  

W005B16D.EXE  

Microsoft Word for Apple Macintosh  

3,4,5  

28  

W054B16D.EXE  

Microsoft Word for Windows  

2  

18  

W044B16D.EXE  

6  

68  

W049B16D.EXE  

7  

-  

Portable Document Format (PDF) Beta  

-  

57  

W107B16D.EXE  

WordPerfect MS-DOS  

5.0,5.1  

3  

W007B16D.EXE  

WordPerfect for Windows  

5.x  

WordPerfect for MS-DOS  

6.0  

1  

W048B16D.EXE  

WordPerfect for Windows  

6.x  

WordPerfect for Windows  

7.0  

-  

Xerox XIF for UNIX  

5,6  

43  

W103B16D.EXE  

The information provided in the column Format ID above is used to create Filter preferences for mixed-format columns that require external filters. A format ID is not provided for the following formats because Oracle8 ConText Cartridge does not support mixed-format columns for these document formats:

However, the Oracle8 ConText Filters for these formats can be used for single-format columns that contain any one of these formats.

Creating Wrappers for Oracle8 ConText Filters

A wrapper must be created for each of the Oracle8 ConText Filters to be used to filter text stored in a column. The wrapper can be any type of executable, such as a UNIX shell script or Windows NT batch file, that calls the filter executable and provides two system-supplied variables as arguments. Once the required wrappers have been created, the external filters can be specified as the filters for the text column.

The following example illustrates a simple Windows NT batch file that can be used as the wrapper for calling the AmiPro filter executable W033B16D.EXE for Windows NT. Note that the .EXE extension for the filter executable file is not specified because Windows NT does not require it.

REM AMIPRO FILTER
ORACLE_HOME\BIN\W033B16D %1 /N /T=%2

The batch file can be named anything, for example, AMIPRO.BAT, but the file must be located in the ORACLE_HOME\BIN directory and the file extension must be .BAT or .CMD. The batch files for all other required external filters for Windows NT are identical to this example, except for the name of the filter executable supplied in each batch file.

Using Oracle8 ConText Filters

This section provides instructions for using the Oracle8 ConText Filters. The following topics are covered in this section:

filtpref-Specifying Oracle8 ConText Filters

To specify one or more of the supplied external filters for a column, you first create a Filter preference in which you specify the wrapper (file name) for each of the filters to be used, then create a policy that calls the Filter preference.

You can create Filter preferences for:

singleformat-Single Format Columns

For single format columns, create a Filter preference that uses the COMMAND attribute (USER FILTER Tile) to specify the wrapper that invokes the filter executable for the format used in your column. The following PL/SQL example illustrates creating a Filter preference for a column that contains documents only in AmiPro format:

BEGIN
CTX_DDL.SET_ATTRIBUTE('COMMAND','AMIPRO.BAT'); 
CTX_DDL.CREATE_PREFERENCE('AMIPRO_FILT', 
                             'AMIPRO FILTER', 
                             'USER FILTER'); 
END;  

multiformat-Mixed Format Columns

For mixed-format columns, create a Filter preference that sets the EXECUTABLE attribute (BLASTER Tile) once for each of the wrappers that invoke the formats you want to use in your column. The following PL/SQL example illustrates creating a Filter preference for a column that contains documents in AmiPro, Adobe Acrobat, and WordPerfect 6.0 formats:

BEGIN 
CTX_DDL.SET_ATTRIBUTE('EXECUTABLE',19,'AMIPRO.BAT', 1); 
CTX_DDL.SET_ATTRIBUTE('EXECUTABLE',57,'ACROBAT.BAT', 2); 
CTX_DDL.CREATE_PREFERENCE('MULT_FILT', 
                            'MULTIPLE FILTERS', 
                            'BLASTER'); 
END; 

In this example, it is not necessary to specify the filter executable for WordPerfect 6.0, because Oracle8 ConText Cartridge provides an internal filter for WordPerfect 6.0. By default, when the Filter preference for a column uses the EXECUTABLE attribute (BLASTER Tile), Oracle8 ConText Cartridge uses internal filters for all supported formats for which an external filter is not explicitly specified.

filtman-Using Oracle8 ConText Filters for Manual Filtering

The external filters can also be used to manually filter your documents (files) prior to storing them in the database. To use this filtering method, call the appropriate external filter executable from the MS-DOS command prompt for each document to be filtered and specify two arguments:

Then, you can load the filtered, plain (ASCII) text from the output file into a database column, create a policy for the column, and index the column.

Note:

If you manually filter your documents before loading them into a column, when creating the policy for the column, specify a Filter preference that uses either the ASCII internal filter or no filter.

 

The following example illustrates the command line syntax for using the filter executables to perform manual filtering on Windows NT:

ORACLE_HOME\BIN\W049B16D TEST.DOC /N /T=OUTPUT.TXT 

In this example, a Microsoft Word 6 (or 7) document named TEST.DOC is filtered using the W049B16D.EXE filter executable and the filtered output is stored in OUTPUT.TXT.

filtlimit-Known Limitations

This section provides information about the known limitations for the external filters supplied with Oracle8 ConText Cartridge.

The PDF external filter provided in this distribution has a status of BETA and does not support filtering of multiple column PDF documents.

Oracle8 ConText Cartridge Demos

The following Oracle8 ConText Cartridge Demos are installed and used on the server:

Product   Demo Is Installed Under...  

SQL*Plus  

%CTX80%\DEMO\CTXPLUS

 

Oracle Forms  

%CTX80%\DEMO\CTXFORM

 

Linguistics  

%CTX80%\DEMO\CTXLING  

Additional Information:

See the Oracle8 ConText Cartridge Application Developer's Guide for further information on setting up and executing the demos applications.  

Note:

The Oracle8 ConText Cartridge Web Sample Application is not provided on Windows NT.  

Oracle8 ConText Cartridge Workbench

Oracle8 ConText Cartridge Workbench can be installed on both server and client and consists of the following components:

Oracle8 ConText Cartridge System Administration

The Oracle8 ConText Cartridge System Administration tool is a GUI application that can be used to perform system and text administration tasks. Before you can connect to the database using the Oracle8 ConText Cartridge System Administration tool, an entry for the database must be added to the TNSNAMES.ORA file. In addition, the CTXSYS user may have to connect once to each database. If this is required for a particular database, the Oracle8 ConText Cartridge System Administration tool notifies you when you attempt to connect to the database.

Note:

CTXSYS needs to connect only once per database. Once CTXSYS connects to a database, the database is enabled thereafter for all users. See the online help with the Oracle8 ConText Cartridge System Administration tool for details on connecting to the database.  

Oracle8 ConText Cartridge Viewer

The Oracle8 ConText Cartridge Viewer is supplied as a custom control (OCX), which can be embedded in any application developed in an environment, such as Visual Basic, and Visual C++.

Additional Information:

See online help for instructions for using the viewer.  

Oracle8 ConText Cartridge I/O Utility

The Oracle8 ConText Cartridge I/O Utility is stand-alone executable that can be used to load text to a database column, load text from a column into a file, execute SQL and PL/SQL code, and call other executables from the MS-DOS command prompt.

Additional Information:

See Oracle8 ConText Cartridge Application Developer's Guide for instructions for using the I/O utility.  




Prev

Next
Oracle
Copyright © 1997 Oracle Corporation.

All Rights Reserved.

Library

Product

Contents

Index