Enterprise Information Portal APIs

com.ibm.mm.sdk.server
Class DKDatastoreTS

java.lang.Object
  |
  +--com.ibm.mm.sdk.server.dkAbstractDatastore
        |
        +--com.ibm.mm.sdk.server.DKDatastoreTS
All Implemented Interfaces:
DKConstant, DKConstantDL, dkDatastore, dkDatastoreIntTS, DKMessageId, DKMessageIdDL, dkQueryEvaluator, dkQueryManager

public class DKDatastoreTS
extends dkAbstractDatastore
implements dkDatastoreIntTS, DKConstantDL, DKMessageIdDL

DKDatastoreTS is a specific version of dkDatastore to implement the Text Search (TS) datastore for IBM Content Manger Version 7 and earlier. Essentially, DKDatastoreTS provides text indexing, and search mechanisms. It does not really store documents or folders. DKDatastoreTS indexes text parts of documents and process search requests using this index. The results of a text query submitted to TS are item IDs, the are keys to retrieve the actual documents from Content Manager datastore.

The execute() and evaluate() methods of DKDatastoreTS takes text query strings expressed in text query language type. The syntax of this query string is described below. The DKTextQuery object accepts queries in this syntax; in fact the DKTextQuery object delegates the low level query processing tasks to DKDatastoreTS.

Text Query String

The syntax of text query string is as follows:

       SEARCH=(COND=(text_search_expression)
              );
      [OPTION=([SEARCH_INDEX={search_index_name | (index_list) };]
                [MAX_RESULTS=maximum_results;]
                [THES_NAME=thesaurus_index_name;]
                [THES_DEPTH=depth_for_query_expansion;]
                [TIME_LIMIT=time_limit]
                [MATCH_INFO=yes_no;]
                         [RANKING=yes_no;]
                         [SORT=yes_no;]
                 [MATCH_DICT=yes_no]
               )]
 

Words in uppercase are keywords. Lowercase words are parameters supplied by users; they are described below. Note that DBCS (double-byte character set) characters must be enclosed in SBCS single quotes, like a phrase. For more information about options, refer to the EhwSearch chapter of the Text Search Engine Application Programming Reference.

text_search_expression

This is an expression composed of a free_text_expression or a boolean_query, followed by an optional free_text_expression. A boolean_query followed by a free_text_expression is known as a hybrid query.

       {boolean_query  [free_text_expression] | free_text_expression}
 

Notice that only one boolean query and/or one optional free_text_expression is allowed. If a boolean query is requested, this should be specified first. For more information about options, refer to the EhwSearch chapter of the Text Search Engine Application Programming Reference.

boolean_query:

      [unary_operator] text_search_criteria
       [[binary_operator [unary_operator] text_search_criteria] ... ]
 

Binary operators are AND or &, OR or |. NOT is the only unary operator. Parentheses are treated as a subquery. A subquery changes the default order of processing for the binary operators. For example, a query that includes parentheses would have the following syntax: UNIX AND (ibm OR system). The information located inside the parentheses, "(ibm OR system)," is a subquery contained inside of a query.

Search argument:text_search_criteria is one of the following keyword/options, where the dollar sign delimits the keyword/option:

      { search_argument                 |
         $DOC$  '{' proximity_search_argument '}'  |
         $PARA$ '{' proximity_search_argument '}'  |
         $SENT$ '{' proximity_search_argument '}'
       }
 

The following options specify proximity search conditions, which require search arguments. These consist of at least a pair of words or phrases:

$DOC$
reserved word indicating that the search proximity expression in search argument has a scope of the whole document

$PARA$
indicating that the search proximity expression in search argument has a scope of a paragraph

$SENT$
indicating that the search proximity expression in search argument has a scope of a sentence

The NOT operator is not allowed with the keywords $DOC$, $PARA$, or $SENT$.

search_argument can be more than one word or phrase:

      [$search_option$] {word | phrase} [$search_option$] {word | phrase}...]
 

proximity_search_argument:

      [$search_option$] {word | phrase} [$search_option$] {word | phrase}
       [$search_option$] [{word | phrase}...]
 

Each word or phrase can be preceded by the "-$search_options$-" tag.

The dollar sign delimits search_option. Options inside a pair of dollar sign are separated by comma, and can have the following values.

The valid codes and ids can be found in the DKConstant2.h file, in the users' include directory. They need to be converted from number values to string values for ccode and langid.

DOCMOD
one or more Document model elements separated by semi colons.

DOCMODNAME
the name of the document model that a section list is defined for.

SECLIST
the list of sections that are defined to the model defintions file. For GTR type indexes only one entry is allowed in this list. If there is more than one item in the list they are separated by commas.

CCSID=ccode:
an option that specifies the character code for a country.

LANG=langid:
an option that specifies the language ID for a country.

SC=symbol:
symbol to indicate a single required character, usually a question mark (?). This must come before the MC=symbol if both SC and MC are specified.

MC=symbol:
symbol to indicate a sequence of optional characters or for a single optional word; that is, wild card character, usually an asterisk (*).

SYN
The text search includes synonyms of the current search term.

THES

THES or THES=relation_name

The text search includes a request to also search for thesaurus expansions of the current search term. Text Search looks for thesaurus terms either in the file defined by the THES_NAME option or the default file. The default file is "imlthes" for Linguistic and Precise searches; the default file is "imlnthes" for GTR searches. If relation_name is specified, query expansion by thesaurus is done along branches of the named relation. If no value is specified, all branches are taken into account for query expansion.

If you have multiple terms in your search (words separated with spaces), you can use either single or double quotes to enclose the string. For example, if you want to search for the words "digital" and "database" using a single query, your query would look like this: 'digital database'. Spaces between words are only recognized when contained within single or double quotes.

NOSEQ
The words in the current search term are requested to be in any sequence; if not specified, the words must occur in exactly the same sequence within a single sentence.

SOUND
The words in the current search term "sound like" words targeted in the search.

MATCH=n
An option that specifies the degree of similarity (GTR). "n" is a number between one and five, inclusive.

BOUND
An option that requests the search to respect word phrase boundaries (GTR).

CSENS
The search is case-sensitve. This is only valid for GTR-type index with case enabled.

ESTEM
An option that requests tokens with a stem that matches the search term (GTR). With this option, Text Search Engine will also search on "computer" and "computing" from the search term "compute".

word is a word in the specified search language, phrase is single or double quoted words (which can be DBCS, double byte character set characters), and free_text is words inside a pair of braces{}.

free_text_expression:free_text_expression is composed of the following string free_text_search_criteria, where free_text_search_criteria is:

    [$free_text_search_option$] '{' free_text '}'
 

The dollar sign delimits free_text_search_option. Options inside a pair of dollar signs are separated by a comma, and can currently have the following value:

DOCMOD
one or more Document model elements separated by semi colons.

DOCMODNAME
the name of the document model that a section list is defined for.

SECLIST
the list of sections that are defined to the model defintions file. For GTR type indexes only one entry is allowed in this list. If there is more than one item in the list they are separated by commas.

SYN
the text search includes synonyms of the current search term.

THES

THES or THES=relation_name

The text search includes a request to also search for thesaurus expansions of the current search term. Text Search looks for thesaurus terms either in the file defined by the THES_NAME option or the default file. The default file is "imlthes" for Linguistic and Precise searches; the default file is "imlnthes" for GTR searches. If relation_name is specified, query expansion by thesaurus is done along branches of the named relation. If no value is specified, all branches are taken into account for query expansion.

If you have multiple terms in your search (words separated with spaces), you can use either single or double quotes to enclose the string. For example, if you want to search for the words "digital" and "database" using a single query, your query would look like this: 'digital database'. Spaces between words are only recognized when contained within single or double quotes.

search_index_name
the name of one search index to be searched.

index_list
the list of search index names to be searched, separated by commas.

maximum_results
the desired maximum number of results to be returned.

time_limit
specifies the maximum processing time of the text search server for a Boolean query or the Boolean part of a hybrid query.

thesaurus_index_name
specifies the name of a thesaurus index to be used to expand query terms. The default name is imlthes for Linguistic and Precise searches; the default name is imlnthes for GTR searches.

depth_for_query_expansion
specifies the depth to be used in query expansion by looking for matches in the thesaurus. Actual expansion of the query is requested by using the THES search_option. The default depth setting is 1.

An example of a boolean search expression to search for documents contains the phrase UNIX Operating and a word member in the same paragraph, is as follows:

            'UNIX Operating'   AND
              member
 

An example of a boolean and free-text search expression to search for documents containing the words WWW, internet, and a free text web site is as follows:

            WWW AND internet  {web site}
 

Another example of an expression to search for documents containing the words internet and DB2 in the same paragraph, a word that starts with Net, and the free_text internet commerce is booming is as follows:

    $PARA$ {internet DB2} AND $MC=*$ Net*
     {internet commerce is booming}
 

yes_no for MATCH_INFO
The MATCH_INFO indicator. The valid values are:

yes_no for MATCH_DICT
The MATCH_DICT indicator. The valid values are:


Fields inherited from interface com.ibm.mm.sdk.common.DKConstantDL
    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.DKMessageIdDL
DK_DL_MSG_INVNBR_TEXTMAPPING, DK_DL_MSG_MSGID_NOT_FOUND
 
Fields inherited from interface com.ibm.mm.sdk.common.DKMessageId
    For details, see the class or interface
 
Constructor Summary
DKDatastoreTS()
          Constructs the datastore and initializes the datastore.
DKDatastoreTS(java.lang.String configuration)
          Constructs the datastore and initializes the datastore.
 
Method Summary
 void addExtension(java.lang.String extensionName, dkExtension extensionObj)
          Adds a new extension object.
 void addObject(dkDataObject ddo)
          Adds a DDO to this datastore.
 void clearIndex(java.lang.String indexName)
          Clears all the indexed terms from a search index.
 void commit()
          Commits a datastore transaction.
 void connect(java.lang.String server_name, java.lang.String port, char communication_type)
          Connects to a datastore.
 void connect(java.lang.String datastore_name, java.lang.String user_name, java.lang.String authentication, java.lang.String connect_string)
          Connects to a datastore.
 DKHandle connection()
          Gets the connection handle for a datastore.
 DKDDO createDDO(java.lang.String objectType, int Flags)
          Creates a new DDO with object type, properties and attributes set for a given backend server.
 void createIndex(DKIndexInfoTS newIndex)
          Creates a search index.
 dkQuery createQuery(DKCQExpr qe)
          Creates a query object.
 dkQuery createQuery(java.lang.String command, short commandLangType, DKNVPair[] params)
          Creates a query object.
 dkDatastoreDef datastoreDef()
          Get the 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 deleteIndex(java.lang.String indexName)
          Deletes a search index.
 void deleteObject(dkDataObject ddo)
          Deletes a DDO from this datastore.
 void destroy()
          datastore destroy - datastore cleanup if needed
 void disconnect()
          Disconnects from the datastore.
 java.lang.Object evaluate(DKCQExpr qe)
          Evaluates the query.
 java.lang.Object evaluate(dkQuery query)
          Evaluates the query.
 java.lang.Object evaluate(java.lang.String command, short commandLangType, DKNVPair[] params)
          Evaluates the query.
 dkResultSetCursor execute(DKCQExpr cqe)
          Executes the query.
 dkResultSetCursor execute(dkQuery query)
          Executes the query.
 dkResultSetCursor execute(java.lang.String command, short commandLangType, DKNVPair[] params)
          Executes the query.
 void executeWithCallback(DKCQExpr qe, dkCallback callbackObj)
          Executes the query with callback function.
 void executeWithCallback(dkQuery query, dkCallback callbackObj)
          Executes the query with callback function.
 void executeWithCallback(java.lang.String command, short commandLangType, DKNVPair[] params, dkCallback callbackObj)
          Executes the query with callback function.
 int getCallbkCnt()
           
 dkExtension getExtension(java.lang.String extensionName)
          Gets the extension object from a given extenstion name.
 DKIndexFuncStatusTS getIndexFunctionStatus(java.lang.String indexName)
          Gets the indexing function status, document, and document message queue count for a search index.
 DKIndexInfoTS getIndexInformation(java.lang.String indexName)
          Gets the index information about a search index.
 dkSchemaMapping getMapping(java.lang.String mappingName)
          Gets mapping information for this datastore.
 DKMatchesInfoTS getMatches(dkResultSetCursor cursor, java.lang.String documentId, java.lang.String textIndexName, boolean useDictionary)
          Gets the match information given indexName and document ID.
 java.lang.Object getOption(int option)
          Gets a datastore option.
 int getRSCCnt()
           
 DKHandle handle(java.lang.String type)
          Gets a datastore handle.
 boolean isConnected()
          Checks to see if the datastore is connected.
 java.lang.String[] listDataSourceNames()
          Lists the available datastore source names that can be used to connect with.
 dkCollection listDataSources()
          Lists the available datastore sources that can be used to connect with.
 dkCollection listEntities()
          Gets a list of entities from persistent datastore
 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 entity names from persistent datastore
 java.lang.String[] listExtensionNames()
          Gets the list of the names of the extension objects.
 java.lang.String[] listMappingNames()
          Gets the list of the register mappings for this datastore
 java.lang.Object listSchema()
          Deprecated. Replace by listEntities
 java.lang.Object listSchemaAttributes(java.lang.String schemaEntry)
          Deprecated. Replace by listEntityAttributes
 java.lang.Object listServers()
          Deprecated. Replace by listDataSources
 java.lang.String registerMapping(DKNVPair sourceMap)
          Registers a mapping definition to this datastore.
 void removeExtension(java.lang.String extensionName)
          Removes an existing extension object.
 void retrieveObject(dkDataObject ddo)
          Retrieves a DDO from this datastore.
 void rollback()
          Rollbacks a datastore transaction.
 void setIndexFunctionStatus(java.lang.String indexName, int actionId)
          Sets the indexing function status for a search index.
 void setOption(int option, java.lang.Object value)
          Sets a datastore option.
 void startUpdateIndex(java.lang.String indexName)
          Starts the indexing process.
 void unRegisterMapping(java.lang.String mappingName)
          Unregisters mapping information for this datastore.
 void updateObject(dkDataObject ddo)
          Updates this DDO in this datastore.
 java.lang.String userName()
          Gets the user name for this datastore object
 
Methods inherited from class com.ibm.mm.sdk.server.dkAbstractDatastore
addObject, addObject, addObjects, addObjects, addObjects, changePassword, clearCache, clearCache, deleteObject, deleteObject, deleteObjects, deleteObjects, deleteObjects, evaluate, execute, executeWithCallback, listAvailableServices, listSearchableEntities, listSearchableEntityNames, listSearchTemplateNames, listSearchTemplates, retrieveObject, retrieveObject, retrieveObjects, retrieveObjects, retrieveObjects, serviceMgr, startTransaction, updateObject, updateObject, 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.dkDatastore
addObject, addObject, addObjects, addObjects, addObjects, changePassword, clearCache, clearCache, deleteObject, deleteObject, deleteObjects, deleteObjects, deleteObjects, evaluate, execute, executeWithCallback, listAvailableServices, listSearchableEntities, listSearchableEntityNames, listSearchTemplateNames, listSearchTemplates, retrieveObject, retrieveObject, retrieveObjects, retrieveObjects, retrieveObjects, serviceMgr, startTransaction, updateObject, updateObject, updateObjects, updateObjects, updateObjects
 

Constructor Detail

DKDatastoreTS

public DKDatastoreTS()
              throws DKException,
                     java.lang.Exception
Constructs the datastore and initializes the datastore.

DKDatastoreTS

public DKDatastoreTS(java.lang.String configuration)
              throws DKException,
                     java.lang.Exception
Constructs the datastore and initializes the datastore.
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
Connects to a datastore.
Specified by:
connect in interface dkDatastore
Overrides:
connect in class dkAbstractDatastore
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.

connect

public void connect(java.lang.String server_name,
                    java.lang.String port,
                    char communication_type)
             throws DKException,
                    java.lang.Exception
Connects to a datastore.
Specified by:
connect in interface dkDatastoreIntTS
Parameters:
server_name - the hostname where the text server is located
port - the port where the text server is located
communication_type - the communication type T for TCPIP or P for PIPES

disconnect

public void disconnect()
                throws DKException,
                       java.lang.Exception
Disconnects from the datastore.
Specified by:
disconnect in interface dkDatastore
Overrides:
disconnect in class dkAbstractDatastore

getOption

public java.lang.Object getOption(int option)
                           throws DKException,
                                  java.lang.Exception
Gets a datastore option.
Specified by:
getOption in interface dkDatastore
Overrides:
getOption in class dkAbstractDatastore
Parameters:
option - the option identifier
Returns:
an option value

setOption

public void setOption(int option,
                      java.lang.Object value)
               throws DKException,
                      java.lang.Exception
Sets a datastore option.
Specified by:
setOption in interface dkDatastore
Overrides:
setOption in class dkAbstractDatastore
Parameters:
option - the option identifier
value - the option value

evaluate

public java.lang.Object evaluate(java.lang.String command,
                                 short commandLangType,
                                 DKNVPair[] params)
                          throws DKException,
                                 java.lang.Exception
Evaluates the query.
Specified by:
evaluate in interface dkDatastore
Overrides:
evaluate in class dkAbstractDatastore
Parameters:
command - a query string
commandLang - a query type
params - additional query option in name/value pair
Returns:
a collection of the results

evaluate

public java.lang.Object evaluate(dkQuery query)
                          throws DKException,
                                 java.lang.Exception
Evaluates the query.
Specified by:
evaluate in interface dkDatastore
Overrides:
evaluate in class dkAbstractDatastore
Parameters:
query - a query object
Returns:
a collection of the results

evaluate

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

execute

public dkResultSetCursor execute(java.lang.String command,
                                 short commandLangType,
                                 DKNVPair[] params)
                          throws DKException,
                                 java.lang.Exception
Executes the query.
Specified by:
execute in interface dkDatastore
Overrides:
execute in class dkAbstractDatastore
Parameters:
command - a query string
commandLang - a query type
params - additional query option in name/value pair
Returns:
resultSetCursor which represents a datastore cursor.

execute

public dkResultSetCursor execute(dkQuery query)
                          throws DKException,
                                 java.lang.Exception
Executes the query.
Specified by:
execute in interface dkDatastore
Overrides:
execute in class dkAbstractDatastore
Parameters:
query - a query object
Returns:
resultSetCursor which represents a datastore cursor.

execute

public dkResultSetCursor execute(DKCQExpr cqe)
                          throws DKException,
                                 java.lang.Exception
Executes the query.
Specified by:
execute in interface dkDatastore
Overrides:
execute in class dkAbstractDatastore
Parameters:
qe - a common query expression object
Returns:
resultSetCursor which represents a datastore cursor.

executeWithCallback

public void executeWithCallback(dkQuery query,
                                dkCallback callbackObj)
                         throws DKException,
                                java.lang.Exception
Executes the query with callback function.
Specified by:
executeWithCallback in interface dkDatastore
Overrides:
executeWithCallback in class dkAbstractDatastore
Parameters:
qo - 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
Executes the query with callback function.
Specified by:
executeWithCallback in interface dkDatastore
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 qe,
                                dkCallback callbackObj)
                         throws DKException,
                                java.lang.Exception
Executes the query with callback function.
Specified by:
executeWithCallback in interface dkDatastore
Overrides:
executeWithCallback in class dkAbstractDatastore
Parameters:
qe - a common query expression object
callbackObj - a dkCallback object

createQuery

public dkQuery createQuery(java.lang.String command,
                           short commandLangType,
                           DKNVPair[] params)
                    throws DKException,
                           java.lang.Exception
Creates a query object.
Specified by:
createQuery in interface dkDatastore
Overrides:
createQuery in class dkAbstractDatastore
Parameters:
command - a query string
commandLang - a query type
params - additional query option in name/value pair
Returns:
a query object

createQuery

public dkQuery createQuery(DKCQExpr qe)
                    throws DKException,
                           java.lang.Exception
Creates a query object.
Specified by:
createQuery in interface dkDatastore
Overrides:
createQuery in class dkAbstractDatastore
Parameters:
qe - a common query expression object

addObject

public void addObject(dkDataObject ddo)
               throws DKException,
                      java.lang.Exception
Adds a DDO to this datastore.
Specified by:
addObject in interface dkDatastore
Overrides:
addObject in class dkAbstractDatastore
Parameters:
ddo - the ddo to be added to this datastore

deleteObject

public void deleteObject(dkDataObject ddo)
                  throws DKException,
                         java.lang.Exception
Deletes a DDO from this datastore.
Specified by:
deleteObject in interface dkDatastore
Overrides:
deleteObject in class dkAbstractDatastore
Parameters:
ddo - the ddo to be deleted from this datastore

retrieveObject

public void retrieveObject(dkDataObject ddo)
                    throws DKException,
                           java.lang.Exception
Retrieves a DDO from this datastore.
Specified by:
retrieveObject in interface dkDatastore
Overrides:
retrieveObject in class dkAbstractDatastore
Parameters:
ddo - the ddo to be retrieved from this datastore

updateObject

public void updateObject(dkDataObject ddo)
                  throws DKException,
                         java.lang.Exception
Updates this DDO in this datastore.
Specified by:
updateObject in interface dkDatastore
Overrides:
updateObject in class dkAbstractDatastore
Parameters:
ddo - the ddo to be updated in this datastore

commit

public void commit()
            throws DKException,
                   java.lang.Exception
Commits a datastore transaction.
Specified by:
commit in interface dkDatastore
Overrides:
commit in class dkAbstractDatastore

rollback

public void rollback()
              throws DKException,
                     java.lang.Exception
Rollbacks a datastore transaction.
Specified by:
rollback in interface dkDatastore
Overrides:
rollback in class dkAbstractDatastore

isConnected

public boolean isConnected()
                    throws java.lang.Exception
Checks to see if the datastore is connected.
Specified by:
isConnected in interface dkDatastore
Overrides:
isConnected in class dkAbstractDatastore
Returns:
true if connected

datastoreName

public java.lang.String datastoreName()
                               throws java.lang.Exception
Gets the name of this datastore object. Usually this represents a the name of server for the datastore.
Specified by:
datastoreName in interface dkDatastore
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.
Specified by:
datastoreType in interface dkDatastore
Overrides:
datastoreType in class dkAbstractDatastore
Returns:
datastore type

connection

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

handle

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

userName

public java.lang.String userName()
                          throws java.lang.Exception
Gets the user name for this datastore object
Specified by:
userName in interface dkDatastore
Overrides:
userName in class dkAbstractDatastore
Returns:
user name

listDataSources

public dkCollection listDataSources()
                             throws DKException,
                                    java.lang.Exception
Lists the available datastore sources that can be used to connect with.
Specified by:
listDataSources in interface dkDatastore
Overrides:
listDataSources in class dkAbstractDatastore
Returns:
a collection of server definitions

listDataSourceNames

public java.lang.String[] listDataSourceNames()
                                       throws DKException,
                                              java.lang.Exception
Lists the available datastore source names that can be used to connect with.
Specified by:
listDataSourceNames in interface dkDatastore
Overrides:
listDataSourceNames in class dkAbstractDatastore
Returns:
an array of server names

listServers

public java.lang.Object listServers()
                             throws DKException,
                                    java.lang.Exception
Deprecated. Replace by listDataSources

Lists the available datastore sources that can be used to connect with.
Specified by:
listServers in interface dkDatastore
Overrides:
listServers in class dkAbstractDatastore
Returns:
a collection of server definitions
See Also:
listDataSources()

listSchema

public java.lang.Object listSchema()
                            throws DKException,
                                   java.lang.Exception
Deprecated. Replace by listEntities

Lists the entities that belong to this datastore.
Specified by:
listSchema in interface dkDatastore
Overrides:
listSchema in class dkAbstractDatastore
Returns:
an object that contains the schema
See Also:
listEntities()

listSchemaAttributes

public java.lang.Object listSchemaAttributes(java.lang.String schemaEntry)
                                      throws DKException,
                                             java.lang.Exception
Deprecated. Replace by listEntityAttributes

Lists the attributes that belong to a schema.
Specified by:
listSchemaAttributes in interface dkDatastore
Overrides:
listSchemaAttributes in class dkAbstractDatastore
Parameters:
schemaEntry - the name of the schema.
Returns:
an object that contains the attributes that belong to this schema
See Also:
listEntityAttrs(java.lang.String)

listEntities

public dkCollection listEntities()
                          throws DKException,
                                 java.lang.Exception
Gets a list of entities from persistent datastore
Specified by:
listEntities in interface dkDatastore
Overrides:
listEntities in class dkAbstractDatastore
Returns:
a collection of entity defs
Throws:
DKException - if error occurs

listEntityNames

public java.lang.String[] listEntityNames()
                                   throws DKException,
                                          java.lang.Exception
Gets a list of entity names from persistent datastore
Specified by:
listEntityNames in interface dkDatastore
Overrides:
listEntityNames in class dkAbstractDatastore
Returns:
an array of entity 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.
Specified by:
listEntityAttrs in interface dkDatastore
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.
Specified by:
listEntityAttrNames in interface dkDatastore
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

startUpdateIndex

public void startUpdateIndex(java.lang.String indexName)
                      throws DKException,
                             java.lang.Exception
Starts the indexing process.
Specified by:
startUpdateIndex in interface dkDatastoreIntTS
Parameters:
indexName - the name of the search index.

clearIndex

public void clearIndex(java.lang.String indexName)
                throws DKException,
                       java.lang.Exception
Clears all the indexed terms from a search index.
Specified by:
clearIndex in interface dkDatastoreIntTS
Parameters:
indexName - the name of the search index.

createIndex

public void createIndex(DKIndexInfoTS newIndex)
                 throws DKException,
                        java.lang.Exception
Creates a search index.
Specified by:
createIndex in interface dkDatastoreIntTS
Parameters:
newIndex - the search index to be created.

deleteIndex

public void deleteIndex(java.lang.String indexName)
                 throws DKException,
                        java.lang.Exception
Deletes a search index.
Specified by:
deleteIndex in interface dkDatastoreIntTS
Parameters:
indexName - the name of a search index.

getIndexInformation

public DKIndexInfoTS getIndexInformation(java.lang.String indexName)
                                  throws DKException,
                                         java.lang.Exception
Gets the index information about a search index.
Specified by:
getIndexInformation in interface dkDatastoreIntTS
Parameters:
indexName - the name of a search index.
Returns:
a search index object which contains search index information.

getIndexFunctionStatus

public DKIndexFuncStatusTS getIndexFunctionStatus(java.lang.String indexName)
                                           throws DKException,
                                                  java.lang.Exception
Gets the indexing function status, document, and document message queue count for a search index.
Specified by:
getIndexFunctionStatus in interface dkDatastoreIntTS
Parameters:
indexName - the name of a search index.
Returns:
a search index function status object which contains the indexing function status.

setIndexFunctionStatus

public void setIndexFunctionStatus(java.lang.String indexName,
                                   int actionId)
                            throws DKException,
                                   java.lang.Exception
Sets the indexing function status for a search index.
Specified by:
setIndexFunctionStatus in interface dkDatastoreIntTS
Parameters:
indexName - the name of a search index.
actionId - the indicator applied to a text search function. It can be enabled, disabled or reset.

datastoreDef

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

getMatches

public DKMatchesInfoTS getMatches(dkResultSetCursor cursor,
                                  java.lang.String documentId,
                                  java.lang.String textIndexName,
                                  boolean useDictionary)
                           throws DKException,
                                  java.lang.Exception
Gets the match information given indexName and document ID.
Specified by:
getMatches in interface dkDatastoreIntTS
Returns:
A DKMatchesInfoTS object that contains match information

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.
Specified by:
registerMapping in interface dkDatastore
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 for this datastore.
Specified by:
unRegisterMapping in interface dkDatastore
Overrides:
unRegisterMapping in class dkAbstractDatastore
Parameters:
mappingName - name of the mapping information
Returns:
an array of register mapping objects' names

listMappingNames

public java.lang.String[] listMappingNames()
                                    throws DKException,
                                           java.lang.Exception
Gets the list of the register mappings for this datastore
Specified by:
listMappingNames in interface dkDatastore
Overrides:
listMappingNames in class dkAbstractDatastore
Returns:
an array of register mapping objects' names

getMapping

public dkSchemaMapping getMapping(java.lang.String mappingName)
                           throws DKException,
                                  java.lang.Exception
Gets mapping information for this datastore.
Specified by:
getMapping in interface dkDatastore
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.
Specified by:
getExtension in interface dkDatastore
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.
Specified by:
addExtension in interface dkDatastore
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
Removes an existing extension object.
Specified by:
removeExtension in interface dkDatastore
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 the names of the extension objects.
Specified by:
listExtensionNames in interface dkDatastore
Overrides:
listExtensionNames in class dkAbstractDatastore
Returns:
an array of extension object 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.
Specified by:
createDDO in interface dkDatastore
Overrides:
createDDO in class dkAbstractDatastore
Parameters:
objectType - the object type you want 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

destroy

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

getRSCCnt

public int getRSCCnt()

getCallbkCnt

public int getCallbkCnt()

EIP Java APIs

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