aboutsummaryrefslogtreecommitdiffstats
path: root/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/filesystem/impl/FSObjectImpl.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/FSObjectImpl.java')
-rw-r--r--Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/filesystem/impl/FSObjectImpl.java196
1 files changed, 196 insertions, 0 deletions
diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/filesystem/impl/FSObjectImpl.java b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/filesystem/impl/FSObjectImpl.java
new file mode 100644
index 00000000..25ea1fbb
--- /dev/null
+++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/filesystem/impl/FSObjectImpl.java
@@ -0,0 +1,196 @@
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.filesystemPackage;
8
9import org.eclipse.emf.common.notify.Notification;
10import org.eclipse.emf.common.notify.NotificationChain;
11
12import org.eclipse.emf.ecore.EClass;
13import org.eclipse.emf.ecore.InternalEObject;
14
15import org.eclipse.emf.ecore.impl.ENotificationImpl;
16import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
17
18import org.eclipse.emf.ecore.util.EcoreUtil;
19
20/**
21 * <!-- begin-user-doc -->
22 * An implementation of the model object '<em><b>FS Object</b></em>'.
23 * <!-- end-user-doc -->
24 * <p>
25 * The following features are implemented:
26 * </p>
27 * <ul>
28 * <li>{@link ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.impl.FSObjectImpl#getParent <em>Parent</em>}</li>
29 * </ul>
30 *
31 * @generated
32 */
33public abstract class FSObjectImpl extends MinimalEObjectImpl.Container implements FSObject {
34 /**
35 * <!-- begin-user-doc -->
36 * <!-- end-user-doc -->
37 * @generated
38 */
39 protected FSObjectImpl() {
40 super();
41 }
42
43 /**
44 * <!-- begin-user-doc -->
45 * <!-- end-user-doc -->
46 * @generated
47 */
48 @Override
49 protected EClass eStaticClass() {
50 return filesystemPackage.Literals.FS_OBJECT;
51 }
52
53 /**
54 * <!-- begin-user-doc -->
55 * <!-- end-user-doc -->
56 * @generated
57 */
58 public Dir getParent() {
59 if (eContainerFeatureID() != filesystemPackage.FS_OBJECT__PARENT) return null;
60 return (Dir)eInternalContainer();
61 }
62
63 /**
64 * <!-- begin-user-doc -->
65 * <!-- end-user-doc -->
66 * @generated
67 */
68 public NotificationChain basicSetParent(Dir newParent, NotificationChain msgs) {
69 msgs = eBasicSetContainer((InternalEObject)newParent, filesystemPackage.FS_OBJECT__PARENT, msgs);
70 return msgs;
71 }
72
73 /**
74 * <!-- begin-user-doc -->
75 * <!-- end-user-doc -->
76 * @generated
77 */
78 public void setParent(Dir newParent) {
79 if (newParent != eInternalContainer() || (eContainerFeatureID() != filesystemPackage.FS_OBJECT__PARENT && newParent != null)) {
80 if (EcoreUtil.isAncestor(this, newParent))
81 throw new IllegalArgumentException("Recursive containment not allowed for " + toString());
82 NotificationChain msgs = null;
83 if (eInternalContainer() != null)
84 msgs = eBasicRemoveFromContainer(msgs);
85 if (newParent != null)
86 msgs = ((InternalEObject)newParent).eInverseAdd(this, filesystemPackage.DIR__CONTENTS, Dir.class, msgs);
87 msgs = basicSetParent(newParent, msgs);
88 if (msgs != null) msgs.dispatch();
89 }
90 else if (eNotificationRequired())
91 eNotify(new ENotificationImpl(this, Notification.SET, filesystemPackage.FS_OBJECT__PARENT, newParent, newParent));
92 }
93
94 /**
95 * <!-- begin-user-doc -->
96 * <!-- end-user-doc -->
97 * @generated
98 */
99 @Override
100 public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
101 switch (featureID) {
102 case filesystemPackage.FS_OBJECT__PARENT:
103 if (eInternalContainer() != null)
104 msgs = eBasicRemoveFromContainer(msgs);
105 return basicSetParent((Dir)otherEnd, msgs);
106 }
107 return super.eInverseAdd(otherEnd, featureID, msgs);
108 }
109
110 /**
111 * <!-- begin-user-doc -->
112 * <!-- end-user-doc -->
113 * @generated
114 */
115 @Override
116 public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
117 switch (featureID) {
118 case filesystemPackage.FS_OBJECT__PARENT:
119 return basicSetParent(null, msgs);
120 }
121 return super.eInverseRemove(otherEnd, featureID, msgs);
122 }
123
124 /**
125 * <!-- begin-user-doc -->
126 * <!-- end-user-doc -->
127 * @generated
128 */
129 @Override
130 public NotificationChain eBasicRemoveFromContainerFeature(NotificationChain msgs) {
131 switch (eContainerFeatureID()) {
132 case filesystemPackage.FS_OBJECT__PARENT:
133 return eInternalContainer().eInverseRemove(this, filesystemPackage.DIR__CONTENTS, Dir.class, msgs);
134 }
135 return super.eBasicRemoveFromContainerFeature(msgs);
136 }
137
138 /**
139 * <!-- begin-user-doc -->
140 * <!-- end-user-doc -->
141 * @generated
142 */
143 @Override
144 public Object eGet(int featureID, boolean resolve, boolean coreType) {
145 switch (featureID) {
146 case filesystemPackage.FS_OBJECT__PARENT:
147 return getParent();
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.FS_OBJECT__PARENT:
161 setParent((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.FS_OBJECT__PARENT:
176 setParent((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.FS_OBJECT__PARENT:
191 return getParent() != null;
192 }
193 return super.eIsSet(featureID);
194 }
195
196} //FSObjectImpl