incubator-blur-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From amccu...@apache.org
Subject [9/16] Removed all the old prototype code.
Date Wed, 31 Oct 2012 02:36:14 GMT
http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/61759696/src/blur-new-api-prototype/src/main/java/org/apache/blur/thrift/generated/DocLocation.java
----------------------------------------------------------------------
diff --git a/src/blur-new-api-prototype/src/main/java/org/apache/blur/thrift/generated/DocLocation.java
b/src/blur-new-api-prototype/src/main/java/org/apache/blur/thrift/generated/DocLocation.java
deleted file mode 100644
index b533baa..0000000
--- a/src/blur-new-api-prototype/src/main/java/org/apache/blur/thrift/generated/DocLocation.java
+++ /dev/null
@@ -1,403 +0,0 @@
-/**
- * Autogenerated by Thrift Compiler (0.7.0)
- *
- * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- */
-package org.apache.blur.thrift.generated;
-
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class DocLocation implements org.apache.thrift.TBase<DocLocation, DocLocation._Fields>,
java.io.Serializable, Cloneable {
-  private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("DocLocation");
-
-  private static final org.apache.thrift.protocol.TField DOC_FIELD_DESC = new org.apache.thrift.protocol.TField("doc",
org.apache.thrift.protocol.TType.I32, (short)1);
-  private static final org.apache.thrift.protocol.TField SHARD_INDEX_FIELD_DESC = new org.apache.thrift.protocol.TField("shardIndex",
org.apache.thrift.protocol.TType.I32, (short)2);
-
-  public int doc; // required
-  public int shardIndex; // required
-
-  /** The set of fields this struct contains, along with convenience methods for finding
and manipulating them. */
-  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
-    DOC((short)1, "doc"),
-    SHARD_INDEX((short)2, "shardIndex");
-
-    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
-    static {
-      for (_Fields field : EnumSet.allOf(_Fields.class)) {
-        byName.put(field.getFieldName(), field);
-      }
-    }
-
-    /**
-     * Find the _Fields constant that matches fieldId, or null if its not found.
-     */
-    public static _Fields findByThriftId(int fieldId) {
-      switch(fieldId) {
-        case 1: // DOC
-          return DOC;
-        case 2: // SHARD_INDEX
-          return SHARD_INDEX;
-        default:
-          return null;
-      }
-    }
-
-    /**
-     * Find the _Fields constant that matches fieldId, throwing an exception
-     * if it is not found.
-     */
-    public static _Fields findByThriftIdOrThrow(int fieldId) {
-      _Fields fields = findByThriftId(fieldId);
-      if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't
exist!");
-      return fields;
-    }
-
-    /**
-     * Find the _Fields constant that matches name, or null if its not found.
-     */
-    public static _Fields findByName(String name) {
-      return byName.get(name);
-    }
-
-    private final short _thriftId;
-    private final String _fieldName;
-
-    _Fields(short thriftId, String fieldName) {
-      _thriftId = thriftId;
-      _fieldName = fieldName;
-    }
-
-    public short getThriftFieldId() {
-      return _thriftId;
-    }
-
-    public String getFieldName() {
-      return _fieldName;
-    }
-  }
-
-  // isset id assignments
-  private static final int __DOC_ISSET_ID = 0;
-  private static final int __SHARDINDEX_ISSET_ID = 1;
-  private BitSet __isset_bit_vector = new BitSet(2);
-
-  public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
-  static {
-    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields,
org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
-    tmpMap.put(_Fields.DOC, new org.apache.thrift.meta_data.FieldMetaData("doc", org.apache.thrift.TFieldRequirementType.DEFAULT,

-        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
-    tmpMap.put(_Fields.SHARD_INDEX, new org.apache.thrift.meta_data.FieldMetaData("shardIndex",
org.apache.thrift.TFieldRequirementType.DEFAULT, 
-        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
-    metaDataMap = Collections.unmodifiableMap(tmpMap);
-    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(DocLocation.class, metaDataMap);
-  }
-
-  public DocLocation() {
-  }
-
-  public DocLocation(
-    int doc,
-    int shardIndex)
-  {
-    this();
-    this.doc = doc;
-    setDocIsSet(true);
-    this.shardIndex = shardIndex;
-    setShardIndexIsSet(true);
-  }
-
-  /**
-   * Performs a deep copy on <i>other</i>.
-   */
-  public DocLocation(DocLocation other) {
-    __isset_bit_vector.clear();
-    __isset_bit_vector.or(other.__isset_bit_vector);
-    this.doc = other.doc;
-    this.shardIndex = other.shardIndex;
-  }
-
-  public DocLocation deepCopy() {
-    return new DocLocation(this);
-  }
-
-  @Override
-  public void clear() {
-    setDocIsSet(false);
-    this.doc = 0;
-    setShardIndexIsSet(false);
-    this.shardIndex = 0;
-  }
-
-  public int getDoc() {
-    return this.doc;
-  }
-
-  public DocLocation setDoc(int doc) {
-    this.doc = doc;
-    setDocIsSet(true);
-    return this;
-  }
-
-  public void unsetDoc() {
-    __isset_bit_vector.clear(__DOC_ISSET_ID);
-  }
-
-  /** Returns true if field doc is set (has been assigned a value) and false otherwise */
-  public boolean isSetDoc() {
-    return __isset_bit_vector.get(__DOC_ISSET_ID);
-  }
-
-  public void setDocIsSet(boolean value) {
-    __isset_bit_vector.set(__DOC_ISSET_ID, value);
-  }
-
-  public int getShardIndex() {
-    return this.shardIndex;
-  }
-
-  public DocLocation setShardIndex(int shardIndex) {
-    this.shardIndex = shardIndex;
-    setShardIndexIsSet(true);
-    return this;
-  }
-
-  public void unsetShardIndex() {
-    __isset_bit_vector.clear(__SHARDINDEX_ISSET_ID);
-  }
-
-  /** Returns true if field shardIndex is set (has been assigned a value) and false otherwise
*/
-  public boolean isSetShardIndex() {
-    return __isset_bit_vector.get(__SHARDINDEX_ISSET_ID);
-  }
-
-  public void setShardIndexIsSet(boolean value) {
-    __isset_bit_vector.set(__SHARDINDEX_ISSET_ID, value);
-  }
-
-  public void setFieldValue(_Fields field, Object value) {
-    switch (field) {
-    case DOC:
-      if (value == null) {
-        unsetDoc();
-      } else {
-        setDoc((Integer)value);
-      }
-      break;
-
-    case SHARD_INDEX:
-      if (value == null) {
-        unsetShardIndex();
-      } else {
-        setShardIndex((Integer)value);
-      }
-      break;
-
-    }
-  }
-
-  public Object getFieldValue(_Fields field) {
-    switch (field) {
-    case DOC:
-      return Integer.valueOf(getDoc());
-
-    case SHARD_INDEX:
-      return Integer.valueOf(getShardIndex());
-
-    }
-    throw new IllegalStateException();
-  }
-
-  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and
false otherwise */
-  public boolean isSet(_Fields field) {
-    if (field == null) {
-      throw new IllegalArgumentException();
-    }
-
-    switch (field) {
-    case DOC:
-      return isSetDoc();
-    case SHARD_INDEX:
-      return isSetShardIndex();
-    }
-    throw new IllegalStateException();
-  }
-
-  @Override
-  public boolean equals(Object that) {
-    if (that == null)
-      return false;
-    if (that instanceof DocLocation)
-      return this.equals((DocLocation)that);
-    return false;
-  }
-
-  public boolean equals(DocLocation that) {
-    if (that == null)
-      return false;
-
-    boolean this_present_doc = true;
-    boolean that_present_doc = true;
-    if (this_present_doc || that_present_doc) {
-      if (!(this_present_doc && that_present_doc))
-        return false;
-      if (this.doc != that.doc)
-        return false;
-    }
-
-    boolean this_present_shardIndex = true;
-    boolean that_present_shardIndex = true;
-    if (this_present_shardIndex || that_present_shardIndex) {
-      if (!(this_present_shardIndex && that_present_shardIndex))
-        return false;
-      if (this.shardIndex != that.shardIndex)
-        return false;
-    }
-
-    return true;
-  }
-
-  @Override
-  public int hashCode() {
-    return 0;
-  }
-
-  public int compareTo(DocLocation other) {
-    if (!getClass().equals(other.getClass())) {
-      return getClass().getName().compareTo(other.getClass().getName());
-    }
-
-    int lastComparison = 0;
-    DocLocation typedOther = (DocLocation)other;
-
-    lastComparison = Boolean.valueOf(isSetDoc()).compareTo(typedOther.isSetDoc());
-    if (lastComparison != 0) {
-      return lastComparison;
-    }
-    if (isSetDoc()) {
-      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.doc, typedOther.doc);
-      if (lastComparison != 0) {
-        return lastComparison;
-      }
-    }
-    lastComparison = Boolean.valueOf(isSetShardIndex()).compareTo(typedOther.isSetShardIndex());
-    if (lastComparison != 0) {
-      return lastComparison;
-    }
-    if (isSetShardIndex()) {
-      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.shardIndex, typedOther.shardIndex);
-      if (lastComparison != 0) {
-        return lastComparison;
-      }
-    }
-    return 0;
-  }
-
-  public _Fields fieldForId(int fieldId) {
-    return _Fields.findByThriftId(fieldId);
-  }
-
-  public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException
{
-    org.apache.thrift.protocol.TField field;
-    iprot.readStructBegin();
-    while (true)
-    {
-      field = iprot.readFieldBegin();
-      if (field.type == org.apache.thrift.protocol.TType.STOP) { 
-        break;
-      }
-      switch (field.id) {
-        case 1: // DOC
-          if (field.type == org.apache.thrift.protocol.TType.I32) {
-            this.doc = iprot.readI32();
-            setDocIsSet(true);
-          } else { 
-            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-          }
-          break;
-        case 2: // SHARD_INDEX
-          if (field.type == org.apache.thrift.protocol.TType.I32) {
-            this.shardIndex = iprot.readI32();
-            setShardIndexIsSet(true);
-          } else { 
-            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-          }
-          break;
-        default:
-          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-      }
-      iprot.readFieldEnd();
-    }
-    iprot.readStructEnd();
-
-    // check for required fields of primitive type, which can't be checked in the validate
method
-    validate();
-  }
-
-  public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException
{
-    validate();
-
-    oprot.writeStructBegin(STRUCT_DESC);
-    oprot.writeFieldBegin(DOC_FIELD_DESC);
-    oprot.writeI32(this.doc);
-    oprot.writeFieldEnd();
-    oprot.writeFieldBegin(SHARD_INDEX_FIELD_DESC);
-    oprot.writeI32(this.shardIndex);
-    oprot.writeFieldEnd();
-    oprot.writeFieldStop();
-    oprot.writeStructEnd();
-  }
-
-  @Override
-  public String toString() {
-    StringBuilder sb = new StringBuilder("DocLocation(");
-    boolean first = true;
-
-    sb.append("doc:");
-    sb.append(this.doc);
-    first = false;
-    if (!first) sb.append(", ");
-    sb.append("shardIndex:");
-    sb.append(this.shardIndex);
-    first = false;
-    sb.append(")");
-    return sb.toString();
-  }
-
-  public void validate() throws org.apache.thrift.TException {
-    // check for required fields
-  }
-
-  private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
-    try {
-      write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
-    } catch (org.apache.thrift.TException te) {
-      throw new java.io.IOException(te);
-    }
-  }
-
-  private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException
{
-    try {
-      // it doesn't seem like you should have to do this, but java serialization is wacky,
and doesn't call the default constructor.
-      __isset_bit_vector = new BitSet(1);
-      read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
-    } catch (org.apache.thrift.TException te) {
-      throw new java.io.IOException(te);
-    }
-  }
-
-}
-

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/61759696/src/blur-new-api-prototype/src/main/java/org/apache/blur/thrift/generated/Document.java
----------------------------------------------------------------------
diff --git a/src/blur-new-api-prototype/src/main/java/org/apache/blur/thrift/generated/Document.java
b/src/blur-new-api-prototype/src/main/java/org/apache/blur/thrift/generated/Document.java
deleted file mode 100644
index 791ef01..0000000
--- a/src/blur-new-api-prototype/src/main/java/org/apache/blur/thrift/generated/Document.java
+++ /dev/null
@@ -1,357 +0,0 @@
-/**
- * Autogenerated by Thrift Compiler (0.7.0)
- *
- * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- */
-package org.apache.blur.thrift.generated;
-
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class Document implements org.apache.thrift.TBase<Document, Document._Fields>,
java.io.Serializable, Cloneable {
-  private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("Document");
-
-  private static final org.apache.thrift.protocol.TField FIELDS_FIELD_DESC = new org.apache.thrift.protocol.TField("fields",
org.apache.thrift.protocol.TType.LIST, (short)1);
-
-  public List<Field> fields; // required
-
-  /** The set of fields this struct contains, along with convenience methods for finding
and manipulating them. */
-  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
-    FIELDS((short)1, "fields");
-
-    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
-    static {
-      for (_Fields field : EnumSet.allOf(_Fields.class)) {
-        byName.put(field.getFieldName(), field);
-      }
-    }
-
-    /**
-     * Find the _Fields constant that matches fieldId, or null if its not found.
-     */
-    public static _Fields findByThriftId(int fieldId) {
-      switch(fieldId) {
-        case 1: // FIELDS
-          return FIELDS;
-        default:
-          return null;
-      }
-    }
-
-    /**
-     * Find the _Fields constant that matches fieldId, throwing an exception
-     * if it is not found.
-     */
-    public static _Fields findByThriftIdOrThrow(int fieldId) {
-      _Fields fields = findByThriftId(fieldId);
-      if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't
exist!");
-      return fields;
-    }
-
-    /**
-     * Find the _Fields constant that matches name, or null if its not found.
-     */
-    public static _Fields findByName(String name) {
-      return byName.get(name);
-    }
-
-    private final short _thriftId;
-    private final String _fieldName;
-
-    _Fields(short thriftId, String fieldName) {
-      _thriftId = thriftId;
-      _fieldName = fieldName;
-    }
-
-    public short getThriftFieldId() {
-      return _thriftId;
-    }
-
-    public String getFieldName() {
-      return _fieldName;
-    }
-  }
-
-  // isset id assignments
-
-  public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
-  static {
-    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields,
org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
-    tmpMap.put(_Fields.FIELDS, new org.apache.thrift.meta_data.FieldMetaData("fields", org.apache.thrift.TFieldRequirementType.DEFAULT,

-        new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,

-            new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT,
Field.class))));
-    metaDataMap = Collections.unmodifiableMap(tmpMap);
-    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(Document.class, metaDataMap);
-  }
-
-  public Document() {
-  }
-
-  public Document(
-    List<Field> fields)
-  {
-    this();
-    this.fields = fields;
-  }
-
-  /**
-   * Performs a deep copy on <i>other</i>.
-   */
-  public Document(Document other) {
-    if (other.isSetFields()) {
-      List<Field> __this__fields = new ArrayList<Field>();
-      for (Field other_element : other.fields) {
-        __this__fields.add(new Field(other_element));
-      }
-      this.fields = __this__fields;
-    }
-  }
-
-  public Document deepCopy() {
-    return new Document(this);
-  }
-
-  @Override
-  public void clear() {
-    this.fields = null;
-  }
-
-  public int getFieldsSize() {
-    return (this.fields == null) ? 0 : this.fields.size();
-  }
-
-  public java.util.Iterator<Field> getFieldsIterator() {
-    return (this.fields == null) ? null : this.fields.iterator();
-  }
-
-  public void addToFields(Field elem) {
-    if (this.fields == null) {
-      this.fields = new ArrayList<Field>();
-    }
-    this.fields.add(elem);
-  }
-
-  public List<Field> getFields() {
-    return this.fields;
-  }
-
-  public Document setFields(List<Field> fields) {
-    this.fields = fields;
-    return this;
-  }
-
-  public void unsetFields() {
-    this.fields = null;
-  }
-
-  /** Returns true if field fields is set (has been assigned a value) and false otherwise
*/
-  public boolean isSetFields() {
-    return this.fields != null;
-  }
-
-  public void setFieldsIsSet(boolean value) {
-    if (!value) {
-      this.fields = null;
-    }
-  }
-
-  public void setFieldValue(_Fields field, Object value) {
-    switch (field) {
-    case FIELDS:
-      if (value == null) {
-        unsetFields();
-      } else {
-        setFields((List<Field>)value);
-      }
-      break;
-
-    }
-  }
-
-  public Object getFieldValue(_Fields field) {
-    switch (field) {
-    case FIELDS:
-      return getFields();
-
-    }
-    throw new IllegalStateException();
-  }
-
-  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and
false otherwise */
-  public boolean isSet(_Fields field) {
-    if (field == null) {
-      throw new IllegalArgumentException();
-    }
-
-    switch (field) {
-    case FIELDS:
-      return isSetFields();
-    }
-    throw new IllegalStateException();
-  }
-
-  @Override
-  public boolean equals(Object that) {
-    if (that == null)
-      return false;
-    if (that instanceof Document)
-      return this.equals((Document)that);
-    return false;
-  }
-
-  public boolean equals(Document that) {
-    if (that == null)
-      return false;
-
-    boolean this_present_fields = true && this.isSetFields();
-    boolean that_present_fields = true && that.isSetFields();
-    if (this_present_fields || that_present_fields) {
-      if (!(this_present_fields && that_present_fields))
-        return false;
-      if (!this.fields.equals(that.fields))
-        return false;
-    }
-
-    return true;
-  }
-
-  @Override
-  public int hashCode() {
-    return 0;
-  }
-
-  public int compareTo(Document other) {
-    if (!getClass().equals(other.getClass())) {
-      return getClass().getName().compareTo(other.getClass().getName());
-    }
-
-    int lastComparison = 0;
-    Document typedOther = (Document)other;
-
-    lastComparison = Boolean.valueOf(isSetFields()).compareTo(typedOther.isSetFields());
-    if (lastComparison != 0) {
-      return lastComparison;
-    }
-    if (isSetFields()) {
-      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.fields, typedOther.fields);
-      if (lastComparison != 0) {
-        return lastComparison;
-      }
-    }
-    return 0;
-  }
-
-  public _Fields fieldForId(int fieldId) {
-    return _Fields.findByThriftId(fieldId);
-  }
-
-  public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException
{
-    org.apache.thrift.protocol.TField field;
-    iprot.readStructBegin();
-    while (true)
-    {
-      field = iprot.readFieldBegin();
-      if (field.type == org.apache.thrift.protocol.TType.STOP) { 
-        break;
-      }
-      switch (field.id) {
-        case 1: // FIELDS
-          if (field.type == org.apache.thrift.protocol.TType.LIST) {
-            {
-              org.apache.thrift.protocol.TList _list29 = iprot.readListBegin();
-              this.fields = new ArrayList<Field>(_list29.size);
-              for (int _i30 = 0; _i30 < _list29.size; ++_i30)
-              {
-                Field _elem31; // required
-                _elem31 = new Field();
-                _elem31.read(iprot);
-                this.fields.add(_elem31);
-              }
-              iprot.readListEnd();
-            }
-          } else { 
-            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-          }
-          break;
-        default:
-          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-      }
-      iprot.readFieldEnd();
-    }
-    iprot.readStructEnd();
-
-    // check for required fields of primitive type, which can't be checked in the validate
method
-    validate();
-  }
-
-  public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException
{
-    validate();
-
-    oprot.writeStructBegin(STRUCT_DESC);
-    if (this.fields != null) {
-      oprot.writeFieldBegin(FIELDS_FIELD_DESC);
-      {
-        oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT,
this.fields.size()));
-        for (Field _iter32 : this.fields)
-        {
-          _iter32.write(oprot);
-        }
-        oprot.writeListEnd();
-      }
-      oprot.writeFieldEnd();
-    }
-    oprot.writeFieldStop();
-    oprot.writeStructEnd();
-  }
-
-  @Override
-  public String toString() {
-    StringBuilder sb = new StringBuilder("Document(");
-    boolean first = true;
-
-    sb.append("fields:");
-    if (this.fields == null) {
-      sb.append("null");
-    } else {
-      sb.append(this.fields);
-    }
-    first = false;
-    sb.append(")");
-    return sb.toString();
-  }
-
-  public void validate() throws org.apache.thrift.TException {
-    // check for required fields
-  }
-
-  private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
-    try {
-      write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
-    } catch (org.apache.thrift.TException te) {
-      throw new java.io.IOException(te);
-    }
-  }
-
-  private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException
{
-    try {
-      read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
-    } catch (org.apache.thrift.TException te) {
-      throw new java.io.IOException(te);
-    }
-  }
-
-}
-

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/61759696/src/blur-new-api-prototype/src/main/java/org/apache/blur/thrift/generated/Field.java
----------------------------------------------------------------------
diff --git a/src/blur-new-api-prototype/src/main/java/org/apache/blur/thrift/generated/Field.java
b/src/blur-new-api-prototype/src/main/java/org/apache/blur/thrift/generated/Field.java
deleted file mode 100644
index d9648ad..0000000
--- a/src/blur-new-api-prototype/src/main/java/org/apache/blur/thrift/generated/Field.java
+++ /dev/null
@@ -1,613 +0,0 @@
-/**
- * Autogenerated by Thrift Compiler (0.7.0)
- *
- * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- */
-package org.apache.blur.thrift.generated;
-
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class Field implements org.apache.thrift.TBase<Field, Field._Fields>, java.io.Serializable,
Cloneable {
-  private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("Field");
-
-  private static final org.apache.thrift.protocol.TField NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("name",
org.apache.thrift.protocol.TType.STRING, (short)1);
-  private static final org.apache.thrift.protocol.TField VALUE_FIELD_DESC = new org.apache.thrift.protocol.TField("value",
org.apache.thrift.protocol.TType.STRING, (short)2);
-  private static final org.apache.thrift.protocol.TField TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("type",
org.apache.thrift.protocol.TType.I32, (short)3);
-  private static final org.apache.thrift.protocol.TField BOOST_FIELD_DESC = new org.apache.thrift.protocol.TField("boost",
org.apache.thrift.protocol.TType.DOUBLE, (short)4);
-
-  public String name; // required
-  public ByteBuffer value; // required
-  /**
-   * 
-   * @see TYPE
-   */
-  public TYPE type; // required
-  public double boost; // required
-
-  /** The set of fields this struct contains, along with convenience methods for finding
and manipulating them. */
-  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
-    NAME((short)1, "name"),
-    VALUE((short)2, "value"),
-    /**
-     * 
-     * @see TYPE
-     */
-    TYPE((short)3, "type"),
-    BOOST((short)4, "boost");
-
-    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
-    static {
-      for (_Fields field : EnumSet.allOf(_Fields.class)) {
-        byName.put(field.getFieldName(), field);
-      }
-    }
-
-    /**
-     * Find the _Fields constant that matches fieldId, or null if its not found.
-     */
-    public static _Fields findByThriftId(int fieldId) {
-      switch(fieldId) {
-        case 1: // NAME
-          return NAME;
-        case 2: // VALUE
-          return VALUE;
-        case 3: // TYPE
-          return TYPE;
-        case 4: // BOOST
-          return BOOST;
-        default:
-          return null;
-      }
-    }
-
-    /**
-     * Find the _Fields constant that matches fieldId, throwing an exception
-     * if it is not found.
-     */
-    public static _Fields findByThriftIdOrThrow(int fieldId) {
-      _Fields fields = findByThriftId(fieldId);
-      if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't
exist!");
-      return fields;
-    }
-
-    /**
-     * Find the _Fields constant that matches name, or null if its not found.
-     */
-    public static _Fields findByName(String name) {
-      return byName.get(name);
-    }
-
-    private final short _thriftId;
-    private final String _fieldName;
-
-    _Fields(short thriftId, String fieldName) {
-      _thriftId = thriftId;
-      _fieldName = fieldName;
-    }
-
-    public short getThriftFieldId() {
-      return _thriftId;
-    }
-
-    public String getFieldName() {
-      return _fieldName;
-    }
-  }
-
-  // isset id assignments
-  private static final int __BOOST_ISSET_ID = 0;
-  private BitSet __isset_bit_vector = new BitSet(1);
-
-  public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
-  static {
-    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields,
org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
-    tmpMap.put(_Fields.NAME, new org.apache.thrift.meta_data.FieldMetaData("name", org.apache.thrift.TFieldRequirementType.DEFAULT,

-        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
-    tmpMap.put(_Fields.VALUE, new org.apache.thrift.meta_data.FieldMetaData("value", org.apache.thrift.TFieldRequirementType.DEFAULT,

-        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING
       , true)));
-    tmpMap.put(_Fields.TYPE, new org.apache.thrift.meta_data.FieldMetaData("type", org.apache.thrift.TFieldRequirementType.DEFAULT,

-        new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM,
TYPE.class)));
-    tmpMap.put(_Fields.BOOST, new org.apache.thrift.meta_data.FieldMetaData("boost", org.apache.thrift.TFieldRequirementType.DEFAULT,

-        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
-    metaDataMap = Collections.unmodifiableMap(tmpMap);
-    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(Field.class, metaDataMap);
-  }
-
-  public Field() {
-  }
-
-  public Field(
-    String name,
-    ByteBuffer value,
-    TYPE type,
-    double boost)
-  {
-    this();
-    this.name = name;
-    this.value = value;
-    this.type = type;
-    this.boost = boost;
-    setBoostIsSet(true);
-  }
-
-  /**
-   * Performs a deep copy on <i>other</i>.
-   */
-  public Field(Field other) {
-    __isset_bit_vector.clear();
-    __isset_bit_vector.or(other.__isset_bit_vector);
-    if (other.isSetName()) {
-      this.name = other.name;
-    }
-    if (other.isSetValue()) {
-      this.value = org.apache.thrift.TBaseHelper.copyBinary(other.value);
-;
-    }
-    if (other.isSetType()) {
-      this.type = other.type;
-    }
-    this.boost = other.boost;
-  }
-
-  public Field deepCopy() {
-    return new Field(this);
-  }
-
-  @Override
-  public void clear() {
-    this.name = null;
-    this.value = null;
-    this.type = null;
-    setBoostIsSet(false);
-    this.boost = 0.0;
-  }
-
-  public String getName() {
-    return this.name;
-  }
-
-  public Field setName(String name) {
-    this.name = name;
-    return this;
-  }
-
-  public void unsetName() {
-    this.name = null;
-  }
-
-  /** Returns true if field name is set (has been assigned a value) and false otherwise */
-  public boolean isSetName() {
-    return this.name != null;
-  }
-
-  public void setNameIsSet(boolean value) {
-    if (!value) {
-      this.name = null;
-    }
-  }
-
-  public byte[] getValue() {
-    setValue(org.apache.thrift.TBaseHelper.rightSize(value));
-    return value == null ? null : value.array();
-  }
-
-  public ByteBuffer bufferForValue() {
-    return value;
-  }
-
-  public Field setValue(byte[] value) {
-    setValue(value == null ? (ByteBuffer)null : ByteBuffer.wrap(value));
-    return this;
-  }
-
-  public Field setValue(ByteBuffer value) {
-    this.value = value;
-    return this;
-  }
-
-  public void unsetValue() {
-    this.value = null;
-  }
-
-  /** Returns true if field value is set (has been assigned a value) and false otherwise
*/
-  public boolean isSetValue() {
-    return this.value != null;
-  }
-
-  public void setValueIsSet(boolean value) {
-    if (!value) {
-      this.value = null;
-    }
-  }
-
-  /**
-   * 
-   * @see TYPE
-   */
-  public TYPE getType() {
-    return this.type;
-  }
-
-  /**
-   * 
-   * @see TYPE
-   */
-  public Field setType(TYPE type) {
-    this.type = type;
-    return this;
-  }
-
-  public void unsetType() {
-    this.type = null;
-  }
-
-  /** Returns true if field type is set (has been assigned a value) and false otherwise */
-  public boolean isSetType() {
-    return this.type != null;
-  }
-
-  public void setTypeIsSet(boolean value) {
-    if (!value) {
-      this.type = null;
-    }
-  }
-
-  public double getBoost() {
-    return this.boost;
-  }
-
-  public Field setBoost(double boost) {
-    this.boost = boost;
-    setBoostIsSet(true);
-    return this;
-  }
-
-  public void unsetBoost() {
-    __isset_bit_vector.clear(__BOOST_ISSET_ID);
-  }
-
-  /** Returns true if field boost is set (has been assigned a value) and false otherwise
*/
-  public boolean isSetBoost() {
-    return __isset_bit_vector.get(__BOOST_ISSET_ID);
-  }
-
-  public void setBoostIsSet(boolean value) {
-    __isset_bit_vector.set(__BOOST_ISSET_ID, value);
-  }
-
-  public void setFieldValue(_Fields field, Object value) {
-    switch (field) {
-    case NAME:
-      if (value == null) {
-        unsetName();
-      } else {
-        setName((String)value);
-      }
-      break;
-
-    case VALUE:
-      if (value == null) {
-        unsetValue();
-      } else {
-        setValue((ByteBuffer)value);
-      }
-      break;
-
-    case TYPE:
-      if (value == null) {
-        unsetType();
-      } else {
-        setType((TYPE)value);
-      }
-      break;
-
-    case BOOST:
-      if (value == null) {
-        unsetBoost();
-      } else {
-        setBoost((Double)value);
-      }
-      break;
-
-    }
-  }
-
-  public Object getFieldValue(_Fields field) {
-    switch (field) {
-    case NAME:
-      return getName();
-
-    case VALUE:
-      return getValue();
-
-    case TYPE:
-      return getType();
-
-    case BOOST:
-      return Double.valueOf(getBoost());
-
-    }
-    throw new IllegalStateException();
-  }
-
-  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and
false otherwise */
-  public boolean isSet(_Fields field) {
-    if (field == null) {
-      throw new IllegalArgumentException();
-    }
-
-    switch (field) {
-    case NAME:
-      return isSetName();
-    case VALUE:
-      return isSetValue();
-    case TYPE:
-      return isSetType();
-    case BOOST:
-      return isSetBoost();
-    }
-    throw new IllegalStateException();
-  }
-
-  @Override
-  public boolean equals(Object that) {
-    if (that == null)
-      return false;
-    if (that instanceof Field)
-      return this.equals((Field)that);
-    return false;
-  }
-
-  public boolean equals(Field that) {
-    if (that == null)
-      return false;
-
-    boolean this_present_name = true && this.isSetName();
-    boolean that_present_name = true && that.isSetName();
-    if (this_present_name || that_present_name) {
-      if (!(this_present_name && that_present_name))
-        return false;
-      if (!this.name.equals(that.name))
-        return false;
-    }
-
-    boolean this_present_value = true && this.isSetValue();
-    boolean that_present_value = true && that.isSetValue();
-    if (this_present_value || that_present_value) {
-      if (!(this_present_value && that_present_value))
-        return false;
-      if (!this.value.equals(that.value))
-        return false;
-    }
-
-    boolean this_present_type = true && this.isSetType();
-    boolean that_present_type = true && that.isSetType();
-    if (this_present_type || that_present_type) {
-      if (!(this_present_type && that_present_type))
-        return false;
-      if (!this.type.equals(that.type))
-        return false;
-    }
-
-    boolean this_present_boost = true;
-    boolean that_present_boost = true;
-    if (this_present_boost || that_present_boost) {
-      if (!(this_present_boost && that_present_boost))
-        return false;
-      if (this.boost != that.boost)
-        return false;
-    }
-
-    return true;
-  }
-
-  @Override
-  public int hashCode() {
-    return 0;
-  }
-
-  public int compareTo(Field other) {
-    if (!getClass().equals(other.getClass())) {
-      return getClass().getName().compareTo(other.getClass().getName());
-    }
-
-    int lastComparison = 0;
-    Field typedOther = (Field)other;
-
-    lastComparison = Boolean.valueOf(isSetName()).compareTo(typedOther.isSetName());
-    if (lastComparison != 0) {
-      return lastComparison;
-    }
-    if (isSetName()) {
-      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.name, typedOther.name);
-      if (lastComparison != 0) {
-        return lastComparison;
-      }
-    }
-    lastComparison = Boolean.valueOf(isSetValue()).compareTo(typedOther.isSetValue());
-    if (lastComparison != 0) {
-      return lastComparison;
-    }
-    if (isSetValue()) {
-      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.value, typedOther.value);
-      if (lastComparison != 0) {
-        return lastComparison;
-      }
-    }
-    lastComparison = Boolean.valueOf(isSetType()).compareTo(typedOther.isSetType());
-    if (lastComparison != 0) {
-      return lastComparison;
-    }
-    if (isSetType()) {
-      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.type, typedOther.type);
-      if (lastComparison != 0) {
-        return lastComparison;
-      }
-    }
-    lastComparison = Boolean.valueOf(isSetBoost()).compareTo(typedOther.isSetBoost());
-    if (lastComparison != 0) {
-      return lastComparison;
-    }
-    if (isSetBoost()) {
-      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.boost, typedOther.boost);
-      if (lastComparison != 0) {
-        return lastComparison;
-      }
-    }
-    return 0;
-  }
-
-  public _Fields fieldForId(int fieldId) {
-    return _Fields.findByThriftId(fieldId);
-  }
-
-  public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException
{
-    org.apache.thrift.protocol.TField field;
-    iprot.readStructBegin();
-    while (true)
-    {
-      field = iprot.readFieldBegin();
-      if (field.type == org.apache.thrift.protocol.TType.STOP) { 
-        break;
-      }
-      switch (field.id) {
-        case 1: // NAME
-          if (field.type == org.apache.thrift.protocol.TType.STRING) {
-            this.name = iprot.readString();
-          } else { 
-            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-          }
-          break;
-        case 2: // VALUE
-          if (field.type == org.apache.thrift.protocol.TType.STRING) {
-            this.value = iprot.readBinary();
-          } else { 
-            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-          }
-          break;
-        case 3: // TYPE
-          if (field.type == org.apache.thrift.protocol.TType.I32) {
-            this.type = TYPE.findByValue(iprot.readI32());
-          } else { 
-            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-          }
-          break;
-        case 4: // BOOST
-          if (field.type == org.apache.thrift.protocol.TType.DOUBLE) {
-            this.boost = iprot.readDouble();
-            setBoostIsSet(true);
-          } else { 
-            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-          }
-          break;
-        default:
-          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-      }
-      iprot.readFieldEnd();
-    }
-    iprot.readStructEnd();
-
-    // check for required fields of primitive type, which can't be checked in the validate
method
-    validate();
-  }
-
-  public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException
{
-    validate();
-
-    oprot.writeStructBegin(STRUCT_DESC);
-    if (this.name != null) {
-      oprot.writeFieldBegin(NAME_FIELD_DESC);
-      oprot.writeString(this.name);
-      oprot.writeFieldEnd();
-    }
-    if (this.value != null) {
-      oprot.writeFieldBegin(VALUE_FIELD_DESC);
-      oprot.writeBinary(this.value);
-      oprot.writeFieldEnd();
-    }
-    if (this.type != null) {
-      oprot.writeFieldBegin(TYPE_FIELD_DESC);
-      oprot.writeI32(this.type.getValue());
-      oprot.writeFieldEnd();
-    }
-    oprot.writeFieldBegin(BOOST_FIELD_DESC);
-    oprot.writeDouble(this.boost);
-    oprot.writeFieldEnd();
-    oprot.writeFieldStop();
-    oprot.writeStructEnd();
-  }
-
-  @Override
-  public String toString() {
-    StringBuilder sb = new StringBuilder("Field(");
-    boolean first = true;
-
-    sb.append("name:");
-    if (this.name == null) {
-      sb.append("null");
-    } else {
-      sb.append(this.name);
-    }
-    first = false;
-    if (!first) sb.append(", ");
-    sb.append("value:");
-    if (this.value == null) {
-      sb.append("null");
-    } else {
-      org.apache.thrift.TBaseHelper.toString(this.value, sb);
-    }
-    first = false;
-    if (!first) sb.append(", ");
-    sb.append("type:");
-    if (this.type == null) {
-      sb.append("null");
-    } else {
-      sb.append(this.type);
-    }
-    first = false;
-    if (!first) sb.append(", ");
-    sb.append("boost:");
-    sb.append(this.boost);
-    first = false;
-    sb.append(")");
-    return sb.toString();
-  }
-
-  public void validate() throws org.apache.thrift.TException {
-    // check for required fields
-  }
-
-  private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
-    try {
-      write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
-    } catch (org.apache.thrift.TException te) {
-      throw new java.io.IOException(te);
-    }
-  }
-
-  private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException
{
-    try {
-      // it doesn't seem like you should have to do this, but java serialization is wacky,
and doesn't call the default constructor.
-      __isset_bit_vector = new BitSet(1);
-      read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
-    } catch (org.apache.thrift.TException te) {
-      throw new java.io.IOException(te);
-    }
-  }
-
-}
-


Mime
View raw message