Index

DKBlobDL

Purpose:

The DKBlobDL class is one of the concrete subclasses of dkBlob. DKBlobDL defines the public interface for BLOB parts in Content Manager. It inherits the public interface of dkBlob (and therefore from dkXDO and dkXDOBase) and implements any abstract functions present in the interfaces of those base classes.

Heirarchy:

dkDataObjectBase
    dkXDOBase
      dkXDO
       dkBlob
        DKBlobDL

Class summary:

public:
 
      DKString dumpContent ();
 
      DKBlobDL ();
      DKBlobDL (DKDatastoreDL* dsDL);
      DKBlobDL (DKDatastoreDL* dsDL, 
                const DKString& data);
      DKBlobDL (const DKBlobDL& blob);
 
      virtual ~DKBlobDL ();
 
      virtual DKString  getObjectType () const;
      virtual void       setNull ();
      virtual DKBoolean  isNull () const;
      virtual dkXDOBase&  operator= (const dkXDOBase& xdo);
      virtual DKBoolean   operator== (const dkXDOBase& xdo) const;
      virtual DKBoolean   operator!= (const dkXDOBase& xdo) const;
      virtual void  deletingValue ();
      virtual void  open ();
      virtual void  setPidObject (const DKPidXDO* pid);
      virtual const DKPidXDO*  getPidObject ();
      virtual void  setDatastore(dkDatastore* ds);
      virtual dkXDO&  add ();
      virtual dkXDO&  retrieve ();
      virtual dkXDO&  update ();
      virtual dkXDO&  del ();
      virtual dkXDO&     copyData (const dkXDO& xdo);
      virtual DKBoolean  compareData (const dkXDO& xdo);
      virtual DKBoolean  isContentChanged () const;
      virtual DKBoolean  isSet () const;
      virtual dkXDO* cloneSkeleton ();
      virtual DKString  getContent () const;
      virtual dkXDO&    setContent (const DKString& data);
      virtual long     size();
      virtual dkBlob&   getContentToClientFile (const char* fName,
                                                int fOpt) const;
      virtual dkBlob&  setContentFromClientFile (const char* fName);
      virtual dkBlob&  operator += (const dkBlob& blob);
      virtual dkBlob&  operator += (const DKString& data);
      virtual long  length () const;
      virtual long  indexOf (const DKString& data,
                             long startPos = 1) const;
      virtual long  indexOf (const dkBlob& blob,
                             long startPos = 1) const;
      virtual DKString  subString (long startPos,
                                   long len) const;
      virtual dkBlob&  remove (long startPos,
                               long len);
      virtual dkBlob&  insert (const DKString& data,
                               long startPos);
      virtual dkBlob&  insert (const dkBlob& blob,
                               long  startPos);
      virtual void  open (const char*  fName);
      virtual void  setClassOpenHandler (const char* hOpen,
                                         DKBoolean sysFlag);
      virtual void  setInstanceOpenHandler (const char* hOpen,
                                            DKBoolean sysFlag);
      virtual DKString   getOpenHandler ();
      virtual DKBoolean  isOpenSynchronous ();
      virtual dkBlob&  add (const char* fName);
      virtual dkBlob&  retrieve (const char* fName);
      virtual dkBlob&  update (const char* fName);
      virtual dkBlob&  del (DKBoolean flush);
      virtual long     retrieveAsync(long readLength, DKBoolean concateFlag);
      virtual long     retrieveAsyncNext();
      virtual void     retrieveAsyncEnd();
      DKString       getItemId () const;
      void           setItemId (const char* itemId);
      unsigned long  getPartId () const;
      void           setPartId (unsigned long partId);
      DKString       getRepType () const;
      void           setRepType (const char* repType);
      unsigned long  getContentClass ();
      void           setContentClass (unsigned long ccls);
      virtual unsigned long  getAffiliatedType ();
      virtual void           setAffiliatedType (unsigned long affType);
      virtual DKString getMimeType();
      virtual void     setMimeType(const char* mimeType);
      virtual void     setContentType(const char* contentType);
      DKAnnotation&  getAffiliatedData ();
      void           setAffiliatedData (const DKAnnotation& affData);
      DKString  mimeType ();
      DKString  getCreatedTimestamp ();
      DKString  getUpdatedTimestamp ();
      void      setUpdatedTimestamp (const DKString& timestamp);
      long  getRetrievalAction ();
      void  setRetrievalAction (long action);
      long  getSize ();
      void  setSize (long size);
      DKString  getSearchEngine ();
      void      setSearchEngine (const DKString& searchEngine);
      DKString  getSearchIndex ();
      void      setSearchIndex (const DKString& searchIndex);
      DKString  getSearchInfo ();
      void      setSearchInfo (const DKString& searchInfo);
      void      setToBeIndexed ();
      virtual DKBlobDL&  operator= (const DKBlobDL& aDKBlobDL);
      virtual DKBlobDL&  operator+ (const DKBlobDL& blob) const;
      virtual DKBlobDL&  operator+ (const DKString& data) const;
      friend  DKBlobDL&  operator+ (const DKString& data, 
                                    const DKBlobDL& blob);
      virtual DKBlobDL&  subLob (long startPos,
                                 long len) const;
      DKBoolean  getIndexFlag ();
      void       setIndexFlag (DKBoolean flag);
      void       setAffTocFlag (DKBoolean flag);
         virtual long  getRank ();
      virtual void  setRank (long r);
         virtual void  getOption (long option, 
                       DKAny& value);
      virtual void  setOption (long option, 
                       DKAny& value);
      DKBoolean  isCategoryOf (long cat);
      long  retrieveObjectState (long object);
      void  addExtension (const DKString& name,
                          const dkExtension* object);
      void  removeExtension (const DKString& name);
      void  setExtension (const DKString& name,
                          const dkExtension* object);
      const dkExtension*  getExtension (const DKString& name);
      void  changeStorage ();
      virtual DKBoolean  isMultiStreamBlob ();
      virtual void  setMultiStreamBlob (DKBoolean tf);
      virtual DKBoolean  isMultiStreamFlagSet ();
      virtual void  setMultiStreamFlag (DKBoolean tf);
      unsigned long  listStreamName (DKString* &stringArray) const;
      const DKString&  getStreamContent (const DKString& streamName) const;
      dkBlob&   setStreamContent (const DKString& streamName, 
                                 const DKString& data);
      long  streamLength (const DKString& streamName) const;  
      const DKAnnotationDL*  getAnnotationData ();
      void  setAnnotationData (const DKAnnotationDL* p);
};

Members:

Constructors and destructor
DKBlobDL provides three constructors including a copy constructor. Each constructor requires a DKDatastoreDL object, representing the Content Manager datastore associated with this object. The content of the object may be set by supplying a byte array stream.
DKBlobDL ();
  DKBlobDL (DKDatastoreDL* dsDL);
  DKBlobDL (DKDatastoreDL* dsDL, 
            const DKString& data);
  DKBlobDL (const DKBlobDL& blob);
  virtual ~DKBlobDL ();
 

Member functions

getObjectType
Gets the object type.
virtual DKString getObjectType () const;
 

setNull
Sets the part content to null (in memory).
virtual void setNull ();
 

isNull
Checks if the part content is null (in memory).
virtual DKBoolean isNull () const;
 

operator=
Assignment operator.
virtual dkXDOBase& operator= (const dkXDOBase& xdo);
 

operator==
Compares this object with the specified object. Returns true if both objects have the same value for each data member.
virtual DKBoolean operator== (const dkXDOBase& xdo) const;
 

operator!=
Compares this object with the specified object. Returns true if both objects do not have the same value for each data member.
virtual DKBoolean operator!= (const dkXDOBase& xdo) const;
 

deletingValue
deletingValue has been deprecated.
virtual void deletingValue ();
 

open
Unloads the object content to a client file with a system generated name, then synchronously invokes a default handler against the file.
virtual void open ();
 

setPidObject
Sets the PID information of this object with the new provided PID.
virtual void setPidObject (const DKPidXDO* pid);
 

getPidObject
Gets a copy of the persistent ID object of this object.
virtual const DKPidXDO*  getPidObject ();
 

setDatastore
Sets the reference to the owner datastore object.
virtual void  setDatastore(dkDatastore* ds);

add
Adds the object content from memory to the datastore.
virtual dkXDO&  add ();
 

retrieve
Retrieves the object content from the datastore to the memory buffer.
virtual dkXDO&  retrieve ();
 

update
Updates the object content in datastore with the content in memory.

virtual dkXDO&  update ();
 

del
Deletes the object content from datastore.
virtual dkXDO&  del ();
 

copyData
Replaces the content of this object with the content of the other XDO object.
virtual dkXDO& copyData (const dkXDO& xdo);
 

compareData
Compares the content of this object with the content of the other XDO object.
virtual DKBoolean compareData (const dkXDO& xdo);
 

isContentChanged
Checks if the part content changed (in memory).
virtual DKBoolean is ContentChanged () const;
 

isSet
Checks if the part content is set (in memory).
virtual DKBoolean  isSet () const;
 

cloneSkeleton
Clones this extended data object (XDO) with its persistent ID only (that is, with its data content set to empty).
virtual dkXDO& cloneSkeleton ();
 

getContent
Gets the content of this object.
virtual DKString  getContent () const;
 

setContent
Sets the content of this object with a byte array stream argument.
virtual dkXDO& setContent (const DKString& data);
 

size
Gets the size of this object content in the datastore.
virtual long size();

getContentToClientFile
Copies the large object (lob) data of this object to the given file.
virtual dkBlob& getContentToClientFile (const char* fName, int fOpt) const;

setContentFromClientFile
Replaces the LOB data of this object with the contents of the file name.
virtual dkBlob&  setContentFromClientFile (const char* fName);

operator +=
Concatenates this object with another DKBlobDL object. The resulting object replaces the existing contents of this object.
virtual dkBlob&  operator += (const dkBlob& blob);
 

operator +=
Concatenates this object with another string. The resulting object replaces the existing contents of this object.
virtual dkBlob&  operator += (const DKString& data);
 

length
Gets the length of this object content in memory.
virtual long  length () const;
 

indexOf
indexOf has been deprecated.
virtual long  indexOf (const DKString& data,long startPos = 1) const; 

indexOf
indexOf has been deprecated.
virtual long  indexOf (const dkBlob& blob,long startPos = 1) const; 

subString
subString has been deprecated.
  virtual DKString subString (long startPos, long len) const;
 

remove
remove has been deprecated.
virtual dkBlob&  remove (long startPos,
long len); 

insert
insert has been deprecated.
virtual dkBlob&  insert (const DKString& data, long startPos); virtual dkBlob&  insert (const dkBlob& blob, long  startPos); 

open
Unloads the object content to a file afileName provided by the application, then synchronously invokes a default handler against the file.
virtual void  open (const char* fName);
 

setClassOpenHandler
Sets the executable handler program name and whether this handler should be invoked synchronously or asynchronously for this object class.
virtual void  setClassOpenHandler (const char* hOpen, DKBoolean sysFlag);
 

setInstanceOpenHandler
Sets the executable handler program name and whether this handler should be invoked synchronously or asynchronously for this object instance.
virtual void  setInstanceOpenHandler (const char* hOpen, DKBoolean sysFlag);
 

getOpenHandler
Gets the current program name of the handler for this object instance.
virtual DKString getOpenHandler ();
 

isOpenSynchronous
Gets the current synchronization property.
virtual DKBoolean isOpenSynchronous ();
 

add
Adds the object content from an existing file to the datastore.
virtual dkBlob&  add (const char* fName);
 

retrieve
Retrieves the object content from the datastore to a file name.
virtual dkBlob& retrieve (const char* fName);
 

update
Updates the object content in datastore with a file.
virtual dkBlob& update (const char* fName);
 

del
Deletes the object content from datastore.
virtual dkBlob& del (DKBoolean flush);
 

retrieveAsync
Asynchrously retrieves the object content from the datastore to the memory buffer.

Parameters

readLength
The number of bytes to retrieve from the datastore into memory.

concateFlag
Indicates that the subsequent retrieved content will concatenate with the previous one (in the memory buffer), and returns the number of bytes left to be retrieved.
virtual long retrieveAsync(long readLength, DKBoolean concateFlag); 

retrieveAsyncNext
Continues the next retrieval, based on the retrieveAsync(readLength, concateFlag) setting, then returns the number of bytes left to be retrieved.
virtual long retrieveAsyncNext(); 

retrieveAsyncEnd
Ends the aynchronous retrieval action.
virtual void retrieveAsyncEnd(); 

getItemId
Gets the DL item ID of the object content.
DKString getItemId () const;
 

setItemId
Sets the DL item ID of the object content.
void setItemId (const char* itemId);
 

getPartId
Gets the part ID of this XDO.
unsigned long getPartId () const;
 

setPartId
Sets the part ID of this XDO.
void setPartId (unsigned long partId);
 

getRepType
Gets the DL representation type of the object content.
DKString getRepType () const;
 

setRepType
Sets the DL representation type of the object content.
void setRepType (const char* repType);
 

getContentClass
Gets the content class of the object.
unsigned long getContentClass ();
 

setContentClass
Sets the content class of the object.
void setContentClass (unsigned long ccls);
 

getAffiliatedType
Gets the affiliated type of the object.
virtual unsigned long getAffiliatedType ();
 

setAffiliatedType
Sets the affiliated type of the object. The valid values are:

DK_DL_ANNOTATION
Indicates that this object is an annotation for a document. It has a page number and XY coordinates of the position in the document.

DK_DL_BASE
This object is a base object, such as a TIFF file, and is not an annotation, note, or event.

DK_DL_EVENT
Indicates that this object is an event.

DK_DL_MGDS
This object is a machine generated data stream.

DK_DL_NOTE
This object is a note. If setAffiliatedType is not set, the default value is DK_DL_BASE.

virtual void setAffiliatedType (unsigned long affType);

getMimeType
Returns the MIME type that corresponds to the object's content class. If the MIME type is not defined in Content Manager for the specified content class, the program will get the MIME type from the cmbcc2mime.ini file specified by the user. If the cmbcc2mime.ini does not exist or if the MIME type is not defined for the specified content class in the cmbcc2mime.ini file, then the default MIME type text/plain will be returned.
virtual DKString getMimeType(); 

setMimeType
Sets the MIME type that corresponds to the object's content class.
virtual void setMimeType(const char* mimeType);

setContentType
Sets the document's file extension.
virtual void setContentType(const char* contentType);

getAffiliatedData
getAffiliatedData has been deprecated and replaced by getExtension.
DKAnnotation& getAffiliatedData (); 

setAffiliatedData
setAffiliatedData has been deprecated and replaced by setExtension.
void setAffiliatedData (const DKAnnotation& affData);
 

mimeType
mimeType has been deprecated and replaced by getMimeType.
DKString  mimeType (); 

getCreatedTimestamp
Gets the date & time that the object was created.
DKString getCreatedTimestamp ();
 

setCreatedTimestamp
Sets the date & time that the object was created.
void setCreatedTimestamp (const DKString& timestamp);

getUpdatedTimestamp
Gets the date & time that the object was updated.
DKString getUpdatedTimestamp ();
 

setUpdatedTimestamp
Sets the date & time that the object was updated.
void setUpdatedTimestamp (const DKString& timestamp);

getRetrievalAction
getRetrievalAction has been deprecated and replaced by getOption.
long getRetrievalAction (); 

setRetrievalAction
setRetrievalAction has been deprecated and replaced by setOption.
void setRetrievalAction (long action);
 

getSize
Gets the size of this object without retrieving the object content.

long getSize ();
 

setSize
Sets the size of this object.
void setSize (long size); 

getSearchEngine
getSearchEngine has been deprecated and replaced by getSearchEngine in the class DKSearchEngineInfoDL.
DKString getSearchEngine ();
 

setSearchEngine
setSearchEngine has been deprecated and replaced by setSearchEngine in the class DKSearchEngineInfoDL.
void setSearchEngine (const DKString& searchEngine);
 

getSearchIndex
getSearchIndex has been deprecated and replaced by getSearchIndex in the class DKSearchEngineInfoDL.
DKString getSearchIndex ();
 

setSearchIndex
setSearchIndex has been deprecated and replaced bysetSearchIndex in the class DKSearchEngineInfoDL.
void setSearchIndex (const DKString& searchIndex);
 

getSearchInfo
getSearchInfo has been deprecated and replaced bygetSearchInfo in the class DKSearchEngineInfoDL.
DKString getSearchInfo ();
 

setSearchInfo
setSearchInfo has been deprecated and replaced bysetSearchInfo in the class DKSearchEngineInfoDL.
void setSearchInfo (const DKString& searchInfo);
 

setToBeIndexed
Indexes an existing part object by search engine. Before using this function, you must set the extension object DKSearchEngineInfoDL by calling the setExtension function.
void setToBeIndexed ();
 

operator=
Assign the specified object to this object.
virtual DKBlobDL& operator= (const DKBlobDL& aDKBlobDL);
 

operator+
Concatenates this object with another DKBlobDL object and returns the resulting DKBlobDL object.
virtual DKBlobDL& operator+ (const DKBlobDL& blob) const;
 

operator+
Concatenates this object with a specified string object and returns the resulting object.
virtual DKBlobDL& operator+ (const DKString& data) const;
 

operator+
Concatenates the special string object and the specified DKBlobDL object and returns the resulting object.
friend DKBlobDL& operator+ (const DKString& data,const DKBlobDL& blob);
 

subLob
subLob has been deprecated.
virtual DKBlobDL& subLob (long startPos,
long len) const;

getIndexFlag
Gets the index flag.
DKBoolean getIndexFlag (); 

setIndexFlag
Sets the index flag.
void setIndexFlag (DKBoolean flag); 

setAffTocFlag
Sets a flag to indicate that SimLibSetItem Affiliated TOC has been invoked.
void setAffTocFlag (DKBoolean flag); 

getRank
Gets the search result ranking value of the current object. The default setting is --1.
long getRank ();

setRank
Sets the search result ranking value of the current object. The default setting is --1.
void setRank (long r); 

getOption
Gets the value for an option. The valid options and values are as follows:

Valid options:

DK_DL_OPT_DELETE_OPTION
Sets the delete option to delete the object.

Valid values for non-media objects:

DK_DL_DELETE_ITEM
Delete an item if there are no more parts left in the item.

DK_DL_DELETE_OBJECT_ONLY
Do not delete the item, even if there are no more parts left in the item. (This is the default value.)

Valid values for media objects:

DK_DL_DELETE_NO_DROPITEM_MEDIA_AVAIL
Do not delete the item if there are no parts left in the item. Cannot delete media parts (media objects) when they are in use.

DK_DL_DELETE_NO_DROPITEM_MEDIA_INUSE
Do not delete the item, even if there are no parts left in the item. You can delete media parts (media objects), even if they are in use.

DK_DL_DELETE_DROPITEM_MEDIA_AVAIL
Delete the item if there are no parts left in the item. Cannot delete media parts (media objects) when they are in use.

DK_DL_DELETE_DROPITEM_MEDIA_INUSE
Delete the item if there are no parts left in the item. Can delete media parts (media objects), even if they are in use.

DK_DL_OPT_RETRIEVAL_ACTION
Sets the retrieval action to retrieve the object content.

Valid values are:

DK_DL_RETRIEVAL_GET_IT
Retrieve the object if it is on a fixed storage device (such as DASD) or on any other storage device that is on-line. If the storage is off-line, an error will return. (This is the default value.)

DK_DL_RETRIEVAL_GET_IT_PREFETCH
Like the DK_DL_RETRIEVAL_GET_IT option, except that the object server places the object in the staging area on DASD instead of sending it to the client for caching.

DK_DL_RETRIEVAL_NO_MOUNT
Retrieve the object only if it is located on a fixed storage device such as DASD. If it is located on a removable device such as an optical disk, the object server returns an error.

DK_DL_RETRIEVAL_NO_MOUNT_PREFETCH
Like the DK_DL_RETRIEVAL_NO_MOUNT option, except that the object server places the object in the staging area on DASD instead of sending it to the client for caching.

DK_DL_RETRIEVAL_STAGE_IT
Retrieve the object, regardless of its location.

DK_DL_RETRIEVAL_STAGE_IT_PREFETCH
Like the DK_DL_RETRIEVAL_STAGE_IT option, except that the object server places the object in the staging area on DASD instead of sending it to the client for caching.

Restrictions -- For media objects, only the following values are valid:

  • DK_DL_RETRIEVAL_GET_IT
  • DK_DL_RETRIEVAL_STAGE_IT
  • DK_DL_RETRIEVAL_STAGE_IT_PREFETCH

Example code:

         DKDatastoreDL dsDL;
         DKBlobDL* axdo = new DKBlobDL(&dsDL);
         DKAny opt;
         axdo->getOption(DK_DL_OPT_DELETE_OPTION, opt);
         long lopt = opt;
         if (lopt == DK_DL_DELETE_OBJECT_ONLY)
           cout << "delete 
           option(DK_DL_DELETE_OBJECT_ONLY)
           =" << lopt << endl;

  void  getOption (long option, DKAny& value);
 

setOption
Sets the value for an option. The valid options and values are as follows:

Valid options:

DK_DL_OPT_DELETE_OPTION
Sets the delete option to delete the object.

Valid values for non-media objects:

DK_DL_DELETE_ITEM
Delete an item if there are no more parts left in the item.

DK_DL_DELETE_OBJECT_ONLY
Do not delete the item, even if there are no more parts left in the item. (This is the default value.)

Valid values for media objects:

DK_DL_DELETE_NO_DROPITEM_MEDIA_AVAIL
Do not delete the item if there are no parts left in the item. Cannot delete media parts (media objects) when they are in use.

DK_DL_DELETE_NO_DROPITEM_MEDIA_INUSE
Do not delete the item, even if there are no parts left in the item. You can delete media parts (media objects), even if they are in use.

DK_DL_DELETE_DROPITEM_MEDIA_AVAIL
Delete the item if there are no parts left in the item. Cannot delete media parts (media objects) when they are in use.

DK_DL_DELETE_DROPITEM_MEDIA_INUSE
Delete the item if there are no parts left in the item. Can delete media parts (media objects), even if they are in use.

DK_DL_OPT_RETRIEVAL_ACTION
Sets the retrieval action to retrieve the object content.

Valid values are:

DK_DL_RETRIEVAL_GET_IT
Retrieve the object if it is on a fixed storage device (such as DASD) or on any other storage device that is on-line. If the storage is off-line, an error will return. (This is the default value.)

DK_DL_RETRIEVAL_GET_IT_PREFETCH
Like the DK_DL_RETRIEVAL_GET_IT option, except that the object server places the object in the staging area on DASD instead of sending it to the client for caching.

DK_DL_RETRIEVAL_NO_MOUNT
Retrieve the object only if it is located on a fixed storage device such as DASD. If it is located on a removable device such as an optical disk, the object server returns an error.

DK_DL_RETRIEVAL_NO_MOUNT_PREFETCH
Like the DK_DL_RETRIEVAL_NO_MOUNT option, except that the object server places the object in the staging area on DASD instead of sending it to the client for caching.

DK_DL_RETRIEVAL_STAGE_IT
Retrieve the object, regardless of its location.

DK_DL_RETRIEVAL_STAGE_IT_PREFETCH
Like the DK_DL_RETRIEVAL_STAGE_IT option, except that the object server places the object in the staging area on DASD instead of sending it to the client for caching.

Restrictions -- For media objects,only the following values are valid:

  • DK_DL_RETRIEVAL_GET_IT
  • DK_DL_RETRIEVAL_STAGE_IT
  • DK_DL_RETRIEVAL_STAGE_IT_PREFETCH

Example code:

DKDatastoreDL dsDL;
       DKBlobDL* axdo = new DKBlobDL(&dsDL);
       DKAny delOpt =                            DK_DL_DELETE_NO_DROPITEM_MEDIA_AVAIL;
       axdo->setOption(DK_DL_OPT_DELETE_OPTION, delOpt);                                                   void setOption (long option, 
DKAny& value);

isCategoryOf
Returns true if the object is a specified category object. Otherwise, it returns false.

Valid category names are:

DK_DL_INDEXED_OBJECT
To check if this object is a search-indexed object. With true returned, this function also retrieves the search-indexed-attribute values. The getExtension function can be used to obtain the DKSearchEngineInfoDL instance that contains all of the search-indexed information.

DK_DL_MEDIA_OBJECT
To check if this object is a media object. With true returned, this function also retrieves the media-user data (media object attributes). The getExtension function can be used to obtain the DKMediaStreamInfoDL instance that contains all the media user data.

Example code:

         DKDatastoreDL dsDL;
         DKBlobDL* axdo = new DKBlobDL(&dsDL);
         DKBoolean flag = axdo->isObjectCategory(DK_DL_INDEXED_OBJECT);
         if (flag)
         {
           DKSearchEngineInfoDL* srchInfo = 
                          (DKSearchEngineInfoDL*)axdo->getExtension
                          ("DKSearchEngineInfoDL");
           cout << "ServerName=" << srchInfo->
                                   getServerName() << endl;
           cout << "srchEngine=" << srchInfo->
                                 getSearchEngine() << endl;
           cout << "srchIndex=" << srchInfo->
                                  getSearchIndex() << endl;
           cout << "TextIndex=" << srchInfo->
                                    getTextIndex() << endl;
           cout << "indexedState=" << axdo->
                                   retrieveObjectState
                                   (DK_DL_INDEXED_OBJECT) 
                                   << endl;
         }

DKBoolean isCategoryOf (long cat);
 

retrieveObjectState
Retrieves the state of a specified category object. (This function performs a dynamic retrieve.)

Valid category names are:

DK_DL_INDEXED_OBJECT
You should invoke isCategoryOf(DK_DL_INDEXED_OBJECT) to make sure this is a search-indexed object. Then, invoke this function to retrieve the search-indexed state. For a non-search-indexed object, a 0 is returned .

Valid status:

256
To be updated. Call the invokeSearchEngine(searchEngine, searchIndex) function to change it.

512
To be deleted. Call the invokeSearchEngine(searchEngine, searchIndex) function to change it.

769
Queued update. In the queue, ready to be indexed by the search machine.

770
Queued delete. In the queue, ready to be deleted by the search machine's indexing action.

1024
Indexed. The object has been indexed by the search machine.

DK_DL_MEDIA_OBJECT
You should invoke isCategoryOf(DK_DL_MEDIA_OBJECT) to make sure this is a media object, then invoke this function to retrieve the state of the media object. For a non-media object, a 0 is returned.

Valid status:

1
Pending, load in progress.

2
Load completed successfully.

3
Load failed.
long retrieveObjectState (long object);
 

addExtension
Add the extension object for this object. The valid extension object names are the same as for the setExtensionfunction.
void addExtension(const char* extensionName, const dkExtension* extensionObj); 

removeExtension
Removes the extension object.
void removeExtension (const DKString& name);

setExtension
Sets the extension object for this object. Valid extension object names are:

DKAnnotationDL
For an annotation object, this extension object must be set to hold the affiliated information.

DKSearchEngineInfoDL
For a search indexed object, this extension object must be set to hold the search indexed information.

DKMediaStreamInfoDL
For a media object, this extension object must be set to hold the media user data.

DKStorageManageInfoDL
To associate with a different storage collection , this extension object must be set to hold the system-management storage information.

Class summary:

DKDatastoreDL dsDL;
         DKBlobDL* axdo = new DKBlobDL(&dsDL);
         //--- set DKSearchEngineInfoDL -----     
         DKSearchEngineInfoDL aSrchEx;
         aSrchEx.setSearchEngine("SM");
         aSrchEx.setSearchIndex("TM-TMINDEX");
         aSrchEx.setSearchInfo("ENU");
         axdo->setExtension("DKSearchEngineInfoDL", 
                     (dkExtension*)&aSrchEx);
 
         //------- set DKAnnotationDL -------
         DKAnnotationDL ann;
         ann.setPart(9);
         ann.setPageNumber(9);
         ann.setX(49);
         ann.setY(19);    
         axdo->setExtension("DKAnnotationDL", (dkExtension*)&ann);
         axdo->setAffiliatedType(DK_DL_ANNOTATION);
 
         //------- set DKMediaStreamInfoDL -------
         DKMediaStreamInfoDL aVS;
         aVS.setMediaFullFileName("/home/VIDEOS/surgery1.mpg");
         aVS.setMediaObjectOption(DK_DL_VS_SINGLE_OBJECT);
         aVS.setMediaHostName("vcharger1a.stl.ibm.com"); 
         aVS.setMediaUserId("root");     
         aVS.setMediaPassword("video2");
         aVS.setMediaCopyRate(0);
         aVS.setMediaInvalidCommands(20);
         aVS.setMediaDurSeconds(30);
         aVS.setMediaDurFrames(46);
         aVS.setMediaFrameRate(2900);
         aVS.setMediaBitRate(1536000);
         aVS.setMediaNumberOfUsers(1);
         aVS.setMediaAssetGroup("AG");
         aVS.setMediaType("MPEG2");
         aVS.setMediaResolution("SIF");
         aVS.setMediaStandard("NTSC");
         aVS.setMediaFormat("SYSTEM");   
         axdo->setExtension("DKMediaStreamInfoDL", 
                       (dkExtension*)&aVS);
         axdo->setContentClass(DK_DL_CC_IBMVSS);
 
         //------- set DKStorageManageInfoDL -------
          DKStorageManageInfoDL aSMS;
          aSMS.setCollectionName("CBR.TESTCOLLECT1");
          aSMS.setRetention(555);
          aSMS.setManagementClass("TESTMGT1");;
          aSMS.setStorageClass("FIXED");
          aSMS.setStoreSite("OBJSRVRN");
          axdo->setExtension("DKStorageManageInfoDL", 
                          (dkExtension*)&aSMS);

void  setExtension (const DKString& name,
 const dkExtension* object);
 

getExtension
Gets the extension object for this object. Valid extension names are:
  • DKAnnotationDL
  • DKSearchEngineInfoDL
  • DKMediaStreamInfoDL
  • DKStorageManageInfoDL

const dkExtension* getExtension (const DKString& name);

changeStorage
Changes the system-managed storage (SMS) criteria for an object.

The collection name, the management class name and the storage class name will be all converted to upper case by the system. These names must be valid on the object server where you store the object. If you change the collection name and specify a null string as the class name, the function places the object in the default class for the specified collection.

You cannot move the object from one server to another using this function, therefore, you cannot change the StoreSite. If the change causes any physical movement of the object, it might be deferred until the storage management cycle runs on the server.

Class summary:

DKDatastoreDL dsDL;
         DKBlobDL* axdo = new DKBlobDL(&dsDL);
 
         //------- set DKMediaStreamInfoDL -------
          DKStorageManageInfoDL aSMS;
          aSMS.setCollectionName("CBR.COLLECT3");
          aSMS.setRetention(888);
          aSMS.setManagementClass("MGTCLASS");;
          aSMS.setStorageClass("FIXED");
          axdo->setExtension("DKStorageManageInfoDL", 
                          (dkExtension*)&asMS);
          cout <<"about to call changeStorage()...."<<endl;
          axdo->changeStorage();
          cout <<"changeStorage() success...."<<endl;

  void  changeStorage ();
 

isMultiStreamBlob
Returns true if the current content is multistream, false otherwise.
virtual DKBoolean isMultiStreamBlob ();
 

setMultiStreamBlob
Returns true if the object server content is checked for mustistream, false otherwise.
virtual void setMultiStreamBlob (DKBoolean tf);

isMultiStreamFlagSet
Returns true if the object server content is checked for Multistream, false otherwise.
virtual DKBoolean isMultiStreamFlagSet ();
 

setMultiStreamFlag
Sets the multistream flag.
virtual void setMultiStreamFlag (DKBoolean tf);

listStreamName
Returns a string array which contains a listing of all stream names in the current content.
unsigned long listStreamName (DKString* &stringArray) const;

getStreamContent
Returns the content of the stream specified by streamName.
const DKString& getStreamContent (const DKString& streamName) const; 

setStreamContent
Sets the content of the stream specified by streamName to aByteArray.
dkBlob& setStreamContent (const DKString& streamName, const DKString& data);
 

streamLength
Returns the length of the content of the stream specified by streamName.
long streamLength (const DKString& streamName) const;

getAnnotationData
Returns the pointer data member of this object.
const DKAnnotationDL* getAnnotationData ();

setAnnotationData
Sets the pointer data member of this object.
void setAnnotationData (const DKAnnotationDL* p); 

Exceptions:

DKXDOError
For general operation errors.

DKXDOAccessError
For the Content Manager folder manager APIs calling errors.

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