ISSearch
Interface ISDBinterface


public interface ISDBinterface

Interface of the database connection. This class is used to open and close the database connection, to prepare the DB schema (tables and indexes) for storage, and to store crawled data into this schema.

See Also:
Connection, ResultSet, Statement, PreparedStatement, OracleConnection, DriverManager

Method Summary
 void closeConnection()
          Closes the open database connection.
 boolean createFeatures()
          This method creates document features from previously stored word stems and stores them (as well as associated feature weights) into additional schema tables.
 boolean createSchema()
          This method creates the database infrastructure that is required for storage of crawled information: relations (tables), index structures, and integrity constraints.
 void dropSchema()
          This method drops all previously created schema elements (tables, associated indexes, and integrity contraints) to fully cleanup the database account for next experiment.
 Connection getConnection()
          Returns the internal database connection of the database interface (only when it is open and valid).
 boolean isOpen()
          Returns the current state of the database connection
 boolean openConnection(String user, String password, String hostname, int port, String service_name)
          Opens the Database connection to the Oracle instance specified by input parameters.
 boolean store(URL url, ISDocumentInterface doc)
          Stores the content of an ISDocument and its URL into the database.
 

Method Detail

openConnection

public boolean openConnection(String user,
                              String password,
                              String hostname,
                              int port,
                              String service_name)
Opens the Database connection to the Oracle instance specified by input parameters.

Parameters:
user - the Oracle user name
password - the database password
hostname - the hostname (or IP address) of the Oracle server
port - the port of the Oracle listener for connections over a TCP/IP network (standard is 1521)
service_name - the name of the requested Oracle service
Returns:
true, if the connect was succesful; false otherwise.

closeConnection

public void closeConnection()
Closes the open database connection.


isOpen

public boolean isOpen()
Returns the current state of the database connection

Returns:
true, if the database was successfully opened and is currently not yet closed.

getConnection

public Connection getConnection()
Returns the internal database connection of the database interface (only when it is open and valid). This method must return the current internal database connection (when available), it should NOT open any additional connections.

Returns:
the database connection (when open and valid); null otherwise.

store

public boolean store(URL url,
                     ISDocumentInterface doc)
Stores the content of an ISDocument and its URL into the database. At least stems of all words from the ISDocument and the absolute URL of the source Web document are required for the search engine; the storage of other available informations (original words and positions, links) is optional.

Returns:
true, if the storage attempt was successful; false otherwise.

createSchema

public boolean createSchema()
This method creates the database infrastructure that is required for storage of crawled information: relations (tables), index structures, and integrity constraints. At least stems of all words from the ISDocument and the absolute URL of the source Web document are required for the search engine. Additionally, you should provide data structures for document features (stem, RTF weight, TF*IDF weight) that will be computed from stored word stems after the crawl. Of course, the schema must also contain information about associations between features, terms, and URLs (e.g. using unique Doc-IDs) to allow the keyword-based search on stored data.

Returns:
true, if the schema was created successfully; false otherwise.

dropSchema

public void dropSchema()
This method drops all previously created schema elements (tables, associated indexes, and integrity contraints) to fully cleanup the database account for next experiment.


createFeatures

public boolean createFeatures()
This method creates document features from previously stored word stems and stores them (as well as associated feature weights) into additional schema tables. At least, the string of the word stem, the RTF weight, and the TF*IDF weight must be stored for each feature and document. Of course, the schema must also contain information about associations between features, terms, and URLs (e.g. using unique Doc-IDs) to allow keyword-based search on stored data.