|
Enterprise Information Portal APIs |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.ibm.mm.viewer.annotation.CMBAnnotationEngine
CMBAnnotationEngine is an abstract class that defines the interface any annotation engine implementation should extend. Annotation engines plug into CMBAnnotationServices and provide rendering and translation support for different annotation types.
Note: An abstract class was used rather than an interface in order to extend this interface in the future without requiring currently written annotation engines to be modified.
CMBAnnotationEngineCallbacks
Constructor Summary | |
CMBAnnotationEngine()
|
Method Summary | |
abstract void |
addAnnotation(java.lang.Object hAnnotationSet,
CMBPageAnnotation newPageAnnotation,
int page)
Called to add a single annotation object to the annotation set. |
abstract boolean |
canLoadAnnotationFormat(java.lang.String format)
Checks if the engine can load a specific format. |
abstract boolean |
canSaveAnnotationFormat(java.lang.String srcFormat,
java.lang.String destFormat)
Checks if the engine can save the annotations from one format to another as specified. |
abstract void |
dropAnnotationSet(java.lang.Object hAnnotationSet)
Terminates processing of an annotation set by the annotation engine. |
abstract CMBPageAnnotation[] |
getAnnotations(java.lang.Object hAnnotationSet)
Gets the annotations that are currently loaded by the document. |
abstract boolean |
getPrivilege(java.lang.Object hAnnotationSet,
int privilegeID)
Gets the privileges for the annotation set. |
abstract java.lang.Class[] |
getSupportedAnnotations()
Returns supported annotation types. |
abstract void |
initialize(CMBAnnotationEngineCallbacks callbacks,
java.util.Properties properties)
Initializes the annotations engine. |
abstract java.lang.Object |
loadAnnotationSet(java.io.InputStream annotationStream,
java.lang.String format,
int documentResolution,
int numOfParts,
int partNumber)
Initializes processing of a group of annotations by the annotations engine. |
abstract void |
removeAnnotation(java.lang.Object hAnnotationSet,
CMBPageAnnotation newPageAnnotation)
Called to remove an annotation from the annotation set. |
abstract void |
removeAnnotationSet(java.lang.Object hAnnotationSet)
Removes the annotation set by invoking the engine callbacks to remove the annotation blobs. |
abstract void |
reorderAnnotation(java.lang.Object hAnnotationSet,
CMBPageAnnotation pageAnnotation,
int location)
Called to modify the order in which the annotations are stored in set. |
abstract void |
saveAnnotationSet(java.lang.Object hAnnotationSet,
CMBPageAnnotation[] pageAnnotations)
Saves the annotation set by invoking the engine callbacks to save the annotation blobs. |
abstract void |
terminate()
Terminates the engine. |
abstract void |
updateAnnotation(java.lang.Object hAnnotationSet,
CMBPageAnnotation pageAnnotation,
int index)
Called to update an existing annotation when its attributes change. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public CMBAnnotationEngine()
Method Detail |
public abstract void initialize(CMBAnnotationEngineCallbacks callbacks, java.util.Properties properties)
callbacks
- The methods to get additional annotations parts.properties
- The engine specific properties.public abstract void terminate()
public abstract boolean canLoadAnnotationFormat(java.lang.String format)
format
- A string constant for the type of annotations requested.public abstract boolean canSaveAnnotationFormat(java.lang.String srcFormat, java.lang.String destFormat)
sourceFormat
- A string constant for the type of annotations.
For ex.'application/vnd.ibm.modcap' for CM v8 annotations or a two letter representation
of the server type 'DL','OD','V4',etc.destFormat
- A string constant for the type of annotations. E.g. 'DL' for CM v7 annotations.public abstract java.lang.Class[] getSupportedAnnotations()
public abstract java.lang.Object loadAnnotationSet(java.io.InputStream annotationStream, java.lang.String format, int documentResolution, int numOfParts, int partNumber) throws java.io.IOException
annotationStream
- An input stream containing the data for the annotations.
If the annotation data is a multi-parted, this input stream contains the data
for the first part of the annotation data.format
- A string constant for the type of annotations.
For ex.'application/vnd.ibm.modcap' for CM v8 annotations or a two letter representation
of the server type 'DL','OD','V4',etc.documentResolution
- The image resolution of the document that was loaded in pixels per inch.numberOfParts
- The number of parts that compose the entire set of annotations.
This will be 1 for a single-part annotation group.partNumber
- The annotation part number that is loaded. First part is usually '0'.public abstract void saveAnnotationSet(java.lang.Object hAnnotationSet, CMBPageAnnotation[] pageAnnotations) throws java.io.IOException
hAnnotationSet
- The handle of the set of annotations, as returned from loadAnnotationSet.pageAnnotations
- The array of CMBPageAnnotation objects to be saved.public abstract void removeAnnotationSet(java.lang.Object hAnnotationSet)
hAnnotationSet
- The handle to the annotation set, as returned from loadAnnotationSet.public abstract void dropAnnotationSet(java.lang.Object hAnnotationSet)
hAnnotationSet
- The handle to the annotation set, as returned from loadAnnotationSet.public abstract CMBPageAnnotation[] getAnnotations(java.lang.Object hAnnotationSet)
hAnnotationSet
- The handle to the annotation set.public abstract boolean getPrivilege(java.lang.Object hAnnotationSet, int privilegeID)
hAnnotationSet
- The handle of the set of annotations.privilegeID
- The privilege typepublic abstract void addAnnotation(java.lang.Object hAnnotationSet, CMBPageAnnotation newPageAnnotation, int page)
hAnnotationSet
- The handle to the annotation set, as returned from loadAnnotationSet.newPageAnnotation
- The CMBPageAnnotation instance to be added.page
- The page to which the annotation is to be added.public abstract void removeAnnotation(java.lang.Object hAnnotationSet, CMBPageAnnotation newPageAnnotation)
hAnnotationSet
- The handle to the annotation set, as returned from loadAnnotationSet.newPageAnnotation
- The CMBPageAnnotation instance to be removed.public abstract void reorderAnnotation(java.lang.Object hAnnotationSet, CMBPageAnnotation pageAnnotation, int location)
hAnnotationSet
- The handle to the annotation set, as returned from loadAnnotationSet.pageAnnotation
- The CMBPageAnnotation instance to be reordered.location
- The new index of the annotation in the set.public abstract void updateAnnotation(java.lang.Object hAnnotationSet, CMBPageAnnotation pageAnnotation, int index)
hAnnotationSet
- The handle to the annotation set, as returned from loadAnnotationSet.pageAnnotation
- The CMBPageAnnotation instance to be updated.index
- The index of the annotation in the set.
|
EIP JavaBeans | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |