Ejemplo n.º 1
0
 public ScoringContext getPrototype() {
   PassageScoringContext context = new PassageScoringContext();
   context.document = this.document;
   context.cachable = this.cachable;
   context.begin = this.begin;
   context.end = this.end;
   return context;
 }
Ejemplo n.º 2
0
  public void setFrom(ScoringContext o) {
    assert (o != null);

    PassageScoringContext other = (PassageScoringContext) o;

    if (this.getClass() != other.getClass()) {
      throw new UnsupportedOperationException(
          "ScoringContext implementation class changed from "
              + this.getClass()
              + " to "
              + other.getClass());
    }

    this.document = other.document;
    this.cachable = other.cachable;
    this.begin = other.begin;
    this.end = other.end;
  }