KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > enterprise > tools > common > dd > webservice > ParamValueType


1 /**
2  * This generated bean class ParamValueType matches the schema element param-valueType
3  *
4  * ===============================================================
5  *
6  *
7  * This type is a general type that can be used to declare
8  * parameter/value lists.
9  *
10  *
11  * ===============================================================
12  * Generated on Fri Apr 22 15:42:55 PDT 2005
13  */

14
15 package com.sun.enterprise.tools.common.dd.webservice;
16
17 import org.w3c.dom.*;
18 import org.netbeans.modules.schema2beans.*;
19 import java.beans.*;
20 import java.util.*;
21
22 // BEGIN_NOI18N
23

24 public class ParamValueType extends org.netbeans.modules.schema2beans.BaseBean
25 {
26
27     static Vector comparators = new Vector();
28
29     static public final String JavaDoc DESCRIPTION = "Description"; // NOI18N
30
static public final String JavaDoc PARAM_NAME = "ParamName"; // NOI18N
31
static public final String JavaDoc PARAM_VALUE = "ParamValue"; // NOI18N
32

33     public ParamValueType() {
34         this(Common.USE_DEFAULT_VALUES);
35     }
36
37     public ParamValueType(int options)
38     {
39         super(comparators, new org.netbeans.modules.schema2beans.Version(1, 2, 0));
40         // Properties (see root bean comments for the bean graph)
41
this.createProperty("description", // NOI18N
42
DESCRIPTION,
43             Common.TYPE_0_N | Common.TYPE_STRING | Common.TYPE_KEY,
44             java.lang.String JavaDoc.class);
45         this.createAttribute(DESCRIPTION, "id", "Id",
46                         AttrProp.CDATA | AttrProp.IMPLIED,
47                         null, null);
48         this.createAttribute(DESCRIPTION, "xml:lang", "XmlLang",
49                         AttrProp.CDATA | AttrProp.IMPLIED,
50                         null, null);
51         this.createProperty("param-name", // NOI18N
52
PARAM_NAME,
53             Common.TYPE_1 | Common.TYPE_STRING | Common.TYPE_KEY,
54             java.lang.String JavaDoc.class);
55         this.createAttribute(PARAM_NAME, "id", "Id",
56                         AttrProp.CDATA | AttrProp.IMPLIED,
57                         null, null);
58         this.createProperty("param-value", // NOI18N
59
PARAM_VALUE,
60             Common.TYPE_1 | Common.TYPE_STRING | Common.TYPE_KEY,
61             java.lang.String JavaDoc.class);
62         this.createAttribute(PARAM_VALUE, "id", "Id",
63                         AttrProp.CDATA | AttrProp.IMPLIED,
64                         null, null);
65         this.initialize(options);
66     }
67
68     // Setting the default values of the properties
69
void initialize(int options)
70     {
71
72     }
73
74     // This attribute is an array, possibly empty
75
public void setDescription(int index, java.lang.String JavaDoc value) {
76         this.setValue(DESCRIPTION, index, value);
77     }
78
79     //
80
public java.lang.String JavaDoc getDescription(int index) {
81         return (java.lang.String JavaDoc)this.getValue(DESCRIPTION, index);
82     }
83
84     // This attribute is an array, possibly empty
85
public void setDescription(java.lang.String JavaDoc[] value) {
86         this.setValue(DESCRIPTION, value);
87     }
88
89     //
90
public java.lang.String JavaDoc[] getDescription() {
91         return (java.lang.String JavaDoc[])this.getValues(DESCRIPTION);
92     }
93
94     // Return the number of properties
95
public int sizeDescription() {
96         return this.size(DESCRIPTION);
97     }
98
99     // Add a new element returning its index in the list
100
public int addDescription(java.lang.String JavaDoc value) {
101         return this.addValue(DESCRIPTION, value);
102     }
103
104     //
105
// Remove an element using its reference
106
// Returns the index the element had in the list
107
//
108
public int removeDescription(java.lang.String JavaDoc value) {
109         return this.removeValue(DESCRIPTION, value);
110     }
111
112     // This attribute is mandatory
113
public void setParamName(java.lang.String JavaDoc value) {
114         this.setValue(PARAM_NAME, value);
115     }
116
117     //
118
public java.lang.String JavaDoc getParamName() {
119         return (java.lang.String JavaDoc)this.getValue(PARAM_NAME);
120     }
121
122     // This attribute is mandatory
123
public void setParamValue(java.lang.String JavaDoc value) {
124         this.setValue(PARAM_VALUE, value);
125     }
126
127     //
128
public java.lang.String JavaDoc getParamValue() {
129         return (java.lang.String JavaDoc)this.getValue(PARAM_VALUE);
130     }
131
132     //
133
public static void addComparator(org.netbeans.modules.schema2beans.BeanComparator c) {
134         comparators.add(c);
135     }
136
137     //
138
public static void removeComparator(org.netbeans.modules.schema2beans.BeanComparator c) {
139         comparators.remove(c);
140     }
141     public void validate() throws org.netbeans.modules.schema2beans.ValidateException {
142     }
143
144     // Dump the content of this bean returning it as a String
145
public void dump(StringBuffer JavaDoc str, String JavaDoc indent){
146         String JavaDoc s;
147         Object JavaDoc o;
148         org.netbeans.modules.schema2beans.BaseBean n;
149         str.append(indent);
150         str.append("Description["+this.sizeDescription()+"]"); // NOI18N
151
for(int i=0; i<this.sizeDescription(); i++)
152         {
153             str.append(indent+"\t");
154             str.append("#"+i+":");
155             str.append(indent+"\t"); // NOI18N
156
str.append("<"); // NOI18N
157
s = this.getDescription(i);
158             str.append((s==null?"null":s.trim())); // NOI18N
159
str.append(">\n"); // NOI18N
160
this.dumpAttributes(DESCRIPTION, i, str, indent);
161         }
162
163         str.append(indent);
164         str.append("ParamName"); // NOI18N
165
str.append(indent+"\t"); // NOI18N
166
str.append("<"); // NOI18N
167
s = this.getParamName();
168         str.append((s==null?"null":s.trim())); // NOI18N
169
str.append(">\n"); // NOI18N
170
this.dumpAttributes(PARAM_NAME, 0, str, indent);
171
172         str.append(indent);
173         str.append("ParamValue"); // NOI18N
174
str.append(indent+"\t"); // NOI18N
175
str.append("<"); // NOI18N
176
s = this.getParamValue();
177         str.append((s==null?"null":s.trim())); // NOI18N
178
str.append(">\n"); // NOI18N
179
this.dumpAttributes(PARAM_VALUE, 0, str, indent);
180
181     }
182     public String JavaDoc dumpBeanNode(){
183         StringBuffer JavaDoc str = new StringBuffer JavaDoc();
184         str.append("ParamValueType\n"); // NOI18N
185
this.dump(str, "\n "); // NOI18N
186
return str.toString();
187     }}
188
189 // END_NOI18N
190

191
192 /*
193  * The contents of this file are subject to the terms
194  * of the Common Development and Distribution License
195  * (the License). You may not use this file except in
196  * compliance with the License.
197  *
198  * You can obtain a copy of the license at
199  * https://glassfish.dev.java.net/public/CDDLv1.0.html or
200  * glassfish/bootstrap/legal/CDDLv1.0.txt.
201  * See the License for the specific language governing
202  * permissions and limitations under the License.
203  *
204  * When distributing Covered Code, include this CDDL
205  * Header Notice in each file and include the License file
206  * at glassfish/bootstrap/legal/CDDLv1.0.txt.
207  * If applicable, add the following below the CDDL Header,
208  * with the fields enclosed by brackets [] replaced by
209  * you own identifying information:
210  * "Portions Copyrighted [year] [name of copyright owner]"
211  *
212  * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
213  */

214
Popular Tags