|Oracle Visual Information Retrieval Java Classes User's Guide and Reference
Part Number A85333-01
Oracle8i Visual Information Retrieval is an extension to Oracle8i that provides image storage, content-based retrieval, and format conversion capabilities through an object type. The capabilities of this product encompass the storage, retrieval, and manipulation of image data managed by the Oracle8i database server. This product supports image storage using binary large objects (BLOBs) and references to image data residing externally in binary files (BFILEs) or URLs.
Visual Information Retrieval is a building block for various imaging applications, rather than being an end-user application in itself. It consists of an object type (ORDVir) along with related methods for managing and processing image data.
Refer to Oracle Visual Information Retreival User's Guide and Reference for information about how visual information retrieval works.
You may already be familiar with Oracle interMedia Image, either as a component of Oracle interMedia or in a previous release as Oracle8 Image Cartridge. The base interMedia Image option and Visual Information Retrieval both let you store an image as an object in the database or as a reference to an external file or URL. Both products let you store and query on the following attributes:
Understanding the base Image option is important because the Visual Information Retrieval object type is defined as the Image object plus a signature attribute.
The main differences between the Image option and the Visual Information Retrieval product are that Visual Information Retrieval lets you create and use indexes, and perform content-based retrieval. Content-based retrieval lets you perform queries based on intrinsic visual attributes of the image (color, structure, texture), rather than being limited to keyword searches in textual annotations or descriptions. The underlying technology was developed by Virage, Inc., a leader in content-based retrieval.
Oracle Visual Information Retrieval Java Classes lets you write your own Java applications to use, retrieve, and modify multimedia data stored in an Oracle database.
Oracle Visual Information Retrieval Java Classes lets you connect to a database through JDBC calls, select a database object into a Java application object, perform various operations on the application object, and commit your changes to the database object.
Perform the following operations to make a connection between a database object and an application object:
Write a method that returns a valid OracleConnection object; see Example 2-3 for an example of a method that makes a connection to the database.
To execute the SELECT statement, you must create a Statement object in your application, use the executeQuery( ) method to execute the SELECT statement, and cast the results into an OracleResultSet object. See steps 1 and 2 of Example 2-4 for an example.
Create an application ORDVir object, and instantiate it with the results of the getCustomDatum( ) method. See step 5 of Example 2-4 for an example.
You should now have an application ORDVir object that is identical to the database object.
Create an OraclePreparedStatement object that contains a SQL statement that updates the database object, and execute the statement. See step 8 of Example 2-4 for an example.
Unless you used the setAutoCommit( ) method to true in your connection method, you must perform an explicit commit to update the database object with any changes that you made to the application object. You do this with the JDBC commit( ) method. See step 4 of Example 2-2 for an example of the commit( ) method.
Close the connection between the application and database with the JDBC close( ) method. See step 5 of Example 2-2 for an example of the close( ) method.
For more information about using JDBC, see Oracle8i JDBC Developer's Guide and Reference.
Oracle Corporation may evolve the Visual Information Retrieval object type by adding new object attributes in a future release. If you want client-side applications to maintain compatibility to release 8.1.7 of the ORDVir object type, even after a server upgrade that evolves the object types, you are advised to make a call to the compatibility initialization function at the beginning of the application.
Client-side applications written in Java using the Visual Information Retrieval Java Classes for release 8.1.7 should call the OrdMediaUtil.virCompatibilityInit( ) function after connecting to Oracle.
This Java function takes an OracleConnection object as an argument. The included Visual Information Retrieval 8.1.7 Java API will ensure that your 8.1.7 application will work (without upgrading) with a potential future version of Visual Information Retrieval with an evolved object type.
See Example 2-2 for an example of the virCompatibilityInit( ) method.