KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > enhydra > snapper > wrapper > lucene > LuceneIndexerFactory


1 /*
2  * Created on Apr 8, 2005
3  *
4  */

5 package org.enhydra.snapper.wrapper.lucene;
6
7 import org.enhydra.snapper.api.Indexer;
8 import org.enhydra.snapper.api.indexing.IndexerFactory;
9 import org.enhydra.snapper.api.logging.LoggingManager;
10
11 /**
12  * @author Igor Smirnov
13  */

14 public class LuceneIndexerFactory implements IndexerFactory {
15     
16     protected static LoggingManager logger;
17     Indexer indexer = null;
18
19     /* (non-Javadoc)
20      * @see org.enhydra.snapper.api.indexing.IndexerFactory#configure(org.enhydra.snapper.api.logging.LoggingManager)
21      */

22     public void configure(LoggingManager logger) {
23         LuceneIndexerFactory.logger = logger;
24         try {
25             
26             // Create the value object
27
//objectClass = Class.forName(fullClassName);
28

29             //indexer = new LuceneIndexer();
30
//indexer.configure(logger);
31
} catch (Exception JavaDoc ex) {
32             System.out.println("Error on creating Indexer" + ex);
33         }
34     }
35     
36     public Indexer getIndexer(){
37         return indexer;
38     }
39     
40     public Indexer newIndexer(){
41         indexer = new LuceneIndexer();
42         //indexer.configure(logger);
43
return indexer;
44     }
45     
46     public void removeIndexer(){
47         indexer = null;
48     }
49
50 }
51
Popular Tags