KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > netbeans > modules > j2ee > websphere6 > dd > beans > PageType


1 /*
2  * The contents of this file are subject to the terms of the Common Development
3  * and Distribution License (the License). You may not use this file except in
4  * compliance with the License.
5  *
6  * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
7  * or http://www.netbeans.org/cddl.txt.
8  *
9  * When distributing Covered Code, include this CDDL Header Notice in each file
10  * and include the License file at http://www.netbeans.org/cddl.txt.
11  * If applicable, add the following below the CDDL Header, with the fields
12  * enclosed by brackets [] replaced by your own identifying information:
13  * "Portions Copyrighted [year] [name of copyright owner]"
14  *
15  * The Original Software is NetBeans. The Initial Developer of the Original
16  * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
17  * Microsystems, Inc. All Rights Reserved.
18  */

19 package org.netbeans.modules.j2ee.websphere6.dd.beans;
20
21 import org.w3c.dom.*;
22 import org.netbeans.modules.schema2beans.*;
23 import java.beans.*;
24 import java.util.*;
25 /**
26  *
27  * @author dlm198383
28  */

29 public class PageType extends org.netbeans.modules.schema2beans.BaseBean implements DDXmiConstants {
30
31     static Vector comparators = new Vector();
32     private static final org.netbeans.modules.schema2beans.Version runtimeVersion = new org.netbeans.modules.schema2beans.Version(4, 2, 0);
33
34
35
36     public PageType() {
37         this(Common.USE_DEFAULT_VALUES);
38     }
39     public PageType(int options) {
40         super(comparators, runtimeVersion);
41         // Properties (see root bean comments for the bean graph)
42
initPropertyTables(1);
43         this.initialize(options);
44     }
45     public void initialize(int options) {
46        
47     }
48     public void setDefaults() {
49          setXmiId("Page_");
50          setName("");
51          setUri("/");
52     }
53     
54    
55     public static void addComparator(org.netbeans.modules.schema2beans.BeanComparator c) {
56         comparators.add(c);
57     }
58          
59     public static void removeComparator(org.netbeans.modules.schema2beans.BeanComparator c) {
60         comparators.remove(c);
61     }
62     
63     public void setXmiId(String JavaDoc value) {
64         this.setAttributeValue(PAGES_XMI_ID,value);
65     }
66     
67     public String JavaDoc getXmiId() {
68         return (String JavaDoc)this.getAttributeValue(PAGES_XMI_ID);
69     }
70     public void setName(String JavaDoc value) {
71         this.setAttributeValue(PAGES_NAME,value);
72     }
73     public String JavaDoc getName() {
74         return (String JavaDoc)this.getAttributeValue(PAGES_NAME);
75     }
76     public void setUri(String JavaDoc value) {
77         this.setAttributeValue(PAGES_URI,value);
78     }
79     public String JavaDoc getUri() {
80         return (String JavaDoc)this.getAttributeValue(PAGES_URI);
81     }
82     
83     
84     public void validate() throws org.netbeans.modules.schema2beans.ValidateException {
85         
86         if(getXmiId()==null) {
87             throw new org.netbeans.modules.schema2beans.ValidateException("getXmiId() == null", org.netbeans.modules.schema2beans.ValidateException.FailureType.NULL_VALUE, "PageType", this); // NOI18N
88
}
89         if(getName()==null) {
90             throw new org.netbeans.modules.schema2beans.ValidateException("getName() == null", org.netbeans.modules.schema2beans.ValidateException.FailureType.NULL_VALUE, "PageType", this); // NOI18N
91
}
92         if(getUri()==null) {
93             throw new org.netbeans.modules.schema2beans.ValidateException("getUri() == null", org.netbeans.modules.schema2beans.ValidateException.FailureType.NULL_VALUE, "PageType", this); // NOI18N
94
}
95         
96                 
97         
98     }
99     
100     
101     
102     // Dump the content of this bean returning it as a String
103
public void dump(StringBuffer JavaDoc str, String JavaDoc indent){
104         String JavaDoc s;
105         Object JavaDoc o;
106         org.netbeans.modules.schema2beans.BaseBean n;
107         str.append(indent);
108         str.append("PageType"); // NOI18N
109
//this.dumpAttributes(PAGE, 0, str, indent);
110

111         
112     }
113     public String JavaDoc dumpBeanNode(){
114         StringBuffer JavaDoc str = new StringBuffer JavaDoc();
115         str.append(getClass().getName()); // NOI18N
116
this.dump(str, "\n "); // NOI18N
117
return str.toString();
118     }
119 }
120
Popular Tags