aboutsummaryrefslogtreecommitdiffstats
path: root/Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/src/hu/bme/mit/inf/dslreasoner/domains/alloyexamples/Filesystem/impl/FSObjectImpl.java
diff options
context:
space:
mode:
Diffstat (limited to 'Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/src/hu/bme/mit/inf/dslreasoner/domains/alloyexamples/Filesystem/impl/FSObjectImpl.java')
-rw-r--r--Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/src/hu/bme/mit/inf/dslreasoner/domains/alloyexamples/Filesystem/impl/FSObjectImpl.java194
1 files changed, 194 insertions, 0 deletions
diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/src/hu/bme/mit/inf/dslreasoner/domains/alloyexamples/Filesystem/impl/FSObjectImpl.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/src/hu/bme/mit/inf/dslreasoner/domains/alloyexamples/Filesystem/impl/FSObjectImpl.java
new file mode 100644
index 00000000..c8e73b4e
--- /dev/null
+++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/src/hu/bme/mit/inf/dslreasoner/domains/alloyexamples/Filesystem/impl/FSObjectImpl.java
@@ -0,0 +1,194 @@
1/**
2 */
3package hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.impl;
4
5import hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.Dir;
6import hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.FSObject;
7import hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.FilesystemPackage;
8
9import org.eclipse.emf.common.notify.Notification;
10import org.eclipse.emf.common.notify.NotificationChain;
11import org.eclipse.emf.ecore.EClass;
12
13import org.eclipse.emf.ecore.InternalEObject;
14import org.eclipse.emf.ecore.impl.ENotificationImpl;
15import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
16import org.eclipse.emf.ecore.util.EcoreUtil;
17
18/**
19 * <!-- begin-user-doc -->
20 * An implementation of the model object '<em><b>FS Object</b></em>'.
21 * <!-- end-user-doc -->
22 * <p>
23 * The following features are implemented:
24 * </p>
25 * <ul>
26 * <li>{@link hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.impl.FSObjectImpl#getParent <em>Parent</em>}</li>
27 * </ul>
28 *
29 * @generated
30 */
31public abstract class FSObjectImpl extends MinimalEObjectImpl.Container implements FSObject {
32 /**
33 * <!-- begin-user-doc -->
34 * <!-- end-user-doc -->
35 * @generated
36 */
37 protected FSObjectImpl() {
38 super();
39 }
40
41 /**
42 * <!-- begin-user-doc -->
43 * <!-- end-user-doc -->
44 * @generated
45 */
46 @Override
47 protected EClass eStaticClass() {
48 return FilesystemPackage.Literals.FS_OBJECT;
49 }
50
51 /**
52 * <!-- begin-user-doc -->
53 * <!-- end-user-doc -->
54 * @generated
55 */
56 public Dir getParent() {
57 if (eContainerFeatureID() != FilesystemPackage.FS_OBJECT__PARENT) return null;
58 return (Dir)eInternalContainer();
59 }
60
61 /**
62 * <!-- begin-user-doc -->
63 * <!-- end-user-doc -->
64 * @generated
65 */
66 public NotificationChain basicSetParent(Dir newParent, NotificationChain msgs) {
67 msgs = eBasicSetContainer((InternalEObject)newParent, FilesystemPackage.FS_OBJECT__PARENT, msgs);
68 return msgs;
69 }
70
71 /**
72 * <!-- begin-user-doc -->
73 * <!-- end-user-doc -->
74 * @generated
75 */
76 public void setParent(Dir newParent) {
77 if (newParent != eInternalContainer() || (eContainerFeatureID() != FilesystemPackage.FS_OBJECT__PARENT && newParent != null)) {
78 if (EcoreUtil.isAncestor(this, newParent))
79 throw new IllegalArgumentException("Recursive containment not allowed for " + toString());
80 NotificationChain msgs = null;
81 if (eInternalContainer() != null)
82 msgs = eBasicRemoveFromContainer(msgs);
83 if (newParent != null)
84 msgs = ((InternalEObject)newParent).eInverseAdd(this, FilesystemPackage.DIR__CONTENTS, Dir.class, msgs);
85 msgs = basicSetParent(newParent, msgs);
86 if (msgs != null) msgs.dispatch();
87 }
88 else if (eNotificationRequired())
89 eNotify(new ENotificationImpl(this, Notification.SET, FilesystemPackage.FS_OBJECT__PARENT, newParent, newParent));
90 }
91
92 /**
93 * <!-- begin-user-doc -->
94 * <!-- end-user-doc -->
95 * @generated
96 */
97 @Override
98 public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
99 switch (featureID) {
100 case FilesystemPackage.FS_OBJECT__PARENT:
101 if (eInternalContainer() != null)
102 msgs = eBasicRemoveFromContainer(msgs);
103 return basicSetParent((Dir)otherEnd, msgs);
104 }
105 return super.eInverseAdd(otherEnd, featureID, msgs);
106 }
107
108 /**
109 * <!-- begin-user-doc -->
110 * <!-- end-user-doc -->
111 * @generated
112 */
113 @Override
114 public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
115 switch (featureID) {
116 case FilesystemPackage.FS_OBJECT__PARENT:
117 return basicSetParent(null, msgs);
118 }
119 return super.eInverseRemove(otherEnd, featureID, msgs);
120 }
121
122 /**
123 * <!-- begin-user-doc -->
124 * <!-- end-user-doc -->
125 * @generated
126 */
127 @Override
128 public NotificationChain eBasicRemoveFromContainerFeature(NotificationChain msgs) {
129 switch (eContainerFeatureID()) {
130 case FilesystemPackage.FS_OBJECT__PARENT:
131 return eInternalContainer().eInverseRemove(this, FilesystemPackage.DIR__CONTENTS, Dir.class, msgs);
132 }
133 return super.eBasicRemoveFromContainerFeature(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.FS_OBJECT__PARENT:
145 return getParent();
146 }
147 return super.eGet(featureID, resolve, coreType);
148 }
149
150 /**
151 * <!-- begin-user-doc -->
152 * <!-- end-user-doc -->
153 * @generated
154 */
155 @Override
156 public void eSet(int featureID, Object newValue) {
157 switch (featureID) {
158 case FilesystemPackage.FS_OBJECT__PARENT:
159 setParent((Dir)newValue);
160 return;
161 }
162 super.eSet(featureID, newValue);
163 }
164
165 /**
166 * <!-- begin-user-doc -->
167 * <!-- end-user-doc -->
168 * @generated
169 */
170 @Override
171 public void eUnset(int featureID) {
172 switch (featureID) {
173 case FilesystemPackage.FS_OBJECT__PARENT:
174 setParent((Dir)null);
175 return;
176 }
177 super.eUnset(featureID);
178 }
179
180 /**
181 * <!-- begin-user-doc -->
182 * <!-- end-user-doc -->
183 * @generated
184 */
185 @Override
186 public boolean eIsSet(int featureID) {
187 switch (featureID) {
188 case FilesystemPackage.FS_OBJECT__PARENT:
189 return getParent() != null;
190 }
191 return super.eIsSet(featureID);
192 }
193
194} //FSObjectImpl