KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > daffodilwoods > daffodildb > server > sql99 > fulltext > dml > DaffodilFullTextAdapter


1 package com.daffodilwoods.daffodildb.server.sql99.fulltext.dml;
2
3 import com.daffodilwoods.fulltext.common._FullTextAdapter;
4 import com.daffodilwoods.fulltext.common._FullTextModifications;
5 import com.daffodilwoods.database.resource.DException;
6 import com.daffodilwoods.daffodildb.server.datasystem.interfaces._IndexTable;
7
8 /**
9  * <p>Title: DaffodilFullTextAdapter </p>
10  * <p>Description: This Class accepts the calls from data system
11  * to initialize the iterators on token and location tables iterators.</p>
12  * <p>Copyright: Copyright (c) 2003</p>
13  * <p>Company: </p>
14  * @author not attributable
15  * @version 1.0
16  */

17 public class DaffodilFullTextAdapter implements _FullTextAdapter{
18
19   /**
20    * When unicode is false, handles the one byte ascii encoding, true for
21    * unicode support.
22    */

23   private boolean unicode;
24   /**
25    * Instance variable having TOKEN table details.
26    */

27   private _IndexTable tokenTable;
28   /**
29    * Instance variable having LOCATION table details.
30    */

31   private _IndexTable locationTable;
32   /**
33    * Index of Full-Text Enabled Column in the table.
34    */

35    private int []columnIndex;
36
37    public DaffodilFullTextAdapter(_IndexTable tokenTable0,_IndexTable locationTable0,boolean unicode0,int[] columnIndex0) {
38       tokenTable = tokenTable0;
39       locationTable = locationTable0;
40       unicode = unicode0;
41       columnIndex = columnIndex0;
42    }
43
44    /**
45     * This method determines the charachter encoding
46     * i.e. ascii or unicode encoding.
47     * @return true for unicode encoding and false for ascii encoding
48     */

49    public boolean encoding(){
50       return unicode;
51    }
52
53    /**
54     * This method returns the DML object instance corresonding to TOKEN table.
55     * @return instance variable to perform insert/update/delete operations
56     * on TOKEN table and to update the database file on disk correspondingly.
57     * @throws DException
58     */

59    public _FullTextModifications getTokenTable() throws DException{
60       return new DaffodilFullTextModifications(tokenTable);
61    }
62
63    /**
64     * This method returns the DML object instance corresonding to LOCATION table.
65     * @return instance variable to perform insert/update/delete operations
66     * on LOCATION table and to update the database file on disk correspondingly.
67     * @throws DException
68     */

69    public _FullTextModifications getLocationTable() throws DException{
70       return new DaffodilFullTextModifications(locationTable);
71    }
72    /**
73     * Determines the index of full-text enabled column in the actual table.
74     * @return index of full-text enabled column
75     * @throws DException
76     */

77    public int[] getColumnIndex()throws DException{
78      return this.columnIndex ;
79    }
80 }
81
Popular Tags