1 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 14 public class LuceneIndexerFactory implements IndexerFactory { 15 16 protected static LoggingManager logger; 17 Indexer indexer = null; 18 19 22 public void configure(LoggingManager logger) { 23 LuceneIndexerFactory.logger = logger; 24 try { 25 26 29 } catch (Exception 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 return indexer; 44 } 45 46 public void removeIndexer(){ 47 indexer = null; 48 } 49 50 } 51 | Popular Tags |