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