KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > netbeans > modules > j2ee > sun > share > plan > FileEntry


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 /**
20  * This generated bean class FileEntry matches the schema element 'file-entry'.
21  * The root bean class is DeploymentPlan
22  *
23  * Generated on Wed Sep 29 16:29:52 PDT 2004
24  * @Generated
25  */

26
27 package org.netbeans.modules.j2ee.sun.share.plan;
28
29 import org.w3c.dom.*;
30 import org.netbeans.modules.schema2beans.*;
31 import java.beans.*;
32 import java.util.*;
33
34 // BEGIN_NOI18N
35

36 public class FileEntry extends org.netbeans.modules.schema2beans.BaseBean
37 {
38
39     static Vector comparators = new Vector();
40     private static final org.netbeans.modules.schema2beans.Version runtimeVersion = new org.netbeans.modules.schema2beans.Version(3, 6, 1);
41
42     static public final String JavaDoc NAME = "Name"; // NOI18N
43
static public final String JavaDoc CONTENT = "Content"; // NOI18N
44
static public final String JavaDoc URI = "Uri"; // NOI18N
45

46     public FileEntry() {
47         this(Common.USE_DEFAULT_VALUES);
48     }
49
50     public FileEntry(int options)
51     {
52         super(comparators, runtimeVersion);
53         // Properties (see root bean comments for the bean graph)
54
initPropertyTables(3);
55         this.createProperty("name", // NOI18N
56
NAME, Common.TYPE_VETOABLE |
57             Common.TYPE_1 | Common.TYPE_STRING | Common.TYPE_KEY,
58             String JavaDoc.class);
59         this.createProperty("content", // NOI18N
60
CONTENT, Common.TYPE_VETOABLE |
61             Common.TYPE_1 | Common.TYPE_STRING | Common.TYPE_KEY,
62             String JavaDoc.class);
63         this.createProperty("uri", // NOI18N
64
URI, Common.TYPE_VETOABLE |
65             Common.TYPE_0_1 | Common.TYPE_STRING | Common.TYPE_KEY,
66             String JavaDoc.class);
67         this.initialize(options);
68     }
69
70     // Setting the default values of the properties
71
void initialize(int options) {
72
73     }
74
75     // This attribute is mandatory
76
public void setName(String JavaDoc value) throws java.beans.PropertyVetoException JavaDoc {
77         try
78         {
79             this.setValue(NAME, value);
80         }
81         catch(BaseProperty.VetoException ve)
82         {
83             throw ve.getPropertyVetoException();
84         }
85     }
86
87     //
88
public String JavaDoc getName() {
89         return (String JavaDoc)this.getValue(NAME);
90     }
91
92     // This attribute is mandatory
93
public void setContent(String JavaDoc value) throws java.beans.PropertyVetoException JavaDoc {
94         try
95         {
96             this.setValue(CONTENT, value);
97         }
98         catch(BaseProperty.VetoException ve)
99         {
100             throw ve.getPropertyVetoException();
101         }
102     }
103
104     //
105
public String JavaDoc getContent() {
106         return (String JavaDoc)this.getValue(CONTENT);
107     }
108
109     // This attribute is optional
110
public void setUri(String JavaDoc value) throws java.beans.PropertyVetoException JavaDoc {
111         try
112         {
113             this.setValue(URI, value);
114         }
115         catch(BaseProperty.VetoException ve)
116         {
117             throw ve.getPropertyVetoException();
118         }
119     }
120
121     //
122
public String JavaDoc getUri() {
123         return (String JavaDoc)this.getValue(URI);
124     }
125
126     //
127
public static void addComparator(org.netbeans.modules.schema2beans.BeanComparator c) {
128         comparators.add(c);
129     }
130
131     //
132
public static void removeComparator(org.netbeans.modules.schema2beans.BeanComparator c) {
133         comparators.remove(c);
134     }
135     //
136
public void addVetoableChangeListener(String JavaDoc n, java.beans.VetoableChangeListener JavaDoc l) {
137         BeanProp p = this.beanProp(n);
138         if (p != null)
139             p.addVCListener(l);
140     }
141
142     //
143
public void removeVetoableChangeListener(String JavaDoc n, java.beans.VetoableChangeListener JavaDoc l) {
144         BeanProp p = this.beanProp(n);
145         if (p != null)
146             p.removeVCListener(l);
147     }
148
149     public void validate() throws org.netbeans.modules.schema2beans.ValidateException {
150     }
151
152     // Dump the content of this bean returning it as a String
153
public void dump(StringBuffer JavaDoc str, String JavaDoc indent){
154         String JavaDoc s;
155         Object JavaDoc o;
156         org.netbeans.modules.schema2beans.BaseBean n;
157         str.append(indent);
158         str.append("Name"); // NOI18N
159
str.append(indent+"\t"); // NOI18N
160
str.append("<"); // NOI18N
161
o = this.getName();
162         str.append((o==null?"null":o.toString().trim())); // NOI18N
163
str.append(">\n"); // NOI18N
164
this.dumpAttributes(NAME, 0, str, indent);
165
166         str.append(indent);
167         str.append("Content"); // NOI18N
168
str.append(indent+"\t"); // NOI18N
169
str.append("<"); // NOI18N
170
o = this.getContent();
171         str.append((o==null?"null":o.toString().trim())); // NOI18N
172
str.append(">\n"); // NOI18N
173
this.dumpAttributes(CONTENT, 0, str, indent);
174
175         str.append(indent);
176         str.append("Uri"); // NOI18N
177
str.append(indent+"\t"); // NOI18N
178
str.append("<"); // NOI18N
179
o = this.getUri();
180         str.append((o==null?"null":o.toString().trim())); // NOI18N
181
str.append(">\n"); // NOI18N
182
this.dumpAttributes(URI, 0, str, indent);
183
184     }
185     public String JavaDoc dumpBeanNode(){
186         StringBuffer JavaDoc str = new StringBuffer JavaDoc();
187         str.append("FileEntry\n"); // NOI18N
188
this.dump(str, "\n "); // NOI18N
189
return str.toString();
190     }}
191
192 // END_NOI18N
193

194
195 /*
196         The following schema file has been used for generation:
197
198 <?xml version="1.0" encoding="UTF-8"?>
199
200 <!--
201     Document : deployment-plan.dtd
202     Created on : April 7, 2003, 2:33 PM
203     Author : vkraemer
204     Description:
205         Purpose of the document follows.
206 -->
207
208 <!ELEMENT deployment-plan (file-entry*) >
209
210 <!ELEMENT file-entry (name, content, uri?) >
211
212 <!ELEMENT name (#PCDATA) >
213 <!ELEMENT content (#PCDATA) >
214 <!ELEMENT uri (#PCDATA) >
215
216 */

217
218
Popular Tags