KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > daffodilwoods > fulltext > common > FullTextFactory


1 package com.daffodilwoods.fulltext.common;
2
3 import com.daffodilwoods.database.resource.DException;
4 import com.daffodilwoods.daffodildb.server.sql99.fulltext.dml.DaffodilFullTextDML;
5 import com.daffodilwoods.daffodildb.server.sql99.fulltext.common.FullTextByteParser;
6
7 /**
8  * <p>Title: FullTextFactory</p>
9  * <p>Description: This Class provides interfaces for creation of full-text
10  * index creation and handles the corresponding effect on token and location tables
11  * of dml operatations on actual table.
12  * </p>
13  * <p>Copyright: Copyright (c) 2003</p>
14  * <p>Company: </p>
15  * @author not attributable
16  * @version 1.0
17  */

18 public class FullTextFactory {
19
20   /**
21    * Provides interface for maintaining token and location tables while DML
22    * operations are performed on actual table.
23    * @param adapter an instance of DaffodilFullTextModification handing token
24    * or location table.
25    * @return
26    * @throws DException
27    */

28    public _FullTextDML getFullTextDML(_FullTextAdapter adapter) throws DException{
29       return new DaffodilFullTextDML(new FullTextByteParser(),adapter);
30    }
31
32    /**
33     * Provides the interfaces that performes the actual full-text index creation.
34     * For each table, for which full text index is created, corresponding
35     * token and location tables and indexes are created.
36     * @param generator
37     * @return
38     * @throws DException
39     */

40    public _FullTextCreator getFullTextIndexCreator(_FullTextGenerator generator) throws DException{
41       return generator.getIndexCreator();
42    }
43 }
44
Popular Tags