// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*-

#ifndef __org_apache_lucene_index_SegmentReader__
#define __org_apache_lucene_index_SegmentReader__

#pragma interface

#include <org/apache/lucene/index/IndexReader.h>
#include <gcj/array.h>

extern "Java"
{
  namespace org
  {
    namespace apache
    {
      namespace lucene
      {
        namespace document
        {
          class Document;
          class FieldSelector;
        }
        namespace store
        {
          class Directory;
          class IndexInput;
        }
        namespace util
        {
          class BitVector;
        }
        namespace index
        {
          class TermFreqVector;
          class IndexReader$FieldOption;
          class TermPositions;
          class TermDocs;
          class Term;
          class TermEnum;
          class SegmentInfos;
          class SegmentReader;
          class CompoundFileReader;
          class TermVectorsReader;
          class TermInfosReader;
          class FieldsReader;
          class FieldInfos;
          class SegmentInfo;
        }
      }
    }
  }
}

class org::apache::lucene::index::SegmentReader : public ::org::apache::lucene::index::IndexReader
{
public:  // actually protected
  SegmentReader ();
public:
  static ::org::apache::lucene::index::SegmentReader *get (::org::apache::lucene::index::SegmentInfo *);
  static ::org::apache::lucene::index::SegmentReader *get (::org::apache::lucene::index::SegmentInfos *, ::org::apache::lucene::index::SegmentInfo *, jboolean);
  static ::org::apache::lucene::index::SegmentReader *get (::org::apache::lucene::store::Directory *, ::org::apache::lucene::index::SegmentInfo *, ::org::apache::lucene::index::SegmentInfos *, jboolean, jboolean);
private:
  void initialize (::org::apache::lucene::index::SegmentInfo *);
public:  // actually protected
  virtual void finalize ();
  virtual void doCommit ();
  virtual void doClose ();
public: // actually package-private
  static jboolean hasDeletions (::org::apache::lucene::index::SegmentInfo *);
public:
  virtual jboolean hasDeletions ();
public: // actually package-private
  static jboolean usesCompoundFile (::org::apache::lucene::index::SegmentInfo *);
  static jboolean hasSeparateNorms (::org::apache::lucene::index::SegmentInfo *);
public:  // actually protected
  virtual void doDelete (jint);
  virtual void doUndeleteAll ();
public: // actually package-private
  virtual ::java::util::Vector *files ();
public:
  virtual ::org::apache::lucene::index::TermEnum *terms ();
  virtual ::org::apache::lucene::index::TermEnum *terms (::org::apache::lucene::index::Term *);
  virtual ::org::apache::lucene::document::Document *document (jint, ::org::apache::lucene::document::FieldSelector *);
  virtual jboolean isDeleted (jint);
  virtual ::org::apache::lucene::index::TermDocs *termDocs ();
  virtual ::org::apache::lucene::index::TermPositions *termPositions ();
  virtual jint docFreq (::org::apache::lucene::index::Term *);
  virtual jint numDocs ();
  virtual jint maxDoc ();
  virtual ::java::util::Collection *getFieldNames (::org::apache::lucene::index::IndexReader$FieldOption *);
  virtual jboolean hasNorms (::java::lang::String *);
public: // actually package-private
  static jbyteArray createFakeNorms (jint);
private:
  jbyteArray fakeNorms ();
public:  // actually protected
  virtual jbyteArray getNorms (::java::lang::String *);
public:
  virtual jbyteArray norms (::java::lang::String *);
public:  // actually protected
  virtual void doSetNorm (jint, ::java::lang::String *, jbyte);
public:
  virtual void norms (::java::lang::String *, jbyteArray, jint);
private:
  void openNorms (::org::apache::lucene::store::Directory *);
  void closeNorms ();
  ::org::apache::lucene::index::TermVectorsReader *getTermVectorsReader ();
public:
  virtual ::org::apache::lucene::index::TermFreqVector *getTermFreqVector (jint, ::java::lang::String *);
  virtual JArray< ::org::apache::lucene::index::TermFreqVector *> *getTermFreqVectors (jint);
private:
  ::java::lang::String * __attribute__((aligned(__alignof__( ::org::apache::lucene::index::IndexReader )))) segment;
  ::org::apache::lucene::index::SegmentInfo *si;
public: // actually package-private
  ::org::apache::lucene::index::FieldInfos *fieldInfos;
private:
  ::org::apache::lucene::index::FieldsReader *fieldsReader;
public: // actually package-private
  ::org::apache::lucene::index::TermInfosReader *tis;
  ::org::apache::lucene::index::TermVectorsReader *termVectorsReaderOrig;
  ::java::lang::ThreadLocal *termVectorsLocal;
  ::org::apache::lucene::util::BitVector *deletedDocs;
private:
  jboolean deletedDocsDirty;
  jboolean normsDirty;
  jboolean undeleteAll;
public: // actually package-private
  ::org::apache::lucene::store::IndexInput *freqStream;
  ::org::apache::lucene::store::IndexInput *proxStream;
  ::org::apache::lucene::index::CompoundFileReader *cfsReader;
private:
  ::java::util::Hashtable *norms__;
  static ::java::lang::Class *IMPL;
  jbyteArray ones;
public: // actually package-private
  static ::java::lang::Class *class$org$apache$lucene$index$SegmentReader;

  friend class org_apache_lucene_index_SegmentReader$Norm;
  friend class org_apache_lucene_index_IndexReader$FieldOption;
public:

  static ::java::lang::Class class$;
};

#endif /* __org_apache_lucene_index_SegmentReader__ */
