IBM Information Integrator for Content V8.2 APIs

com.ibm.mm.sdk.common.infomining
Class DKIKFCatalog

java.lang.Object
  |
  +--com.ibm.mm.sdk.common.infomining.DKIKFCatalog

public abstract class DKIKFCatalog
extends java.lang.Object

A catalog is an object that can be used to store, retrieve and search for records.


Constructor Summary
protected DKIKFCatalog()
          Objects can be obtained from DKIKFLibrary.
 
Method Summary
abstract  void createRecord(DKIKFRecord record, DKIKFCategory[] categories)
          Creates a new record in the catalog and assigns it to the specified categories.
abstract  void deleteRecord(java.lang.String pid)
          Deletes the record with the specified PID in the catalog.
abstract  DKIKFCategory[] getCategoriesForRecord(java.lang.String pid)
          Returns all categories to which the record with the specifed PID is assigned.
abstract  java.lang.String getDescription()
          Returns the description for the catalog.
abstract  java.lang.String getName()
          Returns the name of the catalog.
abstract  DKIKFRecord getRecord(java.lang.String pid)
          Returns the record for the specified PID.
abstract  DKIKFRecord getRecord(java.lang.String pid, java.lang.String[] keys)
          Returns the record for the specified PID containing only the values for the specified keys.
abstract  DKIKFSchema getSchema()
          Returns the schema of the catalog.
abstract  DKIKFService getService()
          Returns the service object used by this catalog.
abstract  DKIKFTaxonomy getTaxonomy()
          Returns the most recent version of the catalogs taxonomy.
abstract  java.sql.Timestamp getTaxonomyLastModified()
          Returns the time the taxonomy has been last modified (categories created, deleted or renamed).
abstract  boolean recordExists(java.lang.String pid)
          Checks if a record with the specified PID exists in the specified catalog.
abstract  DKIKFSearchResult searchRecords(java.lang.String queryString, DKIKFSearchConfiguration configuration)
          Searches for records using the specified query string and search configuration.
abstract  void updateRecord(DKIKFRecord record)
          Updates the record in the catalog.
abstract  void updateRecord(DKIKFRecord record, DKIKFCategory[] categories)
          Updates the record in the catalog.
abstract  void updateRecord(java.lang.String pid, DKIKFCategory[] categories)
          Updates the category assignmet of the record with the specified PID.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DKIKFCatalog

protected DKIKFCatalog()
Objects can be obtained from DKIKFLibrary.
Method Detail

getName

public abstract java.lang.String getName()
                                  throws DKIKFNoSuchCatalogException
Returns the name of the catalog.
Returns:
the catalog name
Throws:
DKIKFNoSuchCatalogException - if the catalog doesn't exist in the library
DKIKFAuthorizationException - if the user or group does not have the privilege IKFRetrieveCatalog

getDescription

public abstract java.lang.String getDescription()
                                         throws DKIKFNoSuchCatalogException
Returns the description for the catalog.
Returns:
the catalog description
Throws:
DKIKFNoSuchCatalogException - if the catalog doesn't exist in the library
DKIKFAuthorizationException - if the user or group does not have the privilege IKFRetrieveCatalog

getTaxonomyLastModified

public abstract java.sql.Timestamp getTaxonomyLastModified()
                                                    throws DKIKFNoSuchCatalogException
Returns the time the taxonomy has been last modified (categories created, deleted or renamed).
Returns:
the catalog name
Throws:
DKIKFNoSuchCatalogException - if the catalog doesn't exist in the library
DKIKFAuthorizationException - if the user or group does not have the privilege IKFRetrieveCatalog

getSchema

public abstract DKIKFSchema getSchema()
                               throws DKIKFNoSuchCatalogException
Returns the schema of the catalog.
Returns:
the catalog schema
Throws:
DKIKFNoSuchCatalogException - if the catalog doesn't exist in the library
DKIKFAuthorizationException - if the user or group does not have the privilege IKFRetrieveCatalog

getTaxonomy

public abstract DKIKFTaxonomy getTaxonomy()
                                   throws DKIKFNoSuchCatalogException
Returns the most recent version of the catalogs taxonomy. Each time the method is called a new taxonomy object is returned. Use the times returned by DKIKFTaxonomy.getTimestamp() and getTaxonomyLastModified() to compare a retrieved taxonomy to the current catalog taxonomy.
Returns:
the catalog taxonomy
Throws:
DKIKFNoSuchCatalogException - if the catalog doesn't exist in the library
DKIKFAuthorizationException - if the user or group does not have the privileges IKFRetrieveCatalog and IKFRetrieveCategory

recordExists

public abstract boolean recordExists(java.lang.String pid)
                              throws DKIKFNoSuchCatalogException
Checks if a record with the specified PID exists in the specified catalog.
Returns:
true if the record exists;false otherwise
Throws:
DKIKFNoSuchCatalogException - if the catalog doesn't exist in the library
DKIKFAuthorizationException - if the user or group does not have the privileges IKFRetrieveCatalog and IKFRetrieveRecord
See Also:
createRecord(DKIKFRecord,DKIKFCategory[]), deleteRecord(String), getRecord(String)

createRecord

public abstract void createRecord(DKIKFRecord record,
                                  DKIKFCategory[] categories)
                           throws DKIKFNoSuchCatalogException,
                                  DKIKFRecordAlreadyExistsException,
                                  DKIKFNoSuchCategoryException,
                                  DKIKFSizeOutOfBoundsException
Creates a new record in the catalog and assigns it to the specified categories. The content of the record is copied to the catalog. Subsequent changes to the record object do not effect the stored record. Use one of the updateRecord methods to update the record in the catalog.
Parameters:
record - the record to be created in the catalog
Throws:
DKIKFNoSuchCatalogException - if the catalog doesn't exist in the library
DKIKFRecordAlreadyExistsException - if a record with the PID stored in the record object already exists in the catalog
DKIKFEmptyCategoryArrayException - if the specified category array is empty
DKIKFNoSuchCategoryException - if at least one of the specified categories doesn't exist
DKIKFNoSuchKeyException - if the specified record contains a key that is not available in the catalog schema
DKIKFInvalidTypeException - if the specified record contains an value that is of the wrong type according to the catalog schema
DKIKFSizeOutOfBoundsException - if the specified record exceeds the database limits
DKIKFAuthorizationException - if the user or group does not have the privileges IKFRetrieveCatalog, IKFRetrieveCategory and IKFCreateRecord
See Also:
deleteRecord(String), updateRecord(DKIKFRecord,DKIKFCategory[]), getRecord(String)

deleteRecord

public abstract void deleteRecord(java.lang.String pid)
                           throws DKIKFNoSuchCatalogException,
                                  DKIKFNoSuchRecordException
Deletes the record with the specified PID in the catalog.
Parameters:
pid - the PID of the record to be deleted
Throws:
DKIKFNoSuchCatalogException - if the catalog doesn't exist in the library
DKIKFNoSuchRecordException - if a record with the specified PID doesn't exist in the catalog
DKIKFAuthorizationException - if the user or group does not have the privileges IKFRetrieveCatalog and IKFDeleteRecord
See Also:
createRecord(DKIKFRecord,DKIKFCategory[]), updateRecord(DKIKFRecord,DKIKFCategory[]), getRecord(String)

updateRecord

public abstract void updateRecord(DKIKFRecord record)
                           throws DKIKFNoSuchCatalogException,
                                  DKIKFNoSuchRecordException,
                                  DKIKFSizeOutOfBoundsException
Updates the record in the catalog. The record attributes are updated, while the category assignment is left alone.
Parameters:
record - the record to be used for update
Throws:
DKIKFNoSuchCatalogException - if the catalog doesn't exist in the library
DKIKFNoSuchRecordException - if the record doesn't exist in the catalog
DKIKFNoSuchKeyException - if the specified record contains a key that is not available in the catalog schema
DKIKFInvalidTypeException - if the specified record contains an value that is of the wrong type according to the catalog schema
DKIKFSizeOutOfBoundsException - if the specified record exceeds the database limits
DKIKFAuthorizationException - if the user or group does not have the privileges IKFRetrieveCatalog, IKFRetrieveRecord and IKFUpdateRecord
See Also:
createRecord(DKIKFRecord,DKIKFCategory[]), deleteRecord(String), updateRecord(DKIKFRecord,DKIKFCategory[]), updateRecord(String,DKIKFCategory[]), getRecord(String)

updateRecord

public abstract void updateRecord(DKIKFRecord record,
                                  DKIKFCategory[] categories)
                           throws DKIKFNoSuchCatalogException,
                                  DKIKFNoSuchRecordException,
                                  DKIKFNoSuchCategoryException,
                                  DKIKFSizeOutOfBoundsException
Updates the record in the catalog. After a call to this method the record is assigned to the specified categories only.
Parameters:
record - the record to be used for update
cateogries - the categories to which the record will be assigned
Throws:
DKIKFNoSuchCatalogException - if the catalog doesn't exist in the library
DKIKFNoSuchRecordException - if the record doesn't exist in the catalog
DKIKFEmptyCategoryArrayException - if the specified category array is empty
DKIKFNoSuchCategoryException - if at least one of the specified categories doesn't exist
DKIKFNoSuchKeyException - if the specified record contains a key that is not available in the catalog schema
DKIKFInvalidTypeException - if the specified record contains an value that is of the wrong type according to the catalog schema
DKIKFSizeOutOfBoundsException - if the specified record exceeds the database limits
DKIKFAuthorizationException - if the user or group does not have the privileges IKFRetrieveCatalog, IKFRetrieveRecord, IKFRetrieveCategory and IKFUpdateRecord
See Also:
createRecord(DKIKFRecord,DKIKFCategory[]), deleteRecord(String), updateRecord(DKIKFRecord), updateRecord(String,DKIKFCategory[]), getRecord(String)

updateRecord

public abstract void updateRecord(java.lang.String pid,
                                  DKIKFCategory[] categories)
                           throws DKIKFNoSuchCatalogException,
                                  DKIKFNoSuchRecordException,
                                  DKIKFNoSuchCategoryException
Updates the category assignmet of the record with the specified PID. After a call to this method the record is assigned to the specified categories only.
Parameters:
pid - the PID of the record to be updated
cateogries - the categories to which the record will be assigned
Throws:
DKIKFNoSuchCatalogException - if the catalog doesn't exist in the library
DKIKFNoSuchRecordException - if the record doesn't exist in the catalog
DKIKFEmptyCategoryArrayException - if the specified category array is empty
DKIKFNoSuchCategoryException - if at least one of the specified categories doesn't exist
DKIKFAuthorizationException - if the user or group does not have the privileges IKFRetrieveCatalog, IKFRetrieveRecord, IKFRetrieveCategory and IKFUpdateRecord
See Also:
createRecord(DKIKFRecord,DKIKFCategory[]), deleteRecord(String), updateRecord(DKIKFRecord), updateRecord(DKIKFRecord,DKIKFCategory[]), getRecord(String)

getRecord

public abstract DKIKFRecord getRecord(java.lang.String pid)
                               throws DKIKFNoSuchCatalogException,
                                      DKIKFNoSuchRecordException
Returns the record for the specified PID.
Parameters:
pid - the PID of the record to be retrieved
Returns:
the record
Throws:
DKIKFNoSuchCatalogException - if the catalog doesn't exist in the library
DKIKFNoSuchRecordException - if the record doesn't exist in the catalog
DKIKFAuthorizationException - if the user or group does not have the privileges IKFRetrieveCatalog and IKFRetrieveRecord
See Also:
createRecord(DKIKFRecord,DKIKFCategory[]), deleteRecord(String), updateRecord(DKIKFRecord), updateRecord(DKIKFRecord,DKIKFCategory[]), updateRecord(String,DKIKFCategory[])

getRecord

public abstract DKIKFRecord getRecord(java.lang.String pid,
                                      java.lang.String[] keys)
                               throws DKIKFNoSuchCatalogException,
                                      DKIKFNoSuchRecordException
Returns the record for the specified PID containing only the values for the specified keys.
Parameters:
pid - the PID of the record to be retrieved
keys - the keys of the values to be retrieved
Returns:
the record
Throws:
DKIKFNoSuchCatalogException - if the catalog doesn't exist in the library
DKIKFNoSuchRecordException - if the record doesn't exist in the catalog
DKIKFNoSuchKeyException - if one of the the specified keys is not available in the catalog schema
DKIKFAuthorizationException - if the user or group does not have the privileges IKFRetrieveCatalog and IKFRetrieveRecord
See Also:
createRecord(DKIKFRecord,DKIKFCategory[]), deleteRecord(String), updateRecord(DKIKFRecord), updateRecord(DKIKFRecord,DKIKFCategory[]), updateRecord(String,DKIKFCategory[])

getCategoriesForRecord

public abstract DKIKFCategory[] getCategoriesForRecord(java.lang.String pid)
                                                throws DKIKFNoSuchCatalogException,
                                                       DKIKFNoSuchRecordException
Returns all categories to which the record with the specifed PID is assigned. The returned categories are not part of a runtime taxonomy.
Throws:
DKIKFNoSuchCatalogException - if the catalog doesn't exist in the library
DKIKFNoSuchRecordException - if the record doesn't exist in the catalog
DKIKFAuthorizationException - if the user or group does not have the privileges IKFRetrieveCatalog, IKFRetrieveRecord and IKFRetrieveCategory

searchRecords

public abstract DKIKFSearchResult searchRecords(java.lang.String queryString,
                                                DKIKFSearchConfiguration configuration)
                                         throws DKIKFNoSuchCatalogException,
                                                DKIKFTaxonomyNotSetException,
                                                DKIKFNoSuchCategoryException,
                                                DKIKFQueryException
Searches for records using the specified query string and search configuration. A call to this method overwrites the results of a previous search. The result contains an iterator over record objects, where each record contains the values according to the keys specified in the search configuration.
The query syntax looks like:
 query_string         ::= term
 term                 ::= ( term )
                      ::= single_term
                      ::= compound_term
 single_term          ::= category_term
                      ::= text_search_term
                      ::= string_term
                      ::= number_term
 compound_term        ::= term binary_bool_operator term
                      ::= unary_bool_operator single_term
 category_term        ::= ( DKIKFCategory category_operator category_path_value )
 text_search_term     ::= ( "attribute name" CONTAINS text_search_value )
 string_term          ::= ( "attribute name" string_operator string_value )
 number_term          ::= ( "attribute name" basic_operator number_value )
 binary_bool_operator ::= AND | OR
 unary_bool_operator  ::= NOT
 category_operator    ::= >= | =
 string_operator      ::= LIKE | basic_operator
 basic_operator       ::= > | < | <= | >= | != | =
 category_path_value  ::= "category path"
 text_search_value    ::= "'string'"
 string_value         ::= "string"
 number_value         ::= "integer" | "decimal number"
 
Example:

("IKF_CONTENT" CONTAINS "'bird'") AND (DKIKFCategory = "root/nature")

Parameters:
queryString - the query string built according to the syntax described above.
configuration - the configuration for the search.
Returns:
the search result containing an iterator over record objects
Throws:
DKIKFNoSuchCatalogException - if the catalog doesn't exist in the library
DKIKFTaxonomyNotSetException - if the query contains a category but no taxonomy has been set in the search configuration
DKIKFNoSuchCategoryException - if the query contains a category which is not part of the taxonomy in the search configuration
DKIKFQueryException - if the query cannot be processed
DKIKFAuthorizationException - if the user or group does not have the privileges IKFRetrieveCatalog and IKFRetrieveRecord
See Also:
DKIKFWebQueryConverter

getService

public abstract DKIKFService getService()
Returns the service object used by this catalog.
Returns:
the service object

IBM Information Integrator for Content V8.2 APIs

© Copyright International Business Machines Corporation 1996, 2003 IBM Corp. All rights reserved.