KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > test > encoding > SuperBean


1 /*
2  * Copyright 2002-2004 The Apache Software Foundation.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */

16
17 package test.encoding;
18
19 /**
20  * A simple type with several elements for testing serialization
21  */

22 public class SuperBean {
23     
24     // Definition of three elements
25
private String JavaDoc zero;
26     private String JavaDoc one;
27     private String JavaDoc two;
28     
29     /**
30      * Returns the one.
31      * @return String
32      */

33     public String JavaDoc getOne() {
34         return one;
35     }
36
37     /**
38      * Returns the two.
39      * @return String
40      */

41     public String JavaDoc getTwo() {
42         return two;
43     }
44
45     /**
46      * Returns the zero.
47      * @return String
48      */

49     public String JavaDoc getZero() {
50         return zero;
51     }
52
53     /**
54      * Sets the one.
55      * @param one The one to set
56      */

57     public void setOne(String JavaDoc one) {
58         this.one = one;
59     }
60
61     /**
62      * Sets the two.
63      * @param two The two to set
64      */

65     public void setTwo(String JavaDoc two) {
66         this.two = two;
67     }
68
69     /**
70      * Sets the zero.
71      * @param zero The zero to set
72      */

73     public void setZero(String JavaDoc zero) {
74         this.zero = zero;
75     }
76
77     // Type metadata
78
private static org.apache.axis.description.TypeDesc typeDesc =
79         new org.apache.axis.description.TypeDesc(SuperBean.class);
80
81     static {
82         org.apache.axis.description.FieldDesc field = new org.apache.axis.description.ElementDesc();
83         field.setFieldName("zero");
84         field.setXmlName(new javax.xml.namespace.QName JavaDoc("", "zero"));
85         field.setXmlType(new javax.xml.namespace.QName JavaDoc("http://www.w3.org/2001/XMLSchema", "string"));
86         typeDesc.addFieldDesc(field);
87         field = new org.apache.axis.description.ElementDesc();
88         field.setFieldName("one");
89         field.setXmlName(new javax.xml.namespace.QName JavaDoc("", "one"));
90         field.setXmlType(new javax.xml.namespace.QName JavaDoc("http://www.w3.org/2001/XMLSchema", "string"));
91         typeDesc.addFieldDesc(field);
92         field = new org.apache.axis.description.ElementDesc();
93         field.setFieldName("two");
94         field.setXmlName(new javax.xml.namespace.QName JavaDoc("", "two"));
95         field.setXmlType(new javax.xml.namespace.QName JavaDoc("http://www.w3.org/2001/XMLSchema", "string"));
96         typeDesc.addFieldDesc(field);
97     };
98
99     /**
100      * Return type metadata object
101      */

102     public static org.apache.axis.description.TypeDesc getTypeDesc() {
103         return typeDesc;
104     }
105 }
Popular Tags