aboutsummaryrefslogtreecommitdiffstats
path: root/Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/src/hu/bme/mit/inf/dslreasoner/domains/alloyexamples/Filesystem/impl
diff options
context:
space:
mode:
authorLibravatar OszkarSemerath <oszka@192.168.122.1>2017-08-20 01:55:38 +0200
committerLibravatar OszkarSemerath <oszka@192.168.122.1>2017-08-20 01:55:38 +0200
commit78c806eebaf5b9d50b08768062755f0044cf107f (patch)
tree7db4d1b6a990b2572ed82a747dffac65a1c6fcc5 /Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/src/hu/bme/mit/inf/dslreasoner/domains/alloyexamples/Filesystem/impl
parentnull check before mapping value of a reference (diff)
downloadVIATRA-Generator-78c806eebaf5b9d50b08768062755f0044cf107f.tar.gz
VIATRA-Generator-78c806eebaf5b9d50b08768062755f0044cf107f.tar.zst
VIATRA-Generator-78c806eebaf5b9d50b08768062755f0044cf107f.zip
Alloy Examples
Diffstat (limited to 'Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/src/hu/bme/mit/inf/dslreasoner/domains/alloyexamples/Filesystem/impl')
-rw-r--r--Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/src/hu/bme/mit/inf/dslreasoner/domains/alloyexamples/Filesystem/impl/DirImpl.java165
-rw-r--r--Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/src/hu/bme/mit/inf/dslreasoner/domains/alloyexamples/Filesystem/impl/FSObjectImpl.java194
-rw-r--r--Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/src/hu/bme/mit/inf/dslreasoner/domains/alloyexamples/Filesystem/impl/FileImpl.java36
-rw-r--r--Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/src/hu/bme/mit/inf/dslreasoner/domains/alloyexamples/Filesystem/impl/FileSystemImpl.java205
-rw-r--r--Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/src/hu/bme/mit/inf/dslreasoner/domains/alloyexamples/Filesystem/impl/FilesystemFactoryImpl.java128
-rw-r--r--Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/src/hu/bme/mit/inf/dslreasoner/domains/alloyexamples/Filesystem/impl/FilesystemPackageImpl.java356
-rw-r--r--Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/src/hu/bme/mit/inf/dslreasoner/domains/alloyexamples/Filesystem/impl/ModelImpl.java221
7 files changed, 1305 insertions, 0 deletions
diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/src/hu/bme/mit/inf/dslreasoner/domains/alloyexamples/Filesystem/impl/DirImpl.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/src/hu/bme/mit/inf/dslreasoner/domains/alloyexamples/Filesystem/impl/DirImpl.java
new file mode 100644
index 00000000..62df04af
--- /dev/null
+++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/src/hu/bme/mit/inf/dslreasoner/domains/alloyexamples/Filesystem/impl/DirImpl.java
@@ -0,0 +1,165 @@
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 java.util.Collection;
10
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.util.EObjectContainmentWithInverseEList;
19import org.eclipse.emf.ecore.util.InternalEList;
20
21/**
22 * <!-- begin-user-doc -->
23 * An implementation of the model object '<em><b>Dir</b></em>'.
24 * <!-- end-user-doc -->
25 * <p>
26 * The following features are implemented:
27 * </p>
28 * <ul>
29 * <li>{@link hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.impl.DirImpl#getContents <em>Contents</em>}</li>
30 * </ul>
31 *
32 * @generated
33 */
34public class DirImpl extends FSObjectImpl implements Dir {
35 /**
36 * The cached value of the '{@link #getContents() <em>Contents</em>}' containment reference list.
37 * <!-- begin-user-doc -->
38 * <!-- end-user-doc -->
39 * @see #getContents()
40 * @generated
41 * @ordered
42 */
43 protected EList<FSObject> contents;
44
45 /**
46 * <!-- begin-user-doc -->
47 * <!-- end-user-doc -->
48 * @generated
49 */
50 protected DirImpl() {
51 super();
52 }
53
54 /**
55 * <!-- begin-user-doc -->
56 * <!-- end-user-doc -->
57 * @generated
58 */
59 @Override
60 protected EClass eStaticClass() {
61 return FilesystemPackage.Literals.DIR;
62 }
63
64 /**
65 * <!-- begin-user-doc -->
66 * <!-- end-user-doc -->
67 * @generated
68 */
69 public EList<FSObject> getContents() {
70 if (contents == null) {
71 contents = new EObjectContainmentWithInverseEList<FSObject>(FSObject.class, this, FilesystemPackage.DIR__CONTENTS, FilesystemPackage.FS_OBJECT__PARENT);
72 }
73 return contents;
74 }
75
76 /**
77 * <!-- begin-user-doc -->
78 * <!-- end-user-doc -->
79 * @generated
80 */
81 @SuppressWarnings("unchecked")
82 @Override
83 public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
84 switch (featureID) {
85 case FilesystemPackage.DIR__CONTENTS:
86 return ((InternalEList<InternalEObject>)(InternalEList<?>)getContents()).basicAdd(otherEnd, msgs);
87 }
88 return super.eInverseAdd(otherEnd, featureID, msgs);
89 }
90
91 /**
92 * <!-- begin-user-doc -->
93 * <!-- end-user-doc -->
94 * @generated
95 */
96 @Override
97 public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
98 switch (featureID) {
99 case FilesystemPackage.DIR__CONTENTS:
100 return ((InternalEList<?>)getContents()).basicRemove(otherEnd, msgs);
101 }
102 return super.eInverseRemove(otherEnd, featureID, msgs);
103 }
104
105 /**
106 * <!-- begin-user-doc -->
107 * <!-- end-user-doc -->
108 * @generated
109 */
110 @Override
111 public Object eGet(int featureID, boolean resolve, boolean coreType) {
112 switch (featureID) {
113 case FilesystemPackage.DIR__CONTENTS:
114 return getContents();
115 }
116 return super.eGet(featureID, resolve, coreType);
117 }
118
119 /**
120 * <!-- begin-user-doc -->
121 * <!-- end-user-doc -->
122 * @generated
123 */
124 @SuppressWarnings("unchecked")
125 @Override
126 public void eSet(int featureID, Object newValue) {
127 switch (featureID) {
128 case FilesystemPackage.DIR__CONTENTS:
129 getContents().clear();
130 getContents().addAll((Collection<? extends FSObject>)newValue);
131 return;
132 }
133 super.eSet(featureID, newValue);
134 }
135
136 /**
137 * <!-- begin-user-doc -->
138 * <!-- end-user-doc -->
139 * @generated
140 */
141 @Override
142 public void eUnset(int featureID) {
143 switch (featureID) {
144 case FilesystemPackage.DIR__CONTENTS:
145 getContents().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 switch (featureID) {
159 case FilesystemPackage.DIR__CONTENTS:
160 return contents != null && !contents.isEmpty();
161 }
162 return super.eIsSet(featureID);
163 }
164
165} //DirImpl
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
diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/src/hu/bme/mit/inf/dslreasoner/domains/alloyexamples/Filesystem/impl/FileImpl.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/src/hu/bme/mit/inf/dslreasoner/domains/alloyexamples/Filesystem/impl/FileImpl.java
new file mode 100644
index 00000000..55cd8a23
--- /dev/null
+++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/src/hu/bme/mit/inf/dslreasoner/domains/alloyexamples/Filesystem/impl/FileImpl.java
@@ -0,0 +1,36 @@
1/**
2 */
3package hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.impl;
4
5import hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.File;
6import hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.FilesystemPackage;
7import org.eclipse.emf.ecore.EClass;
8
9/**
10 * <!-- begin-user-doc -->
11 * An implementation of the model object '<em><b>File</b></em>'.
12 * <!-- end-user-doc -->
13 *
14 * @generated
15 */
16public class FileImpl extends FSObjectImpl implements File {
17 /**
18 * <!-- begin-user-doc -->
19 * <!-- end-user-doc -->
20 * @generated
21 */
22 protected FileImpl() {
23 super();
24 }
25
26 /**
27 * <!-- begin-user-doc -->
28 * <!-- end-user-doc -->
29 * @generated
30 */
31 @Override
32 protected EClass eStaticClass() {
33 return FilesystemPackage.Literals.FILE;
34 }
35
36} //FileImpl
diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/src/hu/bme/mit/inf/dslreasoner/domains/alloyexamples/Filesystem/impl/FileSystemImpl.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/src/hu/bme/mit/inf/dslreasoner/domains/alloyexamples/Filesystem/impl/FileSystemImpl.java
new file mode 100644
index 00000000..adf30f3a
--- /dev/null
+++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/src/hu/bme/mit/inf/dslreasoner/domains/alloyexamples/Filesystem/impl/FileSystemImpl.java
@@ -0,0 +1,205 @@
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.FileSystem;
8import hu.bme.mit.inf.dslreasoner.domains.alloyexamples.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 hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.impl.FileSystemImpl#getRoot <em>Root</em>}</li>
31 * <li>{@link hu.bme.mit.inf.dslreasoner.domains.alloyexamples.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
diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/src/hu/bme/mit/inf/dslreasoner/domains/alloyexamples/Filesystem/impl/FilesystemFactoryImpl.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/src/hu/bme/mit/inf/dslreasoner/domains/alloyexamples/Filesystem/impl/FilesystemFactoryImpl.java
new file mode 100644
index 00000000..e40b0bd1
--- /dev/null
+++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/src/hu/bme/mit/inf/dslreasoner/domains/alloyexamples/Filesystem/impl/FilesystemFactoryImpl.java
@@ -0,0 +1,128 @@
1/**
2 */
3package hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.impl;
4
5import hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.*;
6
7import org.eclipse.emf.ecore.EClass;
8import org.eclipse.emf.ecore.EObject;
9import org.eclipse.emf.ecore.EPackage;
10
11import org.eclipse.emf.ecore.impl.EFactoryImpl;
12
13import org.eclipse.emf.ecore.plugin.EcorePlugin;
14
15/**
16 * <!-- begin-user-doc -->
17 * An implementation of the model <b>Factory</b>.
18 * <!-- end-user-doc -->
19 * @generated
20 */
21public class FilesystemFactoryImpl extends EFactoryImpl implements FilesystemFactory {
22 /**
23 * Creates the default factory implementation.
24 * <!-- begin-user-doc -->
25 * <!-- end-user-doc -->
26 * @generated
27 */
28 public static FilesystemFactory init() {
29 try {
30 FilesystemFactory theFilesystemFactory = (FilesystemFactory)EPackage.Registry.INSTANCE.getEFactory(FilesystemPackage.eNS_URI);
31 if (theFilesystemFactory != null) {
32 return theFilesystemFactory;
33 }
34 }
35 catch (Exception exception) {
36 EcorePlugin.INSTANCE.log(exception);
37 }
38 return new FilesystemFactoryImpl();
39 }
40
41 /**
42 * Creates an instance of the factory.
43 * <!-- begin-user-doc -->
44 * <!-- end-user-doc -->
45 * @generated
46 */
47 public FilesystemFactoryImpl() {
48 super();
49 }
50
51 /**
52 * <!-- begin-user-doc -->
53 * <!-- end-user-doc -->
54 * @generated
55 */
56 @Override
57 public EObject create(EClass eClass) {
58 switch (eClass.getClassifierID()) {
59 case FilesystemPackage.FILE_SYSTEM: return createFileSystem();
60 case FilesystemPackage.DIR: return createDir();
61 case FilesystemPackage.FILE: return createFile();
62 case FilesystemPackage.MODEL: return createModel();
63 default:
64 throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
65 }
66 }
67
68 /**
69 * <!-- begin-user-doc -->
70 * <!-- end-user-doc -->
71 * @generated
72 */
73 public FileSystem createFileSystem() {
74 FileSystemImpl fileSystem = new FileSystemImpl();
75 return fileSystem;
76 }
77
78 /**
79 * <!-- begin-user-doc -->
80 * <!-- end-user-doc -->
81 * @generated
82 */
83 public Dir createDir() {
84 DirImpl dir = new DirImpl();
85 return dir;
86 }
87
88 /**
89 * <!-- begin-user-doc -->
90 * <!-- end-user-doc -->
91 * @generated
92 */
93 public File createFile() {
94 FileImpl file = new FileImpl();
95 return file;
96 }
97
98 /**
99 * <!-- begin-user-doc -->
100 * <!-- end-user-doc -->
101 * @generated
102 */
103 public Model createModel() {
104 ModelImpl model = new ModelImpl();
105 return model;
106 }
107
108 /**
109 * <!-- begin-user-doc -->
110 * <!-- end-user-doc -->
111 * @generated
112 */
113 public FilesystemPackage getFilesystemPackage() {
114 return (FilesystemPackage)getEPackage();
115 }
116
117 /**
118 * <!-- begin-user-doc -->
119 * <!-- end-user-doc -->
120 * @deprecated
121 * @generated
122 */
123 @Deprecated
124 public static FilesystemPackage getPackage() {
125 return FilesystemPackage.eINSTANCE;
126 }
127
128} //FilesystemFactoryImpl
diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/src/hu/bme/mit/inf/dslreasoner/domains/alloyexamples/Filesystem/impl/FilesystemPackageImpl.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/src/hu/bme/mit/inf/dslreasoner/domains/alloyexamples/Filesystem/impl/FilesystemPackageImpl.java
new file mode 100644
index 00000000..87390fee
--- /dev/null
+++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/src/hu/bme/mit/inf/dslreasoner/domains/alloyexamples/Filesystem/impl/FilesystemPackageImpl.java
@@ -0,0 +1,356 @@
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.File;
8import hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.FileSystem;
9import hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.FilesystemFactory;
10import hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.FilesystemPackage;
11import hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.Model;
12
13import org.eclipse.emf.ecore.EClass;
14import org.eclipse.emf.ecore.EPackage;
15import org.eclipse.emf.ecore.EReference;
16
17import org.eclipse.emf.ecore.impl.EPackageImpl;
18
19/**
20 * <!-- begin-user-doc -->
21 * An implementation of the model <b>Package</b>.
22 * <!-- end-user-doc -->
23 * @generated
24 */
25public class FilesystemPackageImpl extends EPackageImpl implements FilesystemPackage {
26 /**
27 * <!-- begin-user-doc -->
28 * <!-- end-user-doc -->
29 * @generated
30 */
31 private EClass fileSystemEClass = null;
32
33 /**
34 * <!-- begin-user-doc -->
35 * <!-- end-user-doc -->
36 * @generated
37 */
38 private EClass fsObjectEClass = null;
39
40 /**
41 * <!-- begin-user-doc -->
42 * <!-- end-user-doc -->
43 * @generated
44 */
45 private EClass dirEClass = null;
46
47 /**
48 * <!-- begin-user-doc -->
49 * <!-- end-user-doc -->
50 * @generated
51 */
52 private EClass fileEClass = null;
53
54 /**
55 * <!-- begin-user-doc -->
56 * <!-- end-user-doc -->
57 * @generated
58 */
59 private EClass modelEClass = null;
60
61 /**
62 * Creates an instance of the model <b>Package</b>, registered with
63 * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package
64 * package URI value.
65 * <p>Note: the correct way to create the package is via the static
66 * factory method {@link #init init()}, which also performs
67 * initialization of the package, or returns the registered package,
68 * if one already exists.
69 * <!-- begin-user-doc -->
70 * <!-- end-user-doc -->
71 * @see org.eclipse.emf.ecore.EPackage.Registry
72 * @see hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.FilesystemPackage#eNS_URI
73 * @see #init()
74 * @generated
75 */
76 private FilesystemPackageImpl() {
77 super(eNS_URI, FilesystemFactory.eINSTANCE);
78 }
79
80 /**
81 * <!-- begin-user-doc -->
82 * <!-- end-user-doc -->
83 * @generated
84 */
85 private static boolean isInited = false;
86
87 /**
88 * Creates, registers, and initializes the <b>Package</b> for this model, and for any others upon which it depends.
89 *
90 * <p>This method is used to initialize {@link FilesystemPackage#eINSTANCE} when that field is accessed.
91 * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package.
92 * <!-- begin-user-doc -->
93 * <!-- end-user-doc -->
94 * @see #eNS_URI
95 * @see #createPackageContents()
96 * @see #initializePackageContents()
97 * @generated
98 */
99 public static FilesystemPackage init() {
100 if (isInited) return (FilesystemPackage)EPackage.Registry.INSTANCE.getEPackage(FilesystemPackage.eNS_URI);
101
102 // Obtain or create and register package
103 FilesystemPackageImpl theFilesystemPackage = (FilesystemPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof FilesystemPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new FilesystemPackageImpl());
104
105 isInited = true;
106
107 // Create package meta-data objects
108 theFilesystemPackage.createPackageContents();
109
110 // Initialize created meta-data
111 theFilesystemPackage.initializePackageContents();
112
113 // Mark meta-data to indicate it can't be changed
114 theFilesystemPackage.freeze();
115
116
117 // Update the registry and return the package
118 EPackage.Registry.INSTANCE.put(FilesystemPackage.eNS_URI, theFilesystemPackage);
119 return theFilesystemPackage;
120 }
121
122 /**
123 * <!-- begin-user-doc -->
124 * <!-- end-user-doc -->
125 * @generated
126 */
127 public EClass getFileSystem() {
128 return fileSystemEClass;
129 }
130
131 /**
132 * <!-- begin-user-doc -->
133 * <!-- end-user-doc -->
134 * @generated
135 */
136 public EReference getFileSystem_Root() {
137 return (EReference)fileSystemEClass.getEStructuralFeatures().get(0);
138 }
139
140 /**
141 * <!-- begin-user-doc -->
142 * <!-- end-user-doc -->
143 * @generated
144 */
145 public EReference getFileSystem_Live() {
146 return (EReference)fileSystemEClass.getEStructuralFeatures().get(1);
147 }
148
149 /**
150 * <!-- begin-user-doc -->
151 * <!-- end-user-doc -->
152 * @generated
153 */
154 public EClass getFSObject() {
155 return fsObjectEClass;
156 }
157
158 /**
159 * <!-- begin-user-doc -->
160 * <!-- end-user-doc -->
161 * @generated
162 */
163 public EReference getFSObject_Parent() {
164 return (EReference)fsObjectEClass.getEStructuralFeatures().get(0);
165 }
166
167 /**
168 * <!-- begin-user-doc -->
169 * <!-- end-user-doc -->
170 * @generated
171 */
172 public EClass getDir() {
173 return dirEClass;
174 }
175
176 /**
177 * <!-- begin-user-doc -->
178 * <!-- end-user-doc -->
179 * @generated
180 */
181 public EReference getDir_Contents() {
182 return (EReference)dirEClass.getEStructuralFeatures().get(0);
183 }
184
185 /**
186 * <!-- begin-user-doc -->
187 * <!-- end-user-doc -->
188 * @generated
189 */
190 public EClass getFile() {
191 return fileEClass;
192 }
193
194 /**
195 * <!-- begin-user-doc -->
196 * <!-- end-user-doc -->
197 * @generated
198 */
199 public EClass getModel() {
200 return modelEClass;
201 }
202
203 /**
204 * <!-- begin-user-doc -->
205 * <!-- end-user-doc -->
206 * @generated
207 */
208 public EReference getModel_Filesystems() {
209 return (EReference)modelEClass.getEStructuralFeatures().get(0);
210 }
211
212 /**
213 * <!-- begin-user-doc -->
214 * <!-- end-user-doc -->
215 * @generated
216 */
217 public EReference getModel_OtherFSObjects() {
218 return (EReference)modelEClass.getEStructuralFeatures().get(1);
219 }
220
221 /**
222 * <!-- begin-user-doc -->
223 * <!-- end-user-doc -->
224 * @generated
225 */
226 public FilesystemFactory getFilesystemFactory() {
227 return (FilesystemFactory)getEFactoryInstance();
228 }
229
230 /**
231 * <!-- begin-user-doc -->
232 * <!-- end-user-doc -->
233 * @generated
234 */
235 private boolean isCreated = false;
236
237 /**
238 * Creates the meta-model objects for the package. This method is
239 * guarded to have no affect on any invocation but its first.
240 * <!-- begin-user-doc -->
241 * <!-- end-user-doc -->
242 * @generated
243 */
244 public void createPackageContents() {
245 if (isCreated) return;
246 isCreated = true;
247
248 // Create classes and their features
249 fileSystemEClass = createEClass(FILE_SYSTEM);
250 createEReference(fileSystemEClass, FILE_SYSTEM__ROOT);
251 createEReference(fileSystemEClass, FILE_SYSTEM__LIVE);
252
253 fsObjectEClass = createEClass(FS_OBJECT);
254 createEReference(fsObjectEClass, FS_OBJECT__PARENT);
255
256 dirEClass = createEClass(DIR);
257 createEReference(dirEClass, DIR__CONTENTS);
258
259 fileEClass = createEClass(FILE);
260
261 modelEClass = createEClass(MODEL);
262 createEReference(modelEClass, MODEL__FILESYSTEMS);
263 createEReference(modelEClass, MODEL__OTHER_FS_OBJECTS);
264 }
265
266 /**
267 * <!-- begin-user-doc -->
268 * <!-- end-user-doc -->
269 * @generated
270 */
271 private boolean isInitialized = false;
272
273 /**
274 * Complete the initialization of the package and its meta-model. This
275 * method is guarded to have no affect on any invocation but its first.
276 * <!-- begin-user-doc -->
277 * <!-- end-user-doc -->
278 * @generated
279 */
280 public void initializePackageContents() {
281 if (isInitialized) return;
282 isInitialized = true;
283
284 // Initialize package
285 setName(eNAME);
286 setNsPrefix(eNS_PREFIX);
287 setNsURI(eNS_URI);
288
289 // Create type parameters
290
291 // Set bounds for type parameters
292
293 // Add supertypes to classes
294 dirEClass.getESuperTypes().add(this.getFSObject());
295 fileEClass.getESuperTypes().add(this.getFSObject());
296
297 // Initialize classes, features, and operations; add parameters
298 initEClass(fileSystemEClass, FileSystem.class, "FileSystem", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
299 initEReference(getFileSystem_Root(), this.getDir(), null, "root", null, 1, 1, FileSystem.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
300 initEReference(getFileSystem_Live(), this.getFSObject(), null, "live", null, 0, -1, FileSystem.class, IS_TRANSIENT, IS_VOLATILE, !IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, IS_DERIVED, IS_ORDERED);
301
302 initEClass(fsObjectEClass, FSObject.class, "FSObject", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
303 initEReference(getFSObject_Parent(), this.getDir(), this.getDir_Contents(), "parent", null, 0, 1, FSObject.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
304
305 initEClass(dirEClass, Dir.class, "Dir", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
306 initEReference(getDir_Contents(), this.getFSObject(), this.getFSObject_Parent(), "contents", null, 0, -1, Dir.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
307
308 initEClass(fileEClass, File.class, "File", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
309
310 initEClass(modelEClass, Model.class, "Model", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
311 initEReference(getModel_Filesystems(), this.getFileSystem(), null, "filesystems", null, 1, 1, Model.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
312 initEReference(getModel_OtherFSObjects(), this.getFSObject(), null, "otherFSObjects", null, 0, -1, Model.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
313
314 // Create resource
315 createResource(eNS_URI);
316
317 // Create annotations
318 // http://www.eclipse.org/emf/2002/Ecore
319 createEcoreAnnotations();
320 // org.eclipse.viatra.query.querybasedfeature
321 createOrgAnnotations();
322 }
323
324 /**
325 * Initializes the annotations for <b>http://www.eclipse.org/emf/2002/Ecore</b>.
326 * <!-- begin-user-doc -->
327 * <!-- end-user-doc -->
328 * @generated
329 */
330 protected void createEcoreAnnotations() {
331 String source = "http://www.eclipse.org/emf/2002/Ecore";
332 addAnnotation
333 (this,
334 source,
335 new String[] {
336 "settingDelegates", "org.eclipse.viatra.query.querybasedfeature"
337 });
338 }
339
340 /**
341 * Initializes the annotations for <b>org.eclipse.viatra.query.querybasedfeature</b>.
342 * <!-- begin-user-doc -->
343 * <!-- end-user-doc -->
344 * @generated
345 */
346 protected void createOrgAnnotations() {
347 String source = "org.eclipse.viatra.query.querybasedfeature";
348 addAnnotation
349 (getFileSystem_Live(),
350 source,
351 new String[] {
352 "patternFQN", "hu.bme.mit.inf.dslreasoner.domains.alloyexamples.live"
353 });
354 }
355
356} //FilesystemPackageImpl
diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/src/hu/bme/mit/inf/dslreasoner/domains/alloyexamples/Filesystem/impl/ModelImpl.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/src/hu/bme/mit/inf/dslreasoner/domains/alloyexamples/Filesystem/impl/ModelImpl.java
new file mode 100644
index 00000000..4c236e8e
--- /dev/null
+++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/src/hu/bme/mit/inf/dslreasoner/domains/alloyexamples/Filesystem/impl/ModelImpl.java
@@ -0,0 +1,221 @@
1/**
2 */
3package hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.impl;
4
5import hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.FSObject;
6import hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.FileSystem;
7import hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.FilesystemPackage;
8import hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.Model;
9
10import java.util.Collection;
11
12import org.eclipse.emf.common.notify.Notification;
13import org.eclipse.emf.common.notify.NotificationChain;
14
15import org.eclipse.emf.common.util.EList;
16
17import org.eclipse.emf.ecore.EClass;
18import org.eclipse.emf.ecore.InternalEObject;
19
20import org.eclipse.emf.ecore.impl.ENotificationImpl;
21import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
22
23import org.eclipse.emf.ecore.util.EObjectContainmentEList;
24import org.eclipse.emf.ecore.util.InternalEList;
25
26/**
27 * <!-- begin-user-doc -->
28 * An implementation of the model object '<em><b>Model</b></em>'.
29 * <!-- end-user-doc -->
30 * <p>
31 * The following features are implemented:
32 * </p>
33 * <ul>
34 * <li>{@link hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.impl.ModelImpl#getFilesystems <em>Filesystems</em>}</li>
35 * <li>{@link hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.impl.ModelImpl#getOtherFSObjects <em>Other FS Objects</em>}</li>
36 * </ul>
37 *
38 * @generated
39 */
40public class ModelImpl extends MinimalEObjectImpl.Container implements Model {
41 /**
42 * The cached value of the '{@link #getFilesystems() <em>Filesystems</em>}' containment reference.
43 * <!-- begin-user-doc -->
44 * <!-- end-user-doc -->
45 * @see #getFilesystems()
46 * @generated
47 * @ordered
48 */
49 protected FileSystem filesystems;
50
51 /**
52 * The cached value of the '{@link #getOtherFSObjects() <em>Other FS Objects</em>}' containment reference list.
53 * <!-- begin-user-doc -->
54 * <!-- end-user-doc -->
55 * @see #getOtherFSObjects()
56 * @generated
57 * @ordered
58 */
59 protected EList<FSObject> otherFSObjects;
60
61 /**
62 * <!-- begin-user-doc -->
63 * <!-- end-user-doc -->
64 * @generated
65 */
66 protected ModelImpl() {
67 super();
68 }
69
70 /**
71 * <!-- begin-user-doc -->
72 * <!-- end-user-doc -->
73 * @generated
74 */
75 @Override
76 protected EClass eStaticClass() {
77 return FilesystemPackage.Literals.MODEL;
78 }
79
80 /**
81 * <!-- begin-user-doc -->
82 * <!-- end-user-doc -->
83 * @generated
84 */
85 public FileSystem getFilesystems() {
86 return filesystems;
87 }
88
89 /**
90 * <!-- begin-user-doc -->
91 * <!-- end-user-doc -->
92 * @generated
93 */
94 public NotificationChain basicSetFilesystems(FileSystem newFilesystems, NotificationChain msgs) {
95 FileSystem oldFilesystems = filesystems;
96 filesystems = newFilesystems;
97 if (eNotificationRequired()) {
98 ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, FilesystemPackage.MODEL__FILESYSTEMS, oldFilesystems, newFilesystems);
99 if (msgs == null) msgs = notification; else msgs.add(notification);
100 }
101 return msgs;
102 }
103
104 /**
105 * <!-- begin-user-doc -->
106 * <!-- end-user-doc -->
107 * @generated
108 */
109 public void setFilesystems(FileSystem newFilesystems) {
110 if (newFilesystems != filesystems) {
111 NotificationChain msgs = null;
112 if (filesystems != null)
113 msgs = ((InternalEObject)filesystems).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - FilesystemPackage.MODEL__FILESYSTEMS, null, msgs);
114 if (newFilesystems != null)
115 msgs = ((InternalEObject)newFilesystems).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - FilesystemPackage.MODEL__FILESYSTEMS, null, msgs);
116 msgs = basicSetFilesystems(newFilesystems, msgs);
117 if (msgs != null) msgs.dispatch();
118 }
119 else if (eNotificationRequired())
120 eNotify(new ENotificationImpl(this, Notification.SET, FilesystemPackage.MODEL__FILESYSTEMS, newFilesystems, newFilesystems));
121 }
122
123 /**
124 * <!-- begin-user-doc -->
125 * <!-- end-user-doc -->
126 * @generated
127 */
128 public EList<FSObject> getOtherFSObjects() {
129 if (otherFSObjects == null) {
130 otherFSObjects = new EObjectContainmentEList<FSObject>(FSObject.class, this, FilesystemPackage.MODEL__OTHER_FS_OBJECTS);
131 }
132 return otherFSObjects;
133 }
134
135 /**
136 * <!-- begin-user-doc -->
137 * <!-- end-user-doc -->
138 * @generated
139 */
140 @Override
141 public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
142 switch (featureID) {
143 case FilesystemPackage.MODEL__FILESYSTEMS:
144 return basicSetFilesystems(null, msgs);
145 case FilesystemPackage.MODEL__OTHER_FS_OBJECTS:
146 return ((InternalEList<?>)getOtherFSObjects()).basicRemove(otherEnd, msgs);
147 }
148 return super.eInverseRemove(otherEnd, featureID, msgs);
149 }
150
151 /**
152 * <!-- begin-user-doc -->
153 * <!-- end-user-doc -->
154 * @generated
155 */
156 @Override
157 public Object eGet(int featureID, boolean resolve, boolean coreType) {
158 switch (featureID) {
159 case FilesystemPackage.MODEL__FILESYSTEMS:
160 return getFilesystems();
161 case FilesystemPackage.MODEL__OTHER_FS_OBJECTS:
162 return getOtherFSObjects();
163 }
164 return super.eGet(featureID, resolve, coreType);
165 }
166
167 /**
168 * <!-- begin-user-doc -->
169 * <!-- end-user-doc -->
170 * @generated
171 */
172 @SuppressWarnings("unchecked")
173 @Override
174 public void eSet(int featureID, Object newValue) {
175 switch (featureID) {
176 case FilesystemPackage.MODEL__FILESYSTEMS:
177 setFilesystems((FileSystem)newValue);
178 return;
179 case FilesystemPackage.MODEL__OTHER_FS_OBJECTS:
180 getOtherFSObjects().clear();
181 getOtherFSObjects().addAll((Collection<? extends FSObject>)newValue);
182 return;
183 }
184 super.eSet(featureID, newValue);
185 }
186
187 /**
188 * <!-- begin-user-doc -->
189 * <!-- end-user-doc -->
190 * @generated
191 */
192 @Override
193 public void eUnset(int featureID) {
194 switch (featureID) {
195 case FilesystemPackage.MODEL__FILESYSTEMS:
196 setFilesystems((FileSystem)null);
197 return;
198 case FilesystemPackage.MODEL__OTHER_FS_OBJECTS:
199 getOtherFSObjects().clear();
200 return;
201 }
202 super.eUnset(featureID);
203 }
204
205 /**
206 * <!-- begin-user-doc -->
207 * <!-- end-user-doc -->
208 * @generated
209 */
210 @Override
211 public boolean eIsSet(int featureID) {
212 switch (featureID) {
213 case FilesystemPackage.MODEL__FILESYSTEMS:
214 return filesystems != null;
215 case FilesystemPackage.MODEL__OTHER_FS_OBJECTS:
216 return otherFSObjects != null && !otherFSObjects.isEmpty();
217 }
218 return super.eIsSet(featureID);
219 }
220
221} //ModelImpl