1   /**
2    * NamedString.java
3    *
4    * This file was auto-generated from WSDL
5    * by the Apache Axis 1.2RC3 Feb 28, 2005 (10:15:14 EST) WSDL2Java emitter.
6    */
7   
8   package oasis.names.tc.wsrp.v1.types;
9   
10  public class NamedString  implements java.io.Serializable {
11      private java.lang.String value;
12      private java.lang.String name;  // attribute
13  
14      public NamedString() {
15      }
16  
17      public NamedString(
18             java.lang.String name,
19             java.lang.String value) {
20             this.value = value;
21             this.name = name;
22      }
23  
24  
25      /**
26       * Gets the value value for this NamedString.
27       * 
28       * @return value
29       */
30      public java.lang.String getValue() {
31          return value;
32      }
33  
34  
35      /**
36       * Sets the value value for this NamedString.
37       * 
38       * @param value
39       */
40      public void setValue(java.lang.String value) {
41          this.value = value;
42      }
43  
44  
45      /**
46       * Gets the name value for this NamedString.
47       * 
48       * @return name
49       */
50      public java.lang.String getName() {
51          return name;
52      }
53  
54  
55      /**
56       * Sets the name value for this NamedString.
57       * 
58       * @param name
59       */
60      public void setName(java.lang.String name) {
61          this.name = name;
62      }
63  
64      private java.lang.Object __equalsCalc = null;
65      public synchronized boolean equals(java.lang.Object obj) {
66          if (!(obj instanceof NamedString)) return false;
67          NamedString other = (NamedString) obj;
68          if (obj == null) return false;
69          if (this == obj) return true;
70          if (__equalsCalc != null) {
71              return (__equalsCalc == obj);
72          }
73          __equalsCalc = obj;
74          boolean _equals;
75          _equals = true && 
76              ((this.value==null && other.getValue()==null) || 
77               (this.value!=null &&
78                this.value.equals(other.getValue()))) &&
79              ((this.name==null && other.getName()==null) || 
80               (this.name!=null &&
81                this.name.equals(other.getName())));
82          __equalsCalc = null;
83          return _equals;
84      }
85  
86      private boolean __hashCodeCalc = false;
87      public synchronized int hashCode() {
88          if (__hashCodeCalc) {
89              return 0;
90          }
91          __hashCodeCalc = true;
92          int _hashCode = 1;
93          if (getValue() != null) {
94              _hashCode += getValue().hashCode();
95          }
96          if (getName() != null) {
97              _hashCode += getName().hashCode();
98          }
99          __hashCodeCalc = false;
100         return _hashCode;
101     }
102 
103     // Type metadata
104     private static org.apache.axis.description.TypeDesc typeDesc =
105         new org.apache.axis.description.TypeDesc(NamedString.class, true);
106 
107     static {
108         typeDesc.setXmlType(new javax.xml.namespace.QName("urn:oasis:names:tc:wsrp:v1:types", "NamedString"));
109         org.apache.axis.description.AttributeDesc attrField = new org.apache.axis.description.AttributeDesc();
110         attrField.setFieldName("name");
111         attrField.setXmlName(new javax.xml.namespace.QName("", "name"));
112         attrField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
113         typeDesc.addFieldDesc(attrField);
114         org.apache.axis.description.ElementDesc elemField = new org.apache.axis.description.ElementDesc();
115         elemField.setFieldName("value");
116         elemField.setXmlName(new javax.xml.namespace.QName("urn:oasis:names:tc:wsrp:v1:types", "value"));
117         elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
118         typeDesc.addFieldDesc(elemField);
119     }
120 
121     /**
122      * Return type metadata object
123      */
124     public static org.apache.axis.description.TypeDesc getTypeDesc() {
125         return typeDesc;
126     }
127 
128     /**
129      * Get Custom Serializer
130      */
131     public static org.apache.axis.encoding.Serializer getSerializer(
132            java.lang.String mechType, 
133            java.lang.Class _javaType,  
134            javax.xml.namespace.QName _xmlType) {
135         return 
136           new  org.apache.axis.encoding.ser.BeanSerializer(
137             _javaType, _xmlType, typeDesc);
138     }
139 
140     /**
141      * Get Custom Deserializer
142      */
143     public static org.apache.axis.encoding.Deserializer getDeserializer(
144            java.lang.String mechType, 
145            java.lang.Class _javaType,  
146            javax.xml.namespace.QName _xmlType) {
147         return 
148           new  org.apache.axis.encoding.ser.BeanDeserializer(
149             _javaType, _xmlType, typeDesc);
150     }
151 
152 }
153