Enterprise Information Portal APIs

com.ibm.gcs.db.component
Interface DB2AnnotationFactory

All Known Implementing Classes:
DefaultDB2AnnotationFactory

public interface DB2AnnotationFactory

DB2AnnotationFactory defines methods to create instances of DB2Annotations. Since there are many different possible classes of DB2Anotations, the factory's function is to reconstruct the appopriate class. The DB2AnnotationHelper uses the DB2AnnotationFactory to create Annotations from database data and to generate an integer to identify the type of annotation in the database record. By default, DBAnnotationHelper uses the default implementation of the factory, DefaultDB2AnnotationFactory.

Packages, such as XCentral, may define their own annotation classes (like DocTypeAnnotation, EntityAnnotation) so must implement their own DB2AnnotationFactory to handle these annotation types. These packages may extend DefaultDB2AnnotationFactory which handles Description and Dictionary type annotations.


Field Summary
static java.lang.String copyright
           
 
Method Summary
 DB2Annotation createDB2Annotation(com.ibm.gcs.urlpool.Annotation ann)
          Constructs a DB2Annotation object from the given annotation.
 DB2Annotation createDB2Annotation(java.util.Hashtable h, int type)
          Constructs a DB2Annotation object of specified type from the given hashtable of data from a loaded db2 row.
 int getAnnotationType(DB2Annotation ann)
          Return an integer value that identifies the DB2Annotation type (or class).
 

Field Detail

copyright

public static final java.lang.String copyright
Method Detail

createDB2Annotation

public DB2Annotation createDB2Annotation(java.util.Hashtable h,
                                         int type)
                                  throws java.lang.Exception
Constructs a DB2Annotation object of specified type from the given hashtable of data from a loaded db2 row. (Does not set the Annotor or Annotatee for the Annotation object.)
Parameters:
h - The hastable containing the db2 data for the given annotation.
type - The annotation type as defined by the implementing class.
Returns:
DB2Annotation The proper DB2Annotation
Throws:
java.lang.Exception - if construction fails

createDB2Annotation

public DB2Annotation createDB2Annotation(com.ibm.gcs.urlpool.Annotation ann)
Constructs a DB2Annotation object from the given annotation. Does not add annotator or annotatee.
Parameters:
ann - Annotation
Returns:
DB2Annotation The proper DB2Annotation
Throws:
java.lang.Exception - if construction fails

getAnnotationType

public int getAnnotationType(DB2Annotation ann)
Return an integer value that identifies the DB2Annotation type (or class).
Parameters:
ann - DB2Annotation.
Returns:
int Type as specified by constants in the implementing class.

EIP Web Crawler APIs

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