package de.uni_tuebingen.ub.ixTheo.keywordChainSearch;

import java.io.IOException;


import org.apache.lucene.index.AtomicReaderContext;
import org.apache.lucene.queries.CustomScoreProvider;
import org.apache.lucene.queries.CustomScoreQuery;
import org.apache.lucene.search.Query;

public class KeywordChainSearchQuery extends CustomScoreQuery {
      
        final Query query;
        final String origQueryString;

        public KeywordChainSearchQuery(final Query subQuery, final String origQueryString) {
                super(subQuery);
                this.query = subQuery;
                this.origQueryString = origQueryString;
        }

        @Override
        protected CustomScoreProvider getCustomScoreProvider(final AtomicReaderContext context) throws IOException {
        	return new KeywordChainScoreProvider(context, query, origQueryString);
        }
        
        @Override
        public String name() {
                return "Keyword Chain Search Query";
        }
}

@@ -53,37 +53,8 @@
 h;%0A%0A
-import java.io.IOException;%0A%0A
 %0Aimp
@@ -81,22 +81,20 @@
 e.index.
-Atomic
+Leaf
 ReaderCo
@@ -245,16 +245,46 @@
 Query;%0A%0A
+import java.io.IOException;%0A%0A%0A
 public c
@@ -339,31 +339,21 @@
 Query %7B%0A
-      %0A   
+%0A
     
- 
 final Qu
@@ -359,28 +359,24 @@
 uery query;%0A
-    
     final St
@@ -398,20 +398,16 @@
 tring;%0A%0A
-    
     publ
@@ -495,24 +495,16 @@
         
-       
- 
 super(su
@@ -512,24 +512,16 @@
 Query);%0A
-        
         
@@ -551,24 +551,16 @@
         
-   
-     
 this.ori
@@ -599,23 +599,15 @@
     
-    %7D%0A%0A   
+%7D%0A%0A
     
- 
 @Ove
@@ -608,28 +608,24 @@
   @Override%0A
-    
     protecte
@@ -679,14 +679,12 @@
 nal 
-Atomic
+Leaf
 Read
@@ -735,9 +735,8 @@
     
-%09
 retu
@@ -810,27 +810,11 @@
     
-    %7D%0A        %0A    
+%7D%0A%0A
     
@@ -823,20 +823,16 @@
 verride%0A
-    
     publ
@@ -850,24 +850,16 @@
 ame() %7B%0A
-        
         
@@ -895,20 +895,16 @@
 Query%22;%0A
-    
     %7D%0A%7D%0A

Update to VuFind 3.0