X-Git-Url: https://git.mdrn.pl/pylucene.git/blobdiff_plain/a2e61f0c04805cfcb8706176758d1283c7e3a55c..aaeed5504b982cf3545252ab528713250aa33eed:/lucene-java-3.4.0/lucene/src/java/org/apache/lucene/index/FilterIndexReader.java
diff --git a/lucene-java-3.4.0/lucene/src/java/org/apache/lucene/index/FilterIndexReader.java b/lucene-java-3.4.0/lucene/src/java/org/apache/lucene/index/FilterIndexReader.java
deleted file mode 100644
index 5717091..0000000
--- a/lucene-java-3.4.0/lucene/src/java/org/apache/lucene/index/FilterIndexReader.java
+++ /dev/null
@@ -1,318 +0,0 @@
-package org.apache.lucene.index;
-
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-import org.apache.lucene.document.Document;
-import org.apache.lucene.document.FieldSelector;
-import org.apache.lucene.store.Directory;
-import org.apache.lucene.util.MapBackedSet;
-
-import java.io.IOException;
-import java.util.Collection;
-import java.util.Map;
-import java.util.concurrent.ConcurrentHashMap;
-
-/** A FilterIndexReader
contains another IndexReader, which it
- * uses as its basic source of data, possibly transforming the data along the
- * way or providing additional functionality. The class
- * FilterIndexReader
itself simply implements all abstract methods
- * of IndexReader
with versions that pass all requests to the
- * contained index reader. Subclasses of FilterIndexReader
may
- * further override some of these methods and may also provide additional
- * methods and fields.
- */
-public class FilterIndexReader extends IndexReader {
-
- /** Base class for filtering {@link TermDocs} implementations. */
- public static class FilterTermDocs implements TermDocs {
- protected TermDocs in;
-
- public FilterTermDocs(TermDocs in) { this.in = in; }
-
- public void seek(Term term) throws IOException { in.seek(term); }
- public void seek(TermEnum termEnum) throws IOException { in.seek(termEnum); }
- public int doc() { return in.doc(); }
- public int freq() { return in.freq(); }
- public boolean next() throws IOException { return in.next(); }
- public int read(int[] docs, int[] freqs) throws IOException {
- return in.read(docs, freqs);
- }
- public boolean skipTo(int i) throws IOException { return in.skipTo(i); }
- public void close() throws IOException { in.close(); }
- }
-
- /** Base class for filtering {@link TermPositions} implementations. */
- public static class FilterTermPositions
- extends FilterTermDocs implements TermPositions {
-
- public FilterTermPositions(TermPositions in) { super(in); }
-
- public int nextPosition() throws IOException {
- return ((TermPositions) this.in).nextPosition();
- }
-
- public int getPayloadLength() {
- return ((TermPositions) this.in).getPayloadLength();
- }
-
- public byte[] getPayload(byte[] data, int offset) throws IOException {
- return ((TermPositions) this.in).getPayload(data, offset);
- }
-
-
- // TODO: Remove warning after API has been finalized
- public boolean isPayloadAvailable() {
- return ((TermPositions)this.in).isPayloadAvailable();
- }
- }
-
- /** Base class for filtering {@link TermEnum} implementations. */
- public static class FilterTermEnum extends TermEnum {
- protected TermEnum in;
-
- public FilterTermEnum(TermEnum in) { this.in = in; }
-
- @Override
- public boolean next() throws IOException { return in.next(); }
- @Override
- public Term term() { return in.term(); }
- @Override
- public int docFreq() { return in.docFreq(); }
- @Override
- public void close() throws IOException { in.close(); }
- }
-
- protected IndexReader in;
-
- /**
- *
Construct a FilterIndexReader based on the specified base reader. - * Directory locking for delete, undeleteAll, and setNorm operations is - * left to the base reader.
- *Note that base reader is closed if this FilterIndexReader is closed.
- * @param in specified base reader. - */ - public FilterIndexReader(IndexReader in) { - super(); - this.in = in; - readerFinishedListeners = new MapBackedSet