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

#ifndef __org_apache_lucene_index_IndexReader__
#define __org_apache_lucene_index_IndexReader__

#pragma interface

#include <java/lang/Object.h>
#include <gcj/array.h>

extern "Java"
{
  namespace org
  {
    namespace apache
    {
      namespace lucene
      {
        namespace document
        {
          class FieldSelector;
          class Document;
        }
        namespace index
        {
          class IndexReader$FieldOption;
          class TermPositions;
          class TermDocs;
          class Term;
          class TermEnum;
          class TermFreqVector;
          class IndexReader;
          class SegmentInfos;
          class IndexFileDeleter;
        }
        namespace store
        {
          class Lock;
          class Directory;
        }
      }
    }
  }
}

class org::apache::lucene::index::IndexReader : public ::java::lang::Object
{
public:  // actually protected
  IndexReader (::org::apache::lucene::store::Directory *);
public: // actually package-private
  IndexReader (::org::apache::lucene::store::Directory *, ::org::apache::lucene::index::SegmentInfos *, jboolean);
  virtual void init (::org::apache::lucene::store::Directory *, ::org::apache::lucene::index::SegmentInfos *, jboolean, jboolean);
public:
  static ::org::apache::lucene::index::IndexReader *open (::java::lang::String *);
  static ::org::apache::lucene::index::IndexReader *open (::java::io::File *);
  static ::org::apache::lucene::index::IndexReader *open (::org::apache::lucene::store::Directory *);
private:
  static ::org::apache::lucene::index::IndexReader *open (::org::apache::lucene::store::Directory *, jboolean);
public:
  virtual ::org::apache::lucene::store::Directory *directory () { return directory__; }
  static jlong lastModified (::java::lang::String *);
  static jlong lastModified (::java::io::File *);
  static jlong lastModified (::org::apache::lucene::store::Directory *);
  static jlong getCurrentVersion (::java::lang::String *);
  static jlong getCurrentVersion (::java::io::File *);
  static jlong getCurrentVersion (::org::apache::lucene::store::Directory *);
  virtual jlong getVersion ();
  virtual jboolean isCurrent ();
  virtual JArray< ::org::apache::lucene::index::TermFreqVector *> *getTermFreqVectors (jint) = 0;
  virtual ::org::apache::lucene::index::TermFreqVector *getTermFreqVector (jint, ::java::lang::String *) = 0;
  static jboolean indexExists (::java::lang::String *);
  static jboolean indexExists (::java::io::File *);
  static jboolean indexExists (::org::apache::lucene::store::Directory *);
  virtual jint numDocs () = 0;
  virtual jint maxDoc () = 0;
  virtual ::org::apache::lucene::document::Document *document (jint);
  virtual ::org::apache::lucene::document::Document *document (jint, ::org::apache::lucene::document::FieldSelector *) = 0;
  virtual jboolean isDeleted (jint) = 0;
  virtual jboolean hasDeletions () = 0;
  virtual jboolean hasNorms (::java::lang::String *);
  virtual jbyteArray norms (::java::lang::String *) = 0;
  virtual void norms (::java::lang::String *, jbyteArray, jint) = 0;
  void setNorm (jint, ::java::lang::String *, jbyte);
public:  // actually protected
  virtual void doSetNorm (jint, ::java::lang::String *, jbyte) = 0;
public:
  virtual void setNorm (jint, ::java::lang::String *, jfloat);
  virtual ::org::apache::lucene::index::TermEnum *terms () = 0;
  virtual ::org::apache::lucene::index::TermEnum *terms (::org::apache::lucene::index::Term *) = 0;
  virtual jint docFreq (::org::apache::lucene::index::Term *) = 0;
  virtual ::org::apache::lucene::index::TermDocs *termDocs (::org::apache::lucene::index::Term *);
  virtual ::org::apache::lucene::index::TermDocs *termDocs () = 0;
  virtual ::org::apache::lucene::index::TermPositions *termPositions (::org::apache::lucene::index::Term *);
  virtual ::org::apache::lucene::index::TermPositions *termPositions () = 0;
private:
  void aquireWriteLock ();
public:
  void deleteDocument (jint);
public:  // actually protected
  virtual void doDelete (jint) = 0;
public:
  jint deleteDocuments (::org::apache::lucene::index::Term *);
  void undeleteAll ();
public:  // actually protected
  virtual void doUndeleteAll () = 0;
  void commit ();
  virtual void setDeleter (::org::apache::lucene::index::IndexFileDeleter *);
  virtual ::org::apache::lucene::index::IndexFileDeleter *getDeleter () { return deleter; }
  virtual void doCommit () = 0;
public:
  void close ();
public:  // actually protected
  virtual void doClose () = 0;
  virtual void finalize ();
public:
  virtual ::java::util::Collection *getFieldNames (::org::apache::lucene::index::IndexReader$FieldOption *) = 0;
  static jboolean isLocked (::org::apache::lucene::store::Directory *);
  static jboolean isLocked (::java::lang::String *);
  static void unlock (::org::apache::lucene::store::Directory *);
  static void main (JArray< ::java::lang::String *> *);
private:
  ::org::apache::lucene::store::Directory * __attribute__((aligned(__alignof__( ::java::lang::Object )))) directory__;
  jboolean directoryOwner;
  jboolean closeDirectory;
public:  // actually protected
  ::org::apache::lucene::index::IndexFileDeleter *deleter;
private:
  ::org::apache::lucene::index::SegmentInfos *segmentInfos;
  ::org::apache::lucene::store::Lock *writeLock;
  jboolean stale;
  jboolean hasChanges;

  friend class org_apache_lucene_index_IndexReader$FieldOption;
  friend class org_apache_lucene_index_IndexReader$1;
  friend class org_apache_lucene_index_IndexReader$2;
  friend class org_apache_lucene_index_IndexReader$3;
public:

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

#endif /* __org_apache_lucene_index_IndexReader__ */
