Renamed protected field back to its 1.3 name, for back-compatibility.

git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@150329 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Doug Cutting 2004-05-11 19:28:51 +00:00
parent 1ed81e4fdc
commit 2a2158c439
2 changed files with 29 additions and 29 deletions

View File

@ -73,68 +73,68 @@ public class FilterIndexReader extends IndexReader {
public void close() throws IOException { in.close(); } public void close() throws IOException { in.close(); }
} }
protected IndexReader baseReader; protected IndexReader in;
/** /**
* <p>Construct a FilterIndexReader based on the specified base reader. * <p>Construct a FilterIndexReader based on the specified base reader.
* Directory locking for delete, undeleteAll, and setNorm operations is * Directory locking for delete, undeleteAll, and setNorm operations is
* left to the base reader.</p> * left to the base reader.</p>
* <p>Note that base reader is closed if this FilterIndexReader is closed.</p> * <p>Note that base reader is closed if this FilterIndexReader is closed.</p>
* @param baseReader specified base reader. * @param in specified base reader.
*/ */
public FilterIndexReader(IndexReader baseReader) { public FilterIndexReader(IndexReader in) {
super(baseReader.directory()); super(in.directory());
this.baseReader = baseReader; this.in = in;
} }
public TermFreqVector[] getTermFreqVectors(int docNumber) public TermFreqVector[] getTermFreqVectors(int docNumber)
throws IOException { throws IOException {
return baseReader.getTermFreqVectors(docNumber); return in.getTermFreqVectors(docNumber);
} }
public TermFreqVector getTermFreqVector(int docNumber, String field) public TermFreqVector getTermFreqVector(int docNumber, String field)
throws IOException { throws IOException {
return baseReader.getTermFreqVector(docNumber, field); return in.getTermFreqVector(docNumber, field);
} }
public int numDocs() { return baseReader.numDocs(); } public int numDocs() { return in.numDocs(); }
public int maxDoc() { return baseReader.maxDoc(); } public int maxDoc() { return in.maxDoc(); }
public Document document(int n) throws IOException { return baseReader.document(n); } public Document document(int n) throws IOException { return in.document(n); }
public boolean isDeleted(int n) { return baseReader.isDeleted(n); } public boolean isDeleted(int n) { return in.isDeleted(n); }
public boolean hasDeletions() { return baseReader.hasDeletions(); } public boolean hasDeletions() { return in.hasDeletions(); }
protected void doUndeleteAll() throws IOException { baseReader.undeleteAll(); } protected void doUndeleteAll() throws IOException { in.undeleteAll(); }
public byte[] norms(String f) throws IOException { return baseReader.norms(f); } public byte[] norms(String f) throws IOException { return in.norms(f); }
public void norms(String f, byte[] bytes, int offset) throws IOException { public void norms(String f, byte[] bytes, int offset) throws IOException {
baseReader.norms(f, bytes, offset); in.norms(f, bytes, offset);
} }
protected void doSetNorm(int d, String f, byte b) throws IOException { protected void doSetNorm(int d, String f, byte b) throws IOException {
baseReader.setNorm(d, f, b); in.setNorm(d, f, b);
} }
public TermEnum terms() throws IOException { return baseReader.terms(); } public TermEnum terms() throws IOException { return in.terms(); }
public TermEnum terms(Term t) throws IOException { return baseReader.terms(t); } public TermEnum terms(Term t) throws IOException { return in.terms(t); }
public int docFreq(Term t) throws IOException { return baseReader.docFreq(t); } public int docFreq(Term t) throws IOException { return in.docFreq(t); }
public TermDocs termDocs() throws IOException { return baseReader.termDocs(); } public TermDocs termDocs() throws IOException { return in.termDocs(); }
public TermPositions termPositions() throws IOException { public TermPositions termPositions() throws IOException {
return baseReader.termPositions(); return in.termPositions();
} }
protected void doDelete(int n) throws IOException { baseReader.delete(n); } protected void doDelete(int n) throws IOException { in.delete(n); }
protected void doCommit() throws IOException { baseReader.commit(); } protected void doCommit() throws IOException { in.commit(); }
protected void doClose() throws IOException { baseReader.close(); } protected void doClose() throws IOException { in.close(); }
public Collection getFieldNames() throws IOException { public Collection getFieldNames() throws IOException {
return baseReader.getFieldNames(); return in.getFieldNames();
} }
public Collection getFieldNames(boolean indexed) throws IOException { public Collection getFieldNames(boolean indexed) throws IOException {
return baseReader.getFieldNames(indexed); return in.getFieldNames(indexed);
} }
/** /**
@ -144,6 +144,6 @@ public class FilterIndexReader extends IndexReader {
* @return Collection of Strings indicating the names of the fields * @return Collection of Strings indicating the names of the fields
*/ */
public Collection getIndexedFieldNames(boolean storedTermVector) { public Collection getIndexedFieldNames(boolean storedTermVector) {
return baseReader.getIndexedFieldNames(storedTermVector); return in.getIndexedFieldNames(storedTermVector);
} }
} }

View File

@ -81,12 +81,12 @@ public class TestFilterIndexReader extends TestCase {
/** Filter terms with TestTermEnum. */ /** Filter terms with TestTermEnum. */
public TermEnum terms() throws IOException { public TermEnum terms() throws IOException {
return new TestTermEnum(baseReader.terms()); return new TestTermEnum(in.terms());
} }
/** Filter positions with TestTermPositions. */ /** Filter positions with TestTermPositions. */
public TermPositions termPositions() throws IOException { public TermPositions termPositions() throws IOException {
return new TestTermPositions(baseReader.termPositions()); return new TestTermPositions(in.termPositions());
} }
} }