/**
 * 
 */
package querqy.rewrite;

import java.util.Set;

import querqy.model.ExpandedQuery;
import querqy.model.Term;

/**
 * @author René Kriegler, @renekrie
 *
 */
public abstract class RewriterFactory {

    private final String rewriterId;

    protected RewriterFactory(final String rewriterId) {
        this.rewriterId = rewriterId;
    }

    public abstract QueryRewriter createRewriter(ExpandedQuery input,
                                                 SearchEngineRequestAdapter searchEngineRequestAdapter);

    /**
     * <p>Get all {@link querqy.model.Term}s that will be generated by Rewriters that will be created by this class.</p>
     * <p>This only includes terms that are known when the factory is created. The terms returned from this method might
     * be used to optimise caching.</p>
     * <p>This method must return an empty set if no such term exists.</p>
     *
     * @return The set of {@link Term}s to be generated.
     */
    public abstract Set<Term> getCacheableGenerableTerms();

    public String getRewriterId() {
        return rewriterId;
    }


}

@@ -30,16 +30,46 @@
 write;%0A%0A
+import java.util.Collections;%0A
 import j
@@ -545,24 +545,454 @@
 tAdapter);%0A%0A
+    /**%0A     * For clarity, implement %7B@link #getCacheableGenerableTerms()%7D instead of this%0A     * method. To ensure backwards compatibility, said method delegates to this one.%0A     * %0A     * @return The set of %7B@link Term%7Ds to be generated, defaults to an empty set.%0A     */%0A    @Deprecated%0A    public Set%3CTerm%3E getGenerableTerms() %7B%0A        return Collections.emptySet();%0A    %7D%0A                                                 %0A
     /**%0A    
@@ -1104,33 +1104,32 @@
  class.%3C/p%3E%0A    
- 
 * %3Cp%3EThis only i
@@ -1232,17 +1232,16 @@
 ght%0A    
- 
 * be use
@@ -1263,25 +1263,24 @@
 aching.%3C/p%3E%0A
- 
     * %3Cp%3EThi
@@ -1341,17 +1341,16 @@
 ts.%3C/p%3E%0A
- 
     *%0A  
@@ -1347,25 +1347,24 @@
 %3E%0A    *%0A    
- 
 * @return Th
@@ -1401,19 +1401,44 @@
 enerated
+, defaults to an empty set
 .%0A
- 
     */%0A 
@@ -1447,25 +1447,16 @@
  public 
-abstract 
 Set%3CTerm
@@ -1485,17 +1485,60 @@
 eTerms()
-;
+ %7B%0A        return getGenerableTerms();%0A    %7D
 %0A%0A    pu

make method signature backwards compatible