JAL-1432 updated copyright notices
[jalview.git] / src / uk / ac / ebi / www / Data.java
1 /*
2  * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.0b1)
3  * Copyright (C) 2014 The Jalview Authors
4  * 
5  * This file is part of Jalview.
6  * 
7  * Jalview is free software: you can redistribute it and/or
8  * modify it under the terms of the GNU General Public License 
9  * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
10  *  
11  * Jalview is distributed in the hope that it will be useful, but 
12  * WITHOUT ANY WARRANTY; without even the implied warranty 
13  * of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
14  * PURPOSE.  See the GNU General Public License for more details.
15  * 
16  * You should have received a copy of the GNU General Public License along with Jalview.  If not, see <http://www.gnu.org/licenses/>.
17  * The Jalview Authors are detailed in the 'AUTHORS' file.
18  */
19 package uk.ac.ebi.www;
20
21 public class Data implements java.io.Serializable
22 {
23   private java.lang.String type;
24
25   private java.lang.String content;
26
27   public Data()
28   {
29   }
30
31   public java.lang.String getType()
32   {
33     return type;
34   }
35
36   public void setType(java.lang.String type)
37   {
38     this.type = type;
39   }
40
41   public java.lang.String getContent()
42   {
43     return content;
44   }
45
46   public void setContent(java.lang.String content)
47   {
48     this.content = content;
49   }
50
51   private java.lang.Object __equalsCalc = null;
52
53   public synchronized boolean equals(java.lang.Object obj)
54   {
55     if (!(obj instanceof Data))
56     {
57       return false;
58     }
59     Data other = (Data) obj;
60     if (obj == null)
61     {
62       return false;
63     }
64     if (this == obj)
65     {
66       return true;
67     }
68     if (__equalsCalc != null)
69     {
70       return (__equalsCalc == obj);
71     }
72     __equalsCalc = obj;
73     boolean _equals;
74     _equals = true
75             && ((type == null && other.getType() == null) || (type != null && type
76                     .equals(other.getType())))
77             && ((content == null && other.getContent() == null) || (content != null && content
78                     .equals(other.getContent())));
79     __equalsCalc = null;
80     return _equals;
81   }
82
83   private boolean __hashCodeCalc = false;
84
85   public synchronized int hashCode()
86   {
87     if (__hashCodeCalc)
88     {
89       return 0;
90     }
91     __hashCodeCalc = true;
92     int _hashCode = 1;
93     if (getType() != null)
94     {
95       _hashCode += getType().hashCode();
96     }
97     if (getContent() != null)
98     {
99       _hashCode += getContent().hashCode();
100     }
101     __hashCodeCalc = false;
102     return _hashCode;
103   }
104
105   // Type metadata
106   private static org.apache.axis.description.TypeDesc typeDesc = new org.apache.axis.description.TypeDesc(
107           Data.class);
108
109   static
110   {
111     org.apache.axis.description.FieldDesc field = new org.apache.axis.description.ElementDesc();
112     field.setFieldName("type");
113     field.setXmlName(new javax.xml.namespace.QName("", "type"));
114     field.setXmlType(new javax.xml.namespace.QName(
115             "http://www.w3.org/2001/XMLSchema", "string"));
116     typeDesc.addFieldDesc(field);
117     field = new org.apache.axis.description.ElementDesc();
118     field.setFieldName("content");
119     field.setXmlName(new javax.xml.namespace.QName("", "content"));
120     field.setXmlType(new javax.xml.namespace.QName(
121             "http://www.w3.org/2001/XMLSchema", "string"));
122     typeDesc.addFieldDesc(field);
123   };
124
125   /**
126    * Return type metadata object
127    */
128   public static org.apache.axis.description.TypeDesc getTypeDesc()
129   {
130     return typeDesc;
131   }
132
133   /**
134    * Get Custom Serializer
135    */
136   public static org.apache.axis.encoding.Serializer getSerializer(
137           java.lang.String mechType, java.lang.Class _javaType,
138           javax.xml.namespace.QName _xmlType)
139   {
140     return new org.apache.axis.encoding.ser.BeanSerializer(_javaType,
141             _xmlType, typeDesc);
142   }
143
144   /**
145    * Get Custom Deserializer
146    */
147   public static org.apache.axis.encoding.Deserializer getDeserializer(
148           java.lang.String mechType, java.lang.Class _javaType,
149           javax.xml.namespace.QName _xmlType)
150   {
151     return new org.apache.axis.encoding.ser.BeanDeserializer(_javaType,
152             _xmlType, typeDesc);
153   }
154
155 }