/**
 * ConditionType.java
 *
 * This file was auto-generated from WSDL
 * by the Apache Axis 1.3 Oct 05, 2005 (05:23:37 EDT) WSDL2Java emitter.
 */

package org.ecoinformatics.ecogrid.queryservice.query;


/**
 * The condition represents a portion of the query
 *             that restricts the set of documents that match the query.
 * The
 *             content of the condition element is the value that should
 * be 
 *             matched. The symbol '%' should be interpreted as a wildcard
 * that 
 *             matches any character.  The "operator" determines how
 * the match is 
 *             performed (e.g., whether numeric equality or string equality
 * is 
 *             used), and the "concept" determines the field to which
 * the 
 *             restriction is applied (e.g., for XML sources this will
 * be a 
 *             relative or absolute path expression).
 */
public class ConditionType  implements java.io.Serializable, org.apache.axis.encoding.SimpleType {
    private java.lang.String _value;

    private org.ecoinformatics.ecogrid.queryservice.query.OperatorType operator;  // attribute

    private java.lang.String concept;  // attribute

    public ConditionType() {
    }

    // Simple Types must have a String constructor
    public ConditionType(java.lang.String _value) {
        this._value = _value;
    }
    // Simple Types must have a toString for serializing the value
    public java.lang.String toString() {
        return _value;
    }


    /**
     * Gets the _value value for this ConditionType.
     * 
     * @return _value
     */
    public java.lang.String get_value() {
        return _value;
    }


    /**
     * Sets the _value value for this ConditionType.
     * 
     * @param _value
     */
    public void set_value(java.lang.String _value) {
        this._value = _value;
    }


    /**
     * Gets the operator value for this ConditionType.
     * 
     * @return operator
     */
    public org.ecoinformatics.ecogrid.queryservice.query.OperatorType getOperator() {
        return operator;
    }


    /**
     * Sets the operator value for this ConditionType.
     * 
     * @param operator
     */
    public void setOperator(org.ecoinformatics.ecogrid.queryservice.query.OperatorType operator) {
        this.operator = operator;
    }


    /**
     * Gets the concept value for this ConditionType.
     * 
     * @return concept
     */
    public java.lang.String getConcept() {
        return concept;
    }


    /**
     * Sets the concept value for this ConditionType.
     * 
     * @param concept
     */
    public void setConcept(java.lang.String concept) {
        this.concept = concept;
    }

    private java.lang.Object __equalsCalc = null;
    public synchronized boolean equals(java.lang.Object obj) {
        if (!(obj instanceof ConditionType)) return false;
        ConditionType other = (ConditionType) obj;
        if (obj == null) return false;
        if (this == obj) return true;
        if (__equalsCalc != null) {
            return (__equalsCalc == obj);
        }
        __equalsCalc = obj;
        boolean _equals;
        _equals = true && 
            ((this._value==null && other.get_value()==null) || 
             (this._value!=null &&
              this._value.equals(other.get_value()))) &&
            ((this.operator==null && other.getOperator()==null) || 
             (this.operator!=null &&
              this.operator.equals(other.getOperator()))) &&
            ((this.concept==null && other.getConcept()==null) || 
             (this.concept!=null &&
              this.concept.equals(other.getConcept())));
        __equalsCalc = null;
        return _equals;
    }

    private boolean __hashCodeCalc = false;
    public synchronized int hashCode() {
        if (__hashCodeCalc) {
            return 0;
        }
        __hashCodeCalc = true;
        int _hashCode = 1;
        if (get_value() != null) {
            _hashCode += get_value().hashCode();
        }
        if (getOperator() != null) {
            _hashCode += getOperator().hashCode();
        }
        if (getConcept() != null) {
            _hashCode += getConcept().hashCode();
        }
        __hashCodeCalc = false;
        return _hashCode;
    }

    // Type metadata
    private static org.apache.axis.description.TypeDesc typeDesc =
        new org.apache.axis.description.TypeDesc(ConditionType.class, true);

    static {
        typeDesc.setXmlType(new javax.xml.namespace.QName("http://ecoinformatics.org/query-1.0.1", "ConditionType"));
        org.apache.axis.description.AttributeDesc attrField = new org.apache.axis.description.AttributeDesc();
        attrField.setFieldName("operator");
        attrField.setXmlName(new javax.xml.namespace.QName("", "operator"));
        attrField.setXmlType(new javax.xml.namespace.QName("http://ecoinformatics.org/query-1.0.1", "OperatorType"));
        typeDesc.addFieldDesc(attrField);
        attrField = new org.apache.axis.description.AttributeDesc();
        attrField.setFieldName("concept");
        attrField.setXmlName(new javax.xml.namespace.QName("", "concept"));
        attrField.setXmlType(new javax.xml.namespace.QName("http://ecoinformatics.org/query-1.0.1", "LimitedXPathExpression"));
        typeDesc.addFieldDesc(attrField);
        org.apache.axis.description.ElementDesc elemField = new org.apache.axis.description.ElementDesc();
        elemField.setFieldName("_value");
        elemField.setXmlName(new javax.xml.namespace.QName("", "_value"));
        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
        elemField.setNillable(false);
        typeDesc.addFieldDesc(elemField);
    }

    /**
     * Return type metadata object
     */
    public static org.apache.axis.description.TypeDesc getTypeDesc() {
        return typeDesc;
    }

    /**
     * Get Custom Serializer
     */
    public static org.apache.axis.encoding.Serializer getSerializer(
           java.lang.String mechType, 
           java.lang.Class _javaType,  
           javax.xml.namespace.QName _xmlType) {
        return 
          new  org.apache.axis.encoding.ser.SimpleSerializer(
            _javaType, _xmlType, typeDesc);
    }

    /**
     * Get Custom Deserializer
     */
    public static org.apache.axis.encoding.Deserializer getDeserializer(
           java.lang.String mechType, 
           java.lang.Class _javaType,  
           javax.xml.namespace.QName _xmlType) {
        return 
          new  org.apache.axis.encoding.ser.SimpleDeserializer(
            _javaType, _xmlType, typeDesc);
    }

}
