DATABASE SCHEMA OR DATA STRUCTURE

Design and implementation of a client/server framework for federated multi-search and update across heterogeneous datastores

6370541

Abstract

A design and implementation of a client/server framework for federated multi-search and update across heterogeneous datastores. In particular, a technique for manipulating data in one or more heterogeneous datastores at a computer is provided. An object-oriented model is provided for integrating one or more heterogeneous datastores with a federated datastore. One or more heterogeneous datastores and a federated datastore are generated based on the object-oriented model. The generated datastores are organized into a federated composition.


Claims

What is claimed is:

1. A method of manipulating data in one or more heterogeneous datastores at a computer, the method comprising the steps of:

providing an object-oriented model for integrating one or more heterogeneous datastores with a federated datastore;

generating objects representing the one or more heterogeneous datastores and the federated datastore based on the object-oriented model; and

organizing the generated datastores into a federated composition.

2. The method of claim 1, wherein each datastore is a datastore object whose class is based on a base datastore class.

3. The method of claim 1, further comprising storing data within the datastores in the form of objects.

4. The method of claim 3, wherein the objects are dynamic data objects.

5. The method of claim 3, wherein objects are extended data objects.

6. The method of claim 5, wherein the extended data objects comprise binary large objects.

7. The method of claim 1, further comprising retrieving data from one or more of the heterogeneous datastores in response to a query to the federated datastore.

8. The method of claim 7, further comprising retrieving data using one or more search engines.

9. The method of claim 7, further comprising retrieving data by mapping between the federated datastore and one or more heterogeneous datastores.

10. The method of claim 1, further comprising returning a group of objects in response to a query for data.

11. The method of claim 10, further comprising iterating through the group of objects.

12. The method of claim 1, further comprising enabling querying of a combination of data.

13. The method of claim 1, farther comprising dynamically modifying the federated composition.

14. An apparatus for manipulating data in one or more heterogeneous datastores, comprising:

a computer having one or more heterogeneous datastores; and

one or more computer programs, performed by the computer, for providing an object-oriented model for integrating one or more heterogeneous datastores with a federated datastore, generating objects representing the one or more heterogeneous datastores and the federated datastore based on the object-oriented model, and organizing the generated datastores into a federated composition.

15. The apparatus of claim 14, wherein each datastore is a datastore object whose class is based on a base datastore class.

16. The apparatus of claim 14, further comprising storing data within the datastores in the form of objects.

17. The apparatus of claim 16, wherein the objects are dynamic data objects.

18. The apparatus of claim 16, wherein objects are extended data objects.

19. The apparatus of claim 18, wherein the extended data objects comprise binary large objects.

20. The apparatus of claim 14, further comprising retrieving data from one or more of the heterogeneous datastores in response to a query to the federated datastore.

21. The apparatus of claim 20, further comprising retrieving data using one or more search engines.

22. The apparatus of claim 20, further comprising retrieving data by mapping between the federated datastore and one or more heterogeneous datastores.

23. The apparatus of claim 14, further comprising returning a group of objects in response to a query for data.

24. The apparatus of claim 23, further comprising iterating through the group of objects.

25. The apparatus of claim 14, further comprising enabling querying of a combination of data.

26. The apparatus of claim 14, further comprising dynamically modifying the federated composition.

27. An article of manufacture comprising a program storage medium readable by a computer and embodying one or more instructions executable by the computer to perform method steps for manipulating data in one or more heterogeneous datastores at a computer, the method comprising the steps of:

providing an object-oriented model for integrating one or more heterogeneous datastores with a federated datastore;

generating objects representing the one or more heterogeneous datastores and the federated datastore based on the object-oriented model; and

organizing the generated datastores into a federated composition.

28. The article of manufacture of claim 27, wherein each datastore is a datastore object whose class is based on a base datastore class.

29. The article of manufacture of claim 27, further comprising storing data within the datastores in the form of objects.

30. The article of manufacture of claim 29, wherein the objects are dynamic data objects.

31. The article of manufacture of claim 29, wherein objects are extended data objects.

32. The article of manufacture of claim 31, wherein the extended data objects comprise binary large objects.

33. The article of manufacture of claim 27, further comprising retrieving data from one or more of the heterogeneous datastores in response to a query to the federated datastore.

34. The article of manufacture of claim 33, further comprising retrieving data using one or more search engines.

35. The article of manufacture of claim 33, further comprising retrieving data by mapping between the federated datastore and one or more heterogeneous datastores.

36. The article of manufacture of claim 27, further comprising returning a group of objects in response to a query for data.

37. The article of manufacture of claim 36, further comprising iterating through the group of objects.

38. The article of manufacture of claim 27, further comprising enabling querying of a combination of data.

39. The article of manufacture of claim 27, further comprising dynamically modifying the federated composition.


Description

BACKGROUND OF THE INVENTION

1. Field of the Invention

This invention relates in general to database management systems performed by computers, and in particular, to a design and implementation of a client/server framework for federated multi-search and update across heterogeneous datastores.

2. Description of Related Art

The present invention relates to a system and method for representing and searching multiple heterogeneous datastores and managing the results of such searches. Datastore is a term used to refer to a generic data storage facility, such as a relational data base, flat-file, hierarchical data base, etc. Heterogeneous is a term used to indicate that the datastores need not be similar to each other. For example, each datastore may store different types of data, such as image or text, or each datastore may be based on a different theory of data model, such as Digital Library/VisualInfo or Domino Extended Search (DES).

For nearly half a century computers have been used by businesses to manage information such as numbers and text, mainly in the form of coded data. However, business data represents only a small part of the world's information. As storage, communication and information processing technologies advance, and as their costs come down, it becomes more feasible to digitize other various types of data, store large volumes of it, and be able to distribute it on demand to users at their place of business or home.

New digitization technologies have emerged in the last decade to digitize images, audio, and video, giving birth to a new type of digital multimedia information. These multimedia objects are quite different from the business data that computers managed in the past, and often require more advanced information management system infrastructures with new capabilities. Such systems are often called "digital libraries."

Bringing new digital technologies can do much more than just replace physical objects with their electronic representation. It enables instant access to information; supports fast, accurate, and powerful search mechanisms; provides, new "experiential" (i.e. virtual reality) user interfaces; and implements new ways of protecting the rights of information owners. These properties make digital library solutions even more attractive and acceptable not only to corporate IS organizations, but to the information owners, publishers and service providers.

Generally, business data is created by a business process (an airline ticket reservation, a deposit at the bank, and a claim processing at an insurance company are examples). Most of these processes have been automated by computers and produce business data in digital form (text and numbers). Therefore it is usually structured coded data. Multimedia data, on the contrary, cannot be fully pre-structured (its use is not fully predictable) because it is the result of the creation of a human being or the digitization of an object of the real world (x-rays, geophysical mapping, etc.) rather than a computer algorithm.

The average size of business data in digital form is relatively small. A banking record--including a customers name, address, phone number, account number, balance, etc.--represents at most a few hundred characters, i.e. few hundreds/thousands of bits. The digitization of multimedia information (image, audio, video) produces a large set of bits called an "object" or "blobs" (Binary Large Objects). For example, a digitized image of the parchments from the Vatican Library takes as much as the equivalent of 30 million characters (30 MB) to be stored. The digitization of a movie, even after compression, may take as much as the equivalent of several billions of characters (3-4 GB) to be stored.

Multimedia information is typically stored as much larger objects, ever increasing in quantity and therefore requiring special storage mechanisms. Classical business computer systems have not been designed to directly store such large objects. Specialized storage technologies may be required for certain types of information, e.g. media streamers for video or music. Because certain multimedia information needs to be preserved "forever" it also requires special storage management functions providing automated back-up and migration to new storage technologies as they become available and as old technologies become obsolete.

Finally, for performance reasons, the multimedia data is often placed in the proximity of the users with the system supporting multiple distributed object servers. This often requires a logical separation between applications, indices, and data to ensure independence from any changes in the location of the data.

The indexing of business data is often imbedded into the data itself. When the automated business process stores a person's name in the column "NAME," it actually indexes that information. Multimedia information objects usually do not contain indexing information. This "meta data" needs to be created in addition by developers or librarians. The indexing information for multimedia information is often kept in "business like" databases separated from the physical object.

In a Digital Library (DL), the multimedia object can be linked with the associated indexing information, since both are available in digital form. Integration of this legacy catalog information with the digitized object is crucial and is one of the great advantages of DL technology. Different types of objects can be categorized differently as appropriate for each object type. Existing standards like MARC records for libraries, Finding Aids for archiving of special collections, etc. . . can be used when appropriate.

The indexing information used for catalog searches in physical libraries is mostly what one can read on the covers of the books: authors name, title, publisher, ISBN, . . . enriched by other information created by librarians based on the content of the books (abstracts, subjects, keywords, . . . ). In digital libraries, the entire content of books, images, music, films, etc . . . are available and "new content" technologies are needed; technologies for full text searching, image content searching (searching based on color, texture, shape, etc . . . ), video content searching, and audio content searching. The integrated combination of catalog searches (e.g. SQL) with content searches will provide more powerful search and access functions. These technologies can also be used to partially automate further indexing, classification, and abstracting of objects based on content.

To harness the massive amounts of information spread throughout these networks, it has become necessary for a user to search numerous storage facilities at the same time without having to consider the particular implementation of each storage facility.

Object-oriented approaches are generally better suited for such complex data management. The term "object-oriented" refers to a software design method which uses "classes" and "objects" to model abstract or real objects. An "object" is the main building block of object-oriented programming, and is a programming unit which has both data and functionality (i.e., "methods"). A "class" defines the implementation of a particular kind of object, the variables and methods it uses, and the parent class it belongs to.

Some known programming tools that can be used for developing search and result-management frameworks include IBM VisualAge C++, Microsoft Visual C++, Microsoft Visual J++, and Java.

There is a need in the art for an improved federated system. In particular, there is a need in the art for an improved client/server framework for federated multi-search and update across heterogeneous datastores.

SUMMARY OF THE INVENTION

To overcome the limitations in the prior art described above, and to overcome other limitations that will become apparent upon reading and understanding the present specification, the present invention discloses a method, apparatus, and article of manufacture for a design and implementation of a client/server framework for federated multi-search and update across heterogeneous datastores.

According to an embodiment of the invention, a technique for manipulating data in one or more heterogeneous datastores at a computer is provided. An object-oriented model is provided for integrating one or more heterogeneous datastores with a federated datastore. One or more heterogeneous datastores and a federated datastore are generated based on the object-oriented model. The generated datastores are organized into a federated composition.

BRIEF DESCRIPTION OF THE DRAWINGS

Referring now to the drawings in which like reference numbers represent corresponding parts throughout:

FIG. 1 is a diagram illustrating a computer architecture that could be used in accordance with the present invention;

FIG. 2 is a diagram illustrating a class hierarchy for Data Object classes;

FIG. 3 is a diagram illustrating a class hierarchy for Datastore classes;

FIG. 4 is a diagram illustrating one composition of a federated datastore;

FIG. 5 is a diagram of an extended Grand Portal architecture;

FIG. 6 is a diagram illustrating individual datastores and federated compositions; and

FIG. 7 is a flow diagram illustrating one use of the client/server framework for federated multi-search and update across heterogeneous datastores.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENT

In the following description of the preferred embodiment, reference is made to the accompanying drawings which form a part hereof, and in which is shown by way of illustration a specific embodiment in which the invention may be practiced. It is to be understood that other embodiments may be utilized and structural and functional changes may be made without departing from the scope of the present invention.

Federated Architecture

FIG. 1 is a diagram illustrating a computer architecture that could be used in accordance with the present invention. The present invention is described herein by way of example and is not intended to be limited to the described embodiment. The description of the preferred embodiment is based on, but certainly not limited to, the IBM design of Java Grand Portal Class Library, the Digital Library Java Application Programming Interface (API).

The Java Grand Portal 120 is comprised of client and server classes. In particular, Java Grand Portal is a set of Java classes which provides access and manipulation of local or remote data stored in Digital Library storage facilities. It uses Java APIs based on OMG-Object Query Services (OQS) and a Dynamic Data Object protocol, which is a part of OMG/Persistence Object Services.

The Java APIs provide multi-search capabilities such as:

1. Searching within a given datastore using one or a combination of supported query types, i.e.

Parametric query--Queries requiring an exact match on the condition specified in the query predicate and the data values stored in the datastore.

Text query--Queries on the content of text fields for approximate match with the given text search expression, e.g. the existence (or non-existence) of certain phrases or word-stems.

Image query--Queries on the content of image fields for approximate match with the given image search expression, e.g. image with certain degree of similarity based on color percentages, layout, or texture.

2. Each search type is supported by one or more search-engines.

3. Searching on the results of a previous search.

4. Searching involving heterogeneous datastores.

The Digital Library Grand Portal classes provide a convenient API for Java application users; the applications can be located at local or remote sites. Java classes will typically reside on both server and client sides; both sides providing the same interface. The client side of Java classes communicates with the server side to access data in the Digital Library through the network. Communication between client and server sides is done by these classes; it is not necessary to add any additional programs.

In particular, FIG. 1 is an architectural diagram outlining the structure of the federated search for Digital Library repositories using the federated datastore 100, comprised of a federated datastore client and server. A federated datastore 100 is a virtual datastore which combines several heterogeneous datastores 102 into a consistent and unified conceptual view. This view, or a federated schema, is established via schema mapping 104 of the underlying datastores. The users interact with a federated datastore 100 using the federated schema, without needing to know about the individual datastores 102 which participate in the federated datastore 100.

One embodiment of the invention provides a federated result set cursor object across heterogeneous datastores. In one embodiment of the invention, one or more classes implement the federated result set cursor object, and one or more methods are provided to manipulate the federated result set cursor object. In one embodiment, the class definitions and methods reside at the federated datastore client and server.

The federated datastore 100 does not have a corresponding back-end client. Since it is a virtual datastore, the federated datastore 100 relies on the underlying physical back-end client associated with it, such as the DL client (i.e., Digital Library client), OnDemand, VisualInfo, DB2, etc. Digital Library, OnDemand, VisualInfo, and DB2 are all products from International Business Machines Corporation. As mentioned before, this association is established by a schema mapping component 104.

The communication between the federated datastore 100 client and server can be done by any appropriate protocol. On top of Java Grand Portal client classes, the users can develop application programs using, for example, any existing Java Beans 122 development environment.

The federated datastore 100 coordinates query evaluation, data-access, and transaction processing of the participating heterogeneous datastores 102. Given the federated schema, a multi-search query can be formulated, executed, and coordinated to produce results in the form of a datastore-neutral dynamic data object.

Note that each heterogeneous datastore and the federated datastore are created using one datastore definition or superclass. The federated datastore 100 and the heterogeneous datastores 102 are all subclasses of a class called Datastore, therefore, all of these datastores 100 and 102 have the same interface. Therefore, a user would be able to access the federated datastore 100 and the heterogeneous datastores 102 in a consistent and uniform manner.

Additionally, the objects stored in the federated datastore 100 and the heterogeneous datastores 102 are subclasses of a Data Object class. The Data Object class includes subclasses for dynamic data objects (DDOs) and extended data objects (XDOs). A DDO has attributes, with type, value, and properties. The value of an attribute can be a reference to another DDO or XDO, or a collection of DDOs or XDOs.

FIG. 2 is a diagram illustrating a class hierarchy for Data Object classes. The objects stored in and manipulated by the datastores and fetch operations belong to data object classes. These objects are returned as the result of a fetch, or created and used in CRUD (add, retrieve, update, delete) operations.

A DataObjectBase 200 is an abstract base class for all data objects known by datastores. It has a protocol attribute, that indicates to the datastore which interface can be used to operate on this object. A XDOBase 210 is the base class used to represent user-defined-types (UDT) or large objects. In particular, the XDOBase 210 is the base class for some user-defined types 212 and XDOs 214. AXDO 214 represents complexUDTs or large objects (LOB). This object can exist stand-alone or as a part of a DDO 236. Therefore, it has a persistent object identifier and CRUD operations capabilities.

Blob 216 is a base class for BLOBs as a place holder to share all generic operations pertaining to BLOBs. Clob 218 is a base class for CLOBs (Character Large Objects) as a placeholder to share all generic operations pertaining to CLOBs. DBClob 220 is a base class for DBCLOBs (database character large object) as a placeholder to share all generic operations pertaining to DBCLOBs. BlobDB2222 represents a BLOB specific to DB2, and BlobDL 22 represents a BLOB specific to DL. Similarly, though not shown, there may be subclasses for ClobDB2, ClobDL, etc.

A DataObject 230 is a base class for PersistentObject 232 and DDOBase 234. A PersistentObject 232 represents a specific object whose code is statically generated and compiled. This type of object will not be covered in this document. A DDOBase 234 is a base class for a dynamic data object 236 (without the CRUD methods). A DDO (Dynamic Data Object) 236 represents generic data objects which are constructed dynamically at runtime. This object fits well with query and browsing activities in Grand Portal where objects are only known and generated at runtime. It supports the CRUD operations (add, retrieve, update, and delete), and, with the help of its associated datastore, a DDO can put itself into and out of the datastore.

One skilled in the art would recognize that these are only example classes and subclasses and other structures maybe used for objects and other classes or subclasses may be added to or removed from the tree shown in FIG. 2.

With respect to the notion of "federation", each participating datastore preserves the right to maintain its "personality", i.e. its own query language, data-model or schema, method of interaction, etc, and at the same time cooperating in a federation to provide a federated schema. This design allows the users to preserve the natural view to their favorite datastore as well as access them in conjunction with other datastores in a federated context.

The federated datastore 100 can combine the participating native datastores in two ways:

With mapping. As described above, mapping of concepts across participating datastores is established to provide a unified conceptual view. Based on this federated schema, federated queries with both join and union expressions can be formulated.

Without mapping. In this case, the federated datastore 100 only reflects the union of each participating datastore's conceptual view. Although it coordinates query processing and data-access for each underlying datastore, the federated datastore 100 must accept queries in each datastore's native language since the query translation process can not be performed without mapping. In addition, since there is no conceptual mapping between datastores, the FederatedQuery 19 results can only reflect the union of results from each datastore.

The embodiment of the invention is incorporated into one or more software programs that reside at the federated datastore 100. Generally, the software programs and the instructions derived therefrom, are all tangibly embodied in a computer-readable medium, e.g. one or more of the data storage devices, which may be connected to the federated datastore 100. Moreover, the software programs and the instructions derived therefrom, are all comprised of instructions which, when read and executed by the computer system 100, causes the computer system 100 to perform the steps necessary to implement and/or use the present invention. Under control of an operating system, the software programs and the instructions derived therefrom, may be loaded from the data storage devices into a memory of the federated datatstore 100 for use during actual operations.

Thus, the present invention may be implemented as a method, apparatus, or article of manufacture using standard programming and/or engineering techniques to produce software, firmware, hardware, or any combination thereof. The term "article of manufacture" (or alternatively, "computer program product") as used herein is intended to encompass a computer program accessible from any computer-readable device, carrier, or media. Of course, those skilled in the art will recognize many modifications may be made to this configuration without departing from the scope of the present invention.

Those skilled in the art will recognize that the exemplary environment illustrated in FIG. 1 is not intended to limit the present invention. Indeed, those skilled in the art will recognize that other alternative hardware environments may be used without departing from the scope of the present invention.

A Design and Implementation of a Client/server Framework for Federated Multi-search and Update Across Heterogeneous Datastores

An embodiment of the invention provides a design and implementation of a client/server framework for federated multi-search and update across heterogeneous datastores.

A consistent framework is provided for developing client/server application programs for multi-search and update on a single or multiple heterogeneous datastores participating in a federation. The datastores can be of the same or different types, and in a mixture of local or client/server configurations. Several different search-engines, such as, text search and image search engines, may be added to enrich the combined multi-search capability of the system.

In particular, an embodiment of the invention provides an environment and facilities for client/server application development with object-oriented class libraries. Example object-oriented class libraries are described in more detail below. The object-oriented class libraries support a consistent framework for representing a variety of data-storage facilities via the use of datstore objects, including the federation of several heterogeneous datastores. Additional datastore types can be defined and incorporated in the federation.

The object-oriented class libraries support a consistent framework for data-access across a single or heterogeneous datastore via the implementation of dynamic data objects and extender data objects.

The object-oriented class libraries support a consistent framework for performing multi-search using a variety of search engines and for performing federated search via the federated datastores.

The object-oriented class libraries support a consistent framework for handling a variety of multi-media data via the implementation of an extender data object and its extensions.

The object-oriented class libraries support a consistent framework for client/server implementation of the above.

The object-oriented class libraries support a consistent framework for defining a dynamic client/server configuration and load balancing.

Modern day application programs work in a complex environment. The present invention provides support for a number of features. Non-traditional data types, such as text, image, voice, and video are supported, along with capabilities for capturing, storing/archiving, searching, updating, and presenting these data types. The ability to perform a multi-search (i.e., a combination of parametric, text, and image search) with the help of proper search engines is supported. The ability to access and update data from a single or heterogeneous data source in a federated or non-federated environment is supported. The ability to work in a client/server environment with dynamic topology where new servers can be added or removed from the configuration is supported. The ability to support a choice of different implementation languages, such as Java, C++, and Visual Basic, in diverse customer shops and machine platforms is supported. The ability to support applications launched from the World Wide Web is available. The ability to support re-usable component based software development is available.

FIG. 3 is a diagram illustrating a class hierarchy for Datastore classes. A main datastore class 300 is an abstract base class (i.e., superclass) for all datastores. In particular, some datastore classes that are based on the datastore class 300 and inherit its characteristics are the following: a DL Datastore class 302, a VisualInfo Datastore class 304, a Federated Datastore class 306, and an OnDemand Datastore class 308. It is to be understood that the techniques of the invention may be applied to any data source and is not limited to the mentioned datastores.

FIG. 4 is a diagram illustrating one composition of a federated datastore. The federated datastore 400 connects to heterogeneous datastores 402,404,406, and 408. As illustrated, a federated datastore 406 may connect to and be nested under federated datastore 400. Additionally, the federated datastore 406 may connect to heterogeneous datastores 410,412, and 414. The depicted architecture is only a sample, and one skilled in the art would recognize that other examples fall within the scope of the invention.

FIG. 5 is a diagram of an extended Grand Portal architecture. A Grand Portal client for a federated client datastore 500 is connected to a Grand Portal server for a federated server datastore 502. Another federated client/server system 504 may be connected to the federated server 502. A Grand Portal client/server system for an OnDemand (OD) datastore 506 may be part of the federation. Additionally, a Grand Portal client/server system for a Digital LibraryNisualinfo (DL/VI) datastore 508 may be part of the federation. As with any of the datastores discussed herein, a user may access the client or the server directly. Therefore, user applications may reside either at the client or the server.

FIG. 6 is a diagram illustrating individual datastores and federated compositions. In particular, a datastore can be configured as a stand-alone or as part of a federation. Additionally, a federated datastore can be composed of any number of datastores, including other federated datastores. Stand-alone datastores may be accessed directly by auser. The following are example stand-alone datastores in FIG. 6: a Digital Libt (DL) datastore 600, an OnDemand datastore 602, a Visualnfo/400 datastore 604, a Domino.Doc datastore 606, or a ImagePlus/390 datastore 608. Additionally, there may be multiple federated compositions 610 and 612. A federated composition 612 may include individual datastores 614, 616, and 620, along with another federated datastore 618.

Part of the novelty and uniqueness of the Grand Portal architecture is that it is rich and robust enough to allow a user to compose a search in the following configurations:

1. Search against a single datastore either from a client or a server configuration. Depending on the target datastore features, the architecture may support multi-search involving several different search engines (text and image search) or an update function.

2. Non-federated search against several datastores. Non-federated means that there is no mapping used. The user manages the search to each native datastore and processes the results according to a specific application to solve a specific problem. In this case, the datastore could be a gateway.

3. Federated search across several datastores, including other federated datastores

4. A mixture of 2 and 3.

5. Search in a combination of different platforms (e.g., AMx, NT/Win98) using a variety of languages (e.g., Java, C++, Visual Basic)

FIG. 7 is a flow diagram illustrating one use of the client/server framework for federated multi-search and update across heterogeneous datastores. Initially, in block 700 a federated composition is built by generated datastores from datastore classes. For example, a federated datastore is generated from a federated datastore class that is based on a base datastore class. Similarly, a Digital Library datastore, a QBIC datastore, and a Text datastore may be generated from their corresponding datastore classes, each of which is based on the base datastore class.

Then, in block 702, data is stored in the datastores using objects based on object classes. For example, the objects may be dynamic data objects or extended data objects. On type of extended data object is a binary large object. Next, searching may be performed across the heterogeneous (native) datastores, block 704. This is done using query objects. For example, the query can be a combined query object (for retrieving a combination of data, such as text, image or parametric), or the query can be a text query, an image query, a parametric query, or a SQL query.

In order for the federated datastore to communicate with the native datastores, shema mapping objects are used, block 706. Once the mapping is performed and the query is submitted to each native datastore, in block 708, data is returned from each native datastore in the form, for example, of a collection object or a result set cursor object. Then, in block 710, a user or application program may iterate thorugh the returned data using an iterator object.

Class Libraries

1. Datastore Base Class

The dkDatastore is the class on which each other datastore class is based. An example class definition for dkDatastore is set forth below.

    dkDatastore
        Interface com.ibm.mm.sdk.common.dkDatastore
            public interface dkDatastore
            extends dkQueryManager
        {
        public abstract void connect(String datastore_name,
                String user_name,
                String authentication,
                String connect_string) throws DKException, Exception
        public abstract void disconnect( ) throws DKException, Exception
        public abstract Object getOption(int option) throws DKException,
     Exception
        public abstract void setOption(int option,
                Object value) throws DKException, Exception
        public abstract Object evaluate(String command,
                short commandLangType,
                DKNVPair params[ ]) throws DKException, Exception
        public abstract Object evaluate(dkQuery query) throws DKException,
     Exception
        public abstract Object evaluate(DKCQExpr qe) throws DKException,
     Exception
        public abstract dkResultSetCursor execute(String command,
                    short commandLangType,
                    DKNVPair params[ ]) throws DKException, Exception
        public abstract dkResultSetCursor execute(dkQuery query) throws
     DKException, Exception
        public abstract dkResultSetCursor execute(DKCQExpr qe) throws
     DKException, Exception
        public abstract void executeWithCallback(dkQuery qo,
                    dkCallback callbackObj) throws DKException, Exception
        public abstract void executeWithCallback(String command,
                    short commandLangType,
                    DKNVPair params[ ],
                    dkCallback callbackObj) throws DKException, Exception
        public abstract void executeWithCallback(DKCQExpr qe,
                    dkCallback callbackObj) throws DKException, Exception
        public abstract dkQuery createQuery(String command,
                    short commandLangType,
                    DKNVPair params[ ]) throws DKException, Exception
        public abstract dkQuery createQuery(DKCQExpr qe) throws DKException,
     Exception
        public abstract void addObject(dkDataObject ddo) throws DKException,
     Exception
        public abstract void deleteObject(dkDataObject ddo) throws DKException,
     Exception
        public abstract void retrieveObject(dkDataObject ddo) throws
     DKException, Exception
        public abstract void updateObject(dkDataObject ddo) throws DKException,
     Exception
        public abstract void commit( ) throws DKException, Exception
        public abstract void rollback( ) throws DKException, Exception
        public abstract boolean isConnected( ) throws Exception
        public abstract String datastoreName( ) throws Exception
        public abstract String datastoreType( ) throws Exception
        public abstract DKHandle connection( ) throws Exception
        public abstract DKHandle handle(String type) throws Exception
        public abstract String userName( ) throws Exception
        public abstract dkCollection listDataSources( ) throws DKException,
     Exception
        public abstract String[ ] listDataSourceNames( ) throws DKException,
     Exception
        public abstract Object listServers( ) throws DKException, Exception
        public abstract Object listSchema( ) throws DKException, Exception
        public abstract Object listSchemaAttributes(String schemaEntry) throws
     DKException, public
        abstract dkCollection listEntities( ) throws DKException, Exception
        public abstract dkCollection listSearchableEntities( ) throws
     DKException, Exception
        public abstract String[ ] listEntityNames( ) throws DKException,
     Exception
        public abstract String[ ] listSearchableEntityNames( ) throws
     DKException, Exception
        public abstract dkCollection listEntityAttrs(String entityName) throws
     DKException,
        Exception
        public abstract String[ ] listEntityAttrNames(String entityName) throws
     DKException,
        Exception
        public abstract dkDatastoreDef datastoreDef( ) throws DKException,
     Exception
        public abstract String registerMapping(DKNVPair sourceMap) throws
     DKException,
        Exception
        public abstract void unRegisterMapping(String mappingName) throws
     DKException,
        Exception
        public abstract String[ ] listMappingNames( ) throws DKException,
     Exception
        public abstract dkSchemaMapping getMapping(String mappingName) throws
     DKException,
        public abstract dkExtension getExtension(String extensionName) throws
     DKException, public
        abstract void addExtension(String extensionName,
                dkExtension extensionObj) throws DKException, Exception
        public abstract void removeExtension(String extensionName) throws
     DKException, Exception
        public abstract String[ ] listExtensionNames( ) throws DKException,
     Exception
        public abstract DKDDO createDDO(String objectType,
                int Flags) throws DKException, Exception
        public abstract void changePassword(String userId,
                String oldPwd,
                String newPwd) throws DKException, Exception
        public abstract void destroy( ) throws DKException, Exception
        }


The following methods are part of the dkDatastore class:

public abstract void connect(String datastore_name,

String user_name,

String authentication,

String connect string) throws DKException, Exception

Connects to a datastore.

Parameters:

datastore_name--the datastore name used for connection

user_name--the user name used for connection

authentication--the authentication used for connection

connect_string--the connect string used for connection. This is used to provide additional connection options.

public abstract void disconnect( ) throws DKException, Exception

Disconnects to a datastore.

public abstract ObjectgetOption(int option) throws DKException, Exception

Gets a datastore option.

Parameters:

option--the option identifier

Returns:

an option value

public abstract void setOption(int option,

Object value) throws DKException, Exception

Sets a datastore option.

Parameters:

option--the option identifier

value--the option value

public abstract Object evaluate(String command,

short commandLangType,

D NVPair params[ ]) throws DKException, Exception

Evaluates a query.

Parameters:

command--a query string

commandLang--a query type

params--additional query option in name/value pair

Returns:

a collection of the results

public abstract Object evaluate(dkQuery query) throws DKException, Exception

Evaluates a query.

Parameters:

qo--a query object

Returns:

a collection of the results

public abstract Object evaluate(DKCQExpr qe) throws DKException, Exception

Evaluates a query.

Parameters:

qe--a common query expression object

Returns:

a collection of the results

public abstract dkResultSetCursor execute(String command,

short commandLangType,

DKNVPairparams[ ]) throws DKException, Exception

Executes the query.

Parameters:

command--a query string

commandLang--a query type

params--additional query option in name/value pair

Returns:

resultSetCursor which represents a datastore cursor.

public abstract dkResultSetCursor execute(dkQuery query) throws DKException, Exception

Executes the query.

Parameters:

qo--a query object

Returns:

resultSetCursor which represents a datastore cursor.

public abstract dkResultSetCursor execute(DKCQExpr qe) throws DKException, Exception

Executes the query.

Parameters:

qe--a common query expression object

Returns:

resultSetCursor which represents a datastore cursor.

public abstract void executeWithCallback(dkQuery qo,

dkcallback callbackObj) throws DKException, Exception

Executes the query with callback function.

Parameters:

qo--a query object

callbackObj--a dkCallback object

public abstract void executeWithCallback(String command,

short commandLangType,

DKNVPairparams[ ],

dkcallback callbackObj) throws DKException, Exception

Executes the query with callback function.

Parameters:

command--a query string

commandLang--a query type

params--additional query option in name/value pair

callbackObj--a dkCallback object

public abstract void executeWithCallback(DKCQExpr qe,

dkcallback callbackObj) throws DKException, Exception

Executes the query with callback function.

Parameters:

qe--a common query expression object

callbackObj--a dkCallback object

public abstract dkQuery createQuery(String command,

short commandLangType,

KNVPair params[ ]) throws DKException, Exception

Creates a query object.

Parameters:

command--a query string

commandLang--a query type

params--additional query option in name/value pair

Returns:

a query object

public abstract dkQuery createQuery(DKCQExpr qe) throws DKException, Exception

Creates a query object.

Parameters:

qe--a common query expression object

public abstract void addObject(dkDataObject ddo) throws DKException, Exception

Adds this ddo to this datastore.

Parameters:

ddo--the ddo to be added to this datastore

public abstract void deleteObject(dkDataObject ddo) throws DKException, Exception

Deletes this ddo from this datastore.

Parameters:

ddo--the ddo to be deleted from this datastore

public abstract void retrieveObject(dkDataObject ddo) throws DKException, Exception

Retrieves this ddo from this datastore.

Parameters:

ddo--the ddo to be retrieved from this datastore

public abstract void updateObject(dkDataObject ddo) throws DKException, Exception

Updates this ddo in this datastore.

Parameters:

ddo--the ddo to be updated in this datastore

public abstract void commit( ) throws DKException, Exception

Commits a datastore transaction.

public abstract void rollback( ) throws DKException, Exception

Rolls back a datastore transaction.

public abstract boolean isConnected( ) throws Exception

checks to see if the datastore is connected.

Returns:

true if connected

public abstract String datastorename( ) throws Exception

Gets the name of this datastore object. Usually it represents a datastore source's server name.

Returns:

datastore name

public abstract String datastoretype( ) throws Exception

Gets the datastore type for this datastore object.

Returns:

datastore type

public abstract DKHandle connection( ) throws Exception

Gets the connection handle for a datastore.

Returns:

connection handle

public abstract DKHande handle(String type) throws Exception

Gets a datastore handle.

Parameters:

type--type of datastore handle wanted

Returns:

a datastore handle

public abstract String userName( ) throws Exception

Gets the user name for this datastore object.

Returns:

user name

public abstract dkcollection listDataSources( ) throws DKException, Exception

List the available datastore sources that can be used to connect with.

Returns:

a collection of server defs

public abstract String[ ] listDataSourceNames( ) throws DKException, Exception

Lists the available datastore source names that can be used to connect with.

Returns:

an array of server names

public abstract Object listServers( ) throws DKException, Exception

Lists the available datastore sources that can be used to connect with. Note: listservers( ) is deprecated. Replace by listDataSources.

Returns:

a collection of server definitions

See Also:

listDataSources

public abstract Object listSchema( ) throws DKException, Exception

List the entities that belong to this datastore. Note: listSchema( ) is deprecated. Replace by listEntities.

Returns:

an object that contains the schema

See Also:

listEntities

public abstract Object listSchemaAttributes(String schemaEntry) throws DKException, Exception

List the attributes that belong to a schema Note: listSchemaAttributes( ) is deprecated. Replace by listEntityAttributes.

Parameters:

schemaEntry--the name of the schema.

Returns:

an object that contains the attributes that belong to this schema

See Also:

listEntityAttrs

public abstract dkcollection listEntities( ) throws DKException, Exception

Gets a list of entities from persistent datastore.

Returns:

a collection of entity defs

Throws: DKException

if error occurs

public abstract dkcollection listSearchableEntities( ) throws DKException, Exception

public abstract String[ ] listEntityNames( ) throws DKException, Exception

Gets a list of entity names from persistent datastore

Returns:

an array of entity names

Throws: DKException

if error occurs

public abstract String[ ] listSearchableEntityNames( ) throws DKException, Exception

public abstract dkcollection listEntityAttrs(String entityName) throws DKException, Exception

Gets a list of attributes for a given entity name.

Parameters:

entityName--name of entity to retrieve attributes for

Returns:

a dkCollection of dkAttrDef objects

Throws: DKException

if the entity name does not exist

public abstract String[ ] listEntityAttrNames(String entityName) throws DKException, Exception

Gets a list of attribute names for a given entity name.

Parameters:

entityName--name of entity to retrieve attribute names for

Returns:

an array of attribute names

Throws: DKException

if the entity name does not exist

public abstract dkDatastoreDef datastoreDef( ) throws DKException; Exception

Gets datastore definition

Returns:

the meta-data (dkDatastoreDef) of this datastore

public abstract String registerMapping(DKNVPair sourceMap) throws DKException, Exception

Registers mapping information to this datastore

Parameters:

sourceMap--source name and mapping

Returns:

the mapping name for the mapping information

public abstract void unRegisterMapping(String mappingName) throws DKException, Exception

Unregisters mapping information for this datastore

Parameters:

mappingName--name of the mapping information

public abstract String[ ] listMappingNames( ) throws DKException, Exception

Gets the list of the register mappings for this datastore

Returns:

an array of register mapping objects' names

public abstract dkSchemaMapping getMapping(String mappingName) throws DKException, Exception

Gets mapping information for this datastore

Parameters:

mappingName--name of the mapping information

Returns:

the schema mapping object

public abstract dkextension getExtension(String extensionName) throws DKException, Exception

Gets the extension object from a given extenstion name.

Parameters:

extensionName--name of the extension object.

Returns:

extension object.

public abstract void addExtension(String extensionname, dkExtension extensionObj) throws DKException, Exception

Adds a new extension object.

Parameters:

extensionname--name of new extension object

extensionObj--the extension object to be set

public abstract void removeExtension(String extensionName) throws DKException, Exception

Removes an existing extension object

Parameters:

extensionname--name of extension object to be removed

public abstract String[ ] listExtensionNames( ) throws DKException, Exception

Gets the list of extension objects' names

Returns:

an array of extension objects' names

public abstract DKDDO createDDO(String objectType,

int Flags) throws DKException, Exception

Creates a new DDO with object type, properties and attributes set for a given backend server.

Parameters:

objectType--the object type user wants to create Flags--to indicate various options to specify more detail characteristics of the DDO to create. For example, it may be a directive to create a document DDO, a folder, etc.

Returns:

a new DDO of the given object type with all the properties and attributes set, so that the user only need to set the attribute values

public abstract void changePassword(String userId,

String oldPwd,

String newPwd) throws DKException, Exception

public abstract void destroy( ) throws DKException, Exception

Destroys datastore and performs datastore cleanup if needed.

2. Federated Datastore

In the preferred embodiment, the federated datastore takes query strings expressed in a federated query language. An example class definition for DatastoreFederated is set forth below.
    DKDatastoreFed.java
        package com.ibm.mm.sdk.server;
        public class DKDatastoreFed extends dkAbstractDataStore
            implements DKConstantFed,
                DKConstant,
                DKMessageIdFed,
                DKMessageId,
                dkFederation,
                java.io.Serializable
        {
        public dkCollection listEntities( ) throws DKException, Exception
        public String[ ] listEntityNames( ) throws DKException, Exception
        public String[ ] listTextEntityNames( ) throws DKException, Exception
        public String[ ] listParmEntityNames( ) throws DKException, Exception
        public dkCollection listEntityAttrs(String entityName) throws
     DKException, Exception
        public String[ ] listEntityAttrNames(String entityName) throws
     DKException, Exception
        public String registerMapping(DKNVPair sourceMap) throws DKException,
     Exception
        public void unRegisterMapping(String mappingName) throws DKException,
     Exception
        public String[ ] listMappingNames( ) throws DKException, Exception
        public dkSchemaMapping getMapping(String mappingName) throws
     DKException,
            Exception
        public synchronized dkExtension getExtension(String extensionName)
     throws
            DKException, Exception
        public synchronized void addExtension(String extensionName,
            dkExtension extensionObj) throws DKException, Exception
        public synchronized void removeExtension(String extensionName) throws
     DKException,
            Exception
        public synchronized String[ ] listExtensionNames( ) throws DKException,
     Exception
        public DKDDO createDDO(String objectType,
                int Flags) throws DKException, Exception
        public dkCollection listSearchTemplates( ) throws DKException,
     Exception
        public String[ ] listSearchTemplateNames( ) throws DKException,
     Exception
        public dkSearchTemplate getSearchTemplate(StringtemplateName) throws
     DKException,
            Exception
        public void destroy( ) throws DKException, Exception
        public synchronized string addRemoveCursor (dkResultSetCursor iCurt int
     action)
            throws DKException, Exception
        public dkDatastore datastoreByServerName (String dsType, String dsName)
            throws DKException, Exception
        public void changePassword (String serverName,
            String user Id,
            String oldPwd,
            String newPwd)
            throws DKException, Exception
        public void requestConnection (String serverName,
            String userId,
            String passwd,
            String connectString)
            throws DKException, Exception
        public void excludeServer (Sting serverName, String templateName)
            throws DKException, Exception
        public boolean isServerExcluded (String serverName, String
     templateName)
            throws DKException, Exception, java.rmi.RemoteException
        public String[ ] listExcludedServers(String templateName) throws
     DKException, Exception
        public void clearExcludedServers(String templateName) throws
     DKException, Exception
        };


The following methods are part of the federated datastore class:

public DKDatastoreFed( ) throws DKException, Exception

Constructs default Federated Datastore.

public DKDatastoreFed(String configuration) throws DKException, Exception

Constructs default Federated Datastore.

public void connect(String datastore_name,

String user_name,

String authentication,

String connect_string) throws DKException, Exception

Establishes a connection to a federated datastore.

Parameters:

datastore_name--federated datastore name

user_name--userid to logon to this federated datastore

authentication--password for this user_name

connect_string--additional information string

Throws: DKException

if either:

datastore_name, user_name, or authentication is null or if error occurs in the federated datastore

Overrides:

connect in class dkAbstractDatastore

public void disconnect( ) throws DKException, Exception

Disconnects from the federated datastore.

Throws: DKException

if unable to disconnect from server.

Overrides:

disconnect in class dkAbstractDatastore

public Object getoption(int option) throws DKException

Gets defined datastore option

Parameters:

option--an option id

Returns:

the value for the given option

Throws: DKException

if option is not set

Overrides:

getOption in class dkAbstractDatastore

public void setOption(int option, Object value) throws DKException

Sets the given "option" with a specific "value".

Parameters:

option--an option id

value--the value for the "option"

Throws: DKException

if option/value is invalid

Overrides:

setOption in class dkAbstractDatastore

public Object evaluate(String command,

short commandLangType,

DKNVPairparams[ ]) throws DKException, Exception

Evaluates a query and returns the result as a dkQueryableCollection object.

Parameters:

command--a query stirring that represent the query criteria

commandLangType--a query language type, for Federated, it will be DK_FEDERATED_QL_TYPE

params--a name/value pairs list

Returns:

a query result collection

Throws: DKException

if "command" argument is null

Overrides:

evaluate in class dkAbstractDatastore

public Object evaluate(dkQuery query) throws DKException, Exception

Evaluates a query and returns the result as a dkQueryableCollection.

Parameters:

query--a given query object

Returns:

a query result collection

Throws: DKException

if the "query" input is null or not of federated query type.

Overrides:

evaluate in class dkAbstractDatastore

public Object evaluate(DKCQExpr qe) throws DKException, Exception

Evaluates a query.

Parameters:

qe--a common query expression object

Returns:

a collection of the results

Throws: DKException

if common query expression object is invalid

Overrides:

evaluate in class dkAbstractDatastore

public dkResultSetCursor execute(String command,

short commandLangType,

DKNVPairparams[ ]) throws DKException, Exception

Executes a command query of the federated datastore and returns a result set cursor.

Parameters:

command--a query string that represents the query criteria.

commandLangType--a query language type, for Federated, it will be DK_FEDERATED.sub.--QL _TYPE.

params[ ]--a name/value pairs list.

Returns:

a dkResultSetCursor object.

Throws: DKException

if "command" is null or invalid, or "commandLangType" is not Federated Query type.

Overrides:

execute in class dkAbstractDatastore

public dkResultSetCursor execute(dkQuery query) throws DKException, Exception

Executes a command query of the federated datastore and returns a result set cursor. This method takes a Federated query object as an argument.

Parameters:

query--a federated dkQuery object

Returns:

a dkResultSetCursor object

Throws: DKException

if "query" object is null or query.qlType( ) is not DK_FEDERATED_QL_TYPE

Overrides:

execute in class dkAbstractDatastore

public dkResultSetCursor execute(DKCQExpr cqe) throws DKException, Exception

Executes a query expression.

Parameters:

cqe--a common query expression object

Returns:

resultSetCursor which represents a federated datastore cursor.

Throws: DKException

if "cqe" object is invalid

Overrides:

execute in class dkAbstractDatastore

public void executeWithCallback(dkQuery query,

dkcallback callbackObj) throws DKException, Exception

Executes a query with callback function.

Parameters:

query--a query object

callbackObj--a dkCallback object

Overrides:

executeWithCallback in class dkAbstractDatastore

public void executeWithCallback(String command,

short commandLangType,

DKNVPair params[ ],

dkcallback callbackObj) throws DKException, Exception

Executes the query with callback function.

Parameters:

command--a query string

commandLang--a query type

params--additional query option in name/value pair

callbackObj--a dkCallback object

Overrides:

executeWithCallback in class dkAbstractDatastore

public void executeWithCallback(DKCQExpr cqe,

dkcallback callbackObj) throws DKException, Exception

Executes a query expression with callback function.

Parameters:

cqe--a common query expression object

callbackObj--a dkCallback object

Overrides:

executeWithCallback in class dkAbstractDatastore

public dkQuery createQuery(String command,

short commandLangType,

DKNVPair params[ ]) throws DKException

Creates a federated query object.

Parameters:

command--a query string that represents the query criteria

commandLangType--a query language type, it will be one of the

following:

DK_CM_TEMPLATE_QL_TYPE

DK_CM_TEXT_QL_TYPE

DK_CM_IMAGE_QL_TYPE

DK_CM_PARAMETRIC_QL_TYPE

DK_CM_COMBINED_QL_TYPE

params[ ]--a name/value pairs list

Returns:

a federated dkQuery object

Throws: DKException

if "command" is null

Overrides:

createQuery in class dkAbstractDatastore

public dkQuery createQuery(DKCQExpr qe) throws DKException

Creates a query object.

Parameters:

cqe--a common query expression object

Throws: DKException

if "cqe" object is invalid

Overrides:

createQuery in class dkAbstractDatastore

public dkcollection listDataSources( ) throws DKException

Lists the available datastore sources that a user can connect to.

Returns:

a collection of ServerDef objects describing the servers

Throws: DKException

if internal error occurs from server

Overrides:

listDataSources in class dkAbstractDatastore

public String[ ] listDataSource( )throws DKException

Gets a list of datasource names.

Returns:

an array of datasource names

Throws: DKException

if error occurs when retrieving datasource names

Overrides:

listDataSourceNames in class dkAbstractDatastore

public void addObject(dkDataObject dataobj) throws DKException, Exception

Adds a DDO object.

Parameters:

ddo--a Federated object to be added.

Throws: DKException

if error occurs during add

Overrides:

addObject in class dkAbstractDatastore

public void deleteObject(dkDataObject dataobj) throws DKException, Exception

Deletes a data object.

Parameters:

ddo--a federated DDO object to be deleted

Throws: DKException

if error occurs during delete.

Overrides:

deleteObject in class dkAbstractDatastore

public void retrieveObject(dkDataObject dataobj) throws DKException, Exception

Retrieves a data-object.

Parameters:

ddo--document object to be retrieved.

Throws: DKException

when retrieve failed.

Overrides:

retrieveObject in class dkAbstractDatastore

public void updateObject(dkDataObject dataobj) throws DKException, Exception

Updates a data-object.

Parameters:

ddo--the data-object to be updated.

Throws: DKException

if error occurs in the datastore

Overrides:

updateObject in class dkAbstractDatastore

public void commit( ) throws DKException

Commits all activities since the last commit.

Throws: DKException

is thrown since federated datastore does not support transaction scope for now.

Overrides:

commit in class dkAbstractDatastore

public void rollbacks throws DKException

Rolls back all activities since the last commit.

Throws: DKException

is thrown since Federated does not support transaction scope for now.

Overrides:

rollback in class dkAbstractDatastore

public boolean isconnected( )

Checks to see if the datastore is connected

Returns:

true if connected, false otherwise

Overrides:

isConnected in class dkAbstractDatastore

public DKHandle connections throws Exception Gets the connection handle for the datastore.

Returns:

the connection handle

Overrides:

connection in class dkAbstractDatastore

public DKHandle handle(String type) throws Exception

Gets a datastore handle.

Parameters:

type--type of datastore handle wanted

Returns:

a datastore handle

Overrides:

handle in class dkAbstractDatastore

public String userName( )

Gets the user name that user used to logon to the datastore.

Returns:

the userid that user used to logon

Overrides:

userName in class dkAbstractDatastore

public String datastoreName( ) throws Exception

Gets the name of this datastore object. Usually it represents a datastore source's server name.

Returns:

datastore name

Overrides:

datastoreName in class dkAbstractDatastore

public String datastoreType( ) throws Exception

Gets the datastore type for this datastore object.

Returns:

datastore type

Overrides:

datastoreType in class dkAbstractDatastore

public dkDatastoreDef datastoreDef( ) throws DKException, Exception

Gets datastore definition.

Returns:

the meta-data (dkDatastoreDef) of this datastore

Overrides:

datastoreDef in class dkAbstractDatastore

public dkcollection listEntities( ) throws DKException, Exception

Gets a list of federated entities from Federated server.

Returns:

a collection of dkEntityDef

Throws: DKException

if error occurs

Overrides:

listEntities in class dkAbstractDatastore

public String[ ] listEntityNames( ) throws DKException, Exception

Gets a list of federated entities names from Federated server.

Returns:

an array of names

Throws: DKException

if error occurs

Overrides:

listEntityNames in class dkAbstractDatastore

public String[ ] listTextEntityNames( ) throws DKException, Exception

Gets a list of federated text search entities names from Federated server.

Returns:

an array of names

Throws: DKException

if error occurs

public String[ ] listParmEntityNames( ) throws DKException, Exception

Gets a list of federated parametric search entities names from Federated server.

Returns:

an array of names

Throws: DKException

if error occurs

Overrides:

listEntityAttrs

public dkcollection listEntityAttrs(String entityName) throws DKException, Exception

Gets a list of attributes for a given entity name.

Parameters:

entityName--name of entity to retrieve attributes for

Returns:

a dkCollection of dkAttrDef objects

Throws: DKException

if the entity name does not exist

Overrides:

listEntityAttrs in class dkAbstractDatastore

public String[ ] listEntityAttrNames(String entityName) throws DKException, Exception

Gets a list of attribute names for a given entity name.

Parameters:

entityName--name of entity to retrieve attribute names for

Returns:

an array of attribute names

Throws: DKException

if the entity name does not exist

Overrides:

listEntityAttrNames in class dkAbstractDatastore

public String registerMapping(DKNVPair sourceMap) throws DKException, Exception

Registers a mapping definition to this datastore. Mapping is done by entities.

Parameters:

sourceMap--source name and mapping, a DKNVPair class with the following possible values:

("BUFFER",): buffer_ref is a reference to a string in memory

("FILE",): file_name is the name of the file containing the mapping

("URL",): URL-address location of the mapping

("LDAP",): LDAP file-name

("SCHEMA",): a reference to a dkSchemaMapping object defining the mapping. Currently, only "SCHEMA" option is supported, others may be added later.

Returns:

the name of the mapping definition.

Overrides:

registerMapping in class dkbstractDatastore

See Also:

unRegisterMapping

public void unRegisterMapping(String mappingName) throws DKException, Exception

Unregisters mapping information from this datastore.

Parameters:

mappingname--name of the mapping information

Overrides:

unRegisterMapping in class dkAbstractDatastore

See Also:

registerMapping

public String[ ] listMappingNames( ) throws DKException, Exception

Gets the list of the registered mappings for this datastore.

Returns:

an array of registered mapping objects' names. The array length would be zero if there is no mapping registered.

Overrides:

listMappingNames in class dkAbstractDatastore

See Also:

registerMapping

public dkSchemaMapping getMapping(String mappingName) throws DKException, Exception

Gets mapping information from this datastore.

Parameters:

mappingName--name of the mapping information

Returns:

the schema mapping object

Overrides:

getMapping in class dkAbstractDatastore

See Also:

registerMapping

public synchronized dkextension getExtension(String extensionName) throws DKException, Exception

Gets the extension object from a given extension name.

Parameters:

extensionname--name of the extension object.

Returns:

extension object.

Overrides:

getextension in class dkAbstractDatastore

public synchronized void addExtension(String extensionName,

dkExtension extensionObj) throws DKException, Exception

Adds a new extension object.

Parameters:

extensionName--name of new extension object

extensionObj--the extension object to be set

Overrides:

add Extension in class dkAbstractDatastore

public synchronized void removeExtension(String extensionName) throws DKException, Exception

Removes an existing extension object.

Parameters:

extensionName--name of extension object to be removed

Overrides:

removeExtension in class dkAbstractDatastore

public synchronized String[ ] listExtensionNames( ) throws DKException, Exception

Gets the list of extension objects' names.

Returns:

an array of extension objects' names

Overrides:

listExtensionNames in class dkAbstractDatastore

public DKDDO createDDO(String objectType,

int Flags) throws DKException, Exception

Creates a new DDO with object type, properties and attributes set for a given backend server.

Parameters:

objectType--the object type

Flags--to indicate various options and to specify more detailed characteristics of the DDO to create. For example, it may be a directive to create a document DDO, a folder, etc.

Returns:

a new DDO of the given object type with all the properties and attributes set, so that the user only needs to set the attribute values

Overrides:

createDDO in class dkAbstractDatastore

public dkcollection listSearchTemplates( ) throws DKException, Exception

Gets a list search templates from a federated server.

Returns:

a DKSequentialCollection of search templates

Throws: DKException

if internal datastore error occurs

public String[ ] listSearchTemplateNames( ) throws DKException, Exception

Gets a list search templates' names from a federated server.

Returns:

an array of search template names

Throws: DKException

if internal datastore error occurs

public dkSearchTemplate getSearchTemplate(String templateName) throws DKException, Exception

Gets a search template information from a given template name.

Returns:

dkSearchTemplate object.

Throws: DKException

if internal datastore error occurs

public void destroy( ) throws DKException, Exception

Destroys datastore--datastore cleanup if needed

Overrides:

destroy in class dkAbstractDatastore

public synchronized string addRemoveCursor (dkResultSetCursor iCurt int action)

throws DKException, Exception

public dkDatastore datastoreByServerName (String dsType, String dsName)

throws DKException, Exception

Gets a reference to the specified datastore. The datastore must be connected, otherwise it will return null even if one is found. First, it will look in the free connection pool. If none found, it will look under the connection pool held by active cursors.

public void changePassword (String serverName,

String user Id,

String oldPwd,

String newPwd)

throws DKException, Exception

Changes the password of a given user Id for a specified server. Administrator only function.

Parameters:

userid--the user--id

oldPwd--the old password

newPwd--the new password

public void requestConnection (String serverName,

String userId,

Stringpasswd,

String connectString)

throws DKException, Exception

Requests a connection to a particular server with the given userid, password & connectString.

Parameters:

userId--the user Id

passwd--the password

connectString--the connect string to logon

public void excludeServer (Sting serverName, String templateName)

throws DKException, Exception

Requests the named server to be skipped for the named search template.

Parameters:

serverName--a back end server name

templateName--a search template name

public boolean isServerExcluded (String serverName, String templateName)

throws DKException, Exception, java.rmi. RemoteException

Checks if the given server is in the excluded list for the named search template.

Parameters:

serverName--a back end server name

templateName--a search template name

Returns:

true or false

public String[ ] listExcludedServers(String templateName) throws DKException, Exception

Lists all the excluded servers for the named search template

Parameters:

s--templateName--a search template name

Returns:

an array of server names that were excluded during search

public void clearExcludedServers(String templateName) throws DKException, Exception

Clears all the excluded servers for the named search template

Parameters:

s--templateName--a search template name

The following is sample syntax of a federated query string. However, it is to be understood that other syntax, including other parameters, may be used for the federated query string without departing from the scope of the invention.
    PARAMETRIC_SEARCH=([ENTITY=entity_name,]
                [MAX_RESULTS=maximum_results,]
                [COND=(conditional_expression)]
                [;...]
            );
        [OPTION=([CONTENT=yes_no]
                )]
    [and_or
    TEXT_SEARCH=(COND=(text_search_expression)
            );
        [OPTION=([SEARCH_INDEX={search_index_name .vertline. (index_list) };]
                [MAX_RESULTS=maximum_results;]
                [TIME_LIMIT=time_limit]
            )]
    ]
    [and_or
    IMAGE_SEARCH=(COND=(image_search_expression)
            );
        [OPTION=([SEARCH_INDEX={search_list) };]
            [MAX_RESULTS=maximum_results;]
            )]
    ]


There are several mechanisms for users to submit federated queries for execution. For example, users can create a federated query string and pass it to a federated query object and then invoke an execute or evaluate method on that object to trigger the query processing. Alternatively, a user can pass the federated query string to the execute or evaluate method in the federated datastore to process the query directly. The query string will be parsed into a federated query canonical form (query expression), which is essentially a datastore neutral representation of the query. In case the input query comes from a graphical user interface (GUI) based application, the query does not need to be parsed and the corresponding canonical form can be directly constructed.

The query canonical form is the input for the federated query processor module. This module will perform the following tasks:

Query translation. Translates the query canonical form into several native queries that corresponds to each native datastore associated to this federated datastore. The translation information is obtained from the schema mapping.

Data conversion. Converts data in the query into a native data type for each of the associated native datastores. This process uses the mapping and conversion mechanisms described in the schema mapping.

Data filtering. Filters only the relevant data during the construction of native queries.

Each native query is submitted to the corresponding native datastore for execution. Initially, the results returned are cursors to the data in each datastore.

The end-result of an initial query is a federated result set cursor object, which is a virtal collection (i.e., at this time, data has not actually been retrieved) of cursors to objects in each of the native datastores.

The user can retrieve the actual data using a fetch. When a fetch is issued for data, the data is returned by the native datastores to the federated query results processor module, which will do the following:

Data conversion. Converts data from the native type into a federated type according to the mapping information.

Data filtering. Filters the results to include only the requested data Result merging. Merges the results from several native datastores into a federated collection.

The federated result set cursor object provides the facility to separate query results according to the source native datastores. To do such a processing, the user/application may either use the federated cursor to fetch data or a native datastore cursor to fetch data from a particular datastore.

A FederatedQuery represents and executes queries across heterogeneous datastores. This query can be a combination of a DL parametric query, OnDemand query, and other query types involving supported datastores. To retrieve data from each datastore, the federated datastore delegates the query processing task to each of the native datastores.
    DKFederatedQuery.java
        package com.ibm.mm.sdk.common.DKFederatedQuery
        public class DKFederatedQuery
            extends Object
            implements dkQuery, DKConstant, DKMessageId, Serializable
        {
        public DKFederatedQuery(dkDatastore creator,
            String queryString)
        public DKFederatedQuery(dkDatastore creator,
        public DKFederatedQuery(DKFederatedQuery fromQuery)
        public void prepare(DKNVPair params[ ]) throws DKException, Exception
        public void execute(DKNVPair params[ ]) throws DKException, Exception
        public int status( )
        public Object result( ) throws DKException, Exception
        public dkResultSetCursor resultSetCursor( ) throws DKException,
     Exception
        public short qlType( )
        public String queryString( )
        public dkDatastore getDatastore( )
        public void setDatastore(dkDatastore ds) throws DKException, Exception
        public String getName( )
        public void setName(String name)
        public int numberOfResults( )
        };


The following methods are part of the federated query class:

public DKFederatedQuery(dkDatastore creator,

String queryString)

Constructs a Federated query.

Parameters:

creator--datastore

queryString--a query string

public DKFederatedQuery(dkDatastore creator,

DKCQExpr queryExpr)

Constructs a Federated query

Parameters:

creator--datastore

queryExpr--a query expression

public DKFederatedQuery(DKFederatedQueryfromQuery)

Constructs a Federated query from a Federated query object.

Parameters:

fromQuery--Federated query

public voidprepare(DKNVPair params[ ]) throws DKException, Exception

Prepares a query.

Parameters:

params--additional prepare query option in name/value pair

public void execute(DKNVPair params[ ]) throws DKException, Exception

Executes a query.

Parameters:

params--additional query option in name/value pair

public int status( )

Gets query status.

Returns:

query status

public Object result( ) throws DKException, Exception

Gets query result.

Returns:

query result in a DKResults object

public dkResultSetCursor resultSetCursor( ) throws DKException, Exception

Gets query result.

Returns:

query result in a dkResultSetCursor object

public short qlType( )

Gets query type.

Returns:

query type

public String querystring( )

Gets query string

Returns:

query string

public dkDatastore getDatastore( )

Gets the reference to the owner datastore object.

Returns:

the dkDatastore object

public void setDatastore(dkDatastore ds) throws DKException, Exception

Sets the reference to the owner datastore object.

Parameters:

ds--a datastore

public String getName( )

Gets query name.

Returns:

name of this query

public void setName(String name)

Sets query name.

Parameters:

name--new name to be set to this query object

public int numberOfResults( )

Gets the number of query results.

Returns:

number of query results

3. Digital Library Datastore

DKDatastoreDL is a specific version of dkDatastore used to implement the Digital Library/Visual Info datastore. It provides Documents, Parts and Folders storage and retrieval mechanisms, as well as search and other document processing capabilities supported by Digital Library. An example class definition for DKDatastoreDL is set forth below.
    DKDatastoreDL
            package com.ibm.mm.sdk.server.DKDatastoreDL
        public class DKDatastoreDL
            extends dkAbstractDatastore
            implements DKConstantDL, DKMessageIdDL
        {
        public DKDatastoreDL() throws DKException, Exception
        public DKDatastoreDL(String configuration) throws DKException,
     Exception
        public void connect(String datastore_name,
                String user_name,
                String authentication,
                String connect_string) throws DKException, Exception
        public void disconnect() throws DKException, Exception
        public Object getOption(int option) throws DKException, Exception
        public void setOption(int option,
                Object value) throws DKException, Exception
        public Object evaluate(String command,
                short commandLangType,
                DKNVPair params[]) throws DKException, Exception
        public Object evaluate(dkQuery query) throws DKException, Exception
        public Object evaluate(DKCQExpr qe) throws DKException, Exception
        public dkResultSetCursor execute(String command,
                    short commandLangType,
                    DKNVPair params[]) throws DKException, Exception
        public dkResultSetCursor execute(dkQuery query) throws DKException,
     Exception
        public dkResultSetCursor execute(DKCQExpr cqe) throws DKException,
     Exception
        public void executeWithCallback(dkQuery query,
                    dkCallback callbackObj) throws DKException, Exception
        public void executeWithCallback(String command,
                    short commandLangType,
                    DKNVPair params[],
                    dkCallback callbackObj) throws DKException, Exception
        public void executeWithCallback(DKCQExpr qe,
                    dkCallback callbackObj) throws DKException, Exception
        public dkQuery createQuery(String command,
                short commandLangType,
                DKNVPair params[]) throws DKException, Exception
        public dkQuery createQuery(DKCQExpr qe) throws DKException, Exception
        public void addObject(dkDataObject ddo) throws DKException, Exception
        public void deleteObject(dkDataObject ddo) throws DKException,
     Exception
        public void retrieveObject(dkDataObject ddo) throws DKException,
     Exception
        public void updateObject(dkDataObject ddo) throws DKException,
     Exception
        public void moveObject(dkDataObject ddo,
                String entityName) throws DKException, Exception
        public void startTransaction() throws DKException, Exception
        public void commit() throws DKException, Exception
        public void rollback() throws DKException, Exception
        public boolean isConnected() throws Exception
        public String datastoreName() throws Exception
        public String datastoreType() throws Exception
        public DKHandle connection() throws Exception
        public DKHandle handle(String type) throws Exception
        public DKHandle transactionConnection() throws DKException, Exception
        public String userName() throws Exception
        public dkCollection listDataSources() throws DKException, Exception
        public String[] listDataSourceNames() throws DKException, Exception
        public Object listServers() throws DKException, Exception
        public Object listSchema() throws DKUsageError
        public Object listSchemaAttributes(String schemaEntry) throws
     DKusageError,
            DKDatastoreAccessError
        public dkCollection listEntities() throws DKException, Exception
        public String[] listEntityNames() throws DKException, Exception
        public dkCollection listEntityAttrs(String entityName) throws
     DKException, Exception
        public String[] listEntityAttrNames(String entityName) throws
     DKException, Exception
        public void wakeUpService(String searchEngine) throws DKException,
     Exception
        public void invokeSearchEngine(String searchEngine,
                    String searchIndex) throws DKException, Exception
        public dkDatastoreDef datastoreDef()
        public DKWorkFlowServiceDL createWorkFlowService() throws DKException,
        Exception
        public String registerMapping(DKNVPair sourceMap) throws DKException,
     Exception
        public void unRegisterMapping(String mappingName) throws DKException,
     Exception
        public String[] listMappingNames() throws DKException, Exception
        public dkschemaMapping getMapping(String mappingName) throws
     DKException,
        Exception
        public synchronized dkExtension getExtension(String extensionName)
     throws
            DKException, Exception
        public synchronized void addExtension(String extensionName,
                    dkExtension extensionObj) throws DKException, Exception
        public synchronized void removeExtension(String extensionName) throws
     DKException,
            Exception
        public synchronized String[] listExtensionNames() throws DKException,
     Exception
        public DKDDO createDDO(String objectType,
                int Flags) throws DKException, Exception
        public void destroy() throws DKException, Exception
        public boolean isCheckedOut(dkDataObject dobj) throws DKUsageError,
            DKDatastoreAccessError
        public String checkedOutUserid(dkDataObject dobj) throws DKUsageError,
            DKDatastoreAccessError
        public void unlockCheckedOut(dkDataObject dobj) throws DKUsageError,
            DKDatastoreAccessError
        public void checkOut(dkDataObject dobj) throws DKUsageError,
        DKDatastoreAccessError
        public void checkln(dkDataObject dobj) throws DKUsageError,
     DKDatastoreAccessError
        public void changePassword(String userId,
                    String oldPwd,
                    String newPwd) throws DKException, Exception
        public synchronized dkXDO retrieveFormOverlay(String objid) throws
     DKException,
        Exception
        public DKCQExpr translate(DKCQExpr cqe) throws DKException, Exception
        }


The following methods are part of the DKDatastoreDL class:

public DKDatastoreDL( ) throws DKException, Exception

Constructs the datastore and initializes the datastore.

public DKDatastoreDL(String configuration) throws DKException, Exception

Constructs the datastore and initializes the datastore.

public void connect(String datastore_name,

String user_name,

String authentication,

String connect_string) throws DKException, Exception

Connects to a datastore.

Parameters:

datastore_name--the datastore name used for connection

user_name--the user name used for connection

authentication--the authentication used for connection

connect_string--the connect sting used for connection. This is used to

provide additional connection options.

Overrides:

connect in class dkAbstracDatastore

public void disconnect( ) throws DKException, Exception

Disconnects from a datastore.

Overrides:

disconnect in class dkAbstractDatastore

public Object getOption(int option) throws DKException, Exception

Gets a datastore option.

Parameters:

option--the option identifier

Returns:

an option value

Overrides:

getOption in class dkAbstractDatastore

public void setOption(int option,

Object value) throws DKException, Exception

Sets a datastore option.

Parameters:

option--the option identifier

value--the option value

Overrides:

setOption in class dkAbstractDatastore

public Object evaluate(String command,

short commandLangType,

DKNVPair params[ ]) throws DKException, Exception

Evaluates the query.

Parameters:

command--a query string

commandlang--a query type

params--additional query option in name/value pair

Returns:

a collection of the results

Overrides:

evaluate in class dkAbstractDatastore

public Object evaluate(dkquery query) throws DKException, Exception

Evaluates the query.

Parameters:

query--a query object

Returns:

a collection of the results

Overrides:

evaluate in class dAbstractDatastore

public Object evaluate(DKCQExpr qe) throws DKException, Exception

Evaluates the query.

Parameters:

qe--a common query expression object

Returns:

a collection of the results

Overrides:

evaluate in class dkAbstractDatastore

public dkResultSetCursor execute(String command,

short commandLangType,

DKNVPairparams[ ]) throws DKException, Exception

Executes the query.

Parameters:

command--a query sting

commandlang--a query type

params--additional query option in name/value pair

Returns:

resultSetCursor which represents a datastore cursor.

Overrides:

execute in class dkAbstractDatastore

public dkResultSetCursor execute(dkQuery query) throws DKException, Exception

Executes the query.

Parameters:

query--a query object

Returns:

resultSetCursor which represents a datastore cursor.

Overrides:

execute in class dkAbstractDatastore

public dkResultSetCursor execute(DKCQExpr cqe) throws DKException, Exception

Executes a query expression and returns a result set cursor

Parameters:

cqe--a common query expression object

Returns:

resultSetCursor which represents a datastore cursor.

Overrides:

execute in class dkAbstractDatastore

public void executeWithCallback(dkQuery query,

dkcallback callbackObj) throws DKException, Exception

Executes the query with callback function.

Parameters:

qo--a query object

callbackObj--a dkCallback object

Overrides:

executeWithCallback in class dkAbstractDatastore

public void executeWithCallback(String command,

short commandLangType,

DKNVAPair params[ ],

dkcallback callbackObj) throws DKException, Exception

Executes the query with callback function.

Parameters:

command--a query string

commandLang--a query type

params--additional query option in name/value pair

callbackObj--a dkCallback object

Overrides:

executeWithCallback in class dkAbstractDatastore

public void executeWithCallback(DKCQExpr qe,

dkcallback callbackObj) throws DKException, Exception

Executes the query with callback function.

Parameters:

qe--a common query expression object

callbackObj--a dkCallback object

Overrides:

executeWithCallback in class dkAbstractDatastore

public dkQuery createQuery(String command,

short commandLangType,

DKNVPair params[ ]) throws DKException, Exception

Creates a query object.

Parameters:

command--a query string

commandlang--a query type

params--additional query option in name/value pair

Returns:

a query object

Overrides:

createQuery in class dkAbstractDatastore

public dkQuery createQuery(DKCQExpr qe) throws DKException, Exception

Creates a query object.

Parameters:

qe--a common query expression object

Overrides:

createQuery in class dkAbstractDatastore

public void addObject(dkDataObject ado) throws DKException, Exception

Adds this data-object to the DL datastore.

Parameters:

ddo--the data-object to be added to this datastore

Overrides:

addObject in class dkAbstractDatastore

See Also:

add

public void deleteObject(dkDataObject ddo) throws DKException, Exception

Deletes this data-object from this datastore.

Parameters:

ddo--the data-object to be deleted from this datastore

Overrides:

deleteObject in class dkAbstractDatastore

See Also:

del

public void retrieveObject(dkDataObject ddo) throws DKException, Exception

Retrieves the data-object from this datastore.

Parameters:

ddo--the data-object to be retrieved from this datastore

Overrides:

retrieveObject in class dkAbstractDatastore

See Also:

retrieve

public void updateObject(dkDataObject ddo) throws DKException, Exception

Updates the data-object in this datastore.

Parameters:

ddo--the data-object to be updated in this datastore

Overrides:

updateObject in class dkAbstractDatastore

See Also:

update

public void moveObject(dkDataObject ddo,

String entityName) throws DKException, Exception

Moves the data-object from one index class to another in this datastore.

Parameters:

ddo--the data-object to be move in this datastore entityName--new entity name to move this data-object to

public void startTransaction( ) throws DKException, Exception

Starts a transaction

public void commit( ) throws DKException, Exception

Commits a datastore transaction

Overrides:

commit in class dkAbstractDatastore

public void rollback( ) throws DKException, Exception

Rolls back a datastore transaction

Overrides:

rollback in class dkAbstractDatastore

public boolean isconnected( ) throws Exception

Checks to see if the datastore is connected.

Returns:

true if connected

Overrides:

isConnected in class dkAbstractDatastore

public String datastoreName( ) throws Exception

Gets the name of this datastore object. Usually it represents a datastore source's server name.

Returns:

datastore name

Overrides:

datastoreName in class dkAbstracDatastore

public String datastoreType( ) throws Exception

Gets the datastore type for this datastore object

Returns:

datastore type

Overrides:

datastoreType in class dkAbstractDatastore

public DKHandle connection( ) throws Exception

Gets the connection handle for a datastore

Returns:

connection handle

Overrides:

connection in class dkAbstractDatastore

public DKHandle handle(String type) throws Exception

Gets a datastore handle

Parameters:

type--type of datastore handle wanted

Returns:

a datastore handle

Overrides:

handle in class dkAbstractDatastore

public DKHandle transactionConnection( ) throws DKException, Exception

Gets the transaction handle for a datastore

Returns:

transaction handle

public String userName( ) throws Exception

Gets the user name for this datastore object

Returns:

user name

Overrides:

userName in class dkAbstractDatastore

public dkCollection listDataSources( ) throws DKException, Exception

List the available datastore sources that can be used to connect with.

Returns:

a collection of server definitions

Overrides:

listDataSources in class dkAbstractDatastore

public String[ ] listDataSourceNames( ) throws DKException, Exception

Lists the available datastore source names that can be used to connect with.

Returns:

an array of server names

Overrides:

listDataSourceNames in class dkAbstractDatastore

public Object listServers( ) throws DKException, Exception

Lists the available datastore sources that can be used to connect with. Note: listservers( ) is deprecated. Replace by listDataSources.

Returns:

a collection of server definitions

Overrides:

listServers in class dkAbstractDatastore

See Also:

listDataSources

public Object listschema( ) throws DKUsageError

Lists the entities that belong to this datastore. Note: listschema( ) is deprecated. Replace by listentities.

Returns:

an object that contains the schema

Overrides:

listSchema in class dkAbstractDatastore

See Also:

listEntities

public Object listSchemaAttributes(String schemaEntry)throwsDKUsageError,

DKDatastoreAccessError

Lists the attributes that belong to a schema Note: listSchemaAttributes( ) is deprecated. Replace by listEntityAttributes.

Parameters:

schemaEntry--the name of the schema

Returns:

an object that contains the attributes that belong to this schema

Overrides:

listSchemaAttributes in class dkAbstractDatastore

See Also:

listEntityAttrs

public dkCollection listEntities( ) throws DKException, Exception

Gets a list of entities from persistent datastore

Returns:

a collection of entity defs

Throws: DKException

if error occurs

Overrides:

listEntities in class dkAbstractDatastore

public String[ ] listEntityNames( ) throws DKException, Exception

Gets a list of entity names from persistent datastore

Returns:

an array of entity names

Throws: DKException

if error occurs

Overrides:

listEntityNames in class dkAbstractDatastore

public dkcollection listEntityAttrs(String entityName) throws DKException, Exception

Gets a list of attributes for a given entity name.

Parameters:

entityName--name of entity to retrieve attributes for

Returns:

a dkCollection of dkAttrDef objects

Throws: DKException

if the entity name does not exist

Overrides:

listEntityAttrs in class dkAbstractDatastore

public String[ ] listEntityAttrNames(String entityName) throws DKException, Exception

Gets a list of attribute names for a given entity name.

Parameters:

entityName--name of entity to retrieve attribute names for

Returns:

an array of attribute names

Throws: DKException

if the entity name does not exist

Overrides:

listEntityAttrNames in class dkAbstractDatastore

public void wake UpService(String searchEngine) throws DKException, Exception

Wakes up a user exit to process search index request. Note: wakeUpService( ) is deprecated. Replace by invokeSearchEngine.

Parameters:

searchengine--search engine name (SM)

See Also:

invokeSearchEngine

public void invokeSearchEngine(String searchEngine,

String searchIndex) throws DKException, Exception

Invokes a user exit to process search index request.

Parameters:

searchEngine--search engine name (ie SM or QBIC)

searchIndex--search index (ie TM-TMINDEX or QBICDB-QBICCAT-QBICSRV)

public dkDatastoreDef datastoreDef( )

Gets datastore definition

Returns:

the meta-data (dkDatastoreDef) of this datastore

Overrides:

datastoreDef in class dkAbstractDatastore

public DKWorkFlowServiceDL createWorkFlowService( ) throws DKException, Exception

Gets work flow service

Returns:

the a work flow service for this datastore

public String registerMapping(DKNVPair sourceMap) throws DKException, Exception

Registers a mapping definition to this datastore. Mapping is done by entities.

Parameters:

sourceMap--source name and mapping, a DKNVPair class with the following possible values:

("BUFFER",): buffer_ref is a reference to a string in memory

("FILE",): file_name is the name of the file containing the mapping

("URL",): URL-address location of the mapping

("LDAP",): LDAP file-name

"SCHEMA",): a reference to a dkSchemaMapping object defining the mapping. Currently, only "SCHEMA" option is supported, others may be added later.

Returns:

the name of the mapping definition.

Overrides:

registerMapping in class dkAbstractDatastore

See Also:

unRegisterMapping

public void unRegisterMapping(String mappingName) throws DKException, Exception

Unregisters mapping information from this datastore.

Parameters:

mappingName--name of the mapping information

Overrides:

unRegisterMapping in class dkAbstractDatastore

See Also:

registerMapping

public String[ ] listMappingNames( ) throws DKException, Exception

Gets the list of the registered mappings from this datastore.

Returns:

an array of registered mapping objects' names

Overrides:

listMappingNames in class dkAbstractDatastore

See Also:

registerMapping

public dkSchemaMapping getMapping(String mappingName) throws DKException, Exception

Gets a mapping information from this datastore.

Parameters:

mappingName--name of the mapping information

Returns:

the schema mapping object

Overrides:

getMapping in class dkAbstractDatastore

See Also:

registerMapping

public synchronized dkExtension getExtension(String extensionName) throws DKException, Exception

Gets the extension object from a given extenstion name.

Parameters:

extensionname--name of the extension object.

Returns:

extension object.

Overrides:

getextension in class dkAbstractDatastore

public synchronized void addExtension(String extensionName,

dkExtension extensionObj) throws DKException, Exception

Adds a new extension object.

Parameters:

extensionname--name of new extension object

extensionObj--the extension object to be set

Overrides:

addextension in class dkAbstractDatastore

public synchronized void removeExtension(String extensionName) throws DKException, Exception

Removes an existing extension object

Parameters:

extensionName--name of extension object to be removed

Overrides:

removeExtension in class dkAbstractDatastore

public synchronized String[ ] listExtensionNames( ) throws DKException, Exception

Gets the list of extension objects' names

Returns:

an array of extension objects' names

Overrides:

listExtensionNames in class dkAbstractDatastore

public DKDDO createDDO(String objectType,

int Flags) throws DKException, Exception

Creates a new DDO with object type, properties and attributes set for a given backend server.

Parameters:

objectType--the object type user wants to create

Flags--to indicate various options to specify more detailed

characteristics of the DDO to create. For example, it may be a directive to create a document DDO, a folder, etc.

Returns:

a new DDO of the given object type with all the properties and

attributes set, so that the user only need to set the attribute values

Overrides:

createDDO in class dkAbstractDatastore

public void destroy( ) throws DKException, Exception

Destroys datastore--datastore cleanup if needed

Overrides:

destroy in class dkAbstractDatastore

public boolean isCheckedOut(dkDataObject dobj) throws DKUsageError,

DKDatastoreAccessError

Checks whether a document or folder item is checked out from datastore

Parameters:

dobj--data object (document or folder item)

Returns:

a boolean indicating if it is checked out or not

public String checkedOutUserid(dkDataObject dobj) throws DKUsageError, DKDatastoreAccessError

Lists the userid who checked out the document or folder

Parameters:

dobj--data object (document or folder item)

Returns:

a userid or empty string (i.e., not checked out)

public void unlockCheckedOut(dkDataObject dobj) throws DKUsageError,

DKDatastoreAccessError

Unlocks the checked-out document or folder item

Parameters:

dobj--data object (document or folder item)

public void checkOut(dkDataObject dobj) throws DKUsageError, DKDatastoreAccessError

Checks out document or folder item from datastore

Parameters:

dobj--data object (document or folder item)

public void checkln(dkDataObject dobj) throws DKUsageError, DKDatastoreAccessError

Checks in document or folder item from datastore

Parameters:

dobj--data object (document or folder item)

public void changePassword(String userId,

String oldPwd,

String newPwd) throws DKException, Exception

Changes LS user password

Overrides:

changepassword in class dkAbstractDatastore

public synchronized dkXDO retrieveFormOverlay(String objid) throws DKException, Exception

Retrieves the form overlay object

Parameters:

id--the id string to retrieve the object

Returns:

the form overlay xdo object

public void moveObject (dkDataObject ddo, String entityName) throws DKException, Exception

Moves the data object from one index class to another.

Parameters:

ddo--data object to be moved

entityName--target index class for this data object

public DKCQExpr translate(DKCQExpr cqe) throws DKException, Exception

Translates a query expression into a native query expression processable by this datastore.

Parameters:

cqe--the input compound query expression

Returns:

a translated query expression or null if the expression is invalid

4. OBIC Datastore

DKDatastoreQBIC is a specific version of dkDatastore used to implement the QBIC datastore. An example class definition for DKDatastoreQBIC is set forth below.
    DKDatastoreQBIC
        package com.ibm.mm.sdk.server.DKDatastOreQBIC
        public class DKDatastoreQBIC
            extends dkAbstractDatastore
            implements DKCorstantDL, DKMessageIdDL
        {
        public DKDatastOreQBIC() throws DKException, Exception
        public DKDatastoreQBIC(String configuration) throws DKException,
     Exception
        public void connect(String datastore_name,
                String user_name,
                String authentication,
                String connect_string) throws DKException, Exception
        public void disconnect() throws DKException, Exception
        public Object getOption(int option) throws DKException, Exception
        public void setOption(int option,
                Object value) throws DKException, Exception
        public Object evaluate(String command,
                short commandLangType,
                DKNVPair params[]) throws DKException, Exception
        public Object evaluate(dkQuery query) throws DKException, Exception
        public Object evaluate(DKCQExpr qe) throws DKException, Exception
        public dkResultSetCursor execute(String command,
                    short commandLangType,
                    DKNVPair params[]) throws DKException, Exception
        public dkResultSetCursor execute(dkQuery query) throws DKException,
     Exception
        public dkResultSetCursor execute(DKCQExpr qe) throws DKException,
     Exception
        public void executeWithCallback(dkQuery query,
                    dkCallback callbackObj) throws DKException, Exception
        public void executewithCallback(String command,
                    short commandLangType,
                    DKNVPair params[],
                    dkCallback callbackObj) throws DKException, Exception
        public void executeWithCallback(DKCQExpr qe,
                    dkCallback callbackObj) throws DKException, Exception
        public dkQuery createQuery(String command,
                short commandLangType,
                DKNVPair params[]) throws DKException, Exception
        public dkQuery createQuery(DKCQExpr qe) throws DKException, Exception
        public void addObject(dkDataObject ddo) throws DKException, Exception
        public void deleteObject(dkDataObject ddo) throws DKException,
     Exception
        public void retrieveObject(dkDataObject ddo) throws DKException,
     Exception
        public void updateObject(dkDataObject ddo) throws DKException,
     Exception
        public void commit() throws DKException, Exception
        public void rollback() throws DKException, Exception
        public boolean isConnected() throws Exception
        public String datastoreName() throws Exception
        public String datastoreType() throws Exception
        public DKHandle connection() throws Exception
        public DKHandle handle(String type) throws Exception
        public String userName() throws Exception
        public dkCollection listDataSources() throws DKException, Exception
        public String[] listDataSourceNames() throws DKException, Exception
        public Object listServers() throws DKException, Exception
        public Object listSchema() throws DKException, Exception
        public Object listSchemaAttributes(String schemaEntry) throws
     DKException, Exception
        public dkCollection listEntities() throws DKException, Exception
        public String[] listEntityNames() throws DKException, Exception
        public dkCollection listEntityAttrs(String entityName) throws
     DKException, Exception
        public String[] listEntityAttrNames(String entityName) throws
     DKException, Exception
        public void destroy() throws DKException, Exception
        public void createDatabase(String database_name) throws DKException,
     Exception
        public void deleteDatabase(Suing database_name) throws DKException,
     Exception
        public void createCatalog(String database_name,
                    String catalog_name) throws DKException, Exception
        public void deleteCatalog(String database_name,
                    String catalog_name) throws DKException, Exception
        public void openCatalog(String database_name,
                  String catalog_name) throws DKException, Exception
        public void closeCatalog() throws DKException, Exception
        public void addColorFeature() throws DKException, Exception
        public void addDrawFeature() throws DKException, Exception
        public void addColorHistogramFeature() throws DKException, Exception
        public void addTextureFeature() throws DKException, Exception
        public void addFeature(int featureSelection,
                boolean bReCatalog) throws DKException, Exception
        public void removeColorFeature() throws DKException, Exception
        public void removeDrawFeature() throws DKException, Exception
        public void removeColorHistogramFeature() throws DKException, Exception
        public void removeTextureFeature() throws DKException, Exception
        public void processImages(DKImageRecordQBIC imageList[],
                  int count) throws DKException, Exception
        public synchronized void queueImages(DKImageRecordQBIC imageList[],
                       int count) throws DKException, Exception
        public void processImageQueue() throws DKException, Exception
        public void reCatalogImages(int featureSelectionList) throws
     DKException, Exception
        public Object listDatabases() throws DKException, Exception
        public Object listCatalogs() throws DKException, Exception
        public Object listCatalogs(String database_name) throws DKException,
     Exception
        public Object listFeatures() throws DKException, Exception
        public Object listColorImages() throws DKException, Exception
        public Object listHistogramImages() throws DKException, Exception
        public Object listDrawImages() throws DKException, Exception
        public Object listTextureImages() throws DKException, Exception
        public String databaseName() throws DKException, Exception
        public String catalogName() throws DKException, Exception
        public String getLibServerName() throws DKException, Exception
        public dkDatastoreDef datastoreDef() throws DKException, Exception
        public String registerMapping(DKNVPair sourceMap) throws DKException,
     Exception
        public void unRegisterMapping(String mappingName) throws DKException,
     Exception
        public String[] listMappingNames() throws DKException, Exception
        public dkSchemaMapping getMapping(String mappingName) throws
     DKException,
        Exception
        public synchronized dkExtension getExtension(String extensionName)
     throws
            DKException, Exception
        public synchronized void addExtension(String extensionName,
                           dkExtension extensionObj) throws DKException,
     Exception
        public synchronized void removeExtension(String extensionName) throws
     DKException,
            Exception
        public synchronized String[] listExtensionNames() throws DKException,
     Exception
        public DKDDO createDDO(String objectType,
                    int Flags) throws DKException, Exception
        }


The following methods are part of the DKDatastoreQBIC class:

public DKDatastoreQBICO throws DKException, Exception

Constructs the datastore and initializes the datastore.

public DKDatastoreQBIC(String configuration) throws DKException, Exception

Constructs the datastore and initializes the datastore.

public void connect(String datastore_name, String user_name, String authentication, String connect_string) throws DKException, Exception

Connects to a datastore.

Parameters:

datastore_nane--the datastore name used for connection

user_name--the user name used for connection

authentication--the authentication used for connection

connect_string--the connect string used for connection. This is used to

provide additional connection options.

Overrides:

connect in class dkAbstractDatastore

public void disconnect( ) throws DKException, Exception

Disconnects to a datastore.

Overrides:

disconnect in class dkAbstractDatastore

public Object getOption(int option) throws DKException, Exception

Gets a datastore option.

Parameters:

option--the option identifier

Returns:

an option value

Overrides:

getOption in class dkAbstractDatastore

public void setOption(int option,

Object value) throws DKException, Exception

Sets a datastore option.

Parameters:

option--the option identifier

value--the option value

Overrides:

setOption in class dkAbstractDatastore

public Object evaluate(String command,

short commandLangType,

DKNVPair params[ ]) throws DKException, Exception

Evaluates the query.

Parameters:

command--a query string

commandLang--a query type

params--additional query option in name/value pair

Returns:

a collection of the results

Overrides:

evaluate in class dkAbstractDatastore

public Object evaluate(dkQuery query) throws DKException, Exception

Evaluates the query.

Parameters:

query--a query object

Returns:

a collection of the results

Overrides:

evaluate in class dkAbstractDatastore

public Object evaluate(DKCQExpr qe) throws DKException, Exception

Evaluates the query.

Parameters:

qe--a common query expression object

Returns:

a collection of the results

Overrides:

evaluate in class ckAbstractDatastore

public dkResultSetCursor execute(String command,

short commandLangType,

DKNVPairparams[ ]) throws DKException, Exception

Executes the query.

Parameters:

command--a query string

commandLang--a query type

params--additional query option in name/value pair

Returns:

resultSetCursor which represents a datastore cursor.

Overrides:

execute in class dkAbstractDatastore

public dkResultSetCursor execute(dkQuery query) throws DKException, Exception

Executes the query.

Parameters:

query--a query object

Returns:

resultSetCursor which represents a datastore cursor.

Overrides:

execute in class dkAbstractDatastore

public dkResultSetCursor execute(DKCQExpr qe) throws DKException, Exception

Executes the query.

Parameters:

qe--a common query expression object

Returns:

resultSetCursor which represents a datastore cursor.

Overrides:

execute in class dkAbstractDatastore

public void executeWithCallback(dkQuery query,

dkcallback callbackObj) throws DKException, Exception

Executes the query with callback function.

Parameters:

qo--a query object

callbackObj--a dkCallback object

Overrides:

executeWithCallback in class dkAbstractDatastore

public void executeWithCallback(String command,

short commandLangType,

DKNVPair params[ ],

dkCallback callbackObj) throws DKException, Exception

Executes the query with callback function.

Parameters:

command--a query string

commandLang--a query type

params--additional query option in name/value pair

callbackObj--a dkCallback object

Overrides:

executeWithCallback in class dkAbstractDatastore

public void executeWithCallback(DKCQExpr qe,

dkcallback callbackObj) throws DKException, Exception

Executes the query with callback function.

Parameters:

qe--a common query expression object

callbackObj--a dkCallback object

Overrides:

executeWithCallback in class dkAbstractDatastore

public dkQuery createQuery(String command,

short commandLangType,

DKNVPairparams[ ]) throws DKException, Exception

Creates a query object.

Parameters:

command--a query string

commandLang--a query type

params--additional query option in name/value pair

Returns:

a query object

Overrides:

createQuery in class dkAbstractDatastore

public dkQuery createQuery(DKCQExpr qe) throws DKException, Exception

Creates a query object.

Parameters:

qe--a common query expression object

Overrides:

createQuery in class dkAbstractDatastore

public void addObject(dkDataObject ddo) throws DKException, Exception

Adds this ddo to this datastore.

Parameters:

ddo--the ddo to be added to this Datastore

Overrides:

addObject in class dkAbstractDatastore

public void deleteObject(dkDataObject ddo) throws DKException, Exception

Deletes this ddo from this datastore.

Parameters:

ddo--the ddo to be deleted from this Datastore

Overrides:

deleteObject in class dkAbstractDatastore

public void retrieveObject(dkDataObject ddo) throws DKException, Exception

Retrieves this ddo from this datastore.

Parameters:

ddo--the ddo to be retrieved from this Datastore

Overrides:

retrieveObject in class dkAbstractDatastore

public void updateObject(dkDataObject ddo) throws DKException, Exception

Updates this ddo in this datastore.

Parameters:

ddo--the ddo to be updated in this Datastore

Overrides:

updateObject in class dkAbstractDatastore

public void commit( ) throws DKException, Exception

Commits a datastore transaction

Overrides:

commit in class dkAbstractDatastore

public void rollback( ) throws DKException, Exception

Rolls back a datastore transaction

Overrides:

rollback in class dkAbstractDatastore

public boolean isconnected( ) throws Exception

Checks to see if the datastore is connected.

Returns:

true if connected

Overrides:

is Connected in class dkAbstractDatastore

public String datastoreName( ) throws Exception

Gets the name of his datastore object. Usually it represents a datastore source's server name.

Returns:

datastorename

Overrides:

datastorename in class dkAbstractDatastore

public String datastoreType() throws Exception

Gets the datastore type for this datastore object

Returns:

datastore type

Overrides:

datastoreType in class dkAbstractDatastore

public DKHandle connection( ) throws Exception

Gets the connection handle for a Datastore

Returns:

connection handle

Overrides:

connection in class dkAbstractDatastore

public DKHandle handle(String type) throws Exception

Gets a datastore handle

Parameters:

type--type of datastore handle wanted

Returns:

a datastore handle

Overrides:

handle in class dkAbstractDatastore

public String userName( ) throws Exception

Gets the user name for this datastore object

Returns:

user name

Overrides:

userName in class dkAbs