KickJava   Java API By Example, From Geeks To Geeks.

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


1 /**
2  * ContentFormat.java
3  *
4  * This file was auto-generated from WSDL
5  * by the Apache Axis 1.3 Oct 05, 2005 (05:23:37 EDT) WSDL2Java emitter.
6  */

7
8 package org.alfresco.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
15     /* TODO: MinOccurs = 0?
16      * TODO: Define Constraints */

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

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

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

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

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

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

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

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