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.java198
1 files changed, 198 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..b5ef2b66
--- /dev/null
+++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/filesystem/impl/FileSystemImpl.java
@@ -0,0 +1,198 @@
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.InternalEObject;
17
18import org.eclipse.emf.ecore.impl.ENotificationImpl;
19import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
20
21/**
22 * <!-- begin-user-doc -->
23 * An implementation of the model object '<em><b>File System</b></em>'.
24 * <!-- end-user-doc -->
25 * <p>
26 * The following features are implemented:
27 * </p>
28 * <ul>
29 * <li>{@link ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.impl.FileSystemImpl#getRoot <em>Root</em>}</li>
30 * <li>{@link ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.impl.FileSystemImpl#getLive <em>Live</em>}</li>
31 * </ul>
32 *
33 * @generated
34 */
35public class FileSystemImpl extends MinimalEObjectImpl.Container implements FileSystem {
36 /**
37 * The cached value of the '{@link #getRoot() <em>Root</em>}' containment reference.
38 * <!-- begin-user-doc -->
39 * <!-- end-user-doc -->
40 * @see #getRoot()
41 * @generated
42 * @ordered
43 */
44 protected Dir root;
45
46 /**
47 * <!-- begin-user-doc -->
48 * <!-- end-user-doc -->
49 * @generated
50 */
51 protected FileSystemImpl() {
52 super();
53 }
54
55 /**
56 * <!-- begin-user-doc -->
57 * <!-- end-user-doc -->
58 * @generated
59 */
60 @Override
61 protected EClass eStaticClass() {
62 return filesystemPackage.Literals.FILE_SYSTEM;
63 }
64
65 /**
66 * <!-- begin-user-doc -->
67 * <!-- end-user-doc -->
68 * @generated
69 */
70 public Dir getRoot() {
71 return root;
72 }
73
74 /**
75 * <!-- begin-user-doc -->
76 * <!-- end-user-doc -->
77 * @generated
78 */
79 public NotificationChain basicSetRoot(Dir newRoot, NotificationChain msgs) {
80 Dir oldRoot = root;
81 root = newRoot;
82 if (eNotificationRequired()) {
83 ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, filesystemPackage.FILE_SYSTEM__ROOT, oldRoot, newRoot);
84 if (msgs == null) msgs = notification; else msgs.add(notification);
85 }
86 return msgs;
87 }
88
89 /**
90 * <!-- begin-user-doc -->
91 * <!-- end-user-doc -->
92 * @generated
93 */
94 public void setRoot(Dir newRoot) {
95 if (newRoot != root) {
96 NotificationChain msgs = null;
97 if (root != null)
98 msgs = ((InternalEObject)root).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - filesystemPackage.FILE_SYSTEM__ROOT, null, msgs);
99 if (newRoot != null)
100 msgs = ((InternalEObject)newRoot).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - filesystemPackage.FILE_SYSTEM__ROOT, null, msgs);
101 msgs = basicSetRoot(newRoot, msgs);
102 if (msgs != null) msgs.dispatch();
103 }
104 else if (eNotificationRequired())
105 eNotify(new ENotificationImpl(this, Notification.SET, filesystemPackage.FILE_SYSTEM__ROOT, newRoot, newRoot));
106 }
107
108 /**
109 * <!-- begin-user-doc -->
110 * <!-- end-user-doc -->
111 * @generated
112 */
113 @SuppressWarnings("unchecked")
114 public EList<FSObject> getLive() {
115 // TODO: implement this method to return the 'Live' reference list
116 // Ensure that you remove @generated or mark it @generated NOT
117 // The list is expected to implement org.eclipse.emf.ecore.util.InternalEList and org.eclipse.emf.ecore.EStructuralFeature.Setting
118 // so it's likely that an appropriate subclass of org.eclipse.emf.ecore.util.EcoreEList should be used.
119 throw new UnsupportedOperationException();
120 }
121
122 /**
123 * <!-- begin-user-doc -->
124 * <!-- end-user-doc -->
125 * @generated
126 */
127 @Override
128 public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
129 switch (featureID) {
130 case filesystemPackage.FILE_SYSTEM__ROOT:
131 return basicSetRoot(null, msgs);
132 }
133 return super.eInverseRemove(otherEnd, featureID, msgs);
134 }
135
136 /**
137 * <!-- begin-user-doc -->
138 * <!-- end-user-doc -->
139 * @generated
140 */
141 @Override
142 public Object eGet(int featureID, boolean resolve, boolean coreType) {
143 switch (featureID) {
144 case filesystemPackage.FILE_SYSTEM__ROOT:
145 return getRoot();
146 case filesystemPackage.FILE_SYSTEM__LIVE:
147 return getLive();
148 }
149 return super.eGet(featureID, resolve, coreType);
150 }
151
152 /**
153 * <!-- begin-user-doc -->
154 * <!-- end-user-doc -->
155 * @generated
156 */
157 @Override
158 public void eSet(int featureID, Object newValue) {
159 switch (featureID) {
160 case filesystemPackage.FILE_SYSTEM__ROOT:
161 setRoot((Dir)newValue);
162 return;
163 }
164 super.eSet(featureID, newValue);
165 }
166
167 /**
168 * <!-- begin-user-doc -->
169 * <!-- end-user-doc -->
170 * @generated
171 */
172 @Override
173 public void eUnset(int featureID) {
174 switch (featureID) {
175 case filesystemPackage.FILE_SYSTEM__ROOT:
176 setRoot((Dir)null);
177 return;
178 }
179 super.eUnset(featureID);
180 }
181
182 /**
183 * <!-- begin-user-doc -->
184 * <!-- end-user-doc -->
185 * @generated
186 */
187 @Override
188 public boolean eIsSet(int featureID) {
189 switch (featureID) {
190 case filesystemPackage.FILE_SYSTEM__ROOT:
191 return root != null;
192 case filesystemPackage.FILE_SYSTEM__LIVE:
193 return !getLive().isEmpty();
194 }
195 return super.eIsSet(featureID);
196 }
197
198} //FileSystemImpl