aboutsummaryrefslogtreecommitdiffstats
path: root/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/filesystem/impl/FileSystemImpl.java
diff options
context:
space:
mode:
Diffstat (limited to 'Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/filesystem/impl/FileSystemImpl.java')
-rw-r--r--Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/filesystem/impl/FileSystemImpl.java205
1 files changed, 205 insertions, 0 deletions
diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/filesystem/impl/FileSystemImpl.java b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/filesystem/impl/FileSystemImpl.java
new file mode 100644
index 00000000..8bbc6a74
--- /dev/null
+++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/filesystem/impl/FileSystemImpl.java
@@ -0,0 +1,205 @@
1/**
2 */
3package ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.impl;
4
5import ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.Dir;
6import ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.FSObject;
7import ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.FileSystem;
8import ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.filesystemPackage;
9
10import org.eclipse.emf.common.notify.Notification;
11import org.eclipse.emf.common.notify.NotificationChain;
12
13import org.eclipse.emf.common.util.EList;
14
15import org.eclipse.emf.ecore.EClass;
16import org.eclipse.emf.ecore.EStructuralFeature;
17import org.eclipse.emf.ecore.InternalEObject;
18
19import org.eclipse.emf.ecore.impl.ENotificationImpl;
20import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
21
22/**
23 * <!-- begin-user-doc -->
24 * An implementation of the model object '<em><b>File System</b></em>'.
25 * <!-- end-user-doc -->
26 * <p>
27 * The following features are implemented:
28 * </p>
29 * <ul>
30 * <li>{@link ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.impl.FileSystemImpl#getRoot <em>Root</em>}</li>
31 * <li>{@link ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.impl.FileSystemImpl#getLive <em>Live</em>}</li>
32 * </ul>
33 *
34 * @generated
35 */
36public class FileSystemImpl extends MinimalEObjectImpl.Container implements FileSystem {
37 /**
38 * The cached value of the '{@link #getRoot() <em>Root</em>}' containment reference.
39 * <!-- begin-user-doc -->
40 * <!-- end-user-doc -->
41 * @see #getRoot()
42 * @generated
43 * @ordered
44 */
45 protected Dir root;
46
47 /**
48 * The cached setting delegate for the '{@link #getLive() <em>Live</em>}' reference list.
49 * <!-- begin-user-doc -->
50 * <!-- end-user-doc -->
51 * @see #getLive()
52 * @generated
53 * @ordered
54 */
55 protected EStructuralFeature.Internal.SettingDelegate LIVE__ESETTING_DELEGATE = ((EStructuralFeature.Internal)filesystemPackage.Literals.FILE_SYSTEM__LIVE).getSettingDelegate();
56
57 /**
58 * <!-- begin-user-doc -->
59 * <!-- end-user-doc -->
60 * @generated
61 */
62 protected FileSystemImpl() {
63 super();
64 }
65
66 /**
67 * <!-- begin-user-doc -->
68 * <!-- end-user-doc -->
69 * @generated
70 */
71 @Override
72 protected EClass eStaticClass() {
73 return filesystemPackage.Literals.FILE_SYSTEM;
74 }
75
76 /**
77 * <!-- begin-user-doc -->
78 * <!-- end-user-doc -->
79 * @generated
80 */
81 public Dir getRoot() {
82 return root;
83 }
84
85 /**
86 * <!-- begin-user-doc -->
87 * <!-- end-user-doc -->
88 * @generated
89 */
90 public NotificationChain basicSetRoot(Dir newRoot, NotificationChain msgs) {
91 Dir oldRoot = root;
92 root = newRoot;
93 if (eNotificationRequired()) {
94 ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, filesystemPackage.FILE_SYSTEM__ROOT, oldRoot, newRoot);
95 if (msgs == null) msgs = notification; else msgs.add(notification);
96 }
97 return msgs;
98 }
99
100 /**
101 * <!-- begin-user-doc -->
102 * <!-- end-user-doc -->
103 * @generated
104 */
105 public void setRoot(Dir newRoot) {
106 if (newRoot != root) {
107 NotificationChain msgs = null;
108 if (root != null)
109 msgs = ((InternalEObject)root).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - filesystemPackage.FILE_SYSTEM__ROOT, null, msgs);
110 if (newRoot != null)
111 msgs = ((InternalEObject)newRoot).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - filesystemPackage.FILE_SYSTEM__ROOT, null, msgs);
112 msgs = basicSetRoot(newRoot, msgs);
113 if (msgs != null) msgs.dispatch();
114 }
115 else if (eNotificationRequired())
116 eNotify(new ENotificationImpl(this, Notification.SET, filesystemPackage.FILE_SYSTEM__ROOT, newRoot, newRoot));
117 }
118
119 /**
120 * <!-- begin-user-doc -->
121 * <!-- end-user-doc -->
122 * @generated
123 */
124 @SuppressWarnings("unchecked")
125 public EList<FSObject> getLive() {
126 return (EList<FSObject>)LIVE__ESETTING_DELEGATE.dynamicGet(this, null, 0, true, false);
127 }
128
129 /**
130 * <!-- begin-user-doc -->
131 * <!-- end-user-doc -->
132 * @generated
133 */
134 @Override
135 public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
136 switch (featureID) {
137 case filesystemPackage.FILE_SYSTEM__ROOT:
138 return basicSetRoot(null, msgs);
139 }
140 return super.eInverseRemove(otherEnd, featureID, msgs);
141 }
142
143 /**
144 * <!-- begin-user-doc -->
145 * <!-- end-user-doc -->
146 * @generated
147 */
148 @Override
149 public Object eGet(int featureID, boolean resolve, boolean coreType) {
150 switch (featureID) {
151 case filesystemPackage.FILE_SYSTEM__ROOT:
152 return getRoot();
153 case filesystemPackage.FILE_SYSTEM__LIVE:
154 return getLive();
155 }
156 return super.eGet(featureID, resolve, coreType);
157 }
158
159 /**
160 * <!-- begin-user-doc -->
161 * <!-- end-user-doc -->
162 * @generated
163 */
164 @Override
165 public void eSet(int featureID, Object newValue) {
166 switch (featureID) {
167 case filesystemPackage.FILE_SYSTEM__ROOT:
168 setRoot((Dir)newValue);
169 return;
170 }
171 super.eSet(featureID, newValue);
172 }
173
174 /**
175 * <!-- begin-user-doc -->
176 * <!-- end-user-doc -->
177 * @generated
178 */
179 @Override
180 public void eUnset(int featureID) {
181 switch (featureID) {
182 case filesystemPackage.FILE_SYSTEM__ROOT:
183 setRoot((Dir)null);
184 return;
185 }
186 super.eUnset(featureID);
187 }
188
189 /**
190 * <!-- begin-user-doc -->
191 * <!-- end-user-doc -->
192 * @generated
193 */
194 @Override
195 public boolean eIsSet(int featureID) {
196 switch (featureID) {
197 case filesystemPackage.FILE_SYSTEM__ROOT:
198 return root != null;
199 case filesystemPackage.FILE_SYSTEM__LIVE:
200 return LIVE__ESETTING_DELEGATE.dynamicIsSet(this, null, 0);
201 }
202 return super.eIsSet(featureID);
203 }
204
205} //FileSystemImpl