KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > enterprise > config > serverbeans > Cluster


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 Cluster matches the DTD element cluster
26  *
27  */

28
29 package com.sun.enterprise.config.serverbeans;
30
31 import org.w3c.dom.*;
32 import org.netbeans.modules.schema2beans.*;
33 import java.beans.*;
34 import java.util.*;
35 import java.io.Serializable JavaDoc;
36 import com.sun.enterprise.config.ConfigBean;
37 import com.sun.enterprise.config.ConfigException;
38 import com.sun.enterprise.config.StaleWriteConfigException;
39 import com.sun.enterprise.util.i18n.StringManager;
40
41 // BEGIN_NOI18N
42

43 public class Cluster extends ConfigBean implements Serializable JavaDoc
44 {
45
46     static Vector comparators = new Vector();
47     private static final org.netbeans.modules.schema2beans.Version runtimeVersion = new org.netbeans.modules.schema2beans.Version(4, 2, 0);
48
49     static public final String JavaDoc SERVER_REF = "ServerRef";
50     static public final String JavaDoc RESOURCE_REF = "ResourceRef";
51     static public final String JavaDoc APPLICATION_REF = "ApplicationRef";
52     static public final String JavaDoc SYSTEM_PROPERTY = "SystemProperty";
53     static public final String JavaDoc ELEMENT_PROPERTY = "ElementProperty";
54
55     public Cluster() {
56         this(Common.USE_DEFAULT_VALUES);
57     }
58
59     public Cluster(int options)
60     {
61         super(comparators, runtimeVersion);
62         // Properties (see root bean comments for the bean graph)
63
initPropertyTables(5);
64         this.createProperty("server-ref", SERVER_REF,
65             Common.TYPE_0_N | Common.TYPE_BEAN | Common.TYPE_KEY,
66             ServerRef.class);
67         this.createAttribute(SERVER_REF, "ref", "Ref",
68                         AttrProp.CDATA | AttrProp.REQUIRED,
69                         null, null);
70         this.createAttribute(SERVER_REF, "disable-timeout-in-minutes", "DisableTimeoutInMinutes",
71                         AttrProp.CDATA,
72                         null, "30");
73         this.createAttribute(SERVER_REF, "lb-enabled", "LbEnabled",
74                         AttrProp.CDATA,
75                         null, "false");
76         this.createAttribute(SERVER_REF, "enabled", "Enabled",
77                         AttrProp.CDATA,
78                         null, "true");
79         this.createProperty("resource-ref", RESOURCE_REF,
80             Common.TYPE_0_N | Common.TYPE_BEAN | Common.TYPE_KEY,
81             ResourceRef.class);
82         this.createAttribute(RESOURCE_REF, "enabled", "Enabled",
83                         AttrProp.CDATA,
84                         null, "true");
85         this.createAttribute(RESOURCE_REF, "ref", "Ref",
86                         AttrProp.CDATA | AttrProp.REQUIRED,
87                         null, null);
88         this.createProperty("application-ref", APPLICATION_REF,
89             Common.TYPE_0_N | Common.TYPE_BEAN | Common.TYPE_KEY,
90             ApplicationRef.class);
91         this.createAttribute(APPLICATION_REF, "enabled", "Enabled",
92                         AttrProp.CDATA,
93                         null, "true");
94         this.createAttribute(APPLICATION_REF, "virtual-servers", "VirtualServers",
95                         AttrProp.CDATA | AttrProp.IMPLIED,
96                         null, null);
97         this.createAttribute(APPLICATION_REF, "lb-enabled", "LbEnabled",
98                         AttrProp.CDATA,
99                         null, "false");
100         this.createAttribute(APPLICATION_REF, "disable-timeout-in-minutes", "DisableTimeoutInMinutes",
101                         AttrProp.CDATA,
102                         null, "30");
103         this.createAttribute(APPLICATION_REF, "ref", "Ref",
104                         AttrProp.CDATA | AttrProp.REQUIRED,
105                         null, null);
106         this.createProperty("system-property", SYSTEM_PROPERTY,
107             Common.TYPE_0_N | Common.TYPE_BEAN | Common.TYPE_KEY,
108             SystemProperty.class);
109         this.createAttribute(SYSTEM_PROPERTY, "name", "Name",
110                         AttrProp.CDATA | AttrProp.REQUIRED,
111                         null, null);
112         this.createAttribute(SYSTEM_PROPERTY, "value", "Value",
113                         AttrProp.CDATA | AttrProp.REQUIRED,
114                         null, null);
115         this.createProperty("property", ELEMENT_PROPERTY,
116             Common.TYPE_0_N | Common.TYPE_BEAN | Common.TYPE_KEY,
117             ElementProperty.class);
118         this.createAttribute(ELEMENT_PROPERTY, "name", "Name",
119                         AttrProp.CDATA | AttrProp.REQUIRED,
120                         null, null);
121         this.createAttribute(ELEMENT_PROPERTY, "value", "Value",
122                         AttrProp.CDATA | AttrProp.REQUIRED,
123                         null, null);
124         this.initialize(options);
125     }
126
127     // Setting the default values of the properties
128
void initialize(int options) {
129
130     }
131
132     // This attribute is an array, possibly empty
133
public void setServerRef(int index, ServerRef value) {
134         this.setValue(SERVER_REF, index, value);
135     }
136
137     // Get Method
138
public ServerRef getServerRef(int index) {
139         return (ServerRef)this.getValue(SERVER_REF, index);
140     }
141
142     // This attribute is an array, possibly empty
143
public void setServerRef(ServerRef[] value) {
144         this.setValue(SERVER_REF, value);
145     }
146
147     // Getter Method
148
public ServerRef[] getServerRef() {
149         return (ServerRef[])this.getValues(SERVER_REF);
150     }
151
152     // Return the number of properties
153
public int sizeServerRef() {
154         return this.size(SERVER_REF);
155     }
156
157     // Add a new element returning its index in the list
158
public int addServerRef(ServerRef value)
159             throws ConfigException{
160         return addServerRef(value, true);
161     }
162
163     // Add a new element returning its index in the list with a boolean flag
164
public int addServerRef(ServerRef value, boolean overwrite)
165             throws ConfigException{
166         ServerRef old = getServerRefByRef(value.getRef());
167         if(old != null) {
168             throw new ConfigException(StringManager.getManager(Cluster.class).getString("cannotAddDuplicate", "ServerRef"));
169         }
170         return this.addValue(SERVER_REF, value, overwrite);
171     }
172
173     //
174
// Remove an element using its reference
175
// Returns the index the element had in the list
176
//
177
public int removeServerRef(ServerRef value){
178         return this.removeValue(SERVER_REF, value);
179     }
180
181     //
182
// Remove an element using its reference
183
// Returns the index the element had in the list
184
// with boolean overwrite
185
//
186
public int removeServerRef(ServerRef value, boolean overwrite)
187             throws StaleWriteConfigException{
188         return this.removeValue(SERVER_REF, value, overwrite);
189     }
190
191     public ServerRef getServerRefByRef(String JavaDoc id) {
192      if (null != id) { id = id.trim(); }
193     ServerRef[] o = getServerRef();
194      if (o == null) return null;
195
196      for (int i=0; i < o.length; i++) {
197          if(o[i].getAttributeValue(Common.convertName(ServerTags.REF)).equals(id)) {
198              return o[i];
199          }
200      }
201
202         return null;
203         
204     }
205     // This attribute is an array, possibly empty
206
public void setResourceRef(int index, ResourceRef value) {
207         this.setValue(RESOURCE_REF, index, value);
208     }
209
210     // Get Method
211
public ResourceRef getResourceRef(int index) {
212         return (ResourceRef)this.getValue(RESOURCE_REF, index);
213     }
214
215     // This attribute is an array, possibly empty
216
public void setResourceRef(ResourceRef[] value) {
217         this.setValue(RESOURCE_REF, value);
218     }
219
220     // Getter Method
221
public ResourceRef[] getResourceRef() {
222         return (ResourceRef[])this.getValues(RESOURCE_REF);
223     }
224
225     // Return the number of properties
226
public int sizeResourceRef() {
227         return this.size(RESOURCE_REF);
228     }
229
230     // Add a new element returning its index in the list
231
public int addResourceRef(ResourceRef value)
232             throws ConfigException{
233         return addResourceRef(value, true);
234     }
235
236     // Add a new element returning its index in the list with a boolean flag
237
public int addResourceRef(ResourceRef value, boolean overwrite)
238             throws ConfigException{
239         ResourceRef old = getResourceRefByRef(value.getRef());
240         if(old != null) {
241             throw new ConfigException(StringManager.getManager(Cluster.class).getString("cannotAddDuplicate", "ResourceRef"));
242         }
243         return this.addValue(RESOURCE_REF, value, overwrite);
244     }
245
246     //
247
// Remove an element using its reference
248
// Returns the index the element had in the list
249
//
250
public int removeResourceRef(ResourceRef value){
251         return this.removeValue(RESOURCE_REF, value);
252     }
253
254     //
255
// Remove an element using its reference
256
// Returns the index the element had in the list
257
// with boolean overwrite
258
//
259
public int removeResourceRef(ResourceRef value, boolean overwrite)
260             throws StaleWriteConfigException{
261         return this.removeValue(RESOURCE_REF, value, overwrite);
262     }
263
264     public ResourceRef getResourceRefByRef(String JavaDoc id) {
265      if (null != id) { id = id.trim(); }
266     ResourceRef[] o = getResourceRef();
267      if (o == null) return null;
268
269      for (int i=0; i < o.length; i++) {
270          if(o[i].getAttributeValue(Common.convertName(ServerTags.REF)).equals(id)) {
271              return o[i];
272          }
273      }
274
275         return null;
276         
277     }
278     // This attribute is an array, possibly empty
279
public void setApplicationRef(int index, ApplicationRef value) {
280         this.setValue(APPLICATION_REF, index, value);
281     }
282
283     // Get Method
284
public ApplicationRef getApplicationRef(int index) {
285         return (ApplicationRef)this.getValue(APPLICATION_REF, index);
286     }
287
288     // This attribute is an array, possibly empty
289
public void setApplicationRef(ApplicationRef[] value) {
290         this.setValue(APPLICATION_REF, value);
291     }
292
293     // Getter Method
294
public ApplicationRef[] getApplicationRef() {
295         return (ApplicationRef[])this.getValues(APPLICATION_REF);
296     }
297
298     // Return the number of properties
299
public int sizeApplicationRef() {
300         return this.size(APPLICATION_REF);
301     }
302
303     // Add a new element returning its index in the list
304
public int addApplicationRef(ApplicationRef value)
305             throws ConfigException{
306         return addApplicationRef(value, true);
307     }
308
309     // Add a new element returning its index in the list with a boolean flag
310
public int addApplicationRef(ApplicationRef value, boolean overwrite)
311             throws ConfigException{
312         ApplicationRef old = getApplicationRefByRef(value.getRef());
313         if(old != null) {
314             throw new ConfigException(StringManager.getManager(Cluster.class).getString("cannotAddDuplicate", "ApplicationRef"));
315         }
316         return this.addValue(APPLICATION_REF, value, overwrite);
317     }
318
319     //
320
// Remove an element using its reference
321
// Returns the index the element had in the list
322
//
323
public int removeApplicationRef(ApplicationRef value){
324         return this.removeValue(APPLICATION_REF, value);
325     }
326
327     //
328
// Remove an element using its reference
329
// Returns the index the element had in the list
330
// with boolean overwrite
331
//
332
public int removeApplicationRef(ApplicationRef value, boolean overwrite)
333             throws StaleWriteConfigException{
334         return this.removeValue(APPLICATION_REF, value, overwrite);
335     }
336
337     public ApplicationRef getApplicationRefByRef(String JavaDoc id) {
338      if (null != id) { id = id.trim(); }
339     ApplicationRef[] o = getApplicationRef();
340      if (o == null) return null;
341
342      for (int i=0; i < o.length; i++) {
343          if(o[i].getAttributeValue(Common.convertName(ServerTags.REF)).equals(id)) {
344              return o[i];
345          }
346      }
347
348         return null;
349         
350     }
351     // This attribute is an array, possibly empty
352
public void setSystemProperty(int index, SystemProperty value) {
353         this.setValue(SYSTEM_PROPERTY, index, value);
354     }
355
356     // Get Method
357
public SystemProperty getSystemProperty(int index) {
358         return (SystemProperty)this.getValue(SYSTEM_PROPERTY, index);
359     }
360
361     // This attribute is an array, possibly empty
362
public void setSystemProperty(SystemProperty[] value) {
363         this.setValue(SYSTEM_PROPERTY, value);
364     }
365
366     // Getter Method
367
public SystemProperty[] getSystemProperty() {
368         return (SystemProperty[])this.getValues(SYSTEM_PROPERTY);
369     }
370
371     // Return the number of properties
372
public int sizeSystemProperty() {
373         return this.size(SYSTEM_PROPERTY);
374     }
375
376     // Add a new element returning its index in the list
377
public int addSystemProperty(SystemProperty value)
378             throws ConfigException{
379         return addSystemProperty(value, true);
380     }
381
382     // Add a new element returning its index in the list with a boolean flag
383
public int addSystemProperty(SystemProperty value, boolean overwrite)
384             throws ConfigException{
385         SystemProperty old = getSystemPropertyByName(value.getName());
386         if(old != null) {
387             throw new ConfigException(StringManager.getManager(Cluster.class).getString("cannotAddDuplicate", "SystemProperty"));
388         }
389         return this.addValue(SYSTEM_PROPERTY, value, overwrite);
390     }
391
392     //
393
// Remove an element using its reference
394
// Returns the index the element had in the list
395
//
396
public int removeSystemProperty(SystemProperty value){
397         return this.removeValue(SYSTEM_PROPERTY, value);
398     }
399
400     //
401
// Remove an element using its reference
402
// Returns the index the element had in the list
403
// with boolean overwrite
404
//
405
public int removeSystemProperty(SystemProperty value, boolean overwrite)
406             throws StaleWriteConfigException{
407         return this.removeValue(SYSTEM_PROPERTY, value, overwrite);
408     }
409
410     public SystemProperty getSystemPropertyByName(String JavaDoc id) {
411      if (null != id) { id = id.trim(); }
412     SystemProperty[] o = getSystemProperty();
413      if (o == null) return null;
414
415      for (int i=0; i < o.length; i++) {
416          if(o[i].getAttributeValue(Common.convertName(ServerTags.NAME)).equals(id)) {
417              return o[i];
418          }
419      }
420
421         return null;
422         
423     }
424     // This attribute is an array, possibly empty
425
public void setElementProperty(int index, ElementProperty value) {
426         this.setValue(ELEMENT_PROPERTY, index, value);
427     }
428
429     // Get Method
430
public ElementProperty getElementProperty(int index) {
431         return (ElementProperty)this.getValue(ELEMENT_PROPERTY, index);
432     }
433
434     // This attribute is an array, possibly empty
435
public void setElementProperty(ElementProperty[] value) {
436         this.setValue(ELEMENT_PROPERTY, value);
437     }
438
439     // Getter Method
440
public ElementProperty[] getElementProperty() {
441         return (ElementProperty[])this.getValues(ELEMENT_PROPERTY);
442     }
443
444     // Return the number of properties
445
public int sizeElementProperty() {
446         return this.size(ELEMENT_PROPERTY);
447     }
448
449     // Add a new element returning its index in the list
450
public int addElementProperty(ElementProperty value)
451             throws ConfigException{
452         return addElementProperty(value, true);
453     }
454
455     // Add a new element returning its index in the list with a boolean flag
456
public int addElementProperty(ElementProperty value, boolean overwrite)
457             throws ConfigException{
458         ElementProperty old = getElementPropertyByName(value.getName());
459         if(old != null) {
460             throw new ConfigException(StringManager.getManager(Cluster.class).getString("cannotAddDuplicate", "ElementProperty"));
461         }
462         return this.addValue(ELEMENT_PROPERTY, value, overwrite);
463     }
464
465     //
466
// Remove an element using its reference
467
// Returns the index the element had in the list
468
//
469
public int removeElementProperty(ElementProperty value){
470         return this.removeValue(ELEMENT_PROPERTY, value);
471     }
472
473     //
474
// Remove an element using its reference
475
// Returns the index the element had in the list
476
// with boolean overwrite
477
//
478
public int removeElementProperty(ElementProperty value, boolean overwrite)
479             throws StaleWriteConfigException{
480         return this.removeValue(ELEMENT_PROPERTY, value, overwrite);
481     }
482
483     public ElementProperty getElementPropertyByName(String JavaDoc id) {
484      if (null != id) { id = id.trim(); }
485     ElementProperty[] o = getElementProperty();
486      if (o == null) return null;
487
488      for (int i=0; i < o.length; i++) {
489          if(o[i].getAttributeValue(Common.convertName(ServerTags.NAME)).equals(id)) {
490              return o[i];
491          }
492      }
493
494         return null;
495         
496     }
497     /**
498     * Getter for Name of the Element cluster
499     * @return the Name of the Element cluster
500     */

501     public String JavaDoc getName() {
502         return getAttributeValue(ServerTags.NAME);
503     }
504     /**
505     * Modify the Name of the Element cluster
506     * @param v the new value
507     * @throws StaleWriteConfigException if overwrite is false and file changed on disk
508     */

509     public void setName(String JavaDoc v, boolean overwrite) throws StaleWriteConfigException {
510         setAttributeValue(ServerTags.NAME, v, overwrite);
511     }
512     /**
513     * Modify the Name of the Element cluster
514     * @param v the new value
515     */

516     public void setName(String JavaDoc v) {
517         setAttributeValue(ServerTags.NAME, v);
518     }
519     /**
520     * Getter for ConfigRef of the Element cluster
521     * @return the ConfigRef of the Element cluster
522     */

523     public String JavaDoc getConfigRef() {
524         return getAttributeValue(ServerTags.CONFIG_REF);
525     }
526     /**
527     * Modify the ConfigRef of the Element cluster
528     * @param v the new value
529     * @throws StaleWriteConfigException if overwrite is false and file changed on disk
530     */

531     public void setConfigRef(String JavaDoc v, boolean overwrite) throws StaleWriteConfigException {
532         setAttributeValue(ServerTags.CONFIG_REF, v, overwrite);
533     }
534     /**
535     * Modify the ConfigRef of the Element cluster
536     * @param v the new value
537     */

538     public void setConfigRef(String JavaDoc v) {
539         setAttributeValue(ServerTags.CONFIG_REF, v);
540     }
541     /**
542     * Getter for HeartbeatPort of the Element cluster
543     * @return the HeartbeatPort of the Element cluster
544     */

545     public String JavaDoc getHeartbeatPort() {
546         return getAttributeValue(ServerTags.HEARTBEAT_PORT);
547     }
548     /**
549     * Modify the HeartbeatPort of the Element cluster
550     * @param v the new value
551     * @throws StaleWriteConfigException if overwrite is false and file changed on disk
552     */

553     public void setHeartbeatPort(String JavaDoc v, boolean overwrite) throws StaleWriteConfigException {
554         setAttributeValue(ServerTags.HEARTBEAT_PORT, v, overwrite);
555     }
556     /**
557     * Modify the HeartbeatPort of the Element cluster
558     * @param v the new value
559     */

560     public void setHeartbeatPort(String JavaDoc v) {
561         setAttributeValue(ServerTags.HEARTBEAT_PORT, v);
562     }
563     /**
564     * Getter for HeartbeatAddress of the Element cluster
565     * @return the HeartbeatAddress of the Element cluster
566     */

567     public String JavaDoc getHeartbeatAddress() {
568         return getAttributeValue(ServerTags.HEARTBEAT_ADDRESS);
569     }
570     /**
571     * Modify the HeartbeatAddress of the Element cluster
572     * @param v the new value
573     * @throws StaleWriteConfigException if overwrite is false and file changed on disk
574     */

575     public void setHeartbeatAddress(String JavaDoc v, boolean overwrite) throws StaleWriteConfigException {
576         setAttributeValue(ServerTags.HEARTBEAT_ADDRESS, v, overwrite);
577     }
578     /**
579     * Modify the HeartbeatAddress of the Element cluster
580     * @param v the new value
581     */

582     public void setHeartbeatAddress(String JavaDoc v) {
583         setAttributeValue(ServerTags.HEARTBEAT_ADDRESS, v);
584     }
585     /**
586     * Getter for HeartbeatEnabled of the Element cluster
587     * @return the HeartbeatEnabled of the Element cluster
588     */

589     public boolean isHeartbeatEnabled() {
590         return toBoolean(getAttributeValue(ServerTags.HEARTBEAT_ENABLED));
591     }
592     /**
593     * Modify the HeartbeatEnabled of the Element cluster
594     * @param v the new value
595     * @throws StaleWriteConfigException if overwrite is false and file changed on disk
596     */

597     public void setHeartbeatEnabled(boolean v, boolean overwrite) throws StaleWriteConfigException {
598         setAttributeValue(ServerTags.HEARTBEAT_ENABLED, ""+(v==true), overwrite);
599     }
600     /**
601     * Modify the HeartbeatEnabled of the Element cluster
602     * @param v the new value
603     */

604     public void setHeartbeatEnabled(boolean v) {
605         setAttributeValue(ServerTags.HEARTBEAT_ENABLED, ""+(v==true));
606     }
607     /**
608     * Get the default value of HeartbeatEnabled from dtd
609     */

610     public static String JavaDoc getDefaultHeartbeatEnabled() {
611         return "true".trim();
612     }
613     /**
614      * Create a new bean using it's default constructor.
615      * This does not add it to any bean graph.
616      */

617     public ServerRef newServerRef() {
618         return new ServerRef();
619     }
620
621     /**
622      * Create a new bean using it's default constructor.
623      * This does not add it to any bean graph.
624      */

625     public ResourceRef newResourceRef() {
626         return new ResourceRef();
627     }
628
629     /**
630      * Create a new bean using it's default constructor.
631      * This does not add it to any bean graph.
632      */

633     public ApplicationRef newApplicationRef() {
634         return new ApplicationRef();
635     }
636
637     /**
638      * Create a new bean using it's default constructor.
639      * This does not add it to any bean graph.
640      */

641     public SystemProperty newSystemProperty() {
642         return new SystemProperty();
643     }
644
645     /**
646      * Create a new bean using it's default constructor.
647      * This does not add it to any bean graph.
648      */

649     public ElementProperty newElementProperty() {
650         return new ElementProperty();
651     }
652
653     /**
654     * get the xpath representation for this element
655     * returns something like abc[@name='value'] or abc
656     * depending on the type of the bean
657     */

658     protected String JavaDoc getRelativeXPath() {
659         String JavaDoc ret = null;
660         ret = "cluster" + (canHaveSiblings() ? "[@name='" + getAttributeValue("name") +"']" : "") ;
661         return (null != ret ? ret.trim() : null);
662     }
663
664     /*
665     * generic method to get default value from dtd
666     */

667     public static String JavaDoc getDefaultAttributeValue(String JavaDoc attr) {
668         if(attr == null) return null;
669         attr = attr.trim();
670         if(attr.equals(ServerTags.HEARTBEAT_ENABLED)) return "true".trim();
671     return null;
672     }
673     //
674
public static void addComparator(org.netbeans.modules.schema2beans.BeanComparator c) {
675         comparators.add(c);
676     }
677
678     //
679
public static void removeComparator(org.netbeans.modules.schema2beans.BeanComparator c) {
680         comparators.remove(c);
681     }
682     public void validate() throws org.netbeans.modules.schema2beans.ValidateException {
683     }
684
685     // Dump the content of this bean returning it as a String
686
public void dump(StringBuffer JavaDoc str, String JavaDoc indent){
687         String JavaDoc s;
688         Object JavaDoc o;
689         org.netbeans.modules.schema2beans.BaseBean n;
690         str.append(indent);
691         str.append("ServerRef["+this.sizeServerRef()+"]"); // NOI18N
692
for(int i=0; i<this.sizeServerRef(); i++)
693         {
694             str.append(indent+"\t");
695             str.append("#"+i+":");
696             n = (org.netbeans.modules.schema2beans.BaseBean) this.getServerRef(i);
697             if (n != null)
698                 n.dump(str, indent + "\t"); // NOI18N
699
else
700                 str.append(indent+"\tnull"); // NOI18N
701
this.dumpAttributes(SERVER_REF, i, str, indent);
702         }
703
704         str.append(indent);
705         str.append("ResourceRef["+this.sizeResourceRef()+"]"); // NOI18N
706
for(int i=0; i<this.sizeResourceRef(); i++)
707         {
708             str.append(indent+"\t");
709             str.append("#"+i+":");
710             n = (org.netbeans.modules.schema2beans.BaseBean) this.getResourceRef(i);
711             if (n != null)
712                 n.dump(str, indent + "\t"); // NOI18N
713
else
714                 str.append(indent+"\tnull"); // NOI18N
715
this.dumpAttributes(RESOURCE_REF, i, str, indent);
716         }
717
718         str.append(indent);
719         str.append("ApplicationRef["+this.sizeApplicationRef()+"]"); // NOI18N
720
for(int i=0; i<this.sizeApplicationRef(); i++)
721         {
722             str.append(indent+"\t");
723             str.append("#"+i+":");
724             n = (org.netbeans.modules.schema2beans.BaseBean) this.getApplicationRef(i);
725             if (n != null)
726                 n.dump(str, indent + "\t"); // NOI18N
727
else
728                 str.append(indent+"\tnull"); // NOI18N
729
this.dumpAttributes(APPLICATION_REF, i, str, indent);
730         }
731
732         str.append(indent);
733         str.append("SystemProperty["+this.sizeSystemProperty()+"]"); // NOI18N
734
for(int i=0; i<this.sizeSystemProperty(); i++)
735         {
736             str.append(indent+"\t");
737             str.append("#"+i+":");
738             n = (org.netbeans.modules.schema2beans.BaseBean) this.getSystemProperty(i);
739             if (n != null)
740                 n.dump(str, indent + "\t"); // NOI18N
741
else
742                 str.append(indent+"\tnull"); // NOI18N
743
this.dumpAttributes(SYSTEM_PROPERTY, i, str, indent);
744         }
745
746         str.append(indent);
747         str.append("ElementProperty["+this.sizeElementProperty()+"]"); // NOI18N
748
for(int i=0; i<this.sizeElementProperty(); i++)
749         {
750             str.append(indent+"\t");
751             str.append("#"+i+":");
752             n = (org.netbeans.modules.schema2beans.BaseBean) this.getElementProperty(i);
753             if (n != null)
754                 n.dump(str, indent + "\t"); // NOI18N
755
else
756                 str.append(indent+"\tnull"); // NOI18N
757
this.dumpAttributes(ELEMENT_PROPERTY, i, str, indent);
758         }
759
760     }
761     public String JavaDoc dumpBeanNode(){
762         StringBuffer JavaDoc str = new StringBuffer JavaDoc();
763         str.append("Cluster\n"); // NOI18N
764
this.dump(str, "\n "); // NOI18N
765
return str.toString();
766     }}
767
768 // END_NOI18N
769

770
Popular Tags