/**
 * EntityResult.java
 *
 * This file was auto-generated from WSDL
 * by the Apache Axis 1.4 Apr 22, 2006 (06:55:48 PDT) WSDL2Java emitter.
 */

package uk.ac.open.kmi.watson.clientapi;

public class EntityResult  implements java.io.Serializable {
    private java.lang.String URI;

    private java.lang.String comment;

    private java.lang.String label;

    private java.lang.String[][] literals;

    private java.lang.String[][] relationFrom;

    private java.lang.String[][] relationTo;

    private java.lang.String type;

    public EntityResult() {
    }

    public EntityResult(
           java.lang.String URI,
           java.lang.String comment,
           java.lang.String label,
           java.lang.String[][] literals,
           java.lang.String[][] relationFrom,
           java.lang.String[][] relationTo,
           java.lang.String type) {
           this.URI = URI;
           this.comment = comment;
           this.label = label;
           this.literals = literals;
           this.relationFrom = relationFrom;
           this.relationTo = relationTo;
           this.type = type;
    }


    /**
     * Gets the URI value for this EntityResult.
     * 
     * @return URI
     */
    public java.lang.String getURI() {
        return URI;
    }


    /**
     * Sets the URI value for this EntityResult.
     * 
     * @param URI
     */
    public void setURI(java.lang.String URI) {
        this.URI = URI;
    }


    /**
     * Gets the comment value for this EntityResult.
     * 
     * @return comment
     */
    public java.lang.String getComment() {
        return comment;
    }


    /**
     * Sets the comment value for this EntityResult.
     * 
     * @param comment
     */
    public void setComment(java.lang.String comment) {
        this.comment = comment;
    }


    /**
     * Gets the label value for this EntityResult.
     * 
     * @return label
     */
    public java.lang.String getLabel() {
        return label;
    }


    /**
     * Sets the label value for this EntityResult.
     * 
     * @param label
     */
    public void setLabel(java.lang.String label) {
        this.label = label;
    }


    /**
     * Gets the literals value for this EntityResult.
     * 
     * @return literals
     */
    public java.lang.String[][] getLiterals() {
        return literals;
    }


    /**
     * Sets the literals value for this EntityResult.
     * 
     * @param literals
     */
    public void setLiterals(java.lang.String[][] literals) {
        this.literals = literals;
    }


    /**
     * Gets the relationFrom value for this EntityResult.
     * 
     * @return relationFrom
     */
    public java.lang.String[][] getRelationFrom() {
        return relationFrom;
    }


    /**
     * Sets the relationFrom value for this EntityResult.
     * 
     * @param relationFrom
     */
    public void setRelationFrom(java.lang.String[][] relationFrom) {
        this.relationFrom = relationFrom;
    }


    /**
     * Gets the relationTo value for this EntityResult.
     * 
     * @return relationTo
     */
    public java.lang.String[][] getRelationTo() {
        return relationTo;
    }


    /**
     * Sets the relationTo value for this EntityResult.
     * 
     * @param relationTo
     */
    public void setRelationTo(java.lang.String[][] relationTo) {
        this.relationTo = relationTo;
    }


    /**
     * Gets the type value for this EntityResult.
     * 
     * @return type
     */
    public java.lang.String getType() {
        return type;
    }


    /**
     * Sets the type value for this EntityResult.
     * 
     * @param type
     */
    public void setType(java.lang.String type) {
        this.type = type;
    }

    private java.lang.Object __equalsCalc = null;
    public synchronized boolean equals(java.lang.Object obj) {
        if (!(obj instanceof EntityResult)) return false;
        EntityResult other = (EntityResult) obj;
        if (obj == null) return false;
        if (this == obj) return true;
        if (__equalsCalc != null) {
            return (__equalsCalc == obj);
        }
        __equalsCalc = obj;
        boolean _equals;
        _equals = true && 
            ((this.URI==null && other.getURI()==null) || 
             (this.URI!=null &&
              this.URI.equals(other.getURI()))) &&
            ((this.comment==null && other.getComment()==null) || 
             (this.comment!=null &&
              this.comment.equals(other.getComment()))) &&
            ((this.label==null && other.getLabel()==null) || 
             (this.label!=null &&
              this.label.equals(other.getLabel()))) &&
            ((this.literals==null && other.getLiterals()==null) || 
             (this.literals!=null &&
              java.util.Arrays.equals(this.literals, other.getLiterals()))) &&
            ((this.relationFrom==null && other.getRelationFrom()==null) || 
             (this.relationFrom!=null &&
              java.util.Arrays.equals(this.relationFrom, other.getRelationFrom()))) &&
            ((this.relationTo==null && other.getRelationTo()==null) || 
             (this.relationTo!=null &&
              java.util.Arrays.equals(this.relationTo, other.getRelationTo()))) &&
            ((this.type==null && other.getType()==null) || 
             (this.type!=null &&
              this.type.equals(other.getType())));
        __equalsCalc = null;
        return _equals;
    }

    private boolean __hashCodeCalc = false;
    public synchronized int hashCode() {
        if (__hashCodeCalc) {
            return 0;
        }
        __hashCodeCalc = true;
        int _hashCode = 1;
        if (getURI() != null) {
            _hashCode += getURI().hashCode();
        }
        if (getComment() != null) {
            _hashCode += getComment().hashCode();
        }
        if (getLabel() != null) {
            _hashCode += getLabel().hashCode();
        }
        if (getLiterals() != null) {
            for (int i=0;
                 i<java.lang.reflect.Array.getLength(getLiterals());
                 i++) {
                java.lang.Object obj = java.lang.reflect.Array.get(getLiterals(), i);
                if (obj != null &&
                    !obj.getClass().isArray()) {
                    _hashCode += obj.hashCode();
                }
            }
        }
        if (getRelationFrom() != null) {
            for (int i=0;
                 i<java.lang.reflect.Array.getLength(getRelationFrom());
                 i++) {
                java.lang.Object obj = java.lang.reflect.Array.get(getRelationFrom(), i);
                if (obj != null &&
                    !obj.getClass().isArray()) {
                    _hashCode += obj.hashCode();
                }
            }
        }
        if (getRelationTo() != null) {
            for (int i=0;
                 i<java.lang.reflect.Array.getLength(getRelationTo());
                 i++) {
                java.lang.Object obj = java.lang.reflect.Array.get(getRelationTo(), i);
                if (obj != null &&
                    !obj.getClass().isArray()) {
                    _hashCode += obj.hashCode();
                }
            }
        }
        if (getType() != null) {
            _hashCode += getType().hashCode();
        }
        __hashCodeCalc = false;
        return _hashCode;
    }

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

    static {
        typeDesc.setXmlType(new javax.xml.namespace.QName("urn:WatsonSearch", "EntityResult"));
        org.apache.axis.description.ElementDesc elemField = new org.apache.axis.description.ElementDesc();
        elemField.setFieldName("URI");
        elemField.setXmlName(new javax.xml.namespace.QName("", "URI"));
        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
        elemField.setNillable(true);
        typeDesc.addFieldDesc(elemField);
        elemField = new org.apache.axis.description.ElementDesc();
        elemField.setFieldName("comment");
        elemField.setXmlName(new javax.xml.namespace.QName("", "comment"));
        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
        elemField.setNillable(true);
        typeDesc.addFieldDesc(elemField);
        elemField = new org.apache.axis.description.ElementDesc();
        elemField.setFieldName("label");
        elemField.setXmlName(new javax.xml.namespace.QName("", "label"));
        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
        elemField.setNillable(true);
        typeDesc.addFieldDesc(elemField);
        elemField = new org.apache.axis.description.ElementDesc();
        elemField.setFieldName("literals");
        elemField.setXmlName(new javax.xml.namespace.QName("", "literals"));
        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
        elemField.setNillable(true);
        typeDesc.addFieldDesc(elemField);
        elemField = new org.apache.axis.description.ElementDesc();
        elemField.setFieldName("relationFrom");
        elemField.setXmlName(new javax.xml.namespace.QName("", "relationFrom"));
        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
        elemField.setNillable(true);
        typeDesc.addFieldDesc(elemField);
        elemField = new org.apache.axis.description.ElementDesc();
        elemField.setFieldName("relationTo");
        elemField.setXmlName(new javax.xml.namespace.QName("", "relationTo"));
        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
        elemField.setNillable(true);
        typeDesc.addFieldDesc(elemField);
        elemField = new org.apache.axis.description.ElementDesc();
        elemField.setFieldName("type");
        elemField.setXmlName(new javax.xml.namespace.QName("", "type"));
        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
        elemField.setNillable(true);
        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.BeanSerializer(
            _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.BeanDeserializer(
            _javaType, _xmlType, typeDesc);
    }

}
