View Javadoc

1   package org.kuali.ole.solr;
2   
3   import org.apache.solr.client.solrj.SolrServerException;
4   import org.apache.solr.client.solrj.response.QueryResponse;
5   import org.apache.solr.common.SolrDocument;
6   
7   import org.apache.solr.common.SolrInputDocument;
8   import org.kuali.ole.docstore.discovery.service.IndexerService;
9   import org.kuali.ole.docstore.discovery.service.IndexerServiceImpl;
10  import org.kuali.ole.docstore.model.xmlpojo.ingest.RequestDocument;
11  
12  import java.io.File;
13  import java.io.IOException;
14  import java.util.ArrayList;
15  import java.util.List;
16  
17  /**
18   * Created by IntelliJ IDEA.
19   * User: ND6967
20   * Date: 3/14/12
21   * Time: 7:34 PM
22   * To change this template use File | Settings | File Templates.
23   */
24  public class DummyIndexerServiceImpl
25          implements IndexerService {
26      private static DummyIndexerServiceImpl genericIndexerServiceImpl = new DummyIndexerServiceImpl();
27  
28      private DummyIndexerServiceImpl() {
29  
30      }
31  
32      public static DummyIndexerServiceImpl getInstance() {
33          System.out.println("in DummyIndexerServiceImpl");
34          return genericIndexerServiceImpl;
35      }
36  
37      @Override
38      public String deleteDocuments(String s, List<String> strings) {
39          return IndexerServiceImpl.SUCCESS;  //To change body of implemented methods use File | Settings | File Templates.
40      }
41  
42      @Override
43      public String deleteDocument(String s, String s1) {
44          return IndexerServiceImpl.SUCCESS;  //To change body of implemented methods use File | Settings | File Templates.
45      }
46  
47      @Override
48      public String indexDocumentsFromFileBySolrDoc(String s, String s1, String s2, String s3) {
49          return IndexerServiceImpl.SUCCESS;  //To change body of implemented methods use File | Settings | File Templates.
50      }
51  
52      @Override
53      public String indexDocumentsFromDirBySolrDoc(String s, String s1, String s2, String s3) {
54          return null;  //To change body of implemented methods use File | Settings | File Templates.
55      }
56  
57      @Override
58      public String indexDocumentsFromStringBySolrDoc(String s, String s1, String s2, String s3) throws IOException {
59          return null;  //To change body of implemented methods use File | Settings | File Templates.
60      }
61  
62      @Override
63      public String indexDocumentsFromFiles(String s, String s1, String s2, List<File> files) {
64          return null;  //To change body of implemented methods use File | Settings | File Templates.
65      }
66  
67      @Override
68      public List<SolrDocument> getSolrDocumentBySolrId(String s) {
69          return new ArrayList<SolrDocument>();  //To change body of implemented methods use File | Settings | File Templates.
70      }
71  
72      @Override
73      public List<SolrDocument> getSolrDocument(String s, String s1) {
74          return new ArrayList<SolrDocument>();  //To change body of implemented methods use File | Settings | File Templates.
75      }
76  
77      @Override
78      public QueryResponse searchBibRecord(String s, String s1, String s2, String s3, String s4, String s5) {
79          return new QueryResponse();  //To change body of implemented methods use File | Settings | File Templates.
80      }
81  
82      @Override
83      public void cleanupDiscoveryData() throws IOException, SolrServerException {
84          //To change body of implemented methods use File | Settings | File Templates.
85      }
86  
87      @Override
88      public String bulkIndexDocuments(List<RequestDocument> requestDocumentList, boolean isCommit) {
89          return IndexerServiceImpl.SUCCESS;  //To change body of implemented methods use File | Settings | File Templates.
90      }
91  
92      @Override
93      public String indexDocument(RequestDocument requestDocument) {
94          return IndexerServiceImpl.SUCCESS;  //To change body of implemented methods use File | Settings | File Templates.
95      }
96  
97      @Override
98      public String indexDocument(RequestDocument requestDocument, boolean commit) {
99          return IndexerServiceImpl.SUCCESS;  //To change body of implemented methods use File | Settings | File Templates.
100     }
101 
102     @Override
103     public String indexDocuments(List<RequestDocument> requestDocumentList) {
104         return IndexerServiceImpl.SUCCESS;  //To change body of implemented methods use File | Settings | File Templates.
105     }
106 
107     @Override
108     public String indexDocuments(List<RequestDocument> requestDocumentList, boolean commit) {
109         return IndexerServiceImpl.SUCCESS;  //To change body of implemented methods use File | Settings | File Templates.
110     }
111 
112     @Override
113     public String indexSolrDocuments(List<SolrInputDocument> solrDocs) {
114         return IndexerServiceImpl.SUCCESS;  //To change body of implemented methods use File | Settings | File Templates.
115     }
116 
117     @Override
118     public void commit() throws Exception {
119     }
120 
121     @Override
122     public void rollback() throws Exception {
123     }
124 }