KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > emf > codegen > ecore > genmodel > GenFeature


1 /**
2  * <copyright>
3  *
4  * Copyright (c) 2002-2005 IBM Corporation and others.
5  * All rights reserved. This program and the accompanying materials
6  * are made available under the terms of the Eclipse Public License v1.0
7  * which accompanies this distribution, and is available at
8  * http://www.eclipse.org/legal/epl-v10.html
9  *
10  * Contributors:
11  * IBM - Initial API and implementation
12  *
13  * </copyright>
14  *
15  * $Id: GenFeature.java,v 1.15 2005/06/08 06:18:44 nickb Exp $
16  */

17 package org.eclipse.emf.codegen.ecore.genmodel;
18
19
20 import org.eclipse.emf.common.util.EList;
21
22 import java.util.List JavaDoc;
23
24 import org.eclipse.emf.ecore.EStructuralFeature;
25
26
27 /**
28  * <!-- begin-user-doc -->
29  * A representation of the model object '<em><b>Gen Feature</b></em>'.
30  * <!-- end-user-doc -->
31  *
32  * <p>
33  * The following features are supported:
34  * <ul>
35  * <li>{@link org.eclipse.emf.codegen.ecore.genmodel.GenFeature#getProperty <em>Property</em>}</li>
36  * <li>{@link org.eclipse.emf.codegen.ecore.genmodel.GenFeature#isNotify <em>Notify</em>}</li>
37  * <li>{@link org.eclipse.emf.codegen.ecore.genmodel.GenFeature#isChildren <em>Children</em>}</li>
38  * <li>{@link org.eclipse.emf.codegen.ecore.genmodel.GenFeature#isCreateChild <em>Create Child</em>}</li>
39  * <li>{@link org.eclipse.emf.codegen.ecore.genmodel.GenFeature#getPropertyCategory <em>Property Category</em>}</li>
40  * <li>{@link org.eclipse.emf.codegen.ecore.genmodel.GenFeature#getPropertyFilterFlags <em>Property Filter Flags</em>}</li>
41  * <li>{@link org.eclipse.emf.codegen.ecore.genmodel.GenFeature#getPropertyDescription <em>Property Description</em>}</li>
42  * <li>{@link org.eclipse.emf.codegen.ecore.genmodel.GenFeature#getGenClass <em>Gen Class</em>}</li>
43  * <li>{@link org.eclipse.emf.codegen.ecore.genmodel.GenFeature#getEcoreFeature <em>Ecore Feature</em>}</li>
44  * </ul>
45  * </p>
46  *
47  * @see org.eclipse.emf.codegen.ecore.genmodel.GenModelPackage#getGenFeature()
48  * @model
49  * @generated
50  */

51 public interface GenFeature extends GenTypedElement {
52   /**
53    * Returns the value of the '<em><b>Property</b></em>' attribute.
54    * The literals are from the enumeration {@link org.eclipse.emf.codegen.ecore.genmodel.GenPropertyKind}.
55    * <!-- begin-user-doc -->
56    * <p>
57    * If the meaning of the '<em>Property</em>' attribute isn't clear,
58    * there really should be more of a description here...
59    * </p>
60    * <!-- end-user-doc -->
61    * @return the value of the '<em>Property</em>' attribute.
62    * @see org.eclipse.emf.codegen.ecore.genmodel.GenPropertyKind
63    * @see #setProperty(GenPropertyKind)
64    * @see org.eclipse.emf.codegen.ecore.genmodel.GenModelPackage#getGenFeature_Property()
65    * @model
66    * @generated
67    */

68   GenPropertyKind getProperty();
69
70   /**
71    * Sets the value of the '{@link org.eclipse.emf.codegen.ecore.genmodel.GenFeature#getProperty <em>Property</em>}' attribute.
72    * <!-- begin-user-doc -->
73    * <!-- end-user-doc -->
74    * @param value the new value of the '<em>Property</em>' attribute.
75    * @see org.eclipse.emf.codegen.ecore.genmodel.GenPropertyKind
76    * @see #getProperty()
77    * @generated
78    */

79   void setProperty(GenPropertyKind value);
80
81   /**
82    * Returns the value of the '<em><b>Notify</b></em>' attribute.
83    * The default value is <code>"true"</code>.
84    * <!-- begin-user-doc -->
85    * <!-- end-user-doc -->
86    * @return the value of the '<em>Notify</em>' attribute.
87    * @see #setNotify(boolean)
88    * @see org.eclipse.emf.codegen.ecore.genmodel.GenModelPackage#getGenFeature_Notify()
89    * @model default="true"
90    * @generated
91    */

92   boolean isNotify();
93
94   /**
95    * Sets the value of the '{@link org.eclipse.emf.codegen.ecore.genmodel.GenFeature#isNotify <em>Notify</em>}' attribute.
96    * <!-- begin-user-doc -->
97    * <!-- end-user-doc -->
98    * @param value the new value of the '<em>Notify</em>' attribute.
99    * @see #isNotify()
100    * @generated
101    */

102   void setNotify(boolean value);
103
104   /**
105    * Returns the value of the '<em><b>Children</b></em>' attribute.
106    * <!-- begin-user-doc -->
107    * <!-- end-user-doc -->
108    * @return the value of the '<em>Children</em>' attribute.
109    * @see #setChildren(boolean)
110    * @see org.eclipse.emf.codegen.ecore.genmodel.GenModelPackage#getGenFeature_Children()
111    * @model
112    * @generated
113    */

114   boolean isChildren();
115
116   /**
117    * Sets the value of the '{@link org.eclipse.emf.codegen.ecore.genmodel.GenFeature#isChildren <em>Children</em>}' attribute.
118    * <!-- begin-user-doc -->
119    * <!-- end-user-doc -->
120    * @param value the new value of the '<em>Children</em>' attribute.
121    * @see #isChildren()
122    * @generated
123    */

124   void setChildren(boolean value);
125
126   /**
127    * Returns the value of the '<em><b>Create Child</b></em>' attribute.
128    * <!-- begin-user-doc -->
129    * <p>
130    * This attribute determines whether child objects can be created via this feature. It is temporarily unsettable to
131    * ease migration from pre-2.0 versions of EMF, in which the {@link #isChildren children} feature did this as a
132    * secondary role.
133    * </p>
134    * <p>
135    * If the feature has not yet been set, it will be set based on the value of the {@link #isChildren children}
136    * feature, before its value is returned. This ensures that pre-2.0 models will upgrade themselves, and continue to
137    * work as before.
138    * </p>
139    * <!-- end-user-doc -->
140    * @return the value of the '<em>Create Child</em>' attribute.
141    * @see #isSetCreateChild()
142    * @see #unsetCreateChild()
143    * @see #setCreateChild(boolean)
144    * @see org.eclipse.emf.codegen.ecore.genmodel.GenModelPackage#getGenFeature_CreateChild()
145    * @model unsettable="true"
146    * @generated
147    */

148   boolean isCreateChild();
149
150   /**
151    * Sets the value of the '{@link org.eclipse.emf.codegen.ecore.genmodel.GenFeature#isCreateChild <em>Create Child</em>}' attribute.
152    * <!-- begin-user-doc -->
153    * <!-- end-user-doc -->
154    * @param value the new value of the '<em>Create Child</em>' attribute.
155    * @see #isSetCreateChild()
156    * @see #unsetCreateChild()
157    * @see #isCreateChild()
158    * @generated
159    */

160   void setCreateChild(boolean value);
161
162   /**
163    * Unsets the value of the '{@link org.eclipse.emf.codegen.ecore.genmodel.GenFeature#isCreateChild <em>Create Child</em>}' attribute.
164    * <!-- begin-user-doc -->
165    * <!-- end-user-doc -->
166    * @see #isSetCreateChild()
167    * @see #isCreateChild()
168    * @see #setCreateChild(boolean)
169    * @generated
170    */

171   void unsetCreateChild();
172
173   /**
174    * Returns whether the value of the '{@link org.eclipse.emf.codegen.ecore.genmodel.GenFeature#isCreateChild <em>Create Child</em>}' attribute is set.
175    * <!-- begin-user-doc -->
176    * <p>
177    * This always returns true. If the feature is unset, it will first be set based on the value of {@link #isChildren
178    * children}. This ensures that pre-2.0 models will upgrade themselves, and continue to behave as before
179    * </p>
180    * <!-- end-user-doc -->
181    * @return whether the value of the '<em>Create Child</em>' attribute is set.
182    * @see #unsetCreateChild()
183    * @see #isCreateChild()
184    * @see #setCreateChild(boolean)
185    * @generated
186    */

187   boolean isSetCreateChild();
188
189   /**
190    * Returns the value of the '<em><b>Property Category</b></em>' attribute.
191    * <!-- begin-user-doc -->
192    * <p>
193    * If the meaning of the '<em>Property Category</em>' attribute isn't clear,
194    * there really should be more of a description here...
195    * </p>
196    * <!-- end-user-doc -->
197    * @return the value of the '<em>Property Category</em>' attribute.
198    * @see #setPropertyCategory(String)
199    * @see org.eclipse.emf.codegen.ecore.genmodel.GenModelPackage#getGenFeature_PropertyCategory()
200    * @model
201    * @generated
202    */

203   String JavaDoc getPropertyCategory();
204
205   /**
206    * Sets the value of the '{@link org.eclipse.emf.codegen.ecore.genmodel.GenFeature#getPropertyCategory <em>Property Category</em>}' attribute.
207    * <!-- begin-user-doc -->
208    * <!-- end-user-doc -->
209    * @param value the new value of the '<em>Property Category</em>' attribute.
210    * @see #getPropertyCategory()
211    * @generated
212    */

213   void setPropertyCategory(String JavaDoc value);
214
215   /**
216    * Returns the value of the '<em><b>Property Filter Flags</b></em>' attribute list.
217    * The list contents are of type {@link java.lang.String}.
218    * <!-- begin-user-doc -->
219    * <p>
220    * If the meaning of the '<em>Property Filter Flags</em>' attribute list isn't clear,
221    * there really should be more of a description here...
222    * </p>
223    * <!-- end-user-doc -->
224    * @return the value of the '<em>Property Filter Flags</em>' attribute list.
225    * @see org.eclipse.emf.codegen.ecore.genmodel.GenModelPackage#getGenFeature_PropertyFilterFlags()
226    * @model type="java.lang.String"
227    * @generated
228    */

229   EList getPropertyFilterFlags();
230
231   /**
232    * Returns the value of the '<em><b>Property Description</b></em>' attribute.
233    * <!-- begin-user-doc -->
234    * <p>
235    * If the meaning of the '<em>Property Description</em>' attribute isn't clear,
236    * there really should be more of a description here...
237    * </p>
238    * <!-- end-user-doc -->
239    * @return the value of the '<em>Property Description</em>' attribute.
240    * @see #setPropertyDescription(String)
241    * @see org.eclipse.emf.codegen.ecore.genmodel.GenModelPackage#getGenFeature_PropertyDescription()
242    * @model
243    * @generated
244    */

245   String JavaDoc getPropertyDescription();
246
247   /**
248    * Sets the value of the '{@link org.eclipse.emf.codegen.ecore.genmodel.GenFeature#getPropertyDescription <em>Property Description</em>}' attribute.
249    * <!-- begin-user-doc -->
250    * <!-- end-user-doc -->
251    * @param value the new value of the '<em>Property Description</em>' attribute.
252    * @see #getPropertyDescription()
253    * @generated
254    */

255   void setPropertyDescription(String JavaDoc value);
256
257   /**
258    * Returns the value of the '<em><b>Gen Class</b></em>' container reference.
259    * It is bidirectional and its opposite is '{@link org.eclipse.emf.codegen.ecore.genmodel.GenClass#getGenFeatures <em>Gen Features</em>}'.
260    * <!-- begin-user-doc -->
261    * <p>
262    * If the meaning of the '<em>Gen Class</em>' reference isn't clear,
263    * there really should be more of a description here...
264    * </p>
265    * <!-- end-user-doc -->
266    * @return the value of the '<em>Gen Class</em>' container reference.
267    * @see #setGenClass(GenClass)
268    * @see org.eclipse.emf.codegen.ecore.genmodel.GenModelPackage#getGenFeature_GenClass()
269    * @see org.eclipse.emf.codegen.ecore.genmodel.GenClass#getGenFeatures
270    * @model opposite="genFeatures" required="true"
271    * @generated
272    */

273   GenClass getGenClass();
274
275   /**
276    * Sets the value of the '{@link org.eclipse.emf.codegen.ecore.genmodel.GenFeature#getGenClass <em>Gen Class</em>}' container reference.
277    * <!-- begin-user-doc -->
278    * <!-- end-user-doc -->
279    * @param value the new value of the '<em>Gen Class</em>' container reference.
280    * @see #getGenClass()
281    * @generated
282    */

283   void setGenClass(GenClass value);
284
285   /**
286    * Returns the value of the '<em><b>Ecore Feature</b></em>' reference.
287    * <!-- begin-user-doc -->
288    * <p>
289    * If the meaning of the '<em>Ecore Feature</em>' reference isn't clear,
290    * there really should be more of a description here...
291    * </p>
292    * <!-- end-user-doc -->
293    * @return the value of the '<em>Ecore Feature</em>' reference.
294    * @see #setEcoreFeature(EStructuralFeature)
295    * @see org.eclipse.emf.codegen.ecore.genmodel.GenModelPackage#getGenFeature_EcoreFeature()
296    * @model required="true"
297    * @generated
298    */

299   EStructuralFeature getEcoreFeature();
300
301   /**
302    * Sets the value of the '{@link org.eclipse.emf.codegen.ecore.genmodel.GenFeature#getEcoreFeature <em>Ecore Feature</em>}' reference.
303    * <!-- begin-user-doc -->
304    * <!-- end-user-doc -->
305    * @param value the new value of the '<em>Ecore Feature</em>' reference.
306    * @see #getEcoreFeature()
307    * @generated
308    */

309   void setEcoreFeature(EStructuralFeature value);
310
311   String JavaDoc getName(); // callers that plan to use this name without appending a suffix should call f.safeName(f.getName()) to make sure its not a keyword
312
String JavaDoc getSafeName(); // this is a safe guaranteed uncapitalized form of the name
313
String JavaDoc getSafeNameAsEObject(); // the safe name and cast to EObject, if necessary.
314
String JavaDoc getCapName();
315   String JavaDoc getUncapName();
316   String JavaDoc getUpperName();
317   String JavaDoc getFormattedName(); // This returns a name like employeeNumber formatted like 'Employee Number'
318
String JavaDoc getIsName(); // This returns the same as getCapName unless it starts with "is" in which case the "is" is stripped
319
String JavaDoc getAccessorName(); // This returns the name to be used in accessor method names; it's the same as getCapName, unless this is the key or value of a map entry, for which "Typed" is prepended
320
String JavaDoc getGetAccessor(); // This returns the name of the get accessor method for the feature, i.e., either "is" or "get" is prefixed to getAccessorName
321

322   GenPackage getGenPackage(); // returns the package in which this feature is defined
323
String JavaDoc getFeatureAccessorName(); // returns the name of the feature get method in the package interface (e.g. Company_Name)
324
String JavaDoc getQualifiedFeatureAccessorName(); // returns the name of the feature get method in the package interface (e.g. Xyz.eINSTANCE.getCompany_Name)
325

326   String JavaDoc getMetaType(); // this returns either "EAttribute" or "EReference"
327
String JavaDoc getImportedMetaType();
328   String JavaDoc getFeatureKind(); // this returns either "attribute", "attribute list", "reference", or "reference list"
329
boolean isReferenceType();
330   boolean isFlag();
331   boolean isESetFlag();
332
333   boolean isSetDefaultValue();
334   String JavaDoc getDefaultValue();
335   String JavaDoc getStaticDefaultValue();
336
337   boolean isContainer();
338   boolean isContains();
339   boolean isBidirectional();
340   GenFeature getReverse();
341
342   String JavaDoc getContainerClass();
343
344   String JavaDoc getDerivedFlag();
345   String JavaDoc getTransientFlag();
346   String JavaDoc getVolatileFlag();
347   String JavaDoc getChangeableFlag();
348   String JavaDoc getUnsettableFlag();
349   String JavaDoc getIDFlag();
350   String JavaDoc getContainmentFlag();
351   String JavaDoc getResolveProxiesFlag();
352
353   boolean isVolatile();
354   boolean isChangeable();
355   boolean isUnsettable();
356   boolean isID();
357   boolean isDerived();
358   boolean isResolveProxies();
359
360   boolean hasDelegateFeature();
361   GenFeature getDelegateFeature();
362
363   List/*of GenFeature*/ getDelegatedFeatures();
364
365   String JavaDoc getCreateChildValueLiteral();
366
367   boolean isSuppressedGetVisibility();
368   boolean isSuppressedSetVisibility();
369   boolean isSuppressedIsSetVisibility();
370   boolean isSuppressedUnsetVisibility();
371   
372   void initialize(EStructuralFeature eFeature);
373
374   //
375
// EMFEdit generation
376
//
377

378   String JavaDoc getPropertyImageName();
379   String JavaDoc getModelInfo();
380   String JavaDoc getQualifiedModelInfo();
381   boolean isProperty();
382
383   boolean reconcile(GenFeature oldGenFeatureVersion);
384   
385   boolean isField();
386   boolean isESetField();
387   boolean isGet();
388   boolean isBasicGet();
389   boolean isBasicSet();
390   boolean isSet();
391   boolean isBasicUnset();
392   boolean isUnset();
393   boolean isIsSet();
394
395 }
396
Popular Tags