Enterprise Information Portal APIs

com.ibm.mm.sdk.server
Class DKDatastoreFed

java.lang.Object
  |
  +--com.ibm.mm.sdk.server.dkAbstractDatastore
        |
        +--com.ibm.mm.sdk.server.DKDatastoreFed
All Implemented Interfaces:
DKConstant, DKConstantFed, dkDatastore, dkFederation, DKMessageId, DKMessageIdFed, dkQueryEvaluator, dkQueryManager, java.io.Serializable

public class DKDatastoreFed
extends dkAbstractDatastore
implements DKConstantFed, DKConstant, DKMessageIdFed, DKMessageId, dkFederation, java.io.Serializable

DKDatastoreFed is a specific version of dkDatastore to implement a federation of datastores. Federated datastore provides facilities to store, manage, query, and retrieve documents which may contain multi-media data across multiple heterogeneous backend servers.

See Also:
Serialized Form

Fields inherited from interface com.ibm.mm.sdk.common.DKConstantFed
    For details, see the class or interface
 
Fields inherited from interface com.ibm.mm.sdk.common.DKConstant
    For details, see the class or interface
 
Fields inherited from interface com.ibm.mm.sdk.common.DKMessageIdFed
    For details, see the class or interface
 
Fields inherited from interface com.ibm.mm.sdk.common.DKMessageId
    For details, see the class or interface
 
Constructor Summary
DKDatastoreFed()
          Constructs the datastore and initializes it with the default configuration.
DKDatastoreFed(java.lang.String configuration)
          Constructs the datastore and initializes it using the supplied configuration string.
 
Method Summary
 void addExtension(java.lang.String extensionName, dkExtension extensionObj)
          Adds a new extension object.
 void addObject(dkDataObject dataobj)
          Adds a DDO object - since federated datastore does not allow adding object dynamically, this method will throw DKUsageError exception.
 void addObject(dkDataObject dataobj, DKNVPair[] options)
          Adds a DDO object - since federated datastore does not allow adding object dynamically, this method will throw DKUsageError exception.
 void addObject(dkDataObject dataobj, int option)
          Adds a DDO object - since federated datastore does not allow adding object dynamically, this method will throw DKUsageError exception.
 void clearCache()
          Clear datastore cache
 void commit()
          Commits all activities since the last commit.
 void connect(java.lang.String datastore_name, java.lang.String user_name, java.lang.String authentication, java.lang.String connect_string)
          Establish a connection to a federated datastore.
 DKHandle connection()
          Gets the connection handle for the datastore
 void connectToService(dkService service)
          Connects to a service
 void connectToService(java.lang.String serviceId)
          Connects to a service
 DKDDO createDDO(java.lang.String objectType, int Flags)
          Creates a new DDO with object type, properties and attributes set for a given backend server.
 dkQuery createQuery(DKCQExpr qe)
          Creates a query object.
 dkQuery createQuery(java.lang.String command, short commandLangType, DKNVPair[] params)
          Creates an federated query object.
 dkDatastoreDef datastoreDef()
          Get datastore definition
 java.lang.String datastoreName()
          Gets the name of this datastore object.
 java.lang.String datastoreType()
          Gets the datastore type for this datastore object
 void deleteObject(dkDataObject dataobj)
          Deletes a data-object.
 void deleteObject(dkDataObject dataobj, DKNVPair[] options)
          Deletes a data-object.
 void deleteObject(dkDataObject dataobj, int option)
          Deletes a data-object.
 void destroy()
          datastore destroy - datastore cleanup if needed
 void disconnect()
          Disconnects from the federated datastore.
 java.lang.Object evaluate(DKCQExpr qe)
          Evaluates a query.
 java.lang.Object evaluate(dkQuery query)
          Evaluates a query and returns the result as a DKAny containing dkQueryableCollection.
 java.lang.Object evaluate(java.lang.String command, short commandLangType, DKNVPair[] params)
          Evaluates a query and returns the result as a dkQueryableCollection object.
 dkResultSetCursor execute(DKCQExpr cqe)
          Executes a query expression.
 dkResultSetCursor execute(dkQuery query)
          Executes a command query of the federated datastore and returns a result set cursor.
 dkResultSetCursor execute(java.lang.String command, short commandLangType, DKNVPair[] params)
          Executes a command query of the federated datastore and returns a result set cursor.
 void executeWithCallback(DKCQExpr cqe, dkCallback callbackObj)
          Execute a query expression with callback function.
 void executeWithCallback(dkQuery query, dkCallback callbackObj)
          Executes a query with callback function.
 void executeWithCallback(java.lang.String command, short commandLangType, DKNVPair[] params, dkCallback callbackObj)
          Execute the query with callback function.
 dkExtension getExtension(java.lang.String extensionName)
          Gets the extension object from a given extenstion name.
 dkSchemaMapping getMapping(java.lang.String mappingName)
          Gets a mapping information from this datastore.
 java.lang.Object getOption(int option)
          Gets defined datastore option
 dkSearchTemplate getSearchTemplate(java.lang.String templateName)
          Gets a search template information from a given template name
 DKHandle handle(java.lang.String type)
          Gets a datastore handle
 boolean isConnected()
          Checks to see if the datastore is connected
 java.lang.String[] listDataSourceNames()
          Gets a list of datasource names
 dkCollection listDataSources()
          List the available datastore sources that you can connect to.
 dkCollection listEntities()
          Gets a list of federated entities from Federated server.
 java.lang.String[] listEntityAttrNames(java.lang.String entityName)
          Gets a list of attribute names for a given entity name.
 dkCollection listEntityAttrs(java.lang.String entityName)
          Gets a list of attributes for a given entity name.
 java.lang.String[] listEntityNames()
          Gets a list of federated entities names from Federated server.
 java.lang.String[] listExtensionNames()
          Gets the list of extension objects' names
 java.lang.String[] listMappingNames()
          Gets the list of the registered mappings for this datastore
 java.lang.String[] listParmEntityNames()
          Gets a list of federated parametric search entities names from Federated server.
 java.lang.String[] listSearchTemplateNames()
          Gets a list search templates' names from an federated server
 dkCollection listSearchTemplates()
          Gets a list search templates from an federated server
 java.lang.String[] listTextEntityNames()
          Gets a list of federated text search entities names from Federated server.
 java.lang.String registerMapping(DKNVPair sourceMap)
          Registers a mapping definition to this datastore.
 void removeExtension(java.lang.String extensionName)
          Remove an existing extension object
 void retrieveObject(dkDataObject dataobj)
          Retrieves a data-object.
 void retrieveObject(dkDataObject dataobj, DKNVPair[] options)
          Retrieves a data-object.
 void retrieveObject(dkDataObject dataobj, int option)
          Retrieves a data-object.
 void rollback()
          Rollbacks all activities since the last commit.
 java.lang.String schemaName()
          Returns the schema Name
 dkServiceMgr serviceMgr()
          Gets a service manager
 void setOption(int option, java.lang.Object value)
          Sets the given "option" with a specific "value"
 void unRegisterMapping(java.lang.String mappingName)
          Unregisters mapping information from this datastore.
 void updateObject(dkDataObject dataobj)
          Updates the data-object.
 void updateObject(dkDataObject dataobj, DKNVPair[] options)
          Updates the data-object.
 void updateObject(dkDataObject dataobj, int option)
          Updates the data-object.
 java.lang.String userName()
          Gets the user name that used to logon to the datastore
 
Methods inherited from class com.ibm.mm.sdk.server.dkAbstractDatastore
addObjects, addObjects, addObjects, changePassword, clearCache, deleteObjects, deleteObjects, deleteObjects, evaluate, execute, executeWithCallback, listAvailableServices, listSchema, listSchemaAttributes, listSearchableEntities, listSearchableEntityNames, listServers, retrieveObjects, retrieveObjects, retrieveObjects, startTransaction, updateObjects, updateObjects, updateObjects
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.ibm.mm.sdk.common.dkFederation
changePassword, clearExcludedServers, datastoreByServerName, datastoreByServerName, excludeServer, listExcludedServers, requestConnection
 

Constructor Detail

DKDatastoreFed

public DKDatastoreFed()
               throws DKException,
                      java.lang.Exception
Constructs the datastore and initializes it with the default configuration.
Throws:
DKException - if a problem is encountered.

DKDatastoreFed

public DKDatastoreFed(java.lang.String configuration)
               throws DKException,
                      java.lang.Exception
Constructs the datastore and initializes it using the supplied configuration string.
Parameters:
configuration - configuration string used for initialization. Configuration string is a sequence of name/value pairs separated by semi colons. Valid name/value pairs are:
  • DSNAME=<datastore_name> Supplies the datastore name. Optional
  • DBAUTH=<SERVER | CLIENT> Database authentication information. If SERVER is supplied the database userid and password will be supplied to the server. If CLIENT is supplied no database userid and password will be supplied to the server. The default is SERVER. Optional
  • LDAPORG=<LDAP organization> Specifies the LDAP organization providing the directory information. This can be used when the list of datasources is in IBM Secure Way. Optional
  • FEDSERVERSFILE=<(datasource information file location)> Specifies the file location of the datasource information. Optional
  • FEDSERVERSURL=<(datasource information url location)> Specifies the url location of the datasource information. Optional
  • FEDENVFILE=<(database connection information file location)> Specifies the file location of the database connection information. Optional
  • FEDENVURL=<(database connection information url location)> Specifies the url location of the database connection information. Optional
Method Detail

connect

public void connect(java.lang.String datastore_name,
                    java.lang.String user_name,
                    java.lang.String authentication,
                    java.lang.String connect_string)
             throws DKException,
                    java.lang.Exception
Establish a connection to a federated datastore.
Overrides:
connect in class dkAbstractDatastore
Parameters:
datastore_name - the datastore name to connect with
user_name - the user name for establishing the connection
authentication - user's password
connect_string - the connect string used for initializing connection options. Connect string is a sequence of name/value pairs separated by semi-colons. Valid name/value pairs are listed below:
  • SQLUID=<database userid> userid for the underlying database. Optional
  • SQLPWD=<database password> user's password for the undelying database. Optional
  • DBAUTH=<SERVER | CLIENT> Database authentication information. If SERVER is supplied the database userid and password will be supplied to the server. If CLIENT is supplied no database userid and password will be supplied to the server. The default is SERVER. Optional
  • SCHEMA=<database schema> database schema name to use. Optional
  • APPLNAME=<application name> Specifies the application name you are running. It is used to identify trace and log information. Optional
  • NPWD=<new password for userid> Changes user's password to this new value. Only valid if userid is not a system userid. Optional
  • LANG=<database language> Server language. Optional
  • TRACESERVERLEVEL=<trace level> Trace level for the server. Optional
    • The default trace level for the server is 0.
    • ICM trace flags
      • 0 ICMTRACE_OFF
      • 1 ICMTRACE_BASIC
      • 2 ICMTRACE_DETAILED
      • 4 ICMTRACE_DATA
      • 8 ICMTRACE_PERFORMANCE
      • 16 ICMTRACE_PARSEBUILD
      • 32 ICMTRACE_MEMDEBUG
      • 256 ICMTRACE_CACHE_TRACE
      • 512 ICMTRACE_CACHE_ALLOC
      • 1024 ICMTRACE_CACHE_MGT
    • Trace level is constructed by adding the numbers above. For example, a common tracing level is 15 (calculated by adding up 1 (ICMTRACE_BASIC), 2 (ICMTRACE_DETAILED), 4 (ICMTRACE_DATA), and 8 (ICMTRACE_PERFORMANCE)).
Throws:
DKException - if a problem is encountered.

disconnect

public void disconnect()
                throws DKException,
                       java.lang.Exception
Disconnects from the federated datastore.
Overrides:
disconnect in class dkAbstractDatastore
Throws:
DKException - for if unable to disconnect from server.

getOption

public java.lang.Object getOption(int option)
                           throws DKException
Gets defined datastore option
Overrides:
getOption in class dkAbstractDatastore
Parameters:
option - an option id
Returns:
the value for the given option
Throws:
DKException - if option is not set

setOption

public void setOption(int option,
                      java.lang.Object value)
               throws DKException
Sets the given "option" with a specific "value"
Overrides:
setOption in class dkAbstractDatastore
Parameters:
option - an option id
value - the value for the "option"
Throws:
DKException - if option/value is invalid

evaluate

public java.lang.Object evaluate(java.lang.String command,
                                 short commandLangType,
                                 DKNVPair[] params)
                          throws DKException,
                                 java.lang.Exception
Evaluates a query and returns the result as a dkQueryableCollection object.
Overrides:
evaluate in class dkAbstractDatastore
Parameters:
command - a query stirng 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

evaluate

public java.lang.Object evaluate(dkQuery query)
                          throws DKException,
                                 java.lang.Exception
Evaluates a query and returns the result as a DKAny containing dkQueryableCollection.
Overrides:
evaluate in class dkAbstractDatastore
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.

evaluate

public java.lang.Object evaluate(DKCQExpr qe)
                          throws DKException,
                                 java.lang.Exception
Evaluates a query.
Overrides:
evaluate in class dkAbstractDatastore
Parameters:
qe - a common query expression object
Returns:
a collection of the results
Throws:
DKException - if common query expression object is invalid

execute

public dkResultSetCursor execute(java.lang.String command,
                                 short commandLangType,
                                 DKNVPair[] params)
                          throws DKException,
                                 java.lang.Exception
Executes a command query of the federated datastore and returns a result set cursor.
Overrides:
execute in class dkAbstractDatastore
Parameters:
command - a query string that represents 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 dkResultSetCursor object.
Throws:
DKException - if "command" is null or invalid, or "commandLangType" is not Federated Query type.

execute

public dkResultSetCursor execute(dkQuery query)
                          throws DKException,
                                 java.lang.Exception
Executes a command query of the federated datastore and returns a result set cursor. This method takes an Federated query object as an argument.
Overrides:
execute in class dkAbstractDatastore
Parameters:
query - an Federated dkQuery object
Returns:
a dkResultSetCursor object
Throws:
DKException - if "query" object is null or query.qlType() is not DK_FEDERATED_QL_TYPE

execute

public dkResultSetCursor execute(DKCQExpr cqe)
                          throws DKException,
                                 java.lang.Exception
Executes a query expression.
Overrides:
execute in class dkAbstractDatastore
Parameters:
cqe - a common query expression object
Returns:
resultSetCursor which represents a federated datastore cursor.
Throws:
DKException - if "cqe" object is invalid

executeWithCallback

public void executeWithCallback(dkQuery query,
                                dkCallback callbackObj)
                         throws DKException,
                                java.lang.Exception
Executes a query with callback function.
Overrides:
executeWithCallback in class dkAbstractDatastore
Parameters:
query - a query object
callbackObj - a dkCallback object

executeWithCallback

public void executeWithCallback(java.lang.String command,
                                short commandLangType,
                                DKNVPair[] params,
                                dkCallback callbackObj)
                         throws DKException,
                                java.lang.Exception
Execute the query with callback function.
Overrides:
executeWithCallback in class dkAbstractDatastore
Parameters:
command - a query string
commandLang - a query type
params - additional query option in name/value pair
callbackObj - a dkCallback object

executeWithCallback

public void executeWithCallback(DKCQExpr cqe,
                                dkCallback callbackObj)
                         throws DKException,
                                java.lang.Exception
Execute a query expression with callback function.
Overrides:
executeWithCallback in class dkAbstractDatastore
Parameters:
cqe - a common query expression object
callbackObj - a dkCallback object

createQuery

public dkQuery createQuery(java.lang.String command,
                           short commandLangType,
                           DKNVPair[] params)
                    throws DKException
Creates an federated query object.
Overrides:
createQuery in class dkAbstractDatastore
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:
an federated dkQuery object
Throws:
DKException - if "command" is null

createQuery

public dkQuery createQuery(DKCQExpr qe)
                    throws DKException
Creates a query object.
Overrides:
createQuery in class dkAbstractDatastore
Parameters:
cqe - a common query expression object
Throws:
DKException - if "cqe" object is invalid

listDataSources

public dkCollection listDataSources()
                             throws DKException,
                                    java.lang.Exception
List the available datastore sources that you can connect to.
Overrides:
listDataSources in class dkAbstractDatastore
Returns:
a collection of server defs
Throws:
DKException - if internal error occurs from server

listDataSourceNames

public java.lang.String[] listDataSourceNames()
                                       throws DKException,
                                              java.lang.Exception
Gets a list of datasource names
Overrides:
listDataSourceNames in class dkAbstractDatastore
Returns:
an array of datasource names
Throws:
DKException - if error occurs when retrieving datasource names

addObject

public void addObject(dkDataObject dataobj)
               throws DKException,
                      java.lang.Exception
Adds a DDO object - since federated datastore does not allow adding object dynamically, this method will throw DKUsageError exception.
Overrides:
addObject in class dkAbstractDatastore
Parameters:
ddo - an Federated object to be add.
Throws:
DKException - is thrown for all calls to this method.

addObject

public void addObject(dkDataObject dataobj,
                      int option)
               throws DKException,
                      java.lang.Exception
Adds a DDO object - since federated datastore does not allow adding object dynamically, this method will throw DKUsageError exception.
Overrides:
addObject in class dkAbstractDatastore
Parameters:
ddo - an Federated object to be add.
option - option for add
Throws:
DKException - is thrown for all calls to this method.

addObject

public void addObject(dkDataObject dataobj,
                      DKNVPair[] options)
               throws DKException,
                      java.lang.Exception
Adds a DDO object - since federated datastore does not allow adding object dynamically, this method will throw DKUsageError exception.
Overrides:
addObject in class dkAbstractDatastore
Parameters:
ddo - an Federated object to be add.
options - options for add
Throws:
DKException - is thrown for all calls to this method.

deleteObject

public void deleteObject(dkDataObject dataobj)
                  throws DKException,
                         java.lang.Exception
Deletes a data-object.
Overrides:
deleteObject in class dkAbstractDatastore
Parameters:
ddo - an Federated DDO object to be deleted
Throws:
DKException - since Federated server does not support deletion of documents for now.

deleteObject

public void deleteObject(dkDataObject dataobj,
                         int option)
                  throws DKException,
                         java.lang.Exception
Deletes a data-object.
Overrides:
deleteObject in class dkAbstractDatastore
Parameters:
ddo - an Federated DDO object to be deleted
option - option for delete
Throws:
DKException - since Federated server does not support deletion of documents for now.

deleteObject

public void deleteObject(dkDataObject dataobj,
                         DKNVPair[] options)
                  throws DKException,
                         java.lang.Exception
Deletes a data-object.
Overrides:
deleteObject in class dkAbstractDatastore
Parameters:
ddo - an Federated DDO object to be deleted
options - options for delete
Throws:
DKException - since Federated server does not support deletion of documents for now.

retrieveObject

public void retrieveObject(dkDataObject dataobj)
                    throws DKException,
                           java.lang.Exception
Retrieves a data-object.
Overrides:
retrieveObject in class dkAbstractDatastore
Parameters:
ddo - document object to be retrieved.
Throws:
DKException - when retrieve failed.

retrieveObject

public void retrieveObject(dkDataObject dataobj,
                           int option)
                    throws DKException,
                           java.lang.Exception
Retrieves a data-object.
Overrides:
retrieveObject in class dkAbstractDatastore
Parameters:
ddo - document object to be retrieved.
option - option for retrieve
Throws:
DKException - when retrieve failed.

retrieveObject

public void retrieveObject(dkDataObject dataobj,
                           DKNVPair[] options)
                    throws DKException,
                           java.lang.Exception
Retrieves a data-object.
Overrides:
retrieveObject in class dkAbstractDatastore
Parameters:
ddo - document object to be retrieved.
options - options for retrieve
Throws:
DKException - when retrieve failed.

updateObject

public void updateObject(dkDataObject dataobj)
                  throws DKException,
                         java.lang.Exception
Updates the data-object.
Overrides:
updateObject in class dkAbstractDatastore
Parameters:
ddo - the data-object to be updated.
Throws:
DKException - if error occurs in the datastore

updateObject

public void updateObject(dkDataObject dataobj,
                         int option)
                  throws DKException,
                         java.lang.Exception
Updates the data-object.
Overrides:
updateObject in class dkAbstractDatastore
Parameters:
ddo - the data-object to be updated.
option - option for update
Throws:
DKException - if error occurs in the datastore

updateObject

public void updateObject(dkDataObject dataobj,
                         DKNVPair[] options)
                  throws DKException,
                         java.lang.Exception
Updates the data-object.
Overrides:
updateObject in class dkAbstractDatastore
Parameters:
ddo - the data-object to be updated.
options - options for update
Throws:
DKException - if error occurs in the datastore

commit

public void commit()
            throws DKException
Commits all activities since the last commit. This method will do nothing for federated since this datastore does not support commit/rollback functions.
Overrides:
commit in class dkAbstractDatastore
Throws:
DKException - is thrown since federated datastore does not support transaction scope for now.

rollback

public void rollback()
              throws DKException
Rollbacks all activities since the last commit. This method will do nothing for federated datastore since it does not support commit/rollback functions yet.
Overrides:
rollback in class dkAbstractDatastore
Throws:
DKException - is thrown since Federated does not support transaction scope for now.

isConnected

public boolean isConnected()
Checks to see if the datastore is connected
Overrides:
isConnected in class dkAbstractDatastore
Returns:
true if connected, false otherwise

connection

public DKHandle connection()
                    throws java.lang.Exception
Gets the connection handle for the datastore
Overrides:
connection in class dkAbstractDatastore
Returns:
the connection handle

handle

public DKHandle handle(java.lang.String type)
                throws java.lang.Exception
Gets a datastore handle
Overrides:
handle in class dkAbstractDatastore
Parameters:
type - type of datastore handle wanted
Returns:
a datastore handle

userName

public java.lang.String userName()
Gets the user name that used to logon to the datastore
Overrides:
userName in class dkAbstractDatastore
Returns:
the userid that used to logon

datastoreName

public java.lang.String datastoreName()
                               throws java.lang.Exception
Gets the name of this datastore object. Usually it represents a datastore source's server name.
Overrides:
datastoreName in class dkAbstractDatastore
Returns:
datastore name

datastoreType

public java.lang.String datastoreType()
                               throws java.lang.Exception
Gets the datastore type for this datastore object
Overrides:
datastoreType in class dkAbstractDatastore
Returns:
datastore type

datastoreDef

public dkDatastoreDef datastoreDef()
                            throws DKException,
                                   java.lang.Exception
Get datastore definition
Overrides:
datastoreDef in class dkAbstractDatastore
Returns:
the meta-data (dkDatastoreDef) of this datastore

listEntities

public dkCollection listEntities()
                          throws DKException,
                                 java.lang.Exception
Gets a list of federated entities from Federated server.
Overrides:
listEntities in class dkAbstractDatastore
Returns:
a collection of dkEntityDef
Throws:
DKException - if error occurs

listEntityNames

public java.lang.String[] listEntityNames()
                                   throws DKException,
                                          java.lang.Exception
Gets a list of federated entities names from Federated server.
Overrides:
listEntityNames in class dkAbstractDatastore
Returns:
an array of names
Throws:
DKException - if error occurs

listTextEntityNames

public java.lang.String[] listTextEntityNames()
                                       throws DKException,
                                              java.lang.Exception
Gets a list of federated text search entities names from Federated server.
Returns:
an array of names
Throws:
DKException - if error occurs

listParmEntityNames

public java.lang.String[] listParmEntityNames()
                                       throws DKException,
                                              java.lang.Exception
Gets a list of federated parametric search entities names from Federated server.
Returns:
an array of names
Throws:
DKException - if error occurs

listEntityAttrs

public dkCollection listEntityAttrs(java.lang.String entityName)
                             throws DKException,
                                    java.lang.Exception
Gets a list of attributes for a given entity name.
Overrides:
listEntityAttrs in class dkAbstractDatastore
Parameters:
entityName - name of entity to retrieve attributes for
Returns:
a dkCollection of dkAttrDef objects
Throws:
DKException - if the entity name does not exist

listEntityAttrNames

public java.lang.String[] listEntityAttrNames(java.lang.String entityName)
                                       throws DKException,
                                              java.lang.Exception
Gets a list of attribute names for a given entity name.
Overrides:
listEntityAttrNames in class dkAbstractDatastore
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

registerMapping

public java.lang.String registerMapping(DKNVPair sourceMap)
                                 throws DKException,
                                        java.lang.Exception
Registers a mapping definition to this datastore. Mapping is done by entities.
Overrides:
registerMapping in class dkAbstractDatastore
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.
    See Also:
    unRegisterMapping(java.lang.String)

unRegisterMapping

public void unRegisterMapping(java.lang.String mappingName)
                       throws DKException,
                              java.lang.Exception
Unregisters mapping information from this datastore.
Overrides:
unRegisterMapping in class dkAbstractDatastore
Parameters:
mappingName - name of the mapping information
See Also:
registerMapping(com.ibm.mm.sdk.common.DKNVPair)

listMappingNames

public java.lang.String[] listMappingNames()
                                    throws DKException,
                                           java.lang.Exception
Gets the list of the registered mappings for this datastore
Overrides:
listMappingNames in class dkAbstractDatastore
Returns:
an array of registered mapping objects' names. The array length would be zero if there is no mapping registered.
See Also:
registerMapping(com.ibm.mm.sdk.common.DKNVPair)

getMapping

public dkSchemaMapping getMapping(java.lang.String mappingName)
                           throws DKException,
                                  java.lang.Exception
Gets a mapping information from this datastore.
Overrides:
getMapping in class dkAbstractDatastore
Parameters:
mappingName - name of the mapping information
Returns:
the schema mapping object
See Also:
registerMapping(com.ibm.mm.sdk.common.DKNVPair)

getExtension

public dkExtension getExtension(java.lang.String extensionName)
                         throws DKException,
                                java.lang.Exception
Gets the extension object from a given extenstion name.
Overrides:
getExtension in class dkAbstractDatastore
Parameters:
extensionName - name of the extension object.
Returns:
extension object.

addExtension

public void addExtension(java.lang.String extensionName,
                         dkExtension extensionObj)
                  throws DKException,
                         java.lang.Exception
Adds a new extension object.
Overrides:
addExtension in class dkAbstractDatastore
Parameters:
extensionName - name of new extension object
extensionObj - the extension object to be set

removeExtension

public void removeExtension(java.lang.String extensionName)
                     throws DKException,
                            java.lang.Exception
Remove an existing extension object
Overrides:
removeExtension in class dkAbstractDatastore
Parameters:
extensionName - name of extension object to be removed

listExtensionNames

public java.lang.String[] listExtensionNames()
                                      throws DKException,
                                             java.lang.Exception
Gets the list of extension objects' names
Overrides:
listExtensionNames in class dkAbstractDatastore
Returns:
an array of extension objects' names

createDDO

public DKDDO createDDO(java.lang.String objectType,
                       int Flags)
                throws DKException,
                       java.lang.Exception
Creates a new DDO with object type, properties and attributes set for a given backend server. This method will call the backend datastore createDDO method to create a federated DDO. For more information on which of the flags below are supported by the particular backend datastore see the createDDO method on the backend datastore involved in the federated mapping.
Overrides:
createDDO in class dkAbstractDatastore
Parameters:
objectType - the object type you want to create. This must be a federated object type.
Flags - Indicate various options to specify more detail characteristics of the DDO to create. For example, it may create a document DDO, a folder DDO or an item DDO. Valid values are (DK_CM_DOCUMENT, DK_CM_FOLDER or DK_CM_ITEM).
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

serviceMgr

public dkServiceMgr serviceMgr()
                        throws DKException,
                               java.lang.Exception
Gets a service manager
Specified by:
serviceMgr in interface dkFederation
Overrides:
serviceMgr in class dkAbstractDatastore
Returns:
the service manager

connectToService

public void connectToService(dkService service)
                      throws DKException,
                             java.lang.Exception
Connects to a service
Specified by:
connectToService in interface dkFederation
Parameters:
service - a service object

connectToService

public void connectToService(java.lang.String serviceId)
                      throws DKException,
                             java.lang.Exception
Connects to a service
Specified by:
connectToService in interface dkFederation
Parameters:
service - a service id

listSearchTemplates

public dkCollection listSearchTemplates()
                                 throws DKException,
                                        java.lang.Exception
Gets a list search templates from an federated server
Specified by:
listSearchTemplates in interface dkFederation
Overrides:
listSearchTemplates in class dkAbstractDatastore
Returns:
a DKSequentialCollection of search templates
Throws:
DKException - if internal datastore error occurs

listSearchTemplateNames

public java.lang.String[] listSearchTemplateNames()
                                           throws DKException,
                                                  java.lang.Exception
Gets a list search templates' names from an federated server
Specified by:
listSearchTemplateNames in interface dkFederation
Overrides:
listSearchTemplateNames in class dkAbstractDatastore
Returns:
an array of search template names
Throws:
DKException - if internal datastore error occurs

getSearchTemplate

public dkSearchTemplate getSearchTemplate(java.lang.String templateName)
                                   throws DKException,
                                          java.lang.Exception
Gets a search template information from a given template name
Specified by:
getSearchTemplate in interface dkFederation
Returns:
dkSearchTemplate object.
Throws:
DKException - if internal datastore error occurs

clearCache

public void clearCache()
                throws DKException,
                       java.lang.Exception
Clear datastore cache

Note:DKUsageError exception thrown if method is not implemented

Overrides:
clearCache in class dkAbstractDatastore

destroy

public void destroy()
             throws DKException,
                    java.lang.Exception
datastore destroy - datastore cleanup if needed
Overrides:
destroy in class dkAbstractDatastore

schemaName

public java.lang.String schemaName()
                            throws DKException,
                                   java.lang.Exception
Returns the schema Name
Returns:
schema name

EIP Java APIs

(c) Copyright International Business Machines Corporation 1996, 2002. IBM Corp. All rights reserved.