Enterprise Information Portal APIs

com.ibm.gcs.db.component
Class LinksTableDef

java.lang.Object
  |
  +--com.ibm.gcs.db.component.LinksTableDef

public class LinksTableDef
extends java.lang.Object

This class provides the constants for column names of the database table LINKS_TABLE. The LINKS_TABLE stores child-parent link relationship information and annotation information that a parent-url makes about a child-url. This table contains many columns that represent the metadata found around a hyperlink: annotation columns. These columns are all defined as VARCHAR with varying sizes. The column names and sizes may be retrieved using getKeyTable().

This LINKS_TABLE is created by the following SQL CREATE statement:

 
  create table LINKS_TABLE( 
    CHILD_URL varchar(250) not null primary key,											
    PARENT_URL varchar(250),
    ANN_TYPE int not null default 0,
          ...
    annotation columns
          ...
  )


Field Summary
static java.lang.String ANNOTATION_TYPE
          The type of annotation: ANNOTATION_TYPE.
static java.lang.String[] annTXTColumns
          An array of the columns used by DictionaryAnnotation that represent hyperlink metadata found around a URL hyperlink.
Each column has SQL DEF: VARCHAR(n), where n varies per column.
static java.lang.String CHILD
          The parent url: PARENT_URL.
static java.lang.String OTHER
          The column used by DescriptionAnnotation to store text that a parent page says about a page that it points to: OTHER.
static java.lang.String PARENT
          The url pointed to: CHILD_URL.
static java.lang.String TABLE
          The table name: LINKS_TABLE.
 
Constructor Summary
LinksTableDef()
           
 
Method Summary
static void createTable(Transaction t)
          Given a Transaction object, executes the create statements (which create the table and associated indexes on the table).
static void dropTable(Transaction t)
          Given a Transaction object, executes the drop statement.
static java.util.Enumeration getCreateIndexSQL()
          Returns the SQL CREATE statements to create the necessary indexes on the LINKS_TABLE as an enumeration of Strings.
static java.lang.String getCreateSQL()
          Returns the SQL CREATE statement to create the tree table.
static java.util.Hashtable getKeyTable()
          Returns the names of the columns in this table and their sizes.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TABLE

public static final java.lang.String TABLE
The table name: LINKS_TABLE.

PARENT

public static final java.lang.String PARENT
The url pointed to: CHILD_URL.

CHILD

public static final java.lang.String CHILD
The parent url: PARENT_URL.

ANNOTATION_TYPE

public static final java.lang.String ANNOTATION_TYPE
The type of annotation: ANNOTATION_TYPE.

OTHER

public static final java.lang.String OTHER
The column used by DescriptionAnnotation to store text that a parent page says about a page that it points to: OTHER.
SQL DEF: VARCHAR(1000)

annTXTColumns

public static final java.lang.String[] annTXTColumns
An array of the columns used by DictionaryAnnotation that represent hyperlink metadata found around a URL hyperlink.
Each column has SQL DEF: VARCHAR(n), where n varies per column.
Constructor Detail

LinksTableDef

public LinksTableDef()
Method Detail

getCreateSQL

public static java.lang.String getCreateSQL()
Returns the SQL CREATE statement to create the tree table. The SQL CREATE statement is as follows:
 
  create table LINKS_TABLE( 
    CHILD_URL varchar(250) not null primary key,											
    PARENT_URL varchar(250),
    ANN_TYPE int not null default 0,
          ...
    annotation columns
          ...
  )
Returns:
The sql string to create the treetable.

getCreateIndexSQL

public static java.util.Enumeration getCreateIndexSQL()
Returns the SQL CREATE statements to create the necessary indexes on the LINKS_TABLE as an enumeration of Strings. The enumeration contains the following CREATE INDEX statements:
     Right now, returns an empty enumeration.
Returns:
An enumeration of SQL strings each contain a separate createIndex statement.

createTable

public static void createTable(Transaction t)
                        throws TransactionException
Given a Transaction object, executes the create statements (which create the table and associated indexes on the table).
Parameters:
t - The transaction object through which to execute the create statements.
Throws:
TransactionException - on failed SQL update.

dropTable

public static void dropTable(Transaction t)
                      throws TransactionException
Given a Transaction object, executes the drop statement.
Parameters:
t - The transaction object through which to execute the drop statements.
Throws:
TransactionException - on failed SQL update.

getKeyTable

public static java.util.Hashtable getKeyTable()
Returns the names of the columns in this table and their sizes.
Returns:
Hashtable A hashtable containing column-names with their character sizes not including the CHILD_URL, PARENT_URL, and ANN_TYPE columns.

EIP Web Crawler APIs

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