Enterprise Information Portal APIs

com.ibm.mm.sdk.common
Interface dkXDO

All Superinterfaces:
dkDataObjectBase, dkXDOBase
All Known Implementing Classes:
dkAbstractXDO, dkResource

public interface dkXDO
extends dkXDOBase

dkXDO: a common abstract class that can represent a complex UDT(User Defined Type) or LOB(Large Object).


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.
 dkXDO cloneSkeleton()
          Clone this XDO with its persistent-id only, that is, with its data content set to empty.
 boolean compareData(dkXDO aXDO)
          Compares the content of this object with the content of the other XDO object
 void copyData(dkXDO aXDO)
          Replaces the content of this object with the content of the other XDO object
 dkDatastore datastore()
          Deprecated. Replace by getDatastore
 void del()
          Deletes the object content from datastore
 void del(boolean flush)
          Deletes the object content from datastore
 int getAffiliatedType()
          Gets the affiliated type of this object.
 java.lang.String getClassName()
          Gets the class name of this object.
 byte[] getContent()
          Gets the content of this 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.
 dkDatastore getDatastore()
          Gets the reference to the owner datastore object
 dkExtension getExtension(java.lang.String extensionName)
          Gets the extension object.
 java.lang.String getMimeType()
          Gets the MIME type of this object.
 java.lang.Object getOption(int option)
          Gets the option value of a specified option
 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
 boolean isContentChanged()
          Checks if the part content changed (in memory).
 boolean isSet()
          Checks if the part content is set (in memory).
 int length()
          Gets the length of this object content in memory
 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 aFullFileName)
          Retrieves the object content from the datastore to a file name
 void setAffiliatedType(int affiliatedType)
          Sets the affiliated type for this object.
 void setClassName(java.lang.String className)
          Sets the class name of this object.
 void setContent(byte[] aByteArr)
          Sets the content of this object with a byte array stream argument
 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 for this object.
 void setDatastore(dkDatastore ds)
          Sets the reference to the owner datastore object
 void setMimeType(java.lang.String mimeType)
          Sets the MIME type for this object.
 void setOption(int option, java.lang.Object value)
          Sets the option value to a specified option
 void setPid(DKPid aPid)
          Deprecated. Replace by setPidObject(DKPid aPid)
 void setPidObject(DKPid aPid)
          Sets the pid information of this object with the new provided pid
 void setRank(int aRank)
          Sets the ranking value of a query
 int size()
          Gets the size of this object content in the datastore
 void update()
          Updates the object content in datastore with the content in memory
 void update(java.lang.String aFullFileName)
          Updates the object content in datastore with a file
 
Methods inherited from interface com.ibm.mm.sdk.common.dkXDOBase
equals, getOpenHandler, isNull, isOpenSynchronous, notEqual, open, open, protocol, setClassOpenHandler, setInstanceOpenHandler, setNull
 
Methods inherited from interface com.ibm.mm.sdk.common.dkDataObjectBase
getObjectType, getParent, getRootObject, setParent, setRootObject
 

Method Detail

setPid

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

Sets the pid information of this object with the new provided pid

Note:DKUsageError exception thrown if method is not implemented

Parameters:
aPid - a DKPid or DKPidXDO object
Throws:
DKUsageError - If provided pid is null
See Also:
setPidObject(DKPid aPidXDO)

getPid

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

Gets a copy of the persistent ID object of this object
Returns:
a copy of the persistent ID object of this object
See Also:
getPidObject()

getPidObject

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

setPidObject

public void setPidObject(DKPid aPid)
                  throws DKException
Sets the pid information of this object with the new provided pid
Parameters:
aPid - a DKPid or 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

Note:DKUsageError exception thrown if method is not implemented

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

Note:DKUsageError exception thrown if method is not implemented

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
Throws:
DKException, - Exception If error occurred

retrieve

public void retrieve(java.lang.String aFullFileName)
              throws DKException,
                     java.lang.Exception
Retrieves the object content from the datastore to a file name
Parameters:
aFullFileName - 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

Note:DKUsageError exception thrown if method is not implemented

Throws:
DKException, - Exception If error occurred

update

public void update(java.lang.String aFullFileName)
            throws DKException,
                   java.lang.Exception
Updates the object content in datastore with a file

Note:DKUsageError exception thrown if method is not implemented

Parameters:
aFullFileName - a fully qualified path and file name, default is current directory
Throws:
DKException, - Exception If error occurred

del

public void del()
         throws DKException,
                java.lang.Exception
Deletes the object content from datastore

Note:DKUsageError exception thrown if method is not implemented

Throws:
DKException, - Exception If error occurred

del

public void del(boolean flush)
         throws DKException,
                java.lang.Exception
Deletes the object content from datastore

Note:DKUsageError exception thrown if method is not implemented

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

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
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
Parameters:
afileName - a fully qualified path with file name, default is current directory(if no path)
Throws:
DKException - If error occurred

isContentChanged

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

isSet

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

copyData

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

compareData

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

size

public int size()
         throws DKException,
                java.lang.Exception
Gets the size of this object content in the datastore

Note:DKUsageError exception thrown if method is not implemented

Returns:
a byte length of this object content in the datastore

length

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

datastore

public dkDatastore datastore()
Deprecated. Replace by getDatastore

Gets the reference to the owner datastore object
Returns:
the dkDatastore object
See Also:
getDatastore()

getDatastore

public dkDatastore getDatastore()
Gets the reference to the owner datastore object
Returns:
the dkDatastore object

setDatastore

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

cloneSkeleton

public dkXDO cloneSkeleton()
                    throws DKUsageError,
                           java.lang.Exception
Clone this XDO with its persistent-id only, that is, with its data content set to empty.

getAffiliatedType

public int getAffiliatedType()
                      throws DKException,
                             java.lang.Exception
Gets the affiliated type of this object. An affiliated type could be ANNOTATION, NOTES, etc. The subclass need to override the behaviour of the default implementation of this method.
Returns:
the affiliated type for this object, for example: DK_CM_ANNOTATION, DK_CM_NOTE, etc.

setAffiliatedType

public void setAffiliatedType(int affiliatedType)
                       throws DKException,
                              java.lang.Exception
Sets the affiliated type for this object. The subclass need to override the behaviour of the default implementation of this method.

Note:DKUsageError exception thrown if method is not implemented

Parameters:
affiliatedType - the affiliated type
See Also:
getAffiliatedType()

getMimeType

public java.lang.String getMimeType()
                             throws DKException,
                                    java.lang.Exception
Gets the MIME type of this object. The subclass need to override the behaviour of the default implementation of this method.
Returns:
the MIME type for this object,

setMimeType

public void setMimeType(java.lang.String mimeType)
                 throws DKException,
                        java.lang.Exception
Sets the MIME type for this object. The subclass need to override the behaviour of the default implementation of this method.

Note:DKUsageError exception thrown if method is not implemented

Parameters:
mimeType - the MIME type
See Also:
getMimeType()

getContentType

public java.lang.String getContentType()
                                throws DKException,
                                       java.lang.Exception
Gets the content type of this object. A content type could be ASCII, JPG, AVI, GIF, HTML, etc The subclass need to override the behaviour of the default implementation of this method.
Returns:
the content type for this object,

setContentType

public void setContentType(java.lang.String contentType)
                    throws DKException,
                           java.lang.Exception
Sets the content type for this object. The subclass need to override the behaviour of the default implementation of this method.

Note:DKUsageError exception thrown if method is not implemented

Parameters:
contentType - the content type
See Also:
getContentType()

addExtension

public void addExtension(java.lang.String extensionName,
                         dkExtension extensionObj)
                  throws DKException,
                         java.lang.Exception
Add the extension object. Do nothing.

Note:DKUsageError exception thrown if method is not implemented

Parameters:
extensionName - the extension name
extensionObj - a source extension object
Throws:
DKException, - Exception If error occurred

removeExtension

public void removeExtension(java.lang.String extensionName)
                     throws DKException
Remove the extension object.

Note:DKUsageError exception thrown if method is not implemented

Parameters:
extensionName - the extension name
Throws:
DKException - If error occurred

getExtension

public dkExtension getExtension(java.lang.String extensionName)
                         throws DKException,
                                java.lang.Exception
Gets the extension object. Default always throws exception. Subclass must write this method.

Note:DKUsageError exception thrown if method is not implemented

Parameters:
extensionName - the extension name
Returns:
a dkExtension object
Throws:
DKException, - Exception If error occurred

getContent

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

setContent

public void setContent(byte[] aByteArr)
                throws DKException
Sets the content of this object with a byte array stream argument
Parameters:
aByteArr - a byte array

getOption

public java.lang.Object getOption(int option)
                           throws DKException,
                                  java.lang.Exception
Gets the option value of a specified option

Note:DKUsageError exception thrown if method is not implemented

Parameters:
option - a specified option
Returns:
the object contains the option value

setOption

public void setOption(int option,
                      java.lang.Object value)
               throws DKException,
                      java.lang.Exception
Sets the option value to a specified option

Note:DKUsageError exception thrown if method is not implemented

Parameters:
option - a specified option
value - an object contains the option value

setRank

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

getRank

public int getRank()
Gets the ranking value of a query
Returns:
a ranking value

getClassName

public java.lang.String getClassName()
                              throws DKException,
                                     java.lang.Exception
Gets the class name of this object.
Returns:
the class name

setClassName

public void setClassName(java.lang.String className)
                  throws DKException,
                         java.lang.Exception
Sets the class name of this object.
Parameters:
className - the class name

EIP Java APIs

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