KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > alfresco > example > webservice > types > ContentFormat


1 /**
2  * ContentFormat.java
3  *
4  * This file was auto-generated from WSDL
5  * by the Apache Axis 1.2.1 Jun 14, 2005 (09:15:57 EDT) WSDL2Java emitter.
6  */

7
8 package org.alfresco.example.webservice.types;
9
10 public class ContentFormat implements java.io.Serializable JavaDoc {
11     /** TODO: MinOccurs = 0?
12  * TODO: Define Constraints */

13     private java.lang.String JavaDoc mimetype;
14     /** TODO: MinOccurs = 0?
15  * TODO: Define Constraints */

16     private java.lang.String JavaDoc encoding;
17
18     public ContentFormat() {
19     }
20
21     public ContentFormat(
22            java.lang.String JavaDoc mimetype,
23            java.lang.String JavaDoc encoding) {
24            this.mimetype = mimetype;
25            this.encoding = encoding;
26     }
27
28
29     /**
30      * Gets the mimetype value for this ContentFormat.
31      *
32      * @return mimetype TODO: MinOccurs = 0?
33  * TODO: Define Constraints
34      */

35     public java.lang.String JavaDoc getMimetype() {
36         return mimetype;
37     }
38
39
40     /**
41      * Sets the mimetype value for this ContentFormat.
42      *
43      * @param mimetype TODO: MinOccurs = 0?
44  * TODO: Define Constraints
45      */

46     public void setMimetype(java.lang.String JavaDoc mimetype) {
47         this.mimetype = mimetype;
48     }
49
50
51     /**
52      * Gets the encoding value for this ContentFormat.
53      *
54      * @return encoding TODO: MinOccurs = 0?
55  * TODO: Define Constraints
56      */

57     public java.lang.String JavaDoc getEncoding() {
58         return encoding;
59     }
60
61
62     /**
63      * Sets the encoding value for this ContentFormat.
64      *
65      * @param encoding TODO: MinOccurs = 0?
66  * TODO: Define Constraints
67      */

68     public void setEncoding(java.lang.String JavaDoc encoding) {
69         this.encoding = encoding;
70     }
71
72     private java.lang.Object JavaDoc __equalsCalc = null;
73     public synchronized boolean equals(java.lang.Object JavaDoc obj) {
74         if (!(obj instanceof ContentFormat)) return false;
75         ContentFormat other = (ContentFormat) obj;
76         if (obj == null) return false;
77         if (this == obj) return true;
78         if (__equalsCalc != null) {
79             return (__equalsCalc == obj);
80         }
81         __equalsCalc = obj;
82         boolean _equals;
83         _equals = true &&
84             ((this.mimetype==null && other.getMimetype()==null) ||
85              (this.mimetype!=null &&
86               this.mimetype.equals(other.getMimetype()))) &&
87             ((this.encoding==null && other.getEncoding()==null) ||
88              (this.encoding!=null &&
89               this.encoding.equals(other.getEncoding())));
90         __equalsCalc = null;
91         return _equals;
92     }
93
94     private boolean __hashCodeCalc = false;
95     public synchronized int hashCode() {
96         if (__hashCodeCalc) {
97             return 0;
98         }
99         __hashCodeCalc = true;
100         int _hashCode = 1;
101         if (getMimetype() != null) {
102             _hashCode += getMimetype().hashCode();
103         }
104         if (getEncoding() != null) {
105             _hashCode += getEncoding().hashCode();
106         }
107         __hashCodeCalc = false;
108         return _hashCode;
109     }
110
111     // Type metadata
112
private static org.apache.axis.description.TypeDesc typeDesc =
113         new org.apache.axis.description.TypeDesc(ContentFormat.class, true);
114
115     static {
116         typeDesc.setXmlType(new javax.xml.namespace.QName JavaDoc("http://www.alfresco.org/ws/model/content/1.0", "ContentFormat"));
117         org.apache.axis.description.ElementDesc elemField = new org.apache.axis.description.ElementDesc();
118         elemField.setFieldName("mimetype");
119         elemField.setXmlName(new javax.xml.namespace.QName JavaDoc("http://www.alfresco.org/ws/model/content/1.0", "mimetype"));
120         elemField.setXmlType(new javax.xml.namespace.QName JavaDoc("http://www.alfresco.org/ws/model/content/1.0", ">ContentFormat>mimetype"));
121         elemField.setNillable(false);
122         typeDesc.addFieldDesc(elemField);
123         elemField = new org.apache.axis.description.ElementDesc();
124         elemField.setFieldName("encoding");
125         elemField.setXmlName(new javax.xml.namespace.QName JavaDoc("http://www.alfresco.org/ws/model/content/1.0", "encoding"));
126         elemField.setXmlType(new javax.xml.namespace.QName JavaDoc("http://www.alfresco.org/ws/model/content/1.0", ">ContentFormat>encoding"));
127         elemField.setMinOccurs(0);
128         elemField.setNillable(false);
129         typeDesc.addFieldDesc(elemField);
130     }
131
132     /**
133      * Return type metadata object
134      */

135     public static org.apache.axis.description.TypeDesc getTypeDesc() {
136         return typeDesc;
137     }
138
139     /**
140      * Get Custom Serializer
141      */

142     public static org.apache.axis.encoding.Serializer getSerializer(
143            java.lang.String JavaDoc mechType,
144            java.lang.Class JavaDoc _javaType,
145            javax.xml.namespace.QName JavaDoc _xmlType) {
146         return
147           new org.apache.axis.encoding.ser.BeanSerializer(
148             _javaType, _xmlType, typeDesc);
149     }
150
151     /**
152      * Get Custom Deserializer
153      */

154     public static org.apache.axis.encoding.Deserializer getDeserializer(
155            java.lang.String JavaDoc mechType,
156            java.lang.Class JavaDoc _javaType,
157            javax.xml.namespace.QName JavaDoc _xmlType) {
158         return
159           new org.apache.axis.encoding.ser.BeanDeserializer(
160             _javaType, _xmlType, typeDesc);
161     }
162
163 }
164
Popular Tags