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

#ifndef __org_apache_lucene_index_TermVectorsWriter__
#define __org_apache_lucene_index_TermVectorsWriter__

#pragma interface

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

extern "Java"
{
  namespace org
  {
    namespace apache
    {
      namespace lucene
      {
        namespace index
        {
          class TermVectorsWriter;
          class TermFreqVector;
          class TermVectorOffsetInfo;
          class TermVectorsWriter$TVField;
          class FieldInfos;
        }
        namespace store
        {
          class Directory;
          class IndexOutput;
        }
      }
    }
  }
}

class org::apache::lucene::index::TermVectorsWriter : public ::java::lang::Object
{
public:
  TermVectorsWriter (::org::apache::lucene::store::Directory *, ::java::lang::String *, ::org::apache::lucene::index::FieldInfos *);
  void openDocument ();
  void closeDocument ();
  jboolean isDocumentOpen ();
  void openField (::java::lang::String *);
private:
  void openField (jint, jboolean, jboolean);
public:
  void closeField ();
  jboolean isFieldOpen ();
  void addTerm (::java::lang::String *, jint);
  void addTerm (::java::lang::String *, jint, jintArray, JArray< ::org::apache::lucene::index::TermVectorOffsetInfo *> *);
private:
  void addTermInternal (::java::lang::String *, jint, jintArray, JArray< ::org::apache::lucene::index::TermVectorOffsetInfo *> *);
public:
  void addAllDocVectors (JArray< ::org::apache::lucene::index::TermFreqVector *> *);
public: // actually package-private
  void close ();
private:
  void writeField ();
  void writeDoc ();
public: // actually package-private
  static const jint STORE_POSITIONS_WITH_TERMVECTOR = 1L;
  static const jint STORE_OFFSET_WITH_TERMVECTOR = 2L;
  static const jint FORMAT_VERSION = 2L;
  static const jint FORMAT_SIZE = 4L;
  static ::java::lang::String *TVX_EXTENSION;
  static ::java::lang::String *TVD_EXTENSION;
  static ::java::lang::String *TVF_EXTENSION;
private:
  ::org::apache::lucene::store::IndexOutput * __attribute__((aligned(__alignof__( ::java::lang::Object )))) tvx;
  ::org::apache::lucene::store::IndexOutput *tvd;
  ::org::apache::lucene::store::IndexOutput *tvf;
  ::java::util::Vector *fields;
  ::java::util::Vector *terms;
  ::org::apache::lucene::index::FieldInfos *fieldInfos;
  ::org::apache::lucene::index::TermVectorsWriter$TVField *currentField;
  jlong currentDocPointer;

  friend class org_apache_lucene_index_TermVectorsWriter$1;
  friend class org_apache_lucene_index_TermVectorsWriter$TVTerm;
  friend class org_apache_lucene_index_TermVectorsWriter$TVField;
public:

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

#endif /* __org_apache_lucene_index_TermVectorsWriter__ */
