Enterprise Information Portal APIs

com.ibm.mm.beans
Class CMBAnnotation

java.lang.Object
  |
  +--com.ibm.mm.beans.CMBAnnotation
All Implemented Interfaces:
java.io.Serializable

public class CMBAnnotation
extends java.lang.Object
implements java.io.Serializable

This is a helper class for the CMBDataManagement bean. This class provides functions for manipulation of annotation data.

Since:
6.1
See Also:
CMBDataManagement, Serialized Form

Field Summary
static int CMB_ANNOTATION_TYPE_BINARY
          Constant indicating that the annotation is binary (non-character) data.
static int CMB_ANNOTATION_TYPE_STRING
          Constant indicating that the annotation is a character string.
 
Constructor Summary
CMBAnnotation()
          Default constructor
CMBAnnotation(byte[] data, int type)
          Constructs a new CMBAnnotation object with initial data and type.
CMBAnnotation(byte[] data, int type, java.lang.String dsType)
          Constructs a new CMBAnnotation object with initial data and type, and datastore type.
CMBAnnotation(java.lang.String data, java.lang.String dsType)
          Constructs a new CMBAnnotation object with initial annotation string and datastore type.
 
Method Summary
 boolean equals(CMBAnnotation anAnnoObj)
          Compares this object with the parameter object.
protected  com.ibm.mm.sdk.common.dkAnnotationExt getAnnoObj()
          Gets the API annotation object.
 int getAnnotationType()
          Gets annotation type
 byte[] getByteArrayData()
          Gets the annotation in byte arrary format
 char getColor()
          Gets the color setting of the annotation.
 CMBObject getComplexData()
          Gets annotation object
 java.io.InputStream getDataStream()
          Returns a stream to the annotation data.
 java.lang.String getGroupName()
          Gets the group name setting of the annotation.
 int getId()
          Gets the part Id of the associated object
 java.lang.String getMimeType()
          Returns the MIME content type of the annotation.
 int getPageNumber()
          Gets the page number that this annotation object refers to.
 java.lang.String getStringData()
          Gets annotation string
 java.lang.String getTimestamp()
          Gets the timestamp of the annotation.
 java.lang.String getUserID()
          Gets the userid associated with this annotation (owner's of the annotation).
 short getX()
          Gets the X coordinate on the page that this annotation object refers to.
protected  com.ibm.mm.sdk.common.dkXDO getXDO()
          Gets the XDO for this annotation
 short getY()
          Gets the Y coordinate on the page that this annotation object refers to.
 boolean isOkToCopy()
          Gets the OkToCopy setting of the annotation.
 boolean isPublic()
          Gets the public setting of the annotation.
protected  void setAnnoObj(com.ibm.mm.sdk.common.dkAnnotationExt annoObj)
          Sets the API annotation object
 void setAnnotationType(int type)
          Sets annotation type
 void setByteArrayData(byte[] data)
          Sets the annotation in byte array format
 void setColor(char color)
          Sets the color setting of the annotation.
 void setComplexData(CMBObject dataObj)
          Sets annotation object, will set the annotation type to CMB_ANNOTATION_TYPE_BINARY
 void setGroupName(java.lang.String groupName)
          Sets the group name setting of the annotation.
 void setId(int aPartId)
          Sets the part Id of the associated object, only positive values are valid.
 void setMimeType(java.lang.String mimetype)
          Sets the MIME content type of the annotation.
 void setOkToCopy(boolean isOkToCopy)
          Sets the OkToCopy setting of the annotation.
 void setPageNumber(int aPageNumber)
          Sets the page number that this annotation object refers to.
 void setPublic(boolean isPublic)
          Sets the public setting of the annotation.
 void setStringData(java.lang.String data)
          Sets annotation string,will set the annotation type to CMB_ANNOTATION_TYPE_STRING.
 void setTimestamp(java.lang.String timestamp)
          Sets the timestamp of the annotation.
 void setX(short aXcoordinate)
          Sets the X coordinate on the page that this annotation object refers to.
 void setY(short aYcoordinate)
          Sets the Y coordinate on the page that this annotation object refers to.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

CMB_ANNOTATION_TYPE_STRING

public static final int CMB_ANNOTATION_TYPE_STRING
Constant indicating that the annotation is a character string.

CMB_ANNOTATION_TYPE_BINARY

public static final int CMB_ANNOTATION_TYPE_BINARY
Constant indicating that the annotation is binary (non-character) data.
Constructor Detail

CMBAnnotation

public CMBAnnotation()
Default constructor

CMBAnnotation

public CMBAnnotation(byte[] data,
                     int type)
Constructs a new CMBAnnotation object with initial data and type.
Parameters:
data - annotation data
type - annotation type

CMBAnnotation

public CMBAnnotation(byte[] data,
                     int type,
                     java.lang.String dsType)
Constructs a new CMBAnnotation object with initial data and type, and datastore type.
Parameters:
data - annotation data
type - annotation type
dsType - datastore type

CMBAnnotation

public CMBAnnotation(java.lang.String data,
                     java.lang.String dsType)
Constructs a new CMBAnnotation object with initial annotation string and datastore type.
Parameters:
data - annotation string
dsType - datastore type
Method Detail

getPageNumber

public int getPageNumber()
Gets the page number that this annotation object refers to.
Returns:
the page number

setPageNumber

public void setPageNumber(int aPageNumber)
Sets the page number that this annotation object refers to.
Parameters:
aPageNumber - a page number

setMimeType

public void setMimeType(java.lang.String mimetype)
                 throws CMBException
Sets the MIME content type of the annotation.

getMimeType

public java.lang.String getMimeType()
                             throws CMBException
Returns the MIME content type of the annotation.

getX

public short getX()
Gets the X coordinate on the page that this annotation object refers to.
Returns:
the X coordinate

setX

public void setX(short aXcoordinate)
Sets the X coordinate on the page that this annotation object refers to.
Parameters:
aXcoordinate - X coordinate

getY

public short getY()
Gets the Y coordinate on the page that this annotation object refers to.
Returns:
the Y coordinate

setY

public void setY(short aYcoordinate)
Sets the Y coordinate on the page that this annotation object refers to.
Parameters:
aYcoordinate - Y coordinate

getStringData

public java.lang.String getStringData()
                               throws CMBException
Gets annotation string
Returns:
annotation string

setStringData

public void setStringData(java.lang.String data)
Sets annotation string,will set the annotation type to CMB_ANNOTATION_TYPE_STRING.
Parameters:
data - annotation string

getComplexData

public CMBObject getComplexData()
                         throws CMBException
Gets annotation object
Returns:
annotation object in CMBObject format

setComplexData

public void setComplexData(CMBObject dataObj)
Sets annotation object, will set the annotation type to CMB_ANNOTATION_TYPE_BINARY
Parameters:
dataObj - annotation object

getAnnotationType

public int getAnnotationType()
Gets annotation type
Returns:
annotation of type
  • CMB_ANNOTATION_TYPE_STRING
  • CMB_ANNOTATION_TYPE_BINARY

setAnnotationType

public void setAnnotationType(int type)
Sets annotation type
Parameters:
type - annotation type

getByteArrayData

public byte[] getByteArrayData()
                        throws java.lang.Exception
Gets the annotation in byte arrary format
Returns:
byte array of view data
Throws:
java.lang.Exception -  

getDataStream

public java.io.InputStream getDataStream()
                                  throws java.lang.Exception
Returns a stream to the annotation data.

setByteArrayData

public void setByteArrayData(byte[] data)
Sets the annotation in byte array format
Parameters:
data - view data

getUserID

public java.lang.String getUserID()
Gets the userid associated with this annotation (owner's of the annotation). This function is available for OnDemand annotations only. This will return null for annotations from other content servers.

getId

public int getId()
Gets the part Id of the associated object
Returns:
the part Id

setId

public void setId(int aPartId)
Sets the part Id of the associated object, only positive values are valid.
Parameters:
aPartId - a part Id

getTimestamp

public java.lang.String getTimestamp()
Gets the timestamp of the annotation. This function is available for OnDemand annotations only. Annotations from other content servers will return null.

setTimestamp

public void setTimestamp(java.lang.String timestamp)
Sets the timestamp of the annotation. This function is available for OnDemand annotations only.

isPublic

public boolean isPublic()
Gets the public setting of the annotation. This function is available for OnDemand annotations only. Annotations from other content servers will return false.

setPublic

public void setPublic(boolean isPublic)
Sets the public setting of the annotation. This function is available for OnDemand annotations only.

getColor

public char getColor()
Gets the color setting of the annotation. This function is available for OnDemand annotations only. Annotations from other content servers will return blank.

setColor

public void setColor(char color)
Sets the color setting of the annotation. This function is available for OnDemand annotations only.

getGroupName

public java.lang.String getGroupName()
Gets the group name setting of the annotation. This function is available for OnDemand annotations only. Annotations from other content servers will return null.

setGroupName

public void setGroupName(java.lang.String groupName)
Sets the group name setting of the annotation. This function is available for OnDemand annotations only.

isOkToCopy

public boolean isOkToCopy()
Gets the OkToCopy setting of the annotation. This function is available for OnDemand annotations only. Annotations from other content servers will return false.

setOkToCopy

public void setOkToCopy(boolean isOkToCopy)
Sets the OkToCopy setting of the annotation. This function is available for OnDemand annotations only.

equals

public boolean equals(CMBAnnotation anAnnoObj)
Compares this object with the parameter object.
Parameters:
anAnnoObj - the second object to compare

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

setAnnoObj

protected void setAnnoObj(com.ibm.mm.sdk.common.dkAnnotationExt annoObj)
Sets the API annotation object
Parameters:
annoObj - an instance of dkAnnotationExt

getAnnoObj

protected com.ibm.mm.sdk.common.dkAnnotationExt getAnnoObj()
Gets the API annotation object.

getXDO

protected com.ibm.mm.sdk.common.dkXDO getXDO()
Gets the XDO for this annotation
Returns:
an instance of dkXDO, or null.

EIP JavaBeans

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