Remove some deprecated warnings from core.

git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@150567 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Christoph Goller 2004-10-06 09:05:56 +00:00
parent f1667be0fc
commit bbf79a5ad0
4 changed files with 14 additions and 41 deletions

View File

@ -138,16 +138,6 @@ public class FilterIndexReader extends IndexReader {
return in.getFieldNames(indexed);
}
/**
*
* @param storedTermVector if true, returns only Indexed fields that have term vector info,
* else only indexed fields without term vector info
* @return Collection of Strings indicating the names of the fields
*/
public Collection getIndexedFieldNames(boolean storedTermVector) {
return in.getIndexedFieldNames(storedTermVector);
}
public Collection getIndexedFieldNames (Field.TermVector tvSpec){
return in.getIndexedFieldNames(tvSpec);
}

View File

@ -26,6 +26,8 @@ import org.apache.lucene.store.Lock;
import java.io.File;
import java.io.IOException;
import java.util.Collection;
import java.util.HashSet;
import java.util.Set;
/** IndexReader is an abstract class, providing an interface for accessing an
index. Search of an index is done entirely through this abstract interface,
@ -564,7 +566,18 @@ public abstract class IndexReader {
*
* @deprecated Replaced by {@link #getIndexedFieldNames (Field.TermVector tvSpec)}
*/
public abstract Collection getIndexedFieldNames(boolean storedTermVector);
public Collection getIndexedFieldNames(boolean storedTermVector){
if(storedTermVector){
Set fieldSet = new HashSet();
fieldSet.addAll(getIndexedFieldNames(Field.TermVector.YES));
fieldSet.addAll(getIndexedFieldNames(Field.TermVector.WITH_POSITIONS));
fieldSet.addAll(getIndexedFieldNames(Field.TermVector.WITH_OFFSETS));
fieldSet.addAll(getIndexedFieldNames(Field.TermVector.WITH_POSITIONS_OFFSETS));
return fieldSet;
}
else
return getIndexedFieldNames(Field.TermVector.NO);
}
/**
* Get a list of unique field names that exist in this index, are indexed, and have

View File

@ -235,17 +235,6 @@ public class MultiReader extends IndexReader {
return fieldSet;
}
public Collection getIndexedFieldNames(boolean storedTermVector) {
// maintain a unique set of field names
Set fieldSet = new HashSet();
for (int i = 0; i < subReaders.length; i++) {
IndexReader reader = subReaders[i];
Collection names = reader.getIndexedFieldNames(storedTermVector);
fieldSet.addAll(names);
}
return fieldSet;
}
public Collection getIndexedFieldNames (Field.TermVector tvSpec){
// maintain a unique set of field names
Set fieldSet = new HashSet();

View File

@ -337,25 +337,6 @@ class SegmentReader extends IndexReader {
}
return fieldSet;
}
/**
*
* @param storedTermVector if true, returns only Indexed fields that have term vector info,
* else only indexed fields without term vector info
* @return Collection of Strings indicating the names of the fields
*/
public Collection getIndexedFieldNames(boolean storedTermVector) {
if(storedTermVector){
Set fieldSet = new HashSet();
fieldSet.addAll(getIndexedFieldNames(Field.TermVector.YES));
fieldSet.addAll(getIndexedFieldNames(Field.TermVector.WITH_POSITIONS));
fieldSet.addAll(getIndexedFieldNames(Field.TermVector.WITH_OFFSETS));
fieldSet.addAll(getIndexedFieldNames(Field.TermVector.WITH_POSITIONS_OFFSETS));
return fieldSet;
}
else
return getIndexedFieldNames(Field.TermVector.NO);
}
public Collection getIndexedFieldNames (Field.TermVector tvSpec){
boolean storedTermVector;