KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > enterprise > tools > common > dd > webapp > data > SunWebAppData


1 /*
2  * The contents of this file are subject to the terms
3  * of the Common Development and Distribution License
4  * (the License). You may not use this file except in
5  * compliance with the License.
6  *
7  * You can obtain a copy of the license at
8  * https://glassfish.dev.java.net/public/CDDLv1.0.html or
9  * glassfish/bootstrap/legal/CDDLv1.0.txt.
10  * See the License for the specific language governing
11  * permissions and limitations under the License.
12  *
13  * When distributing Covered Code, include this CDDL
14  * Header Notice in each file and include the License file
15  * at glassfish/bootstrap/legal/CDDLv1.0.txt.
16  * If applicable, add the following below the CDDL Header,
17  * with the fields enclosed by brackets [] replaced by
18  * you own identifying information:
19  * "Portions Copyrighted [year] [name of copyright owner]"
20  *
21  * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
22  */

23
24 /**
25  * This generated bean class SunWebAppData matches the schema element sun-web-app-data
26  *
27  * Generated on Tue Aug 12 18:27:47 PDT 2003
28  *
29  * This class matches the root element of the DTD,
30  * and is the root of the following bean graph:
31  *
32  * sun-web-app-data : SunWebAppData
33  * session-param : SessionParam[0,n]
34  * param-name : String
35  * param-type : String?
36  * param-values : String[0,n]
37  * default-value : String?
38  * helpID : String?
39  * cookie-param : CookieParam[0,n]
40  * param-name : String
41  * param-type : String?
42  * param-values : String[0,n]
43  * default-value : String?
44  * helpID : String?
45  * jsp-param : JspParam[0,n]
46  * param-name : String
47  * param-type : String?
48  * param-values : String[0,n]
49  * default-value : String?
50  * helpID : String?
51  * extra-param : ExtraParam[0,n]
52  * param-name : String
53  * param-type : String?
54  * param-values : String[0,n]
55  * default-value : String?
56  * helpID : String?
57  * manager-param : ManagerParam[0,n]
58  * param-name : String
59  * param-type : String?
60  * param-values : String[0,n]
61  * default-value : String?
62  * helpID : String?
63  * store-param : StoreParam[0,n]
64  * param-name : String
65  * param-type : String?
66  * param-values : String[0,n]
67  * default-value : String?
68  * helpID : String?
69  * persistence-param : PersistenceParam[0,n]
70  * param-name : String
71  * param-type : String?
72  * param-values : String[0,n]
73  * default-value : String?
74  * helpID : String?
75  * helper-class-param : HelperClassParam[0,n]
76  * param-name : String
77  * param-type : String?
78  * param-values : String[0,n]
79  * default-value : String?
80  * helpID : String?
81  *
82  */

83
84 package com.sun.enterprise.tools.common.dd.webapp.data;
85
86 import org.w3c.dom.*;
87 import org.netbeans.modules.schema2beans.*;
88 import java.beans.*;
89 import java.util.*;
90 import java.io.*;
91
92 // BEGIN_NOI18N
93

94 public class SunWebAppData extends com.sun.enterprise.tools.common.dd.SunBaseBean
95 {
96
97     static Vector comparators = new Vector();
98
99     static public final String JavaDoc SESSION_PARAM = "SessionParam"; // NOI18N
100
static public final String JavaDoc COOKIE_PARAM = "CookieParam"; // NOI18N
101
static public final String JavaDoc JSP_PARAM = "JspParam"; // NOI18N
102
static public final String JavaDoc EXTRA_PARAM = "ExtraParam"; // NOI18N
103
static public final String JavaDoc MANAGER_PARAM = "ManagerParam"; // NOI18N
104
static public final String JavaDoc STORE_PARAM = "StoreParam"; // NOI18N
105
static public final String JavaDoc PERSISTENCE_PARAM = "PersistenceParam"; // NOI18N
106
static public final String JavaDoc HELPER_CLASS_PARAM = "HelperClassParam"; // NOI18N
107

108     public SunWebAppData() throws org.netbeans.modules.schema2beans.Schema2BeansException {
109         this(null, Common.USE_DEFAULT_VALUES);
110     }
111
112     public SunWebAppData(org.w3c.dom.Node JavaDoc doc, int options) throws org.netbeans.modules.schema2beans.Schema2BeansException {
113         this(Common.NO_DEFAULT_VALUES);
114         initFromNode(doc, options);
115     }
116     protected void initFromNode(org.w3c.dom.Node JavaDoc doc, int options) throws Schema2BeansException
117     {
118         if (doc == null)
119         {
120             doc = GraphManager.createRootElementNode("sun-web-app-data"); // NOI18N
121
if (doc == null)
122                 throw new Schema2BeansException(Common.getMessage(
123                     "CantCreateDOMRoot_msg", "sun-web-app-data"));
124         }
125         Node n = GraphManager.getElementNode("sun-web-app-data", doc); // NOI18N
126
if (n == null)
127             throw new Schema2BeansException(Common.getMessage(
128                 "DocRootNotInDOMGraph_msg", "sun-web-app-data", doc.getFirstChild().getNodeName()));
129
130         this.graphManager.setXmlDocument(doc);
131
132         // Entry point of the createBeans() recursive calls
133
this.createBean(n, this.graphManager());
134         this.initialize(options);
135     }
136     public SunWebAppData(int options)
137     {
138         super(comparators, new org.netbeans.modules.schema2beans.Version(1, 2, 0));
139         initOptions(options);
140     }
141     protected void initOptions(int options)
142     {
143         // The graph manager is allocated in the bean root
144
this.graphManager = new GraphManager(this);
145         this.createRoot("sun-web-app-data", "SunWebAppData", // NOI18N
146
Common.TYPE_1 | Common.TYPE_BEAN, SunWebAppData.class);
147
148         // Properties (see root bean comments for the bean graph)
149
this.createProperty("session-param", // NOI18N
150
SESSION_PARAM,
151             Common.TYPE_0_N | Common.TYPE_BEAN | Common.TYPE_KEY,
152             SessionParam.class);
153         this.createProperty("cookie-param", // NOI18N
154
COOKIE_PARAM,
155             Common.TYPE_0_N | Common.TYPE_BEAN | Common.TYPE_KEY,
156             CookieParam.class);
157         this.createProperty("jsp-param", // NOI18N
158
JSP_PARAM,
159             Common.TYPE_0_N | Common.TYPE_BEAN | Common.TYPE_KEY,
160             JspParam.class);
161         this.createProperty("extra-param", // NOI18N
162
EXTRA_PARAM,
163             Common.TYPE_0_N | Common.TYPE_BEAN | Common.TYPE_KEY,
164             ExtraParam.class);
165         this.createProperty("manager-param", // NOI18N
166
MANAGER_PARAM,
167             Common.TYPE_0_N | Common.TYPE_BEAN | Common.TYPE_KEY,
168             ManagerParam.class);
169         this.createProperty("store-param", // NOI18N
170
STORE_PARAM,
171             Common.TYPE_0_N | Common.TYPE_BEAN | Common.TYPE_KEY,
172             StoreParam.class);
173         this.createProperty("persistence-param", // NOI18N
174
PERSISTENCE_PARAM,
175             Common.TYPE_0_N | Common.TYPE_BEAN | Common.TYPE_KEY,
176             PersistenceParam.class);
177         this.createProperty("helper-class-param", // NOI18N
178
HELPER_CLASS_PARAM,
179             Common.TYPE_0_N | Common.TYPE_BEAN | Common.TYPE_KEY,
180             HelperClassParam.class);
181         this.initialize(options);
182     }
183
184     // Setting the default values of the properties
185
void initialize(int options)
186     {
187
188     }
189
190     // This attribute is an array, possibly empty
191
public void setSessionParam(int index, SessionParam value) {
192         this.setValue(SESSION_PARAM, index, value);
193     }
194
195     //
196
public SessionParam getSessionParam(int index) {
197         return (SessionParam)this.getValue(SESSION_PARAM, index);
198     }
199
200     // This attribute is an array, possibly empty
201
public void setSessionParam(SessionParam[] value) {
202         this.setValue(SESSION_PARAM, value);
203     }
204
205     //
206
public SessionParam[] getSessionParam() {
207         return (SessionParam[])this.getValues(SESSION_PARAM);
208     }
209
210     // Return the number of properties
211
public int sizeSessionParam() {
212         return this.size(SESSION_PARAM);
213     }
214
215     // Add a new element returning its index in the list
216
public int addSessionParam(com.sun.enterprise.tools.common.dd.webapp.data.SessionParam value) {
217         return this.addValue(SESSION_PARAM, value);
218     }
219
220     //
221
// Remove an element using its reference
222
// Returns the index the element had in the list
223
//
224
public int removeSessionParam(com.sun.enterprise.tools.common.dd.webapp.data.SessionParam value) {
225         return this.removeValue(SESSION_PARAM, value);
226     }
227
228     // This attribute is an array, possibly empty
229
public void setCookieParam(int index, CookieParam value) {
230         this.setValue(COOKIE_PARAM, index, value);
231     }
232
233     //
234
public CookieParam getCookieParam(int index) {
235         return (CookieParam)this.getValue(COOKIE_PARAM, index);
236     }
237
238     // This attribute is an array, possibly empty
239
public void setCookieParam(CookieParam[] value) {
240         this.setValue(COOKIE_PARAM, value);
241     }
242
243     //
244
public CookieParam[] getCookieParam() {
245         return (CookieParam[])this.getValues(COOKIE_PARAM);
246     }
247
248     // Return the number of properties
249
public int sizeCookieParam() {
250         return this.size(COOKIE_PARAM);
251     }
252
253     // Add a new element returning its index in the list
254
public int addCookieParam(com.sun.enterprise.tools.common.dd.webapp.data.CookieParam value) {
255         return this.addValue(COOKIE_PARAM, value);
256     }
257
258     //
259
// Remove an element using its reference
260
// Returns the index the element had in the list
261
//
262
public int removeCookieParam(com.sun.enterprise.tools.common.dd.webapp.data.CookieParam value) {
263         return this.removeValue(COOKIE_PARAM, value);
264     }
265
266     // This attribute is an array, possibly empty
267
public void setJspParam(int index, JspParam value) {
268         this.setValue(JSP_PARAM, index, value);
269     }
270
271     //
272
public JspParam getJspParam(int index) {
273         return (JspParam)this.getValue(JSP_PARAM, index);
274     }
275
276     // This attribute is an array, possibly empty
277
public void setJspParam(JspParam[] value) {
278         this.setValue(JSP_PARAM, value);
279     }
280
281     //
282
public JspParam[] getJspParam() {
283         return (JspParam[])this.getValues(JSP_PARAM);
284     }
285
286     // Return the number of properties
287
public int sizeJspParam() {
288         return this.size(JSP_PARAM);
289     }
290
291     // Add a new element returning its index in the list
292
public int addJspParam(com.sun.enterprise.tools.common.dd.webapp.data.JspParam value) {
293         return this.addValue(JSP_PARAM, value);
294     }
295
296     //
297
// Remove an element using its reference
298
// Returns the index the element had in the list
299
//
300
public int removeJspParam(com.sun.enterprise.tools.common.dd.webapp.data.JspParam value) {
301         return this.removeValue(JSP_PARAM, value);
302     }
303
304     // This attribute is an array, possibly empty
305
public void setExtraParam(int index, ExtraParam value) {
306         this.setValue(EXTRA_PARAM, index, value);
307     }
308
309     //
310
public ExtraParam getExtraParam(int index) {
311         return (ExtraParam)this.getValue(EXTRA_PARAM, index);
312     }
313
314     // This attribute is an array, possibly empty
315
public void setExtraParam(ExtraParam[] value) {
316         this.setValue(EXTRA_PARAM, value);
317     }
318
319     //
320
public ExtraParam[] getExtraParam() {
321         return (ExtraParam[])this.getValues(EXTRA_PARAM);
322     }
323
324     // Return the number of properties
325
public int sizeExtraParam() {
326         return this.size(EXTRA_PARAM);
327     }
328
329     // Add a new element returning its index in the list
330
public int addExtraParam(com.sun.enterprise.tools.common.dd.webapp.data.ExtraParam value) {
331         return this.addValue(EXTRA_PARAM, value);
332     }
333
334     //
335
// Remove an element using its reference
336
// Returns the index the element had in the list
337
//
338
public int removeExtraParam(com.sun.enterprise.tools.common.dd.webapp.data.ExtraParam value) {
339         return this.removeValue(EXTRA_PARAM, value);
340     }
341
342     // This attribute is an array, possibly empty
343
public void setManagerParam(int index, ManagerParam value) {
344         this.setValue(MANAGER_PARAM, index, value);
345     }
346
347     //
348
public ManagerParam getManagerParam(int index) {
349         return (ManagerParam)this.getValue(MANAGER_PARAM, index);
350     }
351
352     // This attribute is an array, possibly empty
353
public void setManagerParam(ManagerParam[] value) {
354         this.setValue(MANAGER_PARAM, value);
355     }
356
357     //
358
public ManagerParam[] getManagerParam() {
359         return (ManagerParam[])this.getValues(MANAGER_PARAM);
360     }
361
362     // Return the number of properties
363
public int sizeManagerParam() {
364         return this.size(MANAGER_PARAM);
365     }
366
367     // Add a new element returning its index in the list
368
public int addManagerParam(com.sun.enterprise.tools.common.dd.webapp.data.ManagerParam value) {
369         return this.addValue(MANAGER_PARAM, value);
370     }
371
372     //
373
// Remove an element using its reference
374
// Returns the index the element had in the list
375
//
376
public int removeManagerParam(com.sun.enterprise.tools.common.dd.webapp.data.ManagerParam value) {
377         return this.removeValue(MANAGER_PARAM, value);
378     }
379
380     // This attribute is an array, possibly empty
381
public void setStoreParam(int index, StoreParam value) {
382         this.setValue(STORE_PARAM, index, value);
383     }
384
385     //
386
public StoreParam getStoreParam(int index) {
387         return (StoreParam)this.getValue(STORE_PARAM, index);
388     }
389
390     // This attribute is an array, possibly empty
391
public void setStoreParam(StoreParam[] value) {
392         this.setValue(STORE_PARAM, value);
393     }
394
395     //
396
public StoreParam[] getStoreParam() {
397         return (StoreParam[])this.getValues(STORE_PARAM);
398     }
399
400     // Return the number of properties
401
public int sizeStoreParam() {
402         return this.size(STORE_PARAM);
403     }
404
405     // Add a new element returning its index in the list
406
public int addStoreParam(com.sun.enterprise.tools.common.dd.webapp.data.StoreParam value) {
407         return this.addValue(STORE_PARAM, value);
408     }
409
410     //
411
// Remove an element using its reference
412
// Returns the index the element had in the list
413
//
414
public int removeStoreParam(com.sun.enterprise.tools.common.dd.webapp.data.StoreParam value) {
415         return this.removeValue(STORE_PARAM, value);
416     }
417
418     // This attribute is an array, possibly empty
419
public void setPersistenceParam(int index, PersistenceParam value) {
420         this.setValue(PERSISTENCE_PARAM, index, value);
421     }
422
423     //
424
public PersistenceParam getPersistenceParam(int index) {
425         return (PersistenceParam)this.getValue(PERSISTENCE_PARAM, index);
426     }
427
428     // This attribute is an array, possibly empty
429
public void setPersistenceParam(PersistenceParam[] value) {
430         this.setValue(PERSISTENCE_PARAM, value);
431     }
432
433     //
434
public PersistenceParam[] getPersistenceParam() {
435         return (PersistenceParam[])this.getValues(PERSISTENCE_PARAM);
436     }
437
438     // Return the number of properties
439
public int sizePersistenceParam() {
440         return this.size(PERSISTENCE_PARAM);
441     }
442
443     // Add a new element returning its index in the list
444
public int addPersistenceParam(com.sun.enterprise.tools.common.dd.webapp.data.PersistenceParam value) {
445         return this.addValue(PERSISTENCE_PARAM, value);
446     }
447
448     //
449
// Remove an element using its reference
450
// Returns the index the element had in the list
451
//
452
public int removePersistenceParam(com.sun.enterprise.tools.common.dd.webapp.data.PersistenceParam value) {
453         return this.removeValue(PERSISTENCE_PARAM, value);
454     }
455
456     // This attribute is an array, possibly empty
457
public void setHelperClassParam(int index, HelperClassParam value) {
458         this.setValue(HELPER_CLASS_PARAM, index, value);
459     }
460
461     //
462
public HelperClassParam getHelperClassParam(int index) {
463         return (HelperClassParam)this.getValue(HELPER_CLASS_PARAM, index);
464     }
465
466     // This attribute is an array, possibly empty
467
public void setHelperClassParam(HelperClassParam[] value) {
468         this.setValue(HELPER_CLASS_PARAM, value);
469     }
470
471     //
472
public HelperClassParam[] getHelperClassParam() {
473         return (HelperClassParam[])this.getValues(HELPER_CLASS_PARAM);
474     }
475
476     // Return the number of properties
477
public int sizeHelperClassParam() {
478         return this.size(HELPER_CLASS_PARAM);
479     }
480
481     // Add a new element returning its index in the list
482
public int addHelperClassParam(com.sun.enterprise.tools.common.dd.webapp.data.HelperClassParam value) {
483         return this.addValue(HELPER_CLASS_PARAM, value);
484     }
485
486     //
487
// Remove an element using its reference
488
// Returns the index the element had in the list
489
//
490
public int removeHelperClassParam(com.sun.enterprise.tools.common.dd.webapp.data.HelperClassParam value) {
491         return this.removeValue(HELPER_CLASS_PARAM, value);
492     }
493
494     //
495
public static void addComparator(org.netbeans.modules.schema2beans.BeanComparator c) {
496         comparators.add(c);
497     }
498
499     //
500
public static void removeComparator(org.netbeans.modules.schema2beans.BeanComparator c) {
501         comparators.remove(c);
502     }
503     //
504
// This method returns the root of the bean graph
505
// Each call creates a new bean graph from the specified DOM graph
506
//
507
public static SunWebAppData createGraph(org.w3c.dom.Node JavaDoc doc) throws org.netbeans.modules.schema2beans.Schema2BeansException {
508         return new SunWebAppData(doc, Common.NO_DEFAULT_VALUES);
509     }
510
511     public static SunWebAppData createGraph(java.io.InputStream JavaDoc in) throws org.netbeans.modules.schema2beans.Schema2BeansException {
512         return createGraph(in, false);
513     }
514
515     public static SunWebAppData createGraph(java.io.InputStream JavaDoc in, boolean validate) throws org.netbeans.modules.schema2beans.Schema2BeansException {
516         Document doc = GraphManager.createXmlDocument(in, validate);
517         return createGraph(doc);
518     }
519
520     //
521
// This method returns the root for a new empty bean graph
522
//
523
public static SunWebAppData createGraph() {
524         try {
525             return new SunWebAppData();
526         }
527         catch (Schema2BeansException e) {
528             throw new RuntimeException JavaDoc(e.getMessage());
529         }
530     }
531
532     public void validate() throws org.netbeans.modules.schema2beans.ValidateException {
533         boolean restrictionFailure = false;
534         // Validating property sessionParam
535
for (int _index = 0; _index < sizeSessionParam(); ++_index) {
536             com.sun.enterprise.tools.common.dd.webapp.data.SessionParam element = getSessionParam(_index);
537             if (element != null) {
538                 element.validate();
539             }
540         }
541         // Validating property cookieParam
542
for (int _index = 0; _index < sizeCookieParam(); ++_index) {
543             com.sun.enterprise.tools.common.dd.webapp.data.CookieParam element = getCookieParam(_index);
544             if (element != null) {
545                 element.validate();
546             }
547         }
548         // Validating property jspParam
549
for (int _index = 0; _index < sizeJspParam(); ++_index) {
550             com.sun.enterprise.tools.common.dd.webapp.data.JspParam element = getJspParam(_index);
551             if (element != null) {
552                 element.validate();
553             }
554         }
555         // Validating property extraParam
556
for (int _index = 0; _index < sizeExtraParam(); ++_index) {
557             com.sun.enterprise.tools.common.dd.webapp.data.ExtraParam element = getExtraParam(_index);
558             if (element != null) {
559                 element.validate();
560             }
561         }
562         // Validating property managerParam
563
for (int _index = 0; _index < sizeManagerParam(); ++_index) {
564             com.sun.enterprise.tools.common.dd.webapp.data.ManagerParam element = getManagerParam(_index);
565             if (element != null) {
566                 element.validate();
567             }
568         }
569         // Validating property storeParam
570
for (int _index = 0; _index < sizeStoreParam(); ++_index) {
571             com.sun.enterprise.tools.common.dd.webapp.data.StoreParam element = getStoreParam(_index);
572             if (element != null) {
573                 element.validate();
574             }
575         }
576         // Validating property persistenceParam
577
for (int _index = 0; _index < sizePersistenceParam(); ++_index) {
578             com.sun.enterprise.tools.common.dd.webapp.data.PersistenceParam element = getPersistenceParam(_index);
579             if (element != null) {
580                 element.validate();
581             }
582         }
583         // Validating property helperClassParam
584
for (int _index = 0; _index < sizeHelperClassParam(); ++_index) {
585             com.sun.enterprise.tools.common.dd.webapp.data.HelperClassParam element = getHelperClassParam(_index);
586             if (element != null) {
587                 element.validate();
588             }
589         }
590     }
591
592     // Special serializer: output XML as serialization
593
private void writeObject(java.io.ObjectOutputStream JavaDoc out) throws java.io.IOException JavaDoc{
594         ByteArrayOutputStream baos = new ByteArrayOutputStream();
595         write(baos);
596         String JavaDoc str = baos.toString();;
597         // System.out.println("str='"+str+"'");
598
out.writeUTF(str);
599     }
600     // Special deserializer: read XML as deserialization
601
private void readObject(java.io.ObjectInputStream JavaDoc in) throws java.io.IOException JavaDoc, ClassNotFoundException JavaDoc{
602         try{
603             init(comparators, new org.netbeans.modules.schema2beans.Version(1, 2, 0));
604             String JavaDoc strDocument = in.readUTF();
605             // System.out.println("strDocument='"+strDocument+"'");
606
ByteArrayInputStream bais = new ByteArrayInputStream(strDocument.getBytes());
607             Document doc = GraphManager.createXmlDocument(bais, false);
608             initOptions(Common.NO_DEFAULT_VALUES);
609             initFromNode(doc, Common.NO_DEFAULT_VALUES);
610         }
611         catch (Schema2BeansException e) {
612             e.printStackTrace();
613             throw new RuntimeException JavaDoc(e.getMessage());
614         }
615     }
616
617     // Dump the content of this bean returning it as a String
618
public void dump(StringBuffer JavaDoc str, String JavaDoc indent){
619         String JavaDoc s;
620         Object JavaDoc o;
621         org.netbeans.modules.schema2beans.BaseBean n;
622         str.append(indent);
623         str.append("SessionParam["+this.sizeSessionParam()+"]"); // NOI18N
624
for(int i=0; i<this.sizeSessionParam(); i++)
625         {
626             str.append(indent+"\t");
627             str.append("#"+i+":");
628             n = (org.netbeans.modules.schema2beans.BaseBean) this.getSessionParam(i);
629             if (n != null)
630                 n.dump(str, indent + "\t"); // NOI18N
631
else
632                 str.append(indent+"\tnull"); // NOI18N
633
this.dumpAttributes(SESSION_PARAM, i, str, indent);
634         }
635
636         str.append(indent);
637         str.append("CookieParam["+this.sizeCookieParam()+"]"); // NOI18N
638
for(int i=0; i<this.sizeCookieParam(); i++)
639         {
640             str.append(indent+"\t");
641             str.append("#"+i+":");
642             n = (org.netbeans.modules.schema2beans.BaseBean) this.getCookieParam(i);
643             if (n != null)
644                 n.dump(str, indent + "\t"); // NOI18N
645
else
646                 str.append(indent+"\tnull"); // NOI18N
647
this.dumpAttributes(COOKIE_PARAM, i, str, indent);
648         }
649
650         str.append(indent);
651         str.append("JspParam["+this.sizeJspParam()+"]"); // NOI18N
652
for(int i=0; i<this.sizeJspParam(); i++)
653         {
654             str.append(indent+"\t");
655             str.append("#"+i+":");
656             n = (org.netbeans.modules.schema2beans.BaseBean) this.getJspParam(i);
657             if (n != null)
658                 n.dump(str, indent + "\t"); // NOI18N
659
else
660                 str.append(indent+"\tnull"); // NOI18N
661
this.dumpAttributes(JSP_PARAM, i, str, indent);
662         }
663
664         str.append(indent);
665         str.append("ExtraParam["+this.sizeExtraParam()+"]"); // NOI18N
666
for(int i=0; i<this.sizeExtraParam(); i++)
667         {
668             str.append(indent+"\t");
669             str.append("#"+i+":");
670             n = (org.netbeans.modules.schema2beans.BaseBean) this.getExtraParam(i);
671             if (n != null)
672                 n.dump(str, indent + "\t"); // NOI18N
673
else
674                 str.append(indent+"\tnull"); // NOI18N
675
this.dumpAttributes(EXTRA_PARAM, i, str, indent);
676         }
677
678         str.append(indent);
679         str.append("ManagerParam["+this.sizeManagerParam()+"]"); // NOI18N
680
for(int i=0; i<this.sizeManagerParam(); i++)
681         {
682             str.append(indent+"\t");
683             str.append("#"+i+":");
684             n = (org.netbeans.modules.schema2beans.BaseBean) this.getManagerParam(i);
685             if (n != null)
686                 n.dump(str, indent + "\t"); // NOI18N
687
else
688                 str.append(indent+"\tnull"); // NOI18N
689
this.dumpAttributes(MANAGER_PARAM, i, str, indent);
690         }
691
692         str.append(indent);
693         str.append("StoreParam["+this.sizeStoreParam()+"]"); // NOI18N
694
for(int i=0; i<this.sizeStoreParam(); i++)
695         {
696             str.append(indent+"\t");
697             str.append("#"+i+":");
698             n = (org.netbeans.modules.schema2beans.BaseBean) this.getStoreParam(i);
699             if (n != null)
700                 n.dump(str, indent + "\t"); // NOI18N
701
else
702                 str.append(indent+"\tnull"); // NOI18N
703
this.dumpAttributes(STORE_PARAM, i, str, indent);
704         }
705
706         str.append(indent);
707         str.append("PersistenceParam["+this.sizePersistenceParam()+"]"); // NOI18N
708
for(int i=0; i<this.sizePersistenceParam(); i++)
709         {
710             str.append(indent+"\t");
711             str.append("#"+i+":");
712             n = (org.netbeans.modules.schema2beans.BaseBean) this.getPersistenceParam(i);
713             if (n != null)
714                 n.dump(str, indent + "\t"); // NOI18N
715
else
716                 str.append(indent+"\tnull"); // NOI18N
717
this.dumpAttributes(PERSISTENCE_PARAM, i, str, indent);
718         }
719
720         str.append(indent);
721         str.append("HelperClassParam["+this.sizeHelperClassParam()+"]"); // NOI18N
722
for(int i=0; i<this.sizeHelperClassParam(); i++)
723         {
724             str.append(indent+"\t");
725             str.append("#"+i+":");
726             n = (org.netbeans.modules.schema2beans.BaseBean) this.getHelperClassParam(i);
727             if (n != null)
728                 n.dump(str, indent + "\t"); // NOI18N
729
else
730                 str.append(indent+"\tnull"); // NOI18N
731
this.dumpAttributes(HELPER_CLASS_PARAM, i, str, indent);
732         }
733
734     }
735     public String JavaDoc dumpBeanNode(){
736         StringBuffer JavaDoc str = new StringBuffer JavaDoc();
737         str.append("SunWebAppData\n"); // NOI18N
738
this.dump(str, "\n "); // NOI18N
739
return str.toString();
740     }}
741
742 // END_NOI18N
743

744
745 /*
746         The following schema file has been used for generation:
747
748 <?xml version="1.0" encoding="UTF-8"?>
749 <!-- edited with XML Spy v4.1 U (http://www.xmlspy.com) by A Gaur (Sun Microsystems) -->
750 <!ELEMENT sun-web-app-data (session-param*, cookie-param*, jsp-param*, extra-param*, manager-param*, store-param*, persistence-param*, helper-class-param*)>
751 <!ELEMENT session-param (param-name, param-type?, param-values*, default-value?, helpID?)>
752 <!ELEMENT cookie-param (param-name, param-type?, param-values*, default-value?, helpID?)>
753 <!ELEMENT jsp-param (param-name, param-type?, param-values*, default-value? helpID?)>
754 <!ELEMENT extra-param (param-name, param-type?, param-values*, default-value? helpID?)>
755 <!ELEMENT manager-param (param-name, param-type?, param-values*, default-value? helpID?)>
756 <!ELEMENT store-param (param-name, param-type?, param-values*, default-value? helpID?)>
757 <!ELEMENT persistence-param (param-name, param-type?, param-values*, default-value? helpID?)>
758 <!ELEMENT helper-class-param (param-name, param-type?, param-values*, default-value? helpID?)>
759 <!ELEMENT param-name (#PCDATA)>
760 <!ELEMENT param-type (#PCDATA)>
761 <!ELEMENT param-values (#PCDATA)>
762 <!ELEMENT default-value (#PCDATA)>
763 <!ELEMENT helpID (#PCDATA)>
764
765 */

766
Popular Tags