Installing the Program
To install the program, unpack oapi.zip to any suitable directory.
The package contains the following files:
- oapi.jar program classes
- oapi.bat program run file
- OAPI.css table of styles for the object description HTML file (defines the format of object description display in a browser)
- OAPI_CONTENT.css table of styles for the contents HTML file (defines the format of contents display in a browser)
- oapi.oh template for the HTML file to browse a document
- cont.oh template for the contents HTML file
- desc.oh template for the DB object description HTML file
- OAPI_Blanc.htm HTML file displayed to the right after a document is opened.
- UserGuid.htm user guide
Starting up the Program
The program does not require Oracle Client.
The program requires Java version 1.4.1.0 or higher.
To start up the program, run oapi.bat.
If there are several Java versions installed on your computer, you may have to specify the path to the version you want to use (for example, when a version earlier than the one required for the program runs as default). In this case, the oapi.bat file must be corrected: the path to the java.exe file of the required version must be specified.
Example of a corrected file text:
C:\j2sdk1.4.1_01\bin\java -jar oapi.jar
Working with the Program
When starting up, specify parameters of the database you want to connect to:
- Protocol network protocol type (usually TCP)
- Host network address of the database host computer
- Port number of the port to connect to the database
- Database name name of the database
- User Name database user name
- Password database user password
(If you have the client Oracle software installed, you can view the parameters in the ORA_HOME\network\ADMIN\tnsnames.ora file. Also, you can view Protocol, Host and Port by executing the command: tnsping database_name)
After connection to the database, the main program window opens:
There you must select a name of the database schema, objects of which are to be described. You can select several schemas. To do that, you have to hold down Ctrl and click the name of the corresponding schema.
To retrieve the description of a DB object type (tables, procedures, functions, packages, types), check the name of the type.
Besides, you can specify a filter for the names of described objects in the field under the object type name. The filter syntax is similar to the one used in SQL LIKE-expressions. The example will show generation of documents containing the description of the tables with names starting with HR, as well as of the functions from the SCOTT and SYS schemas.
You must set the documentation directory and specify the name of the HTML file required to view the documents.
To run the document generation procedure, click Process.
Info on program operation is displayed at the bottom of the window (including error messages).
Setting Interface Language
You can set the user interface language (Russian and English are currently supported). To change the language, go to the Interface Language menu and select the required language. The selected language will be applied to interface items (except for the dialog box where database connection parameters are specified) and messages.
Debug Logging
This is a test version supporting the feature of logging executed actions. Logging is disabled by default. To turn logging on, go to the "Debugging" menu and select a debugging level. The higher the level, the more detailed info on program actions is. At level 0, only error messages are saved. At level 1, info on method start and completion is added to error messages, etc.
By default, debug logs are saved in the OAPI.log file. You can change the log file. To do that, go to the "Debugging-Set log file" menu item and in the appeared dialog box select (or create if required) the directory and file where logs will be exported.
Described objects selection parameters, paths to the files of created documents and the log file, and settings of the interface language and debugging level are saved when closing the program and automatically restored at the next startup.
Viewing Documents
To view documents, browse the file specified in the Documentation Directory box.
The object list is displayed to the left, the description of the selected object is displayed to the right.
You can set the format of DB object content and description display by changing the applied tables of styles (OAPI_CONTENT.css and OAPI.css).
Tags to display text elements:
- FONT.PACKAGE_NAME package name
- FONT.TABLE_NAME table name
- FONT.INDEX index name
- FONT.PROC_NAME procedure and function name
- FONT.TYPE data type name
- FONT.P_NAME parameter name
- FONT.P_TYPE parameter type name
- FONT.RETURN - word RETURN
- FONT.P_DEFAULT - word DEFAULT
- FONT.P_COMMENT - comments
- FONT.P_IN_OUT - words IN and OUT
- FONT.P_NOCOPY - word NOCOPY
You can also correct the HTML file templates:
- oapi.oh template for the HTML file to browse documents;
- cont.oh template for the contents HTML file;
- desc.oh template for the DB object description HTML file;
- OAPI_Blanc.htm HTML file displayed to the right after a document is opened.