Modify pom file
[nemo.git] / nemo-tools / eclipse-plugin / nemo-editor / org.opendaylight.nemo.tool.eclipse.plugin.editor / src-gen / org / opendaylight / nemo / tool / eclipse / plugin / editor / impl / ModelImpl.java
1 /**
2  */
3 package org.opendaylight.nemo.tool.eclipse.plugin.editor.impl;
4
5 import java.util.Collection;
6
7 import org.eclipse.emf.common.notify.NotificationChain;
8
9 import org.eclipse.emf.common.util.EList;
10
11 import org.eclipse.emf.ecore.EClass;
12 import org.eclipse.emf.ecore.InternalEObject;
13
14 import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
15
16 import org.eclipse.emf.ecore.util.EObjectContainmentEList;
17 import org.eclipse.emf.ecore.util.InternalEList;
18
19 import org.opendaylight.nemo.tool.eclipse.plugin.editor.EditorPackage;
20 import org.opendaylight.nemo.tool.eclipse.plugin.editor.Model;
21 import org.opendaylight.nemo.tool.eclipse.plugin.editor.Sentence;
22
23 /**
24  * <!-- begin-user-doc -->
25  * An implementation of the model object '<em><b>Model</b></em>'.
26  * <!-- end-user-doc -->
27  * <p>
28  * The following features are implemented:
29  * </p>
30  * <ul>
31  *   <li>{@link org.opendaylight.nemo.tool.eclipse.plugin.editor.impl.ModelImpl#getSentences <em>Sentences</em>}</li>
32  * </ul>
33  *
34  * @generated
35  */
36 public class ModelImpl extends MinimalEObjectImpl.Container implements Model
37 {
38   /**
39    * The cached value of the '{@link #getSentences() <em>Sentences</em>}' containment reference list.
40    * <!-- begin-user-doc -->
41    * <!-- end-user-doc -->
42    * @see #getSentences()
43    * @generated
44    * @ordered
45    */
46   protected EList<Sentence> sentences;
47
48   /**
49    * <!-- begin-user-doc -->
50    * <!-- end-user-doc -->
51    * @generated
52    */
53   protected ModelImpl()
54   {
55     super();
56   }
57
58   /**
59    * <!-- begin-user-doc -->
60    * <!-- end-user-doc -->
61    * @generated
62    */
63   @Override
64   protected EClass eStaticClass()
65   {
66     return EditorPackage.Literals.MODEL;
67   }
68
69   /**
70    * <!-- begin-user-doc -->
71    * <!-- end-user-doc -->
72    * @generated
73    */
74   public EList<Sentence> getSentences()
75   {
76     if (sentences == null)
77     {
78       sentences = new EObjectContainmentEList<Sentence>(Sentence.class, this, EditorPackage.MODEL__SENTENCES);
79     }
80     return sentences;
81   }
82
83   /**
84    * <!-- begin-user-doc -->
85    * <!-- end-user-doc -->
86    * @generated
87    */
88   @Override
89   public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs)
90   {
91     switch (featureID)
92     {
93       case EditorPackage.MODEL__SENTENCES:
94         return ((InternalEList<?>)getSentences()).basicRemove(otherEnd, msgs);
95     }
96     return super.eInverseRemove(otherEnd, featureID, msgs);
97   }
98
99   /**
100    * <!-- begin-user-doc -->
101    * <!-- end-user-doc -->
102    * @generated
103    */
104   @Override
105   public Object eGet(int featureID, boolean resolve, boolean coreType)
106   {
107     switch (featureID)
108     {
109       case EditorPackage.MODEL__SENTENCES:
110         return getSentences();
111     }
112     return super.eGet(featureID, resolve, coreType);
113   }
114
115   /**
116    * <!-- begin-user-doc -->
117    * <!-- end-user-doc -->
118    * @generated
119    */
120   @SuppressWarnings("unchecked")
121   @Override
122   public void eSet(int featureID, Object newValue)
123   {
124     switch (featureID)
125     {
126       case EditorPackage.MODEL__SENTENCES:
127         getSentences().clear();
128         getSentences().addAll((Collection<? extends Sentence>)newValue);
129         return;
130     }
131     super.eSet(featureID, newValue);
132   }
133
134   /**
135    * <!-- begin-user-doc -->
136    * <!-- end-user-doc -->
137    * @generated
138    */
139   @Override
140   public void eUnset(int featureID)
141   {
142     switch (featureID)
143     {
144       case EditorPackage.MODEL__SENTENCES:
145         getSentences().clear();
146         return;
147     }
148     super.eUnset(featureID);
149   }
150
151   /**
152    * <!-- begin-user-doc -->
153    * <!-- end-user-doc -->
154    * @generated
155    */
156   @Override
157   public boolean eIsSet(int featureID)
158   {
159     switch (featureID)
160     {
161       case EditorPackage.MODEL__SENTENCES:
162         return sentences != null && !sentences.isEmpty();
163     }
164     return super.eIsSet(featureID);
165   }
166
167 } //ModelImpl