Enterprise Information Portal APIs

com.ibm.mm.sdk.common
Class DKDatastoreDefICM

java.lang.Object
  |
  +--com.ibm.mm.sdk.common.dkAbstractDatastoreDef
        |
        +--com.ibm.mm.sdk.common.DKDatastoreDefICM
All Implemented Interfaces:
dkDatastoreDef, DKMessageId, java.io.Serializable

public class DKDatastoreDefICM
extends dkAbstractDatastoreDef
implements java.io.Serializable

DKDatastoreDefICM implements the interface dkDatastoreDef. It provides the actual functions to access and manipulate Content Manager Version 8 and later datastore metadata and related information. It contains methods for the the creation, deletion, update and listing of item types, item type views, atributes and attribute groups plus methods for managing link type, semantic type, XDO classification, component type index and so on.

See Also:
Serialized Form

Field Summary
static int DK_ICM_ALL_ITEM_TYPES
           
static int DK_ICM_PARTS_ITEM_TYPES
           
static int DK_ICM_SYSTEM_ITEM_TYPES
           
static int DK_ICM_USER_ITEM_TYPES
           
 
Fields inherited from interface com.ibm.mm.sdk.common.DKMessageId
    For details, see the class or interface
 
Constructor Summary
DKDatastoreDefICM(dkDatastore ds)
          Constructs a datastore definition for Content Manager server.
 
Method Summary
 void add(dkAttrDef attrObj)
          Adds the given attribute definition to the persistent store.
 int add(dkAttrGroupDef attrGroupObj)
          Adds the given attribute group to the persistent store.
 void add(dkCollection relColl)
          Add the given collection of the item type relation objects to the persistent store
 void add(DKComponentTypeIndexDefICM ComponentTypeIndexObj)
          Adds the given component type index object to the persistent store.
 void add(dkEntityDef itemTypeObj)
          Adds the given entity definition to the persistent store.
 void add(DKItemTypeRelationDefICM itRelationObj)
          Adds the given item type relation object to the persistent store
 int add(DKLinkTypeDefICM linkTypeObj)
          Adds the given link type object to the persistent store.
 int add(DKSemanticTypeDefICM semanticTypeObj)
          Adds the given semantic type object to the persistent store.
 int add(DKXDOClassificationDefICM xdoClassificationObj)
          Adds the given XDO classification object to the persistent store.
 dkAttrDef createAttr()
          Creates a new attribute definition on the object.
 dkAttrGroupDef createAttrGroup()
          Creates a attribute group definintion and returns it to caller.
 dkAttrGroupDef createAttrGroup(int option)
          Creates an attribute group defintion based on the option requested and returns it to the caller as a dkAttrGroupDef object.
 dkEntityDef createEntity()
          Creates a new instance of an entity object and returns it to the caller.
 dkEntityDef createItemType()
          Creates a new instatnce of DKItemTypeDefICM and returns the object to its caller This is a specific interface for Content Manager server where entities are equivalent to item types.
 dkDatastoreAdmin datastoreAdmin()
          Gets a datastore administration object for this datastore.
 void del(dkAttrDef attrObj)
          Deletes the given attribute definition from the persistent store.
 void del(dkAttrGroupDef attrGroupObj)
          Deletes the given attribute group from the persistent store.
 void del(dkCollection relColl)
          Deletes the given collection of item type relation objects from the persistent store
 void del(DKComponentTypeIndexDefICM componentTypeIndexObj)
          Deletes the given component type index object from the persistent store.
 void del(dkEntityDef itemTypeObj)
          Deletes the definition of an item type from the persistent store.
 void del(DKItemTypeRelationDefICM itRelationObj)
          Deletes the given item type relation object from the persistent store
 void del(DKLinkTypeDefICM linkTypeObj)
          Deletes the given link type definition from the persistent store.
 void del(DKSemanticTypeDefICM semanticTypeObj)
          Deletes the given semantic type object from the persistent store.
 void del(DKXDOClassificationDefICM xdoClassificationObj)
          Deletes the given XDO classification object from the persistant store.
 DKComponentTypeViewDefICM getActiveComponentTypeView(java.lang.String compTypeName)
          Gets the active view for the given component type name.
 DKItemTypeViewDefICM getActiveItemTypeView(java.lang.String itemTypeName)
          Gets the active view for the given item type name.
 dkCollection listActiveComponentTypeViews()
          Gets a list active views for all the component types the user has access to.
 dkCollection listActiveComponentTypeViews(int options)
          Gets a list of the active component type view definitions from the persistent store.
 dkCollection listActiveItemTypeViews()
          Gets a list active views for the user-defined item types the user has access to.
 dkCollection listActiveItemTypeViews(int options)
          Gets a list of active views from a persistent store.
 dkCollection listAttrGroup()
          Gets a list of attribute groups defined in the current server.
 dkCollection listAttrGroup(int option)
          Gets different lists of attributes group defined in the current server according to the option.
 java.lang.String[] listAttrGroupNames()
          Gets an array of names of the user-defined attribute groups on the current server
 java.lang.String[] listAttrGroupNames(int option)
          Gets different lists of the attribute group names defined in the current server according to the option value.
 java.lang.String[] listAttrNames()
          Gets a list of the user-defined attribute names in the datastore.
 java.lang.String[] listAttrNames(int option)
          Gets different lists of the attribute names defined in the datastore.
 dkCollection listAttrs()
          Gets a list of user-defined attributes from the datastore.
 dkCollection listAttrs(int option)
          Gets different lists of attributes defined in the datastore.
 dkCollection listComponentTypeIndexes(java.lang.String compTypeName)
          Lists component type indexes for the given name defined in this datastore.
 java.lang.String[] listComponentTypeIndexNames(java.lang.String compTypeName)
          Lists component type index names defined in this datastore.
 java.lang.String[] listComponentTypeNames()
          Gets a list of user-defined component type names from the persistent store.
 java.lang.String[] listComponentTypeNames(int options)
          Gets a list of component type names from the persistent store.
 dkCollection listComponentTypes()
          Gets a list of user-defined component type definitions from a persistent store.
 dkCollection listComponentTypes(int options)
          Gets a list of component type definitions from a persistent store.
 java.lang.String[] listComponentTypeViewNames()
          Gets a list of component type view names from the persistent store.
 dkCollection listComponentTypeViews()
          Gets a list of componnent type views from persistent store
 java.lang.String[] listDefinedPartTypeNames()
          Gets a list of part item type names.
 dkCollection listEntities()
          Gets a list of user defined item type definitions from a persistent store.
 dkCollection listEntities(DKNVPair[] options)
          Gets a list of item type definitions from the persistent store.
 dkCollection listEntities(int options)
          Gets a list of item type definitions from the persistent store.
 dkCollection listEntityAttrGroup(java.lang.String entityName)
          Gets a list of the attributes groups for a given item type.
 java.lang.String[] listEntityAttrGroupNames(java.lang.String entityName)
          Gets a list of the attribute group names for a given item type.
 java.lang.String[] listEntityAttrNames(java.lang.String entityName)
          Gets a list of the attribute names for a given item type.
 dkCollection listEntityAttrs(java.lang.String entityName)
          Gets a list of the attribute definitions for a given item type.
 java.lang.String[] listEntityNames()
          Gets a list of user defined item type names from a persistent store.
 java.lang.String[] listEntityNames(int options)
          Gets an array of item type names from the persistent store.
 dkCollection listItemTypeRelations()
          List all item type relation definitions from the persistent store
 dkCollection listItemTypeViews()
          Gets a list of Item type views from persistent store
 java.lang.String[] listLinkTypeNames()
          Lists the link type names defined in this datastore.
 dkCollection listLinkTypes()
          Lists link types defined in this datastore.
 java.lang.String[] listSemanticTypeNames()
          Lists semantic type names defined in this datastore.
 dkCollection listSemanticTypes()
          Lists semantic types defined in this datastore.
 java.lang.String[] listXdoClassificationNames()
          Lists the XDO classification names defined in this datastore.
 dkCollection listXdoClassifications()
          Lists the XDO classification definitions in this datastore.
 void makeViewActive(DKItemTypeViewDefICM itemTypeView)
          Sets the given item type view as the active view.
 void makeViewsActive(dkCollection views)
          Sets a collection of item type view as the active view.
 void rebuildComponentType(java.lang.String compTypeName)
          Rebuilds the neccessary dynamic linked library for access module functions for a given component type name.
 void reorgTextIndexes(int lCompTypeId)
          Reorganizes a text index, to optimize performance.
 dkAttrDef retrieveAttr(java.lang.String attrName)
          Retrieves an attribute definition from the persistent store by name.
 dkAttrGroupDef retrieveAttrGroup(java.lang.String attrGroupName)
          Retrieves an attribute group with the persistent store.
 DKComponentTypeDefICM retrieveComponentType(java.lang.String compTypeName)
          Retrieves the component type definition with the given name from the persistent store.
 DKComponentTypeIndexDefICM retrieveComponentTypeIndex(java.lang.String ComponentTypeIndexName, java.lang.String compTypeName)
          Retrieves the definition of the component type index for the given component type index for the given name from the persistent store.
 dkEntityDef retrieveComponentTypeView(java.lang.String cpViewName)
          Retrieves the definition for the given component type view name from the persistent store.
 dkEntityDef retrieveEntity(java.lang.String entityName)
          Gets the definition for the given item type name from the persistent store
 DKItemTypeRelationDefICM retrieveItemTypeRelation(int srcItemTypeID, int tgtItemTypeID)
          Retrieves the item type relation definition for the given source item type and target item type from the persistent store
 dkCollection retrieveItemTypeRelations(int srcItemTypeID)
          Retrieves a collection of the item type relation objects for the given source item type id from the persistent store
 DKItemTypeViewDefICM retrieveItemTypeView(java.lang.String itViewName)
          Retrieves the definition for the given item type view from the persistent store.
 DKLinkTypeDefICM retrieveLinkType(java.lang.String linkTypeName)
          retrieves the link type object for a given name from persistent store.
 DKSemanticTypeDefICM retrieveSemanticType(java.lang.String semanticTypeName)
          Retrieves the semantic type object for the given name from the persistent store.
 DKXDOClassificationDefICM retrieveXdoClassification(java.lang.String xdoClassificationName)
          Gets the definition of XDO classification object for the given name from the persistent store.
 void update(dkAttrDef attrObj)
          Updates the definition of the specified attribute on the current datastore.
 void update(dkAttrGroupDef attrGroupObj)
          Updates the given attribute group in the persistent store.
 void update(dkCollection relColl)
          Updates the given collection of item type relation objects in the persistent store
 void update(dkEntityDef itemTypeObj)
          Updates the item type defintion in the persistent store.
 void update(DKItemTypeRelationDefICM itRelationObj)
          Updates the given item type relation object in the persistent store
 void update(DKLinkTypeDefICM linkTypeObj)
          Updates the given link type definition in the persistent store.
 void update(DKSemanticTypeDefICM semanticTypeObj)
          Updates the given semantic type object in the persistent store.
 void update(DKXDOClassificationDefICM xdoClassificationObj)
          Updates the given XDO classification object in the persistent store.
 void updateTextIndexes(int lCompTypeId)
          Forces text index to process documents in the queue.
 
Methods inherited from class com.ibm.mm.sdk.common.dkAbstractDatastoreDef
clearCache, datastoreName, datastoreType, deleteEntity, getDatastore, getEntity, listEntityNames, listSearchableEntities, listSearchableEntities, listSearchableEntities, listSearchableEntityNames, listSearchableEntityNames, listSearchableEntityNames, listSearchTemplateNames, listSearchTemplates, setDatastore
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DK_ICM_USER_ITEM_TYPES

public static final int DK_ICM_USER_ITEM_TYPES

DK_ICM_ALL_ITEM_TYPES

public static final int DK_ICM_ALL_ITEM_TYPES

DK_ICM_SYSTEM_ITEM_TYPES

public static final int DK_ICM_SYSTEM_ITEM_TYPES

DK_ICM_PARTS_ITEM_TYPES

public static final int DK_ICM_PARTS_ITEM_TYPES
Constructor Detail

DKDatastoreDefICM

public DKDatastoreDefICM(dkDatastore ds)
Constructs a datastore definition for Content Manager server.
Parameters:
ds - datastore
Method Detail

createEntity

public dkEntityDef createEntity()
                         throws DKException,
                                java.lang.Exception
Creates a new instance of an entity object and returns it to the caller. This is a generic interface inherited from dkDatastoreDef. For Content Manager datastore. the entity object is DKItemTypeDefICM. This method is retruning the same results as createItemType() below.
Overrides:
createEntity in class dkAbstractDatastoreDef
Returns:
Returns a new instance of DKItemTypeDefICM object, a subclass of dkEntityDef.
Throws:
if - an error occurs
See Also:
createItemType()

createItemType

public dkEntityDef createItemType()
                           throws DKException,
                                  java.lang.Exception
Creates a new instatnce of DKItemTypeDefICM and returns the object to its caller This is a specific interface for Content Manager server where entities are equivalent to item types.
Returns:
Returns a new instance of DKItemTypeDefICM object, a subclass of dkEntityDef
Throws:
if - an error occurs
See Also:
createEntity()

add

public void add(dkEntityDef itemTypeObj)
         throws DKException,
                java.lang.Exception
Adds the given entity definition to the persistent store. In Content Manager, an entity is an item-type or item-type view.
Overrides:
add in class dkAbstractDatastoreDef
Parameters:
itemTypeObj - item type object to be created in the persistent store. It can be DKItemTypeDefICM or DKItemTypeViewDefICM object
Throws:
DKException - if the item type object is invalid or an error occurs in the server.

del

public void del(dkEntityDef itemTypeObj)
         throws DKException,
                java.lang.Exception
Deletes the definition of an item type from the persistent store.
Overrides:
del in class dkAbstractDatastoreDef
Parameters:
itemTypeObj - a dkEntityDef object to delete. In datastore ICM, the entity def object can be either DKItemTypeDefICM or DKItemTypeViewDefICM object.
Throws:
DKException - if the itemTypeObj is invalid or the entity does not exist in the server.

update

public void update(dkEntityDef itemTypeObj)
            throws DKException,
                   java.lang.Exception
Updates the item type defintion in the persistent store. The type of updates you can do is limited. You can not remove attriubtes from the attribute collection associate with this entity
Parameters:
itemTypeObj - the dkEntityDef object to be updated. In datastore ICM, the entityDef object can be either DKItemTypeDefICM or DKItemTypeViewDefICM object
Throws:
DKException - if the itemTypeObj is invalid or the entity does not exist in the server.

retrieveEntity

public dkEntityDef retrieveEntity(java.lang.String entityName)
                           throws DKException,
                                  java.lang.Exception
Gets the definition for the given item type name from the persistent store
Overrides:
retrieveEntity in class dkAbstractDatastoreDef
Parameters:
entityName - the name of the item type to be retrieved.
Returns:
a dkEntityDef object describing the entity; return null if the entity is not found. In datastore ICM, the entity def object can be either DKItemTypeDefICM or DKItemTypeViewDefICM object
Throws:
DKException - if if error occurs.

listEntities

public dkCollection listEntities(int options)
                          throws DKException,
                                 java.lang.Exception
Gets a list of item type definitions from the persistent store. The option value determines the scope of the returned list Valid option values are: override listEntities in class dkAbstractDatastoreDef
Overrides:
listEntities in class dkAbstractDatastoreDef
Parameters:
options - to filter the results. See above list for valid option values.
Returns:
Returns a collection of item type definition objects, that is DKItemTypeDefICM and/or DKItemTypeViewDefICM, subclasses of dkEntityDef.
Throws:
DKException - if error occurs.

listEntities

public dkCollection listEntities()
                          throws DKException,
                                 java.lang.Exception
Gets a list of user defined item type definitions from a persistent store.
Overrides:
listEntities in class dkAbstractDatastoreDef
Returns:
a collection of entity definition objects, that is DKItemTypeDefICM and/or DKItemTypeViewDefICM. subclasses of dkEntityDef
Throws:
DKException - if error occurs.

listEntities

public dkCollection listEntities(DKNVPair[] options)
                          throws DKException,
                                 java.lang.Exception
Gets a list of item type definitions from the persistent store. The list is filtered based on input parameter.
Overrides:
listEntities in class dkAbstractDatastoreDef
Parameters:
options - DKNVPair[] options for listEntities
Supported values for NVPair options :
  • NAME: DKConstant.DK_ICM_ENTITY_TYPE, VALUE: integer_item_type_filter
    Valid values for integer_item_type_filter:
    • DKConstant.DK_ICM_BASE Lists base item type definitions
    • DKConstant.DK_ICM_VIEW Lists item type view definitions
    • DKConstant.DK_ICM_BASE_AND_VIEW List base item type definitions and view definitions
  • NAME: DKConstant.DK_ICM_PRIV_TYPE, VALUE: String[]
    This option allows the user to retrieve the entity definition based on the passed privileges.
    Some of the system defined privileges value of DKConstant.DK_ICM_PRIV_TYPE
    • DK_ICM_PRIV_ITEM_SUPER_ACCESS
    • DK_ICM_PRIV_ITEM_SQL_SELECT
    • DK_ICM_PRIV_ITEM_TYPE_QUERY
    • DK_ICM_PRIV_ITEM_QUERY
    • DK_ICM_PRIV_ITEM_ADD
    • DK_ICM_PRIV_ITEM_SET_USER_ATTR
    • DK_ICM_PRIV_ITEM_SET_SYS_ATTR
    • DK_ICM_PRIV_ITEM_DELETE
    • DK_ICM_PRIV_ITEM_MOVE
    • DK_ICM_PRIV_ITEM_LINK_TO
    • DK_ICM_PRIV_ITEM_LINKED
    • DK_ICM_PRIV_ITEM_OWN
    • DK_ICM_PRIV_ITEM_OWNED

Throws:
DKException - if error occurs.

listEntityNames

public java.lang.String[] listEntityNames(int options)
                                   throws DKException,
                                          java.lang.Exception
Gets an array of item type names from the persistent store. Valid option values are: Overrides listEnittyNames in class dkAbstractDatastoreDef
Overrides:
listEntityNames in class dkAbstractDatastoreDef
Parameters:
options - based on which item types are filtered.
Returns:
a collection of entity definitions.
Throws:
DKException - if error occurs.

listEntityNames

public java.lang.String[] listEntityNames()
                                   throws DKException,
                                          java.lang.Exception
Gets a list of user defined item type names from a persistent store.
Overrides:
listEntityNames in class dkAbstractDatastoreDef
Returns:
an array of item type names.
Throws:
DKException - if an error occurs.

listDefinedPartTypeNames

public java.lang.String[] listDefinedPartTypeNames()
                                            throws DKException,
                                                   java.lang.Exception
Gets a list of part item type names.
Returns:
an array of part type item type names.
Throws:
DKException - if an error occurs.

listEntityAttrs

public dkCollection listEntityAttrs(java.lang.String entityName)
                             throws DKException,
                                    java.lang.Exception
Gets a list of the attribute definitions for a given item type.
Overrides:
listEntityAttrs in class dkAbstractDatastoreDef
Parameters:
entityName - the name of item type which has the attributes.
Returns:
a collection of attirbute definition objects, DKAttrDefICM.
Throws:
DKException - if the item type name does not exist in the persistent store

listEntityAttrNames

public java.lang.String[] listEntityAttrNames(java.lang.String entityName)
                                       throws DKException,
                                              java.lang.Exception
Gets a list of the attribute names for a given item type.
Overrides:
listEntityAttrNames in class dkAbstractDatastoreDef
Parameters:
entityName - the name of the item type which has the attributes.
Returns:
an array of attribute names.
Throws:
DKException - if the item type name does not exist.

listEntityAttrGroup

public dkCollection listEntityAttrGroup(java.lang.String entityName)
                                 throws DKException,
                                        java.lang.Exception
Gets a list of the attributes groups for a given item type.
Parameters:
entityName - the name of the item type which has the attribute groups.
Returns:
a dkCollection of dkAttrGroupDef objects.
Throws:
DKException - if the item type name does not exist.

listEntityAttrGroupNames

public java.lang.String[] listEntityAttrGroupNames(java.lang.String entityName)
                                            throws DKException,
                                                   java.lang.Exception
Gets a list of the attribute group names for a given item type.
Parameters:
entityName - the name of item type which has the attribute groups.
Returns:
an array of attribute names.
Throws:
DKException - if the item type name does not exist.

datastoreAdmin

public dkDatastoreAdmin datastoreAdmin()
                                throws DKException,
                                       java.lang.Exception
Gets a datastore administration object for this datastore.
Overrides:
datastoreAdmin in class dkAbstractDatastoreDef
Returns:
a dkDatastoreAdmin object, in this case, it is DKDatastoreAdminICM object

retrieveItemTypeView

public DKItemTypeViewDefICM retrieveItemTypeView(java.lang.String itViewName)
                                          throws DKException,
                                                 java.lang.Exception
Retrieves the definition for the given item type view from the persistent store.
Parameters:
itViewName - name of item type view to retrieve
Returns:
the DKItemTypeViewICM object with the specified name. Returns null if the item type view does not exist.

retrieveComponentTypeView

public dkEntityDef retrieveComponentTypeView(java.lang.String cpViewName)
                                      throws DKException,
                                             java.lang.Exception
Retrieves the definition for the given component type view name from the persistent store. Returns the component type view definition as a dkEntityDef object.
Parameters:
compTypeViewName - name of the component type view to retrieve.
Returns:
a subclass of dkEntityDef object, DKComponentTypeViewDefICM with the given name.
Throws:
DKException - if the component type view name does not exist.

listComponentTypeViews

public dkCollection listComponentTypeViews()
                                    throws DKException,
                                           java.lang.Exception
Gets a list of componnent type views from persistent store
Throws:
DKException - if the component type view name does not exist.

listItemTypeViews

public dkCollection listItemTypeViews()
                               throws DKException,
                                      java.lang.Exception
Gets a list of Item type views from persistent store
Returns:
Returns a collection of item type view definition objects, DKItemTypeViewDefICM.
Throws:
DKException - if the component type view name does not exist.

listComponentTypeViewNames

public java.lang.String[] listComponentTypeViewNames()
                                              throws DKException,
                                                     java.lang.Exception
Gets a list of component type view names from the persistent store.
Returns:
Returns an array of component type view names.

getActiveComponentTypeView

public DKComponentTypeViewDefICM getActiveComponentTypeView(java.lang.String compTypeName)
                                                     throws DKException,
                                                            java.lang.Exception
Gets the active view for the given component type name.
Parameters:
compTypeName - - the name of the component type
Returns:
Returns a DKComponentTypeViewDefICM object, the active view for the specified component type. Returns null if there is no active view for this component type name.

getActiveItemTypeView

public DKItemTypeViewDefICM getActiveItemTypeView(java.lang.String itemTypeName)
                                           throws DKException,
                                                  java.lang.Exception
Gets the active view for the given item type name.
Parameters:
itemTypeName - - the name of the item type
Returns:
a DKItemTypeViewDefICM object, the active view for the specified item type. Returns null if there is no active view for this item type name.

makeViewActive

public void makeViewActive(DKItemTypeViewDefICM itemTypeView)
                    throws DKException,
                           java.lang.Exception
Sets the given item type view as the active view.
Parameters:
itemTypeView - the view to make active.

makeViewsActive

public void makeViewsActive(dkCollection views)
                     throws DKException,
                            java.lang.Exception
Sets a collection of item type view as the active view.
Parameters:
itemTypeView - the view to make active.

listActiveComponentTypeViews

public dkCollection listActiveComponentTypeViews()
                                          throws DKException,
                                                 java.lang.Exception
Gets a list active views for all the component types the user has access to.

listActiveItemTypeViews

public dkCollection listActiveItemTypeViews()
                                     throws DKException,
                                            java.lang.Exception
Gets a list active views for the user-defined item types the user has access to.
Returns:
a collection of item type view definitions, DKItemTypeVewiDefICM objects.

listActiveItemTypeViews

public dkCollection listActiveItemTypeViews(int options)
                                     throws DKException,
                                            java.lang.Exception
Gets a list of active views from a persistent store. The valid option values are
Parameters:
options - based on which item types are filtered.
Returns:
a collection of entity definitions.
Throws:
DKException - if error occurs.

listActiveComponentTypeViews

public dkCollection listActiveComponentTypeViews(int options)
                                          throws DKException,
                                                 java.lang.Exception
Gets a list of the active component type view definitions from the persistent store.
Parameters:
options, - the valid option values are
  • DK_ICM_ALL_COMPONENT_TYPES: all of the component type views
  • DK_ICM_SYSTEM_COMPONENT_TYPES: system defined component type views
  • DK_ICM_USER_COMPONENT_TYPES: user defined component type views
Returns:
a collection of the component type view definition objects of active component type views, DKComponentTypeViewDefICM.
Throws:
DKException - if an error occurs.

listComponentTypes

public dkCollection listComponentTypes(int options)
                                throws DKException,
                                       java.lang.Exception
Gets a list of component type definitions from a persistent store.
Parameters:
options, - the valid option values are
  • DK_ICM_ALL_COMPONENT_TYPES: Lists all component types
  • DK_ICM_SYSTEM_COMPONENT_TYPES: Lists system defined component types
  • DK_ICM_USER_COMPONENT_TYPES: Lists user defined component types
Returns:
a collection of entity definitions based on option.
Throws:
DKException - if an error occurs.

listComponentTypes

public dkCollection listComponentTypes()
                                throws DKException,
                                       java.lang.Exception
Gets a list of user-defined component type definitions from a persistent store.
Returns:
a collection of user-defined component type definition objects, DKComponentTypeDefICM.
Throws:
DKException - if an error occurs.

listComponentTypeNames

public java.lang.String[] listComponentTypeNames(int options)
                                          throws DKException,
                                                 java.lang.Exception
Gets a list of component type names from the persistent store.
Parameters:
options, - the valid option values are
  • DK_ICM_ALL_COMPONENT_TYPES: lists all component types
  • DK_ICM_SYSTEM_COMPONENT_TYPES: lists system defined component types
  • DK_ICM_USER_COMPONENT_TYPES: lists user defined component types
Returns:
an array of component type names
Throws:
DKException - if an error occurs.

listComponentTypeNames

public java.lang.String[] listComponentTypeNames()
                                          throws DKException,
                                                 java.lang.Exception
Gets a list of user-defined component type names from the persistent store.
Returns:
an array of user-defined component type names.
Throws:
DKException - if an error occurs.

rebuildComponentType

public void rebuildComponentType(java.lang.String compTypeName)
                          throws DKException,
                                 java.lang.Exception
Rebuilds the neccessary dynamic linked library for access module functions for a given component type name. This function should be called when a previously created item type failed due to errors. Note: If the application already has the Component Type id, then it should be calling rebuildComponentType(short compTypeId) method instead due to performance.
Parameters:
compTypeName - component type name to be rebuild.

retrieveComponentType

public DKComponentTypeDefICM retrieveComponentType(java.lang.String compTypeName)
                                            throws DKException,
                                                   java.lang.Exception
Retrieves the component type definition with the given name from the persistent store.
Returns:
the component object, DKComponentTypeDefICM.
Throws:
DKException - if an error occurs.

updateTextIndexes

public void updateTextIndexes(int lCompTypeId)
                       throws DKException,
                              java.lang.Exception
Forces text index to process documents in the queue.
Parameters:
component_id - id of the component containing indexes to be updated

reorgTextIndexes

public void reorgTextIndexes(int lCompTypeId)
                      throws DKException,
                             java.lang.Exception
Reorganizes a text index, to optimize performance.
Parameters:
component_id - id of the component containing indexes to be reorganized

listAttrs

public dkCollection listAttrs()
                       throws DKException,
                              java.lang.Exception
Gets a list of user-defined attributes from the datastore.
Returns:
a dkCollection of dkAttrDef objects.
Throws:
DKException - if a problem is encountered.

listAttrs

public dkCollection listAttrs(int option)
                       throws DKException,
                              java.lang.Exception
Gets different lists of attributes defined in the datastore.
Parameters:
option, - one of the following:
  • DK_ICM_ALL_ATTR -- to list all the attirubtes
  • DK_ICM_USER_ATTR -- to list the user-defined attributes
  • DK_ICM_SYSTEM_ATTR -- to list the system-defined attirubtes
Returns:
a dkCollection of dkAttrDef objects.
Throws:
DKException - if an error occurs.

listAttrNames

public java.lang.String[] listAttrNames()
                                 throws DKException,
                                        java.lang.Exception
Gets a list of the user-defined attribute names in the datastore.
Returns:
an array of attribute names.
Throws:
DKException - if an error occurs.

listAttrNames

public java.lang.String[] listAttrNames(int option)
                                 throws DKException,
                                        java.lang.Exception
Gets different lists of the attribute names defined in the datastore.
Parameters:
option, - one of the following value:
  • DK_ICM_ALL_ATTR -- to list all the attirubtes
  • DK_ICM_USER_ATTR -- to list the user-defined attributes
  • DK_ICM_SYSTEM_ATTR -- to list the system attirubtes
Returns:
an array of attribute names.
Throws:
DKException - if an error is encountered.

retrieveAttr

public dkAttrDef retrieveAttr(java.lang.String attrName)
                       throws DKException,
                              java.lang.Exception
Retrieves an attribute definition from the persistent store by name. Returns null if the attribute does not exist. If cache is on, get it from memory, otherwise get from database, and add to the cache. If cache is off, retrieve from database.
Parameters:
attrName - the name of the attribute to be retrieved.
Returns:
the attribute definition as a dkAttrDef object.
Throws:
DKException - if an error is encountered.

createAttr

public dkAttrDef createAttr()
                     throws DKException,
                            java.lang.Exception
Creates a new attribute definition on the object.
Returns:
a new dkAttrDef object dkAttrDef object - DKAttrDefICM.
Throws:
DKException - if an error is encountered.

add

public void add(dkAttrDef attrObj)
         throws DKException,
                java.lang.Exception
Adds the given attribute definition to the persistent store.
Parameters:
attrObj - attribute to be added.
Throws:
DKException - if an error occurs.

del

public void del(dkAttrDef attrObj)
         throws DKException,
                java.lang.Exception
Deletes the given attribute definition from the persistent store.
Parameters:
attrObj - the attribute to be deleted.
Throws:
DKException - if an error occurs.

update

public void update(dkAttrDef attrObj)
            throws DKException,
                   java.lang.Exception
Updates the definition of the specified attribute on the current datastore.
Parameters:
attrObj - the attribute to be updated.
Throws:
DKException - if the attrObj is invalid or does not exist in the server.

listAttrGroup

public dkCollection listAttrGroup()
                           throws DKException,
                                  java.lang.Exception
Gets a list of attribute groups defined in the current server.
Returns:
a dkCollection of dkAttrGroupDef objects.
Throws:
DKException - if an error is encountered.

listAttrGroup

public dkCollection listAttrGroup(int option)
                           throws DKException,
                                  java.lang.Exception
Gets different lists of attributes group defined in the current server according to the option. The valid option valuse are
Parameters:
option - one of values above
Returns:
a dkCollection of dkAttrGroupDef objects.
Throws:
DKException - if a problem is encountered.

listAttrGroupNames

public java.lang.String[] listAttrGroupNames()
                                      throws DKException,
                                             java.lang.Exception
Gets an array of names of the user-defined attribute groups on the current server
Returns:
an array of attribute group names.
Throws:
DKException - if an error is encountered.

listAttrGroupNames

public java.lang.String[] listAttrGroupNames(int option)
                                      throws DKException,
                                             java.lang.Exception
Gets different lists of the attribute group names defined in the current server according to the option value. The valid option values are
Parameters:
option - one of the values above
Returns:
an array of attribute group names.
Throws:
DKException - if an error is encountered.

createAttrGroup

public dkAttrGroupDef createAttrGroup()
                               throws DKException,
                                      java.lang.Exception
Creates a attribute group definintion and returns it to caller. This returns the definition as a dkAttrGroupDef object.
Returns:
new dkAttrGroupDef object - DKAttrGroupDefICM.
Throws:
DKException - if an error is encountered.

createAttrGroup

public dkAttrGroupDef createAttrGroup(int option)
                               throws DKException,
                                      java.lang.Exception
Creates an attribute group defintion based on the option requested and returns it to the caller as a dkAttrGroupDef object.
Parameters:
option - only DK_ICM_REFERENCE_ATTRGROUP is supported, This call request to create a reference attribute group.
Returns:
new dkAttrGroupDef object.
Throws:
DKException - if an error is encountered
java.lang.Exception - if an error is encountered

add

public int add(dkAttrGroupDef attrGroupObj)
        throws DKNotExistException,
               DKException,
               java.lang.Exception
Adds the given attribute group to the persistent store.
Parameters:
attrGroupObj - attribute group object to be added.
Returns:
the attribute group identifier.
Throws:
DKException - if an error is encountered.

del

public void del(dkAttrGroupDef attrGroupObj)
         throws DKException,
                java.lang.Exception
Deletes the given attribute group from the persistent store.
Parameters:
attrGroupObj - the attribute group object to be deleted.
Throws:
DKException - if an error is encountered.

update

public void update(dkAttrGroupDef attrGroupObj)
            throws DKException,
                   java.lang.Exception
Updates the given attribute group in the persistent store.
Parameters:
attrGroupObj - attribute group object to be updated.
Throws:
DKException - if an error is encountered.

retrieveAttrGroup

public dkAttrGroupDef retrieveAttrGroup(java.lang.String attrGroupName)
                                 throws DKException,
                                        java.lang.Exception
Retrieves an attribute group with the persistent store.
Parameters:
name - the name of the attribute group to be retrieved.
Returns:
a dkAttrGroupDef object with the specified name.
Throws:
DKException - if an error is encountered.

listLinkTypes

public dkCollection listLinkTypes()
                           throws DKException,
                                  java.lang.Exception
Lists link types defined in this datastore.
Returns:
a collection of link type definition objects.
Throws:
DKException - if an error is encountered.

listLinkTypeNames

public java.lang.String[] listLinkTypeNames()
                                     throws DKException,
                                            java.lang.Exception
Lists the link type names defined in this datastore.
Returns:
an array of the link type names.
Throws:
DKException - if an error is encountered.

retrieveLinkType

public DKLinkTypeDefICM retrieveLinkType(java.lang.String linkTypeName)
                                  throws DKException,
                                         java.lang.Exception
retrieves the link type object for a given name from persistent store.
Parameters:
linkTypeName - - the name of link type to be retrieved.
Returns:
the DKLinkTypeDefICM object with the given name.
Throws:
DKException - if the link type doesnot exist in the persistent store.

add

public int add(DKLinkTypeDefICM linkTypeObj)
        throws DKException,
               java.lang.Exception
Adds the given link type object to the persistent store.
Parameters:
linkTypeObj - - link type object to be added.
Returns:
link object identifier.
Throws:
DKException - if an error is encountered.

del

public void del(DKLinkTypeDefICM linkTypeObj)
         throws DKException,
                java.lang.Exception
Deletes the given link type definition from the persistent store.
Parameters:
linkTypeObj - - the link type object to be deleted.
Throws:
DKException - if an error is encountered.

update

public void update(DKLinkTypeDefICM linkTypeObj)
            throws DKException,
                   java.lang.Exception
Updates the given link type definition in the persistent store.
Parameters:
linkTypeObj - - the link type objec to be updated.
Throws:
DKException - if an error is encountered.

listSemanticTypes

public dkCollection listSemanticTypes()
                               throws DKException,
                                      java.lang.Exception
Lists semantic types defined in this datastore.
Returns:
a collection of semantic type objects - DKSemanticTypeDefICM.
Throws:
DKException - if an error is encountered.

listSemanticTypeNames

public java.lang.String[] listSemanticTypeNames()
                                         throws DKException,
                                                java.lang.Exception
Lists semantic type names defined in this datastore.
Returns:
a string array of the semantic type names.
Throws:
DKException - if an error is encountered.

retrieveSemanticType

public DKSemanticTypeDefICM retrieveSemanticType(java.lang.String semanticTypeName)
                                          throws DKException,
                                                 java.lang.Exception
Retrieves the semantic type object for the given name from the persistent store.
Parameters:
semanticTypeName - - the name of semantic type to be retrieved.
Returns:
the DKSemanticTypeDefICM object with the given name.
Throws:
DKException - if the semantic type does not exist.

add

public int add(DKSemanticTypeDefICM semanticTypeObj)
        throws DKException,
               java.lang.Exception
Adds the given semantic type object to the persistent store.
Parameters:
semanticTypeObj - semantic type object to be added.
Returns:
the integer identifier of the semantic type object.
Throws:
DKException - if an error is encountered.

del

public void del(DKSemanticTypeDefICM semanticTypeObj)
         throws DKException,
                java.lang.Exception
Deletes the given semantic type object from the persistent store.
Parameters:
semanticTypeObj - - the semantic type object to be deleted.
Throws:
DKException - if an error is encountered.

update

public void update(DKSemanticTypeDefICM semanticTypeObj)
            throws DKNotExistException,
                   DKException,
                   java.lang.Exception
Updates the given semantic type object in the persistent store.
Parameters:
semanticTypeObj - the semantic type object to be updated.
Throws:
DKException - if an error is encountered.

listXdoClassifications

public dkCollection listXdoClassifications()
                                    throws DKException,
                                           java.lang.Exception
Lists the XDO classification definitions in this datastore.
Returns:
a collection of XDO Classification objects, DKXDOClassificationDefICM.
Throws:
DKException - if an error is encountered.

listXdoClassificationNames

public java.lang.String[] listXdoClassificationNames()
                                              throws DKException,
                                                     java.lang.Exception
Lists the XDO classification names defined in this datastore.
Returns:
a String array of XDO classification names.
Throws:
DKException - if an error is encountered.

retrieveXdoClassification

public DKXDOClassificationDefICM retrieveXdoClassification(java.lang.String xdoClassificationName)
                                                    throws DKException,
                                                           java.lang.Exception
Gets the definition of XDO classification object for the given name from the persistent store.
Parameters:
xdoClassificationName - name of XDO Classification to be retrieved.
Returns:
the XDO classification object. XDO classification name.
Throws:
DKException - if the XDO classification does not exist in the datastore.

add

public int add(DKXDOClassificationDefICM xdoClassificationObj)
        throws DKException,
               java.lang.Exception
Adds the given XDO classification object to the persistent store.
Parameters:
xdoClassificationObj - XDO classification object to be added.
Returns:
an integer identifier of the XDO classification object.
Throws:
DKException - if an error is encountered.

del

public void del(DKXDOClassificationDefICM xdoClassificationObj)
         throws DKException,
                java.lang.Exception
Deletes the given XDO classification object from the persistant store.
Parameters:
XdoClassificationObj - - the definition of the XDO classification object to be deleted.
Throws:
DKException - if an error is encountered.

update

public void update(DKXDOClassificationDefICM xdoClassificationObj)
            throws DKNotExistException,
                   DKException,
                   java.lang.Exception
Updates the given XDO classification object in the persistent store.
Parameters:
xdoClassificationObj - - the definition of the XDO classification object to be updated.
Throws:
DKException - if an error is encountered.

listComponentTypeIndexes

public dkCollection listComponentTypeIndexes(java.lang.String compTypeName)
                                      throws DKException,
                                             java.lang.Exception
Lists component type indexes for the given name defined in this datastore.
Parameters:
compTypeName - - the component type name.
Returns:
a collection of component type index objects DKComponentTypeIndexDefICM.
Throws:
DKException - if an error is encountered.

listComponentTypeIndexNames

public java.lang.String[] listComponentTypeIndexNames(java.lang.String compTypeName)
                                               throws DKException,
                                                      java.lang.Exception
Lists component type index names defined in this datastore.
Returns:
a String array of component type index names.
Throws:
DKException - if an error is encountered.

retrieveComponentTypeIndex

public DKComponentTypeIndexDefICM retrieveComponentTypeIndex(java.lang.String ComponentTypeIndexName,
                                                             java.lang.String compTypeName)
                                                      throws DKException,
                                                             java.lang.Exception
Retrieves the definition of the component type index for the given component type index for the given name from the persistent store.
Parameters:
componentTypeIndexName - - the name of the component type index to be retrieved.
Returns:
a DKComponentTypeIndexDefICM object.
Throws:
DKException - if the component type index does not exist.

add

public void add(DKComponentTypeIndexDefICM ComponentTypeIndexObj)
         throws DKException,
                java.lang.Exception
Adds the given component type index object to the persistent store.
Parameters:
componentTypeIndexObj - - the component type index object to be added.
Throws:
DKException - if an error is encountered.

del

public void del(DKComponentTypeIndexDefICM componentTypeIndexObj)
         throws DKException,
                java.lang.Exception
Deletes the given component type index object from the persistent store.
Parameters:
componentTypeIndexObj - - the component type index object to be deleted.
Throws:
DKException - if an error is encountered.

listItemTypeRelations

public dkCollection listItemTypeRelations()
                                   throws DKException,
                                          java.lang.Exception
List all item type relation definitions from the persistent store
Returns:
a collection of item type relation definition objects - DKItemTypeRelationDefICM.

retrieveItemTypeRelations

public dkCollection retrieveItemTypeRelations(int srcItemTypeID)
                                       throws DKException,
                                              java.lang.Exception
Retrieves a collection of the item type relation objects for the given source item type id from the persistent store
Parameters:
srcItemTypeID - - the identifier of the source item type to be retrieved.
Returns:
a collection of item type relation definition objects - DKItemTypeRelationDefICM.
Throws:
DKException - if an error occurs

retrieveItemTypeRelation

public DKItemTypeRelationDefICM retrieveItemTypeRelation(int srcItemTypeID,
                                                         int tgtItemTypeID)
                                                  throws DKException,
                                                         java.lang.Exception
Retrieves the item type relation definition for the given source item type and target item type from the persistent store
Parameters:
srcItemTypeID - - the identifier of the source item type to be retrieved
tgtItemTypeID - - the target item type id to be retrieved
Returns:
the item type definition object.
Throws:
DKException - if error occurs

add

public void add(DKItemTypeRelationDefICM itRelationObj)
         throws DKException,
                java.lang.Exception
Adds the given item type relation object to the persistent store
Parameters:
itRelationObj - - the item type relation object to be added.

add

public void add(dkCollection relColl)
         throws DKException,
                java.lang.Exception
Add the given collection of the item type relation objects to the persistent store
Parameters:
- - the relColl of the item type relation objects to be added.

del

public void del(DKItemTypeRelationDefICM itRelationObj)
         throws DKException,
                java.lang.Exception
Deletes the given item type relation object from the persistent store
Parameters:
itemTypeRelationObj - - the item type relation object to be deleted.

del

public void del(dkCollection relColl)
         throws DKException,
                java.lang.Exception
Deletes the given collection of item type relation objects from the persistent store
Parameters:
relColl - - the collection of the item type relation objects - DKItemTypeRelationDefICM to be deleted.

update

public void update(DKItemTypeRelationDefICM itRelationObj)
            throws DKException,
                   java.lang.Exception
Updates the given item type relation object in the persistent store
Parameters:
itemTypeRelationObj - the item type relation object to be updated.

update

public void update(dkCollection relColl)
            throws DKException,
                   java.lang.Exception
Updates the given collection of item type relation objects in the persistent store
Parameters:
relColl - the collection of the item type relation objects to be updated.

EIP Java APIs

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