Coverage Report - org.galagosearch.core.store.SQLDocumentStoreWriter
 
Classes in this File Line Coverage Branch Coverage Complexity
SQLDocumentStoreWriter
0%
0/9
N/A
0
 
 1  
 // BSD License (http://www.galagosearch.org/license)
 2  
 package org.galagosearch.core.store;
 3  
 
 4  
 import java.io.IOException;
 5  
 import java.sql.SQLException;
 6  
 import org.galagosearch.core.parse.Document;
 7  
 import org.galagosearch.tupleflow.Processor;
 8  
 import org.galagosearch.tupleflow.TupleFlowParameters;
 9  
 
 10  
 /**
 11  
  *
 12  
  * @author trevor
 13  
  */
 14  0
 public class SQLDocumentStoreWriter implements Processor<Document> {
 15  
     SQLDocumentStore documentStore;
 16  
 
 17  0
     public SQLDocumentStoreWriter(TupleFlowParameters parameters) throws SQLException, ClassNotFoundException {
 18  0
         documentStore = new SQLDocumentStore(parameters);
 19  0
     }
 20  
 
 21  
     public void process(Document document) throws IOException {
 22  0
         documentStore.add(document);
 23  0
     }
 24  
 
 25  
     public void close() throws IOException {
 26  0
         documentStore.close();
 27  0
     }
 28  
 
 29  
     public Class<Document> getInputClass() {
 30  0
         return Document.class;
 31  
     }
 32  
 }