Enterprise Information Portal APIs

com.ibm.mm.sdk.common
Class DKBlobDL

java.lang.Object
  |
  +--com.ibm.mm.sdk.common.dkAbstractXDO
        |
        +--com.ibm.mm.sdk.common.dkBlob
              |
              +--com.ibm.mm.sdk.common.DKBlobDL
All Implemented Interfaces:
DKConstant, DKConstantDL, dkDataObjectBase, DKMessageId, DKMessageIdDL, dkXDO, dkXDOBase, java.io.Serializable

public class DKBlobDL
extends dkBlob
implements DKConstantDL, DKMessageIdDL, java.io.Serializable

DKBlobDL: a blob (XDO) represents a part object of DL

See Also:
Serialized Form

Field Summary
static short APPEND
           
 boolean checkedMultistreamFlag
           
 boolean isMultistreamBlob
           
 boolean isMultistreamInOS
           
 com.ibm.mm.sdk.internal.PLobDataDL mtocLobData
           
static short NOOVERWRITE
           
static short OVERWRITE
           
 java.util.Vector streamLobData
           
 java.util.Vector streamName
           
 java.util.Vector streamReptype
           
 
Fields inherited from interface com.ibm.mm.sdk.common.DKConstantDL
    For details, see the class or interface
 
Fields inherited from interface com.ibm.mm.sdk.common.DKConstant
    For details, see the class or interface
 
Fields inherited from interface com.ibm.mm.sdk.common.DKMessageIdDL
DK_DL_MSG_INVNBR_TEXTMAPPING, DK_DL_MSG_MSGID_NOT_FOUND
 
Fields inherited from interface com.ibm.mm.sdk.common.DKMessageId
    For details, see the class or interface
 
Constructor Summary
DKBlobDL()
          Constructs the blob and defers initialization until implementation methods are called.
DKBlobDL(DKBlobDL aDKBlobDL)
          Copy constructor.
DKBlobDL(dkDatastore aDatastore)
          Constructs the blob and defers initialization until implementation methods are called.
DKBlobDL(dkDatastore aDatastore, byte[] aByteArr)
          Constructs the blob and set the object's content.
 
Method Summary
 void add()
          Adds the object content from memory to the datastore
 void add(java.lang.String aFullFileName)
          Adds the object content from existing file to the datastore
 void addExtension(java.lang.String extensionName, dkExtension extensionObj)
          Add the extension object.
 void changeStorage()
          Changes the system-managed storage (SMS) criteria for an object.
 boolean compareData(dkXDO adkXDO)
          Compares the content of this object with the content of the other XDO object
 DKBlobDL concatenate(byte[] aByteArr)
          Deprecated. not really needed
 DKBlobDL concatenate(DKBlobDL aDKBlobDL)
          Deprecated. not really needed
 dkBlob concatReplace(byte[] aByteArr)
          Deprecated. no need to do this, no meaning
 dkBlob concatReplace(dkBlob adkBlob)
          Deprecated. no need to do this, no meaning
 void copyData(dkXDO adkXDO)
          Replaces the content of this object with the content of the other XDO object
 void del()
          Deletes the object content from datastore
 void del(boolean flush)
          Deletes the object content from datastore
 void deletingValue()
          Deprecated. no meaning for Digital Library
 boolean equals(dkXDOBase adkXDOBase)
          Deprecated. no need to do this, no meaning
 DKAnnotation getAffiliatedData()
          Deprecated. Replace by getExtension(String extensionName)
 int getAffiliatedType()
          Gets the affiliated type of the object if DK_ANNOTATION, the getExtension("DKAnnotationDL") should point to DKAnnotationDL
 byte[] getContent()
          Gets the content of this object
 int getContentClass()
          Gets the content class of the object
 void getContentToClientFile(java.lang.String afileName, int fileOption)
          Copies the lob data of this object to the given file
 java.lang.String getContentType()
          Gets the content type of this object.
 java.lang.String getCreatedTimestamp()
          Gets the data & time that the object was created
 dkExtension getExtension(java.lang.String extensionName)
          Gets the extension object.
 boolean getIndexFlag()
          Deprecated. Replace by isCategoryOf(..) method of this class
 java.lang.String getItemId()
          Gets the DL item id of the object content
 java.lang.String getMimeType()
          Gets the MIME type represents this object's contentClass
 java.lang.String getObjectType()
          Gets the object type.
 java.lang.String getOpenHandler()
          Gets the current program name of the handler for this object instance
 java.lang.Object getOption(int option)
          Gets the delete or retrieval option to perform the delete or retrieve action.
 int getPartId()
          Gets the part id of this XDO
 DKPid getPid()
          Deprecated. Replace by getPidObject()
 DKPid getPidObject()
          Gets a copy of the persistent ID object of this object
 int getRank()
          Gets the ranking value of a query
 java.lang.String getRepType()
          Gets the DL representation type of the object content
 java.lang.String getRepTypeMTOC()
           
 int getRetrievalAction()
          Deprecated. Replace by getOption(int option)
 java.lang.String getSearchEngine()
          Deprecated. Replace by DKSearchEngineInfoDL.getSearchEngine()
 java.lang.String getSearchIndex()
          Deprecated. Replace by DKSearchEngineInfoDL.getSearchIndex()
 java.lang.String getSearchInfo()
          Deprecated. Replace by DKSearchEngineInfoDL.getSearchInfo()
 int getSize()
          Gets the size of this object without retrieve object content.
 byte[] getStreamContent(java.lang.String sName)
          returns the content of the stream specified by sName.
 java.lang.String getUpdatedTimestamp()
          Gets the data & time that the object was updated
 int indexOf(dkBlob adkBlob, int startpos)
          Deprecated. no need to do this, no meaning
 int indexOf(java.lang.String astring, int startpos)
          Deprecated. no need to do this, no meaning
 dkBlob insert(dkBlob adkBlob, int startpos)
          Deprecated. no need to do this, no meaning
 dkBlob insert(java.lang.String astring, int startpos)
          Deprecated. no need to do this, no meaning
 boolean isCategoryOf(int categoryName)
          Check the object category.
 boolean isContentChanged()
          Checks if the part content changed (in memory).
 boolean isMultiStreamBlob()
          returns true if current content is multistream, false otherwise.
 boolean isMultiStreamFlagSet()
          returns true if the object server content is checked for Multistream, false otherwise.
 boolean isNull()
          Checks if the part content is null (in memory).
 boolean isOpenSynchronous()
          Gets the current synchronization property
 boolean isSet()
          Checks if the part content is set (in memory).
 int length()
          Gets the length of this object content in memory
 java.lang.String[] listStreamName()
          returns a string array which contains a listing of all stream names in the current content.
 java.lang.String mimeType()
          Gets the MIME type represents this object's contentClass
 boolean notEqual(dkXDOBase adkXDOBase)
          Deprecated. no need to do this, no meaning
 void open()
          Unloads the object content to a client file with a system generated name and then synchronously invoking a default handler against the file.
 void open(java.lang.String afileName)
          Unloads the object content to a file afileName provided by the application and then synchronously invoking a default handler against the file.
 dkBlob remove(int startpos, int alength)
          Deprecated. no need to do this, no meaning
 void removeExtension(java.lang.String extensionName)
          Remove the extension object.
 void retrieve()
          Retrieves the object content from the datastore to the memory buffer
 void retrieve(java.lang.String aFileName)
          Retrieves the object content from the datastore to a file name
 int retrieveAsync(int readLength, boolean concateFlag)
          Retrieve the object content asynchronously from datastore to memory buffer
 void retrieveAsyncEnd()
          Stop the asynchronous retrieve and close the object access handle
 int retrieveAsyncNext()
          Retrieve the next piece of object content from datastore to memory buffer To continue the next retrieval based on the retrieveAsync(readLength,concateFlag) setting.
 int retrieveObjectState(int object)
          Retrieve the state of search indexed object or media object.
 void setAffiliatedData(DKAnnotation apAData)
          Deprecated. Replace by setExtension(..)
 void setAffiliatedType(int aAType)
          Sets the affiliated type of the object
 void setClassOpenHandler(java.lang.String ahandler, boolean newSynchronousFlag)
          Sets the executable handler program name and whether this handler should be invoked synchronously or asynchronously for this object class
 void setContent(byte[] aByteArray)
          Sets the content of this object with a byte array stream argument
 void setContentClass(int aCClass)
          Sets the content class of the object
 void setContentFromClientFile(java.lang.String afileName)
          Replaces the lob data of this object with the contents of the file afileName
 void setContentType(java.lang.String contentType)
          Sets the content type to be translated to content class Id (in DL the content type is the content class name)
 void setDatastore(dkDatastore ds)
          Sets the reference to the owner datastore object
 void setExtension(java.lang.String extensionName, dkExtension extensionObj)
          Sets the extension object.
 void setIndexFlag(boolean aFlag)
          Deprecated. no need to use this
 void setInstanceOpenHandler(java.lang.String ahandler, boolean newSynchronousFlag)
          Sets the executable handler program name and whether this handler should be invoked synchronously or asynchronously for this object instant
 void setItemId(java.lang.String aItemId)
          Sets the DL item id of the object content
 void setMimeType(java.lang.String mType)
          Sets the MIME type to be translated to content class Id
 void setNull()
          Sets the part content to null (in memory).
 void setOption(int option, java.lang.Object value)
          Sets the delete or retrieval option to perform the delete or retrieve action.
 void setPartId(int partId)
          Gets the part id of this XDO
 void setPid(DKPid aDKPid)
          Deprecated. Replace by setPidObject(DKPid aPidXDO)
 void setPidObject(DKPid aPidXDO)
          Sets the pid information of this object with the new provided pid
 void setRank(int aRank)
          Sets the ranking value of a query
 void setRepType(java.lang.String aRType)
          Sets the DL representation type of the object content
 void setRetrievalAction(int aRetriveAction)
          Deprecated. Replace by setOption(int option, Object value)
 void setSearchEngine(java.lang.String aSearchEngine)
          Deprecated. Replace by DKSearchEngineInfoDL.setSearchEngine(..)
 void setSearchIndex(java.lang.String aSearchIndex)
          Deprecated. Replace by DKSearchEngineInfoDL.setSearchIndex(..)
 void setSearchInfo(java.lang.String aSearchInfo)
          Deprecated. Replace by DKSearchEngineInfoDL.setSearchInfo(..)
 void setStreamContent(java.lang.String sName, byte[] aByteArray)
          Sets the content of the stream specified by sName to aByteArray.
 void setToBeIndexed()
          Indexes an existing part object by search engine
 int size()
          Gets the size of this object without retrieve object content.
 long streamLength(java.lang.String sName)
          returns the length of the content of the stream specified by sName.
 DKBlobDL subLob(int startpos, int alength)
          Deprecated. not really needed
 java.lang.String subString(int startpos, int alength)
          Deprecated. no need to do this, no meaning
 void update()
          Updates the object content in datastore with the content in memory
 void update(java.lang.String aFileName)
          Updates the object content in datastore with a file
 
Methods inherited from class com.ibm.mm.sdk.common.dkAbstractXDO
cloneSkeleton, datastore, getClassName, getDatastore, getParent, getRootObject, protocol, setClassName, setParent, setRootObject
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

OVERWRITE

public static final short OVERWRITE

NOOVERWRITE

public static final short NOOVERWRITE

APPEND

public static final short APPEND

mtocLobData

public com.ibm.mm.sdk.internal.PLobDataDL mtocLobData

streamName

public java.util.Vector streamName

streamReptype

public java.util.Vector streamReptype

streamLobData

public java.util.Vector streamLobData

isMultistreamBlob

public boolean isMultistreamBlob

isMultistreamInOS

public boolean isMultistreamInOS

checkedMultistreamFlag

public boolean checkedMultistreamFlag
Constructor Detail

DKBlobDL

public DKBlobDL()
         throws DKUsageError,
                java.lang.Exception
Constructs the blob and defers initialization until implementation methods are called.
Throws:
DKUsageError, - Exception If invalid datastore type

DKBlobDL

public DKBlobDL(dkDatastore aDatastore)
         throws DKUsageError,
                java.lang.Exception
Constructs the blob and defers initialization until implementation methods are called.
Parameters:
aDatastore - a DKDatastoreDL representing the associated DL datastore
Throws:
DKUsageError, - Exception If invalid datastore type

DKBlobDL

public DKBlobDL(dkDatastore aDatastore,
                byte[] aByteArr)
         throws DKException,
                java.lang.Exception
Constructs the blob and set the object's content.
Parameters:
aDatastore - a DKDatastoreDL representing the associated DL datastore
aByteArr - a byte array to be set as this object's content
Throws:
DKException, - Exception If error occurred

DKBlobDL

public DKBlobDL(DKBlobDL aDKBlobDL)
         throws DKException
Copy constructor.
Parameters:
aDKBlobDL - an instance of DKBlobDL
Throws:
DKException - If error occurred
Method Detail

getObjectType

public java.lang.String getObjectType()
Gets the object type.
Returns:
the object type "DKBlobDL"

deletingValue

public void deletingValue()
Deprecated. no meaning for Digital Library

Deletes value, this function performs as setNull in this class

isContentChanged

public boolean isContentChanged()
Checks if the part content changed (in memory).
Overrides:
isContentChanged in class dkAbstractXDO
Returns:
true if the object content is changed; false otherwise.

isSet

public boolean isSet()
Checks if the part content is set (in memory).
Overrides:
isSet in class dkAbstractXDO
Returns:
true if the object content is set; false otherwise.

isNull

public boolean isNull()
Checks if the part content is null (in memory).
Overrides:
isNull in class dkAbstractXDO
Returns:
true if the object content is null; false otherwise.

setNull

public void setNull()
Sets the part content to null (in memory).
Overrides:
setNull in class dkAbstractXDO

equals

public boolean equals(dkXDOBase adkXDOBase)
               throws DKException
Deprecated. no need to do this, no meaning

Check if the xdo objects have same type, pid, content and indexed by same search engine
Overrides:
equals in class dkAbstractXDO
Parameters:
adkXDOBase - an instance of dkXDOBase
Returns:
true if the objects have same type, pid, content and search index false otherwise.
Throws:
DKException - If objects are not the same class

notEqual

public boolean notEqual(dkXDOBase adkXDOBase)
                 throws DKException
Deprecated. no need to do this, no meaning

check if the xdo objects is not equal.
Overrides:
notEqual in class dkAbstractXDO
Parameters:
adkXDOBase - an instance of dkXDOBase
Returns:
true if the objects do not have same type, pid, content and search index false otherwise.
Throws:
DKException - If objects are not the same class

getPid

public DKPid getPid()
Deprecated. Replace by getPidObject()

Gets a copy of the persistent ID object of this DKBlobDL object
Overrides:
getPid in class dkAbstractXDO
Returns:
a copy of the persistent ID object of this DKBlobDL object
See Also:
getPidObject()

setPid

public void setPid(DKPid aDKPid)
            throws DKUsageError
Deprecated. Replace by setPidObject(DKPid aPidXDO)

Sets the pid information of this object with the new provided pid
Overrides:
setPid in class dkAbstractXDO
Parameters:
aDKPid - a DKPidXDO object
Throws:
DKUsageError - If provided pid is null
See Also:
setPidObject(DKPid aPidXDO)

getPidObject

public DKPid getPidObject()
Gets a copy of the persistent ID object of this object
Overrides:
getPidObject in class dkAbstractXDO
Returns:
a copy of the persistent ID object of this object

setPidObject

public void setPidObject(DKPid aPidXDO)
                  throws DKException
Sets the pid information of this object with the new provided pid
Overrides:
setPidObject in class dkAbstractXDO
Parameters:
aPidXDO - a DKPidXDO object
Throws:
DKException - If provided pid is null

add

public void add()
         throws DKException,
                java.lang.Exception
Adds the object content from memory to the datastore
Overrides:
add in class dkAbstractXDO
Throws:
DKException, - Exception If error occurred

add

public void add(java.lang.String aFullFileName)
         throws DKException,
                java.lang.Exception
Adds the object content from existing file to the datastore
Overrides:
add in class dkAbstractXDO
Parameters:
aFullFileName - a fully qualified path and file name, default is current directory
Throws:
DKException, - Exception If error occurred

retrieve

public void retrieve()
              throws DKException,
                     java.lang.Exception
Retrieves the object content from the datastore to the memory buffer
Overrides:
retrieve in class dkAbstractXDO
Throws:
DKException, - Exception If error occurred

retrieve

public void retrieve(java.lang.String aFileName)
              throws DKException,
                     java.lang.Exception
Retrieves the object content from the datastore to a file name
Overrides:
retrieve in class dkAbstractXDO
Parameters:
aFileName - a fully qualified path and file name, default is current directory
Throws:
DKException, - Exception If error occurred

update

public void update(java.lang.String aFileName)
            throws DKException,
                   java.lang.Exception
Updates the object content in datastore with a file
Overrides:
update in class dkAbstractXDO
Parameters:
aFileName - a fully qualified path and file name, default is current directory
Throws:
DKException, - Exception If error occurred

update

public void update()
            throws DKException,
                   java.lang.Exception
Updates the object content in datastore with the content in memory
Overrides:
update in class dkAbstractXDO
Throws:
DKException, - Exception If error occurred

del

public void del()
         throws DKException,
                java.lang.Exception
Deletes the object content from datastore
Overrides:
del in class dkAbstractXDO
Throws:
DKException, - Exception If error occurred

del

public void del(boolean flush)
         throws DKException,
                java.lang.Exception
Deletes the object content from datastore
Overrides:
del in class dkAbstractXDO
Parameters:
flush - if true the memory content will be flush, if false and content is not set, the object will be retreived before delete it. The default is flush.
Throws:
DKException, - Exception If error occurred

copyData

public void copyData(dkXDO adkXDO)
              throws DKException,
                     java.lang.Exception
Replaces the content of this object with the content of the other XDO object
Overrides:
copyData in class dkAbstractXDO
Parameters:
adkXDO - the other XDO object
Throws:
DKException, - Exception If error occurred

compareData

public boolean compareData(dkXDO adkXDO)
                    throws DKException,
                           java.lang.Exception
Compares the content of this object with the content of the other XDO object
Overrides:
compareData in class dkAbstractXDO
Parameters:
adkXDO - the other XDO object
Throws:
DKException, - Exception If object type is different

setContent

public void setContent(byte[] aByteArray)
Sets the content of this object with a byte array stream argument
Overrides:
setContent in class dkAbstractXDO
Parameters:
aByteArray - a byte array

getContent

public byte[] getContent()
                  throws DKException,
                         java.lang.Exception
Gets the content of this object
Overrides:
getContent in class dkAbstractXDO
Returns:
the object content as a byte array stream
Throws:
DKException, - Exception If object type is different

getContentToClientFile

public void getContentToClientFile(java.lang.String afileName,
                                   int fileOption)
                            throws DKException,
                                   java.lang.Exception
Copies the lob data of this object to the given file
Overrides:
getContentToClientFile in class dkAbstractXDO
Parameters:
afileName - a fully qualified path with file name, default is current directory(if no path)
fileOption - 1 will create or overwrite an existing file; 2 will only create file, but will also throw an exception if the file already exists; 3 appends to an existing file
Throws:
DKException, - Exception If error occurred

setContentFromClientFile

public void setContentFromClientFile(java.lang.String afileName)
                              throws DKException
Replaces the lob data of this object with the contents of the file afileName
Overrides:
setContentFromClientFile in class dkAbstractXDO
Parameters:
afileName - a fully qualified path with file name, default is current directory(if no path)
Throws:
DKException - If error occurred

concatReplace

public dkBlob concatReplace(dkBlob adkBlob)
                     throws DKException,
                            java.lang.Exception
Deprecated. no need to do this, no meaning

Concatenates this object content with another object content the results of the concatenation replaces the existing contents of this object
Overrides:
concatReplace in class dkBlob
Parameters:
adkBlob - another dkBlob object
Returns:
a dkBlob object

concatReplace

public dkBlob concatReplace(byte[] aByteArr)
                     throws DKException,
                            java.lang.Exception
Deprecated. no need to do this, no meaning

Concatenates this object content with another stream the results of the concatenation replaces the existing contents of this object
Overrides:
concatReplace in class dkBlob
Parameters:
aByteArr - a byte array stream
Returns:
a dkBlob object

length

public int length()
           throws DKException,
                  java.lang.Exception
Gets the length of this object content in memory
Overrides:
length in class dkAbstractXDO
Returns:
a byte length of this object content in memory

indexOf

public int indexOf(java.lang.String astring,
                   int startpos)
            throws DKException,
                   java.lang.Exception
Deprecated. no need to do this, no meaning

Returns the byte offset of the first occurrence of the search argument within this object, starting the search at offset startPos. If the search argument is not found, return 0.
Overrides:
indexOf in class dkBlob
Parameters:
astring - the search string argument
startpos - the offset position start to search
Returns:
the byte offset of the first occurrence of the search argument; return 0 if the search argument is not found

indexOf

public int indexOf(dkBlob adkBlob,
                   int startpos)
            throws DKException,
                   java.lang.Exception
Deprecated. no need to do this, no meaning

Returns the byte offset of the first occurrence of the search argument within this object, starting the search at offset startPos. If the search argument is not found, return 0.
Overrides:
indexOf in class dkBlob
Parameters:
adkBlob - the lobData of this dkBlob is the search argument
startpos - the offset position start to search
Returns:
the byte offset of the first occurrence of the search argument; return 0 if the search argument is not found

subString

public java.lang.String subString(int startpos,
                                  int alength)
                           throws DKException,
                                  java.lang.Exception
Deprecated. no need to do this, no meaning

return a string object containing a substring of the lob data of this object. The substring will be taken starting at byte offset startpos, and extracting alength bytes.
Overrides:
subString in class dkBlob
Parameters:
startpos - the byte offset position start to extract
alength - the length to extract
Returns:
a string object

remove

public dkBlob remove(int startpos,
                     int alength)
              throws DKException,
                     java.lang.Exception
Deprecated. no need to do this, no meaning

Deletes the portion of the lob data of this object starting at startpos for alength bytes
Overrides:
remove in class dkBlob
Parameters:
startpos - the byte offset position start to delete
alength - the length to delete
Returns:
a dkBlob object

insert

public dkBlob insert(java.lang.String astring,
                     int startpos)
              throws DKException,
                     java.lang.Exception
Deprecated. no need to do this, no meaning

Inserts the argument data, following position startpos in the lob data of this object
Overrides:
insert in class dkBlob
Parameters:
astring - the argument string data
startpos - the byte offset position start to insert
Returns:
a dkBlob object

insert

public dkBlob insert(dkBlob adkBlob,
                     int startpos)
              throws DKException,
                     java.lang.Exception
Deprecated. no need to do this, no meaning

Inserts the argument data, following position startpos in the lob data of this object
Overrides:
insert in class dkBlob
Parameters:
adkBlob - the lobData of this dkBlob is the argument data
startpos - the byte offset position start to insert
Returns:
a dkBlob object

open

public void open()
          throws DKException,
                 java.lang.Exception
Unloads the object content to a client file with a system generated name and then synchronously invoking a default handler against the file.
Overrides:
open in class dkAbstractXDO
Throws:
DKException, - Exception If error occurred

open

public void open(java.lang.String afileName)
          throws DKException,
                 java.lang.Exception
Unloads the object content to a file afileName provided by the application and then synchronously invoking a default handler against the file.
Overrides:
open in class dkAbstractXDO
Parameters:
afileName - a provided file name
Throws:
DKException, - Exception If error occurred

setInstanceOpenHandler

public void setInstanceOpenHandler(java.lang.String ahandler,
                                   boolean newSynchronousFlag)
Sets the executable handler program name and whether this handler should be invoked synchronously or asynchronously for this object instant
Overrides:
setInstanceOpenHandler in class dkAbstractXDO
Parameters:
ahandler - the handler program name to view the content
newSynchronousFlag - true for synchronous process; false otherwise.

setClassOpenHandler

public void setClassOpenHandler(java.lang.String ahandler,
                                boolean newSynchronousFlag)
Sets the executable handler program name and whether this handler should be invoked synchronously or asynchronously for this object class
Overrides:
setClassOpenHandler in class dkAbstractXDO
Parameters:
ahandler - the handler program name to view the content
newSynchronousFlag - true for synchronous process; false otherwise.

getOpenHandler

public java.lang.String getOpenHandler()
Gets the current program name of the handler for this object instance
Overrides:
getOpenHandler in class dkAbstractXDO
Returns:
the handler program name

isOpenSynchronous

public boolean isOpenSynchronous()
Gets the current synchronization property
Overrides:
isOpenSynchronous in class dkAbstractXDO
Returns:
TRUE or FALSE for the handler

getRepType

public java.lang.String getRepType()
Gets the DL representation type of the object content
Returns:
the DL representation type of the object content

setRepType

public void setRepType(java.lang.String aRType)
                throws DKException,
                       java.lang.Exception
Sets the DL representation type of the object content
Parameters:
aRType - the DL representation type of the object content

getItemId

public java.lang.String getItemId()
Gets the DL item id of the object content
Returns:
the DL item id of the object content

setItemId

public void setItemId(java.lang.String aItemId)
               throws DKException,
                      java.lang.Exception
Sets the DL item id of the object content
Parameters:
aRType - the DL item id of the object content

getContentClass

public int getContentClass()
Gets the content class of the object
Returns:
the content class of the object

setContentClass

public void setContentClass(int aCClass)
Sets the content class of the object
Parameters:
aCClass - the content class of the object

getAffiliatedType

public int getAffiliatedType()
                      throws DKException,
                             java.lang.Exception
Gets the affiliated type of the object if DK_ANNOTATION, the getExtension("DKAnnotationDL") should point to DKAnnotationDL
Overrides:
getAffiliatedType in class dkAbstractXDO
Returns:
the affiliated type of the object

setAffiliatedType

public void setAffiliatedType(int aAType)
                       throws DKException,
                              java.lang.Exception
Sets the affiliated type of the object
Overrides:
setAffiliatedType in class dkAbstractXDO
Parameters:
aAType - the affiliated type of the object

getAffiliatedData

public DKAnnotation getAffiliatedData()
Deprecated. Replace by getExtension(String extensionName)

Gets the affiliated data of this object, if the affiliatedType is DK_ANNOTATION, this should get the DKAnnotation object.
Returns:
a DKAnnotation object contains the annotation data informations
See Also:
getExtension(String extensionName)

setAffiliatedData

public void setAffiliatedData(DKAnnotation apAData)
Deprecated. Replace by setExtension(..)

Sets the affiliated data of this object, if the affiliatedType is DK_ANNOTATION, this should be provided.
Parameters:
apAData - a DKAnnotation object contains the annotation data informations
See Also:
setExtension(String extensionName, dkExtension extensionObj)

getSearchEngine

public java.lang.String getSearchEngine()
                                 throws DKException,
                                        java.lang.Exception
Deprecated. Replace by DKSearchEngineInfoDL.getSearchEngine()

Gets search engine name
Returns:
the search engine name; SM for text search, QBIC for image search
Throws:
DKException, - Exception If error occurred
See Also:
to get the DKSearchEngineInfoDL object

setSearchEngine

public void setSearchEngine(java.lang.String aSearchEngine)
                     throws DKException,
                            java.lang.Exception
Deprecated. Replace by DKSearchEngineInfoDL.setSearchEngine(..)

Sets the search engine name
Parameters:
aSearchEngine - the search engine name; SM for text search, QBIC for image search
Throws:
DKException, - Exception If error occurred
See Also:
to set the DKSearchEngineInfoDL object

getSearchIndex

public java.lang.String getSearchIndex()
                                throws DKException,
                                       java.lang.Exception
Deprecated. Replace by DKSearchEngineInfoDL.getSearchIndex()

Gets the search index; ie."SearchService-IndexName" name
Returns:
the search index name
Throws:
DKException, - Exception If error occurred
See Also:
to get the DKSearchEngineInfoDL object

setSearchIndex

public void setSearchIndex(java.lang.String aSearchIndex)
                    throws DKException,
                           java.lang.Exception
Deprecated. Replace by DKSearchEngineInfoDL.setSearchIndex(..)

Sets the search index; ie."SearchService-IndexName" name
Parameters:
aSearchIndex - the search index name like "SearchService-IndexName"
Throws:
DKException, - Exception If error occurred
See Also:
to set the DKSearchEngineInfoDL object

getSearchInfo

public java.lang.String getSearchInfo()
                               throws DKException,
                                      java.lang.Exception
Deprecated. Replace by DKSearchEngineInfoDL.getSearchInfo()

Gets the search infomation value; a three chars code, valid in the NLS language table that identifies the language. (ie. ENU is US English, JAP is Japanese..)
Returns:
the search infomation value
Throws:
DKException, - Exception If error occurred
See Also:
to get the DKSearchEngineInfoDL object

setSearchInfo

public void setSearchInfo(java.lang.String aSearchInfo)
                   throws DKException,
                          java.lang.Exception
Deprecated. Replace by DKSearchEngineInfoDL.setSearchInfo(..)

Sets the search infomation value; a three chars code, valid in the NLS language table that identifies the language. (ie. ENU is US English, JAP is Japanese..)
Parameters:
aSearchInfo - the three chars code, valid in the NLS language table
Throws:
DKException, - Exception If error occurred
See Also:
to set the DKSearchEngineInfoDL object

getIndexFlag

public boolean getIndexFlag()
Deprecated. Replace by isCategoryOf(..) method of this class

Gets the flag that indicates a part object is indexed by a search engine
Returns:
true if a part object is indexed by a search engine false otherwise.
See Also:
for details

setIndexFlag

public void setIndexFlag(boolean aFlag)
Deprecated. no need to use this

Sets the flag that indicates a part object is indexed by a search engine
Parameters:
aFlag - a flag to indicate the part object is indexed by a search engine

concatenate

public DKBlobDL concatenate(DKBlobDL aDKBlobDL)
                     throws DKException,
                            java.lang.Exception
Deprecated. not really needed

Concatenates this object content with another object content and returns a new DKBlobDL object containing the result.
Parameters:
aDKBlobDL - another DKBlobDL object
Returns:
a new DKBlobDL object containing the result
Throws:
DKException, - Exception If error occurred

concatenate

public DKBlobDL concatenate(byte[] aByteArr)
                     throws DKException,
                            java.lang.Exception
Deprecated. not really needed

Concatenates this object content with another stream and returns a new DKBlobDL object containing the result.
Parameters:
aByteArr - a byte array stream
Returns:
a new DKBlobDL object containing the result
Throws:
DKException, - Exception If error occurred

subLob

public DKBlobDL subLob(int startpos,
                       int alength)
                throws DKException,
                       java.lang.Exception
Deprecated. not really needed

Similar to subString, but returns the subString data in form of a new DKBlobDL object
Parameters:
startpos - the byte offset position to start
alength - the length of bytes to obtain
Returns:
a new DKBlobDL object containing the result
Throws:
DKException, - Exception If error occurred

setRank

public void setRank(int aRank)
Sets the ranking value of a query
Overrides:
setRank in class dkAbstractXDO
Parameters:
aRank - a ranking value

getRank

public int getRank()
Gets the ranking value of a query
Overrides:
getRank in class dkAbstractXDO
Returns:
a ranking value

setContentType

public void setContentType(java.lang.String contentType)
                    throws DKException,
                           java.lang.Exception
Sets the content type to be translated to content class Id (in DL the content type is the content class name)
Overrides:
setContentType in class dkAbstractXDO
Parameters:
contentType - a content type
Throws:
DKException, - Exception If error occurred

getContentType

public java.lang.String getContentType()
                                throws DKException,
                                       java.lang.Exception
Gets the content type of this object. In DL, the content type is the content class name.
Overrides:
getContentType in class dkAbstractXDO
Returns:
the content type for this object,

setMimeType

public void setMimeType(java.lang.String mType)
                 throws DKException,
                        java.lang.Exception
Sets the MIME type to be translated to content class Id
Overrides:
setMimeType in class dkAbstractXDO
Parameters:
mType - the MIME type
Throws:
DKException, - Exception If error occurred

getMimeType

public java.lang.String getMimeType()
                             throws DKException,
                                    java.lang.Exception
Gets the MIME type represents this object's contentClass
Overrides:
getMimeType in class dkAbstractXDO
Returns:
the MIME type
Throws:
DKException, - Exception If error occurred

mimeType

public java.lang.String mimeType()
                          throws DKException,
                                 java.lang.Exception
Gets the MIME type represents this object's contentClass
Returns:
the MIME type
Throws:
DKException, - Exception If error occurred

setToBeIndexed

public void setToBeIndexed()
                    throws DKException,
                           java.lang.Exception
Indexes an existing part object by search engine
Throws:
DKException, - Exception If error occurred

getCreatedTimestamp

public java.lang.String getCreatedTimestamp()
                                     throws DKException,
                                            java.lang.Exception
Gets the data & time that the object was created
Returns:
the data & time that the object was created
Throws:
DKException, - Exception If error occurred

getUpdatedTimestamp

public java.lang.String getUpdatedTimestamp()
                                     throws DKException,
                                            java.lang.Exception
Gets the data & time that the object was updated
Returns:
the data & time that the object was updated
Throws:
DKException, - Exception If error occurred

getRetrievalAction

public int getRetrievalAction()
                       throws DKException,
                              java.lang.Exception
Deprecated. Replace by getOption(int option)

Gets the retrieval option to perform the retrieve action.
Returns:
the retrieval option
Throws:
DKException, - Exception If error occurred
See Also:
for details

setRetrievalAction

public void setRetrievalAction(int aRetriveAction)
                        throws DKException,
                               java.lang.Exception
Deprecated. Replace by setOption(int option, Object value)

Sets the retrieval option to perform the retrieve action.
Parameters:
the - retrieval option
Throws:
DKException, - Exception If error occurred
See Also:
for details

size

public int size()
         throws DKException,
                java.lang.Exception
Gets the size of this object without retrieve object content.
Overrides:
size in class dkAbstractXDO
Returns:
the object size
Throws:
DKException, - Exception If error occurred

getSize

public int getSize()
            throws DKException,
                   java.lang.Exception
Gets the size of this object without retrieve object content.
Returns:
the object size
Throws:
DKException, - Exception If error occurred

getOption

public java.lang.Object getOption(int option)
                           throws DKException,
                                  java.lang.Exception
Gets the delete or retrieval option to perform the delete or retrieve action.
Overrides:
getOption in class dkAbstractXDO
Returns:
a retrieval or delete option
Throws:
DKException, - Exception If error occurred

setOption

public void setOption(int option,
                      java.lang.Object value)
               throws DKException,
                      java.lang.Exception
Sets the delete or retrieval option to perform the delete or retrieve action.
Overrides:
setOption in class dkAbstractXDO
Parameters:
option - an option

The valid options are:

  • DK_DL_OPT_DELETE_OPTION: for delete
  • DK_DL_OPT_RETRIEVAL_ACTION: for retrieve
value - the option value

For DK_DL_OPT_DELETE_OPTION, the valid values are:

For DK_DL_OPT_RETRIEVAL_ACTION, the valid values are:

  • DK_RETRIEVAL_GET_IT
  • DK_RETRIEVAL_GET_IT_PREFETCH
  • DK_RETRIEVAL_NO_MOUNT
  • DK_RETRIEVAL_NO_MOUNT_PREFETCH
  • DK_RETRIEVAL_STAGE_IT
  • DK_RETRIEVAL_STAGE_IT_PREFETCH
Throws:
DKException, - Exception If error occurred

setExtension

public void setExtension(java.lang.String extensionName,
                         dkExtension extensionObj)
                  throws DKException,
                         java.lang.Exception
Sets the extension object.
Parameters:
extensionName - the extension name

The valid extension names are:

  • DKSearchEngineInfoDL
    • For an annotation object, you need to set this extension object to hold the affiliated informations.

  • DKAnnotationDL
    • For a search indexed object, you need to set this extension object to hold the search indexed informations.

  • DKMediaStreamInfoDL
    • For a media object, you need to set this extension object to hold the media user data.

  • DKStorageManageInfoDL
    • If you want to associate this part with different storage colleciton name, you need to set this extension object to hold the storage collection informations.

extensionObj - a source extension object
Throws:
DKException, - Exception If error occurred

addExtension

public void addExtension(java.lang.String extensionName,
                         dkExtension extensionObj)
                  throws DKException,
                         java.lang.Exception
Add the extension object.
Overrides:
addExtension in class dkAbstractXDO
Parameters:
extensionName - the extension name
extensionObj - a source extension object
Throws:
DKException, - Exception If error occurred

getExtension

public dkExtension getExtension(java.lang.String extensionName)
                         throws DKException,
                                java.lang.Exception
Gets the extension object.
Overrides:
getExtension in class dkAbstractXDO
Parameters:
extensionName - the extension name

The valid extension names are:

Returns:
a dkExtension object
Throws:
DKException, - Exception If error occurred

removeExtension

public void removeExtension(java.lang.String extensionName)
                     throws DKException
Remove the extension object.
Overrides:
removeExtension in class dkAbstractXDO
Parameters:
extensionName - the extension name

The valid extension names are:

Throws:
DKException - If error occurred

isCategoryOf

public boolean isCategoryOf(int categoryName)
                     throws DKException,
                            java.lang.Exception
Check the object category.
Parameters:
categoryName - the category name

The valid category names are:

  • DK_MEDIA_OBJECT
  • DK_INDEXED_OBJECT
Returns:
true if the object is the specified category; false otherwise.
Throws:
DKException, - Exception If error occurred

retrieveObjectState

public int retrieveObjectState(int object)
                        throws DKException,
                               java.lang.Exception
Retrieve the state of search indexed object or media object.
Parameters:
object - the type of object

The valid input are:

  • DK_MEDIA_OBJECT
  • DK_INDEXED_OBJECT
Returns:
the object state

For media object, the valid states are:

  • 1 : Pending, load in progress
  • 2 : Load completed successfully
  • 3 : Load failed

For search indexed object, the valid states are:

  • 256 : to be updated
  • 512 : to be deleted
  • 769 : queued update
  • 770 : queued delete
  • 1024 : indexed
Throws:
DKException, - Exception If error occurred

changeStorage

public void changeStorage()
                   throws DKException,
                          java.lang.Exception
Changes the system-managed storage (SMS) criteria for an object.

The collection name, management class name and 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.

Throws:
DKException, - Exception If error occurred

getPartId

public int getPartId()
Gets the part id of this XDO
Returns:
the part id

setPartId

public void setPartId(int partId)
               throws DKException,
                      java.lang.Exception
Gets the part id of this XDO
Returns:
the part id

setDatastore

public void setDatastore(dkDatastore ds)
Sets the reference to the owner datastore object
Overrides:
setDatastore in class dkAbstractXDO
Parameters:
ds - a dkDatastore

listStreamName

public java.lang.String[] listStreamName()
                                  throws DKException,
                                         java.lang.Exception
returns a string array which contains a listing of all stream names in the current content. returns null if (multi)stream content not set (available). Note: if the content is not set, will attempt to retrieve the content from the object server.
Returns:
string array containing current stream names, else null.
Throws:
DKException - (Exception) if error occurs.

getStreamContent

public byte[] getStreamContent(java.lang.String sName)
                        throws DKException,
                               java.lang.Exception
returns the content of the stream specified by sName. If the stream does not exist throws DKException. If this is not a (multi)stream object then returns content of primary stream (lobData).
Parameters:
sName - name of string to retrieve content.
Returns:
byte array stream content corresponding to sName, else content of primary stream.
Throws:
DKException - is thrown if this is a (multi)stream object and stream does not exists with name sName.

setStreamContent

public void setStreamContent(java.lang.String sName,
                             byte[] aByteArray)
                      throws DKException,
                             java.lang.Exception
Sets the content of the stream specified by sName to aByteArray. If the stream does not exist a new stream is added with streamName = sName and content = aByteArray. If this is not a (multi)stream object, the primary stream content is set to aByteArray instead.
Parameters:
sName - name of stream to set content.
aByteArray - content to set.
Throws:
DKException - (Exception) if error occurs.

streamLength

public long streamLength(java.lang.String sName)
                  throws DKException,
                         java.lang.Exception
returns the length of the content of the stream specified by sName. If the stream does not exist throws DKException. If this is not a (multi)stream object then returns content of primary stream (lobData). Note: calls getStreamContent(String) for content.
Parameters:
sName - name of string to retrieve content's length.
Returns:
length of byte array stream content corresponding to sName, else length of content of primary stream.
Throws:
DKException - is thrown if this is a (multi)stream object and stream does not exists with name sName.

isMultiStreamBlob

public boolean isMultiStreamBlob()
returns true if current content is multistream, false otherwise.

isMultiStreamFlagSet

public boolean isMultiStreamFlagSet()
returns true if the object server content is checked for Multistream, false otherwise.

getRepTypeMTOC

public java.lang.String getRepTypeMTOC()

retrieveAsync

public int retrieveAsync(int readLength,
                         boolean concateFlag)
                  throws DKException,
                         java.lang.Exception
Retrieve the object content asynchronously from datastore to memory buffer
Parameters:
readLength - the number of bytes to retrieve from datastore into the memory
concateFlag - flag to indicate the subsequent retrieved content will concatenate with previous one in the memory buffer
Returns:
the number of bytes left to be retrieved
Throws:
DKException, - Exception If error occurred

retrieveAsyncNext

public int retrieveAsyncNext()
                      throws DKException,
                             java.lang.Exception
Retrieve the next piece of object content from datastore to memory buffer To continue the next retrieval based on the retrieveAsync(readLength,concateFlag) setting.
Returns:
the number of bytes left to be retrieved
Throws:
DKException, - Exception If error occurred

retrieveAsyncEnd

public void retrieveAsyncEnd()
                      throws DKException,
                             java.lang.Exception
Stop the asynchronous retrieve and close the object access handle
Throws:
DKException, - Exception If error occurred

EIP Java APIs

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