package clucene;
/* ----------------------------------------------------------------------------
 * This file was automatically generated by SWIG (http://www.swig.org).
 * Version 1.3.25
 *
 * Do not make changes to this file unless you know what you are doing--modify
 * the SWIG interface file instead.
 * ----------------------------------------------------------------------------- */


public class Field {
  private long swigCPtr;
  protected boolean swigCMemOwn;

  protected Field(long cPtr, boolean cMemoryOwn) {
    swigCMemOwn = cMemoryOwn;
    swigCPtr = cPtr;
  }

  protected static long getCPtr(Field obj) {
    return (obj == null) ? 0 : obj.swigCPtr;
  }

  protected void finalize() {
    delete();
  }

  public void delete() {
    if(swigCPtr != 0 && swigCMemOwn) {
      swigCMemOwn = false;
      CLjavaJNI.delete_Field(swigCPtr);
    }
    swigCPtr = 0;
  }

  public Field(String name, String value, boolean store, boolean index, boolean token, boolean storeTermVector) {
    this(CLjavaJNI.new_Field__SWIG_0(name, value, store, index, token, storeTermVector), true);
  }

  public Field(String name, String value, boolean store, boolean index, boolean token) {
    this(CLjavaJNI.new_Field__SWIG_1(name, value, store, index, token), true);
  }

  public Field(String name, Reader reader, boolean store, boolean index, boolean token, boolean storeTermVector) {
    this(CLjavaJNI.new_Field__SWIG_2(name, Reader.getCPtr(reader), store, index, token, storeTermVector), true);
  }

  public Field(String name, Reader reader, boolean store, boolean index, boolean token) {
    this(CLjavaJNI.new_Field__SWIG_3(name, Reader.getCPtr(reader), store, index, token), true);
  }

  public Field(String name, Reader reader, boolean storeTermVector) {
    this(CLjavaJNI.new_Field__SWIG_4(name, Reader.getCPtr(reader), storeTermVector), true);
  }

  public Field(String name, Reader reader) {
    this(CLjavaJNI.new_Field__SWIG_5(name, Reader.getCPtr(reader)), true);
  }

  public static Field Keyword(String name, String value) {
    long cPtr = CLjavaJNI.Field_Keyword(name, value);
    return (cPtr == 0) ? null : new Field(cPtr, true);
  }

  public static Field UnIndexed(String name, String value) {
    long cPtr = CLjavaJNI.Field_UnIndexed(name, value);
    return (cPtr == 0) ? null : new Field(cPtr, true);
  }

  public static Field Text(String name, String value, boolean storeTermVector) {
    long cPtr = CLjavaJNI.Field_Text__SWIG_0(name, value, storeTermVector);
    return (cPtr == 0) ? null : new Field(cPtr, true);
  }

  public static Field Text(String name, String value) {
    long cPtr = CLjavaJNI.Field_Text__SWIG_1(name, value);
    return (cPtr == 0) ? null : new Field(cPtr, true);
  }

  public static Field UnStored(String name, String value, boolean storeTermVector) {
    long cPtr = CLjavaJNI.Field_UnStored__SWIG_0(name, value, storeTermVector);
    return (cPtr == 0) ? null : new Field(cPtr, true);
  }

  public static Field UnStored(String name, String value) {
    long cPtr = CLjavaJNI.Field_UnStored__SWIG_1(name, value);
    return (cPtr == 0) ? null : new Field(cPtr, true);
  }

  public static Field Text(String name, Reader value, boolean storeTermVector) {
    long cPtr = CLjavaJNI.Field_Text__SWIG_2(name, Reader.getCPtr(value), storeTermVector);
    return (cPtr == 0) ? null : new Field(cPtr, true);
  }

  public static Field Text(String name, Reader value) {
    long cPtr = CLjavaJNI.Field_Text__SWIG_3(name, Reader.getCPtr(value));
    return (cPtr == 0) ? null : new Field(cPtr, true);
  }

  public String name() {
    return CLjavaJNI.Field_name(swigCPtr);
  }

  public String stringValue() {
    return CLjavaJNI.Field_stringValue(swigCPtr);
  }

  public Reader readerValue() {
    long cPtr = CLjavaJNI.Field_readerValue(swigCPtr);
    return (cPtr == 0) ? null : new Reader(cPtr, false);
  }

  public boolean isStored() {
    return CLjavaJNI.Field_isStored(swigCPtr);
  }

  public boolean isIndexed() {
    return CLjavaJNI.Field_isIndexed(swigCPtr);
  }

  public boolean isTokenized() {
    return CLjavaJNI.Field_isTokenized(swigCPtr);
  }

  public boolean isTermVectorStored() {
    return CLjavaJNI.Field_isTermVectorStored(swigCPtr);
  }

  public float getBoost() {
    return CLjavaJNI.Field_getBoost(swigCPtr);
  }

  public void setBoost(float value) {
    CLjavaJNI.Field_setBoost(swigCPtr, value);
  }

  public String toString() {
    return CLjavaJNI.Field_toString(swigCPtr);
  }

}
