diff options
author | 2017-08-20 01:55:38 +0200 | |
---|---|---|
committer | 2017-08-20 01:55:38 +0200 | |
commit | 78c806eebaf5b9d50b08768062755f0044cf107f (patch) | |
tree | 7db4d1b6a990b2572ed82a747dffac65a1c6fcc5 /Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/src | |
parent | null check before mapping value of a reference (diff) | |
download | VIATRA-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')
16 files changed, 2524 insertions, 0 deletions
diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/src/hu/bme/mit/inf/dslreasoner/domains/alloyexamples/Filesystem/Dir.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/src/hu/bme/mit/inf/dslreasoner/domains/alloyexamples/Filesystem/Dir.java new file mode 100644 index 00000000..59900ac7 --- /dev/null +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/src/hu/bme/mit/inf/dslreasoner/domains/alloyexamples/Filesystem/Dir.java | |||
@@ -0,0 +1,42 @@ | |||
1 | /** | ||
2 | */ | ||
3 | package hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem; | ||
4 | |||
5 | import org.eclipse.emf.common.util.EList; | ||
6 | |||
7 | /** | ||
8 | * <!-- begin-user-doc --> | ||
9 | * A representation of the model object '<em><b>Dir</b></em>'. | ||
10 | * <!-- end-user-doc --> | ||
11 | * | ||
12 | * <p> | ||
13 | * The following features are supported: | ||
14 | * </p> | ||
15 | * <ul> | ||
16 | * <li>{@link hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.Dir#getContents <em>Contents</em>}</li> | ||
17 | * </ul> | ||
18 | * | ||
19 | * @see hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.FilesystemPackage#getDir() | ||
20 | * @model | ||
21 | * @generated | ||
22 | */ | ||
23 | public interface Dir extends FSObject { | ||
24 | /** | ||
25 | * Returns the value of the '<em><b>Contents</b></em>' containment reference list. | ||
26 | * The list contents are of type {@link hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.FSObject}. | ||
27 | * It is bidirectional and its opposite is '{@link hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.FSObject#getParent <em>Parent</em>}'. | ||
28 | * <!-- begin-user-doc --> | ||
29 | * <p> | ||
30 | * If the meaning of the '<em>Contents</em>' containment reference list isn't clear, | ||
31 | * there really should be more of a description here... | ||
32 | * </p> | ||
33 | * <!-- end-user-doc --> | ||
34 | * @return the value of the '<em>Contents</em>' containment reference list. | ||
35 | * @see hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.FilesystemPackage#getDir_Contents() | ||
36 | * @see hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.FSObject#getParent | ||
37 | * @model opposite="parent" containment="true" | ||
38 | * @generated | ||
39 | */ | ||
40 | EList<FSObject> getContents(); | ||
41 | |||
42 | } // Dir | ||
diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/src/hu/bme/mit/inf/dslreasoner/domains/alloyexamples/Filesystem/FSObject.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/src/hu/bme/mit/inf/dslreasoner/domains/alloyexamples/Filesystem/FSObject.java new file mode 100644 index 00000000..2cc4d454 --- /dev/null +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/src/hu/bme/mit/inf/dslreasoner/domains/alloyexamples/Filesystem/FSObject.java | |||
@@ -0,0 +1,52 @@ | |||
1 | /** | ||
2 | */ | ||
3 | package hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem; | ||
4 | |||
5 | import org.eclipse.emf.ecore.EObject; | ||
6 | |||
7 | /** | ||
8 | * <!-- begin-user-doc --> | ||
9 | * A representation of the model object '<em><b>FS Object</b></em>'. | ||
10 | * <!-- end-user-doc --> | ||
11 | * | ||
12 | * <p> | ||
13 | * The following features are supported: | ||
14 | * </p> | ||
15 | * <ul> | ||
16 | * <li>{@link hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.FSObject#getParent <em>Parent</em>}</li> | ||
17 | * </ul> | ||
18 | * | ||
19 | * @see hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.FilesystemPackage#getFSObject() | ||
20 | * @model abstract="true" | ||
21 | * @generated | ||
22 | */ | ||
23 | public interface FSObject extends EObject { | ||
24 | |||
25 | /** | ||
26 | * Returns the value of the '<em><b>Parent</b></em>' container reference. | ||
27 | * It is bidirectional and its opposite is '{@link hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.Dir#getContents <em>Contents</em>}'. | ||
28 | * <!-- begin-user-doc --> | ||
29 | * <p> | ||
30 | * If the meaning of the '<em>Parent</em>' container reference isn't clear, | ||
31 | * there really should be more of a description here... | ||
32 | * </p> | ||
33 | * <!-- end-user-doc --> | ||
34 | * @return the value of the '<em>Parent</em>' container reference. | ||
35 | * @see #setParent(Dir) | ||
36 | * @see hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.FilesystemPackage#getFSObject_Parent() | ||
37 | * @see hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.Dir#getContents | ||
38 | * @model opposite="contents" transient="false" | ||
39 | * @generated | ||
40 | */ | ||
41 | Dir getParent(); | ||
42 | |||
43 | /** | ||
44 | * Sets the value of the '{@link hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.FSObject#getParent <em>Parent</em>}' container reference. | ||
45 | * <!-- begin-user-doc --> | ||
46 | * <!-- end-user-doc --> | ||
47 | * @param value the new value of the '<em>Parent</em>' container reference. | ||
48 | * @see #getParent() | ||
49 | * @generated | ||
50 | */ | ||
51 | void setParent(Dir value); | ||
52 | } // FSObject | ||
diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/src/hu/bme/mit/inf/dslreasoner/domains/alloyexamples/Filesystem/File.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/src/hu/bme/mit/inf/dslreasoner/domains/alloyexamples/Filesystem/File.java new file mode 100644 index 00000000..e765cbda --- /dev/null +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/src/hu/bme/mit/inf/dslreasoner/domains/alloyexamples/Filesystem/File.java | |||
@@ -0,0 +1,18 @@ | |||
1 | /** | ||
2 | */ | ||
3 | package hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem; | ||
4 | |||
5 | |||
6 | /** | ||
7 | * <!-- begin-user-doc --> | ||
8 | * A representation of the model object '<em><b>File</b></em>'. | ||
9 | * <!-- end-user-doc --> | ||
10 | * | ||
11 | * | ||
12 | * @see hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.FilesystemPackage#getFile() | ||
13 | * @model | ||
14 | * @generated | ||
15 | */ | ||
16 | public interface File extends FSObject { | ||
17 | |||
18 | } // File | ||
diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/src/hu/bme/mit/inf/dslreasoner/domains/alloyexamples/Filesystem/FileSystem.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/src/hu/bme/mit/inf/dslreasoner/domains/alloyexamples/Filesystem/FileSystem.java new file mode 100644 index 00000000..1896e31e --- /dev/null +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/src/hu/bme/mit/inf/dslreasoner/domains/alloyexamples/Filesystem/FileSystem.java | |||
@@ -0,0 +1,70 @@ | |||
1 | /** | ||
2 | */ | ||
3 | package hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem; | ||
4 | |||
5 | import org.eclipse.emf.common.util.EList; | ||
6 | |||
7 | import org.eclipse.emf.ecore.EObject; | ||
8 | |||
9 | /** | ||
10 | * <!-- begin-user-doc --> | ||
11 | * A representation of the model object '<em><b>File System</b></em>'. | ||
12 | * <!-- end-user-doc --> | ||
13 | * | ||
14 | * <p> | ||
15 | * The following features are supported: | ||
16 | * </p> | ||
17 | * <ul> | ||
18 | * <li>{@link hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.FileSystem#getRoot <em>Root</em>}</li> | ||
19 | * <li>{@link hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.FileSystem#getLive <em>Live</em>}</li> | ||
20 | * </ul> | ||
21 | * | ||
22 | * @see hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.FilesystemPackage#getFileSystem() | ||
23 | * @model | ||
24 | * @generated | ||
25 | */ | ||
26 | public interface FileSystem extends EObject { | ||
27 | /** | ||
28 | * Returns the value of the '<em><b>Root</b></em>' containment reference. | ||
29 | * <!-- begin-user-doc --> | ||
30 | * <p> | ||
31 | * If the meaning of the '<em>Root</em>' containment reference isn't clear, | ||
32 | * there really should be more of a description here... | ||
33 | * </p> | ||
34 | * <!-- end-user-doc --> | ||
35 | * @return the value of the '<em>Root</em>' containment reference. | ||
36 | * @see #setRoot(Dir) | ||
37 | * @see hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.FilesystemPackage#getFileSystem_Root() | ||
38 | * @model containment="true" required="true" | ||
39 | * @generated | ||
40 | */ | ||
41 | Dir getRoot(); | ||
42 | |||
43 | /** | ||
44 | * Sets the value of the '{@link hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.FileSystem#getRoot <em>Root</em>}' containment reference. | ||
45 | * <!-- begin-user-doc --> | ||
46 | * <!-- end-user-doc --> | ||
47 | * @param value the new value of the '<em>Root</em>' containment reference. | ||
48 | * @see #getRoot() | ||
49 | * @generated | ||
50 | */ | ||
51 | void setRoot(Dir value); | ||
52 | |||
53 | /** | ||
54 | * Returns the value of the '<em><b>Live</b></em>' reference list. | ||
55 | * The list contents are of type {@link hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.FSObject}. | ||
56 | * <!-- begin-user-doc --> | ||
57 | * <p> | ||
58 | * If the meaning of the '<em>Live</em>' reference list isn't clear, | ||
59 | * there really should be more of a description here... | ||
60 | * </p> | ||
61 | * <!-- end-user-doc --> | ||
62 | * @return the value of the '<em>Live</em>' reference list. | ||
63 | * @see hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.FilesystemPackage#getFileSystem_Live() | ||
64 | * @model transient="true" changeable="false" volatile="true" derived="true" | ||
65 | * annotation="org.eclipse.viatra.query.querybasedfeature patternFQN='hu.bme.mit.inf.dslreasoner.domains.alloyexamples.live'" | ||
66 | * @generated | ||
67 | */ | ||
68 | EList<FSObject> getLive(); | ||
69 | |||
70 | } // FileSystem | ||
diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/src/hu/bme/mit/inf/dslreasoner/domains/alloyexamples/Filesystem/FilesystemFactory.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/src/hu/bme/mit/inf/dslreasoner/domains/alloyexamples/Filesystem/FilesystemFactory.java new file mode 100644 index 00000000..aaba633f --- /dev/null +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/src/hu/bme/mit/inf/dslreasoner/domains/alloyexamples/Filesystem/FilesystemFactory.java | |||
@@ -0,0 +1,69 @@ | |||
1 | /** | ||
2 | */ | ||
3 | package hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem; | ||
4 | |||
5 | import org.eclipse.emf.ecore.EFactory; | ||
6 | |||
7 | /** | ||
8 | * <!-- begin-user-doc --> | ||
9 | * The <b>Factory</b> for the model. | ||
10 | * It provides a create method for each non-abstract class of the model. | ||
11 | * <!-- end-user-doc --> | ||
12 | * @see hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.FilesystemPackage | ||
13 | * @generated | ||
14 | */ | ||
15 | public interface FilesystemFactory extends EFactory { | ||
16 | /** | ||
17 | * The singleton instance of the factory. | ||
18 | * <!-- begin-user-doc --> | ||
19 | * <!-- end-user-doc --> | ||
20 | * @generated | ||
21 | */ | ||
22 | FilesystemFactory eINSTANCE = hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.impl.FilesystemFactoryImpl.init(); | ||
23 | |||
24 | /** | ||
25 | * Returns a new object of class '<em>File System</em>'. | ||
26 | * <!-- begin-user-doc --> | ||
27 | * <!-- end-user-doc --> | ||
28 | * @return a new object of class '<em>File System</em>'. | ||
29 | * @generated | ||
30 | */ | ||
31 | FileSystem createFileSystem(); | ||
32 | |||
33 | /** | ||
34 | * Returns a new object of class '<em>Dir</em>'. | ||
35 | * <!-- begin-user-doc --> | ||
36 | * <!-- end-user-doc --> | ||
37 | * @return a new object of class '<em>Dir</em>'. | ||
38 | * @generated | ||
39 | */ | ||
40 | Dir createDir(); | ||
41 | |||
42 | /** | ||
43 | * Returns a new object of class '<em>File</em>'. | ||
44 | * <!-- begin-user-doc --> | ||
45 | * <!-- end-user-doc --> | ||
46 | * @return a new object of class '<em>File</em>'. | ||
47 | * @generated | ||
48 | */ | ||
49 | File createFile(); | ||
50 | |||
51 | /** | ||
52 | * Returns a new object of class '<em>Model</em>'. | ||
53 | * <!-- begin-user-doc --> | ||
54 | * <!-- end-user-doc --> | ||
55 | * @return a new object of class '<em>Model</em>'. | ||
56 | * @generated | ||
57 | */ | ||
58 | Model createModel(); | ||
59 | |||
60 | /** | ||
61 | * Returns the package supported by this factory. | ||
62 | * <!-- begin-user-doc --> | ||
63 | * <!-- end-user-doc --> | ||
64 | * @return the package supported by this factory. | ||
65 | * @generated | ||
66 | */ | ||
67 | FilesystemPackage getFilesystemPackage(); | ||
68 | |||
69 | } //FilesystemFactory | ||
diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/src/hu/bme/mit/inf/dslreasoner/domains/alloyexamples/Filesystem/FilesystemPackage.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/src/hu/bme/mit/inf/dslreasoner/domains/alloyexamples/Filesystem/FilesystemPackage.java new file mode 100644 index 00000000..cad9293e --- /dev/null +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/src/hu/bme/mit/inf/dslreasoner/domains/alloyexamples/Filesystem/FilesystemPackage.java | |||
@@ -0,0 +1,511 @@ | |||
1 | /** | ||
2 | */ | ||
3 | package hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem; | ||
4 | |||
5 | import org.eclipse.emf.ecore.EClass; | ||
6 | import org.eclipse.emf.ecore.EPackage; | ||
7 | import org.eclipse.emf.ecore.EReference; | ||
8 | |||
9 | /** | ||
10 | * <!-- begin-user-doc --> | ||
11 | * The <b>Package</b> for the model. | ||
12 | * It contains accessors for the meta objects to represent | ||
13 | * <ul> | ||
14 | * <li>each class,</li> | ||
15 | * <li>each feature of each class,</li> | ||
16 | * <li>each operation of each class,</li> | ||
17 | * <li>each enum,</li> | ||
18 | * <li>and each data type</li> | ||
19 | * </ul> | ||
20 | * <!-- end-user-doc --> | ||
21 | * @see hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.FilesystemFactory | ||
22 | * @model kind="package" | ||
23 | * annotation="http://www.eclipse.org/emf/2002/Ecore settingDelegates='org.eclipse.viatra.query.querybasedfeature'" | ||
24 | * @generated | ||
25 | */ | ||
26 | public interface FilesystemPackage extends EPackage { | ||
27 | /** | ||
28 | * The package name. | ||
29 | * <!-- begin-user-doc --> | ||
30 | * <!-- end-user-doc --> | ||
31 | * @generated | ||
32 | */ | ||
33 | String eNAME = "Filesystem"; | ||
34 | |||
35 | /** | ||
36 | * The package namespace URI. | ||
37 | * <!-- begin-user-doc --> | ||
38 | * <!-- end-user-doc --> | ||
39 | * @generated | ||
40 | */ | ||
41 | String eNS_URI = "FS"; | ||
42 | |||
43 | /** | ||
44 | * The package namespace name. | ||
45 | * <!-- begin-user-doc --> | ||
46 | * <!-- end-user-doc --> | ||
47 | * @generated | ||
48 | */ | ||
49 | String eNS_PREFIX = "FS"; | ||
50 | |||
51 | /** | ||
52 | * The singleton instance of the package. | ||
53 | * <!-- begin-user-doc --> | ||
54 | * <!-- end-user-doc --> | ||
55 | * @generated | ||
56 | */ | ||
57 | FilesystemPackage eINSTANCE = hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.impl.FilesystemPackageImpl.init(); | ||
58 | |||
59 | /** | ||
60 | * The meta object id for the '{@link hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.impl.FileSystemImpl <em>File System</em>}' class. | ||
61 | * <!-- begin-user-doc --> | ||
62 | * <!-- end-user-doc --> | ||
63 | * @see hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.impl.FileSystemImpl | ||
64 | * @see hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.impl.FilesystemPackageImpl#getFileSystem() | ||
65 | * @generated | ||
66 | */ | ||
67 | int FILE_SYSTEM = 0; | ||
68 | |||
69 | /** | ||
70 | * The feature id for the '<em><b>Root</b></em>' containment reference. | ||
71 | * <!-- begin-user-doc --> | ||
72 | * <!-- end-user-doc --> | ||
73 | * @generated | ||
74 | * @ordered | ||
75 | */ | ||
76 | int FILE_SYSTEM__ROOT = 0; | ||
77 | |||
78 | /** | ||
79 | * The feature id for the '<em><b>Live</b></em>' reference list. | ||
80 | * <!-- begin-user-doc --> | ||
81 | * <!-- end-user-doc --> | ||
82 | * @generated | ||
83 | * @ordered | ||
84 | */ | ||
85 | int FILE_SYSTEM__LIVE = 1; | ||
86 | |||
87 | /** | ||
88 | * The number of structural features of the '<em>File System</em>' class. | ||
89 | * <!-- begin-user-doc --> | ||
90 | * <!-- end-user-doc --> | ||
91 | * @generated | ||
92 | * @ordered | ||
93 | */ | ||
94 | int FILE_SYSTEM_FEATURE_COUNT = 2; | ||
95 | |||
96 | /** | ||
97 | * The number of operations of the '<em>File System</em>' class. | ||
98 | * <!-- begin-user-doc --> | ||
99 | * <!-- end-user-doc --> | ||
100 | * @generated | ||
101 | * @ordered | ||
102 | */ | ||
103 | int FILE_SYSTEM_OPERATION_COUNT = 0; | ||
104 | |||
105 | /** | ||
106 | * The meta object id for the '{@link hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.impl.FSObjectImpl <em>FS Object</em>}' class. | ||
107 | * <!-- begin-user-doc --> | ||
108 | * <!-- end-user-doc --> | ||
109 | * @see hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.impl.FSObjectImpl | ||
110 | * @see hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.impl.FilesystemPackageImpl#getFSObject() | ||
111 | * @generated | ||
112 | */ | ||
113 | int FS_OBJECT = 1; | ||
114 | |||
115 | /** | ||
116 | * The feature id for the '<em><b>Parent</b></em>' container reference. | ||
117 | * <!-- begin-user-doc --> | ||
118 | * <!-- end-user-doc --> | ||
119 | * @generated | ||
120 | * @ordered | ||
121 | */ | ||
122 | int FS_OBJECT__PARENT = 0; | ||
123 | |||
124 | /** | ||
125 | * The number of structural features of the '<em>FS Object</em>' class. | ||
126 | * <!-- begin-user-doc --> | ||
127 | * <!-- end-user-doc --> | ||
128 | * @generated | ||
129 | * @ordered | ||
130 | */ | ||
131 | int FS_OBJECT_FEATURE_COUNT = 1; | ||
132 | |||
133 | /** | ||
134 | * The number of operations of the '<em>FS Object</em>' class. | ||
135 | * <!-- begin-user-doc --> | ||
136 | * <!-- end-user-doc --> | ||
137 | * @generated | ||
138 | * @ordered | ||
139 | */ | ||
140 | int FS_OBJECT_OPERATION_COUNT = 0; | ||
141 | |||
142 | /** | ||
143 | * The meta object id for the '{@link hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.impl.DirImpl <em>Dir</em>}' class. | ||
144 | * <!-- begin-user-doc --> | ||
145 | * <!-- end-user-doc --> | ||
146 | * @see hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.impl.DirImpl | ||
147 | * @see hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.impl.FilesystemPackageImpl#getDir() | ||
148 | * @generated | ||
149 | */ | ||
150 | int DIR = 2; | ||
151 | |||
152 | /** | ||
153 | * The feature id for the '<em><b>Parent</b></em>' container reference. | ||
154 | * <!-- begin-user-doc --> | ||
155 | * <!-- end-user-doc --> | ||
156 | * @generated | ||
157 | * @ordered | ||
158 | */ | ||
159 | int DIR__PARENT = FS_OBJECT__PARENT; | ||
160 | |||
161 | /** | ||
162 | * The feature id for the '<em><b>Contents</b></em>' containment reference list. | ||
163 | * <!-- begin-user-doc --> | ||
164 | * <!-- end-user-doc --> | ||
165 | * @generated | ||
166 | * @ordered | ||
167 | */ | ||
168 | int DIR__CONTENTS = FS_OBJECT_FEATURE_COUNT + 0; | ||
169 | |||
170 | /** | ||
171 | * The number of structural features of the '<em>Dir</em>' class. | ||
172 | * <!-- begin-user-doc --> | ||
173 | * <!-- end-user-doc --> | ||
174 | * @generated | ||
175 | * @ordered | ||
176 | */ | ||
177 | int DIR_FEATURE_COUNT = FS_OBJECT_FEATURE_COUNT + 1; | ||
178 | |||
179 | /** | ||
180 | * The number of operations of the '<em>Dir</em>' class. | ||
181 | * <!-- begin-user-doc --> | ||
182 | * <!-- end-user-doc --> | ||
183 | * @generated | ||
184 | * @ordered | ||
185 | */ | ||
186 | int DIR_OPERATION_COUNT = FS_OBJECT_OPERATION_COUNT + 0; | ||
187 | |||
188 | /** | ||
189 | * The meta object id for the '{@link hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.impl.FileImpl <em>File</em>}' class. | ||
190 | * <!-- begin-user-doc --> | ||
191 | * <!-- end-user-doc --> | ||
192 | * @see hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.impl.FileImpl | ||
193 | * @see hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.impl.FilesystemPackageImpl#getFile() | ||
194 | * @generated | ||
195 | */ | ||
196 | int FILE = 3; | ||
197 | |||
198 | /** | ||
199 | * The feature id for the '<em><b>Parent</b></em>' container reference. | ||
200 | * <!-- begin-user-doc --> | ||
201 | * <!-- end-user-doc --> | ||
202 | * @generated | ||
203 | * @ordered | ||
204 | */ | ||
205 | int FILE__PARENT = FS_OBJECT__PARENT; | ||
206 | |||
207 | /** | ||
208 | * The number of structural features of the '<em>File</em>' class. | ||
209 | * <!-- begin-user-doc --> | ||
210 | * <!-- end-user-doc --> | ||
211 | * @generated | ||
212 | * @ordered | ||
213 | */ | ||
214 | int FILE_FEATURE_COUNT = FS_OBJECT_FEATURE_COUNT + 0; | ||
215 | |||
216 | /** | ||
217 | * The number of operations of the '<em>File</em>' class. | ||
218 | * <!-- begin-user-doc --> | ||
219 | * <!-- end-user-doc --> | ||
220 | * @generated | ||
221 | * @ordered | ||
222 | */ | ||
223 | int FILE_OPERATION_COUNT = FS_OBJECT_OPERATION_COUNT + 0; | ||
224 | |||
225 | /** | ||
226 | * The meta object id for the '{@link hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.impl.ModelImpl <em>Model</em>}' class. | ||
227 | * <!-- begin-user-doc --> | ||
228 | * <!-- end-user-doc --> | ||
229 | * @see hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.impl.ModelImpl | ||
230 | * @see hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.impl.FilesystemPackageImpl#getModel() | ||
231 | * @generated | ||
232 | */ | ||
233 | int MODEL = 4; | ||
234 | |||
235 | /** | ||
236 | * The feature id for the '<em><b>Filesystems</b></em>' containment reference. | ||
237 | * <!-- begin-user-doc --> | ||
238 | * <!-- end-user-doc --> | ||
239 | * @generated | ||
240 | * @ordered | ||
241 | */ | ||
242 | int MODEL__FILESYSTEMS = 0; | ||
243 | |||
244 | /** | ||
245 | * The feature id for the '<em><b>Other FS Objects</b></em>' containment reference list. | ||
246 | * <!-- begin-user-doc --> | ||
247 | * <!-- end-user-doc --> | ||
248 | * @generated | ||
249 | * @ordered | ||
250 | */ | ||
251 | int MODEL__OTHER_FS_OBJECTS = 1; | ||
252 | |||
253 | /** | ||
254 | * The number of structural features of the '<em>Model</em>' class. | ||
255 | * <!-- begin-user-doc --> | ||
256 | * <!-- end-user-doc --> | ||
257 | * @generated | ||
258 | * @ordered | ||
259 | */ | ||
260 | int MODEL_FEATURE_COUNT = 2; | ||
261 | |||
262 | /** | ||
263 | * The number of operations of the '<em>Model</em>' class. | ||
264 | * <!-- begin-user-doc --> | ||
265 | * <!-- end-user-doc --> | ||
266 | * @generated | ||
267 | * @ordered | ||
268 | */ | ||
269 | int MODEL_OPERATION_COUNT = 0; | ||
270 | |||
271 | |||
272 | /** | ||
273 | * Returns the meta object for class '{@link hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.FileSystem <em>File System</em>}'. | ||
274 | * <!-- begin-user-doc --> | ||
275 | * <!-- end-user-doc --> | ||
276 | * @return the meta object for class '<em>File System</em>'. | ||
277 | * @see hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.FileSystem | ||
278 | * @generated | ||
279 | */ | ||
280 | EClass getFileSystem(); | ||
281 | |||
282 | /** | ||
283 | * Returns the meta object for the containment reference '{@link hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.FileSystem#getRoot <em>Root</em>}'. | ||
284 | * <!-- begin-user-doc --> | ||
285 | * <!-- end-user-doc --> | ||
286 | * @return the meta object for the containment reference '<em>Root</em>'. | ||
287 | * @see hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.FileSystem#getRoot() | ||
288 | * @see #getFileSystem() | ||
289 | * @generated | ||
290 | */ | ||
291 | EReference getFileSystem_Root(); | ||
292 | |||
293 | /** | ||
294 | * Returns the meta object for the reference list '{@link hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.FileSystem#getLive <em>Live</em>}'. | ||
295 | * <!-- begin-user-doc --> | ||
296 | * <!-- end-user-doc --> | ||
297 | * @return the meta object for the reference list '<em>Live</em>'. | ||
298 | * @see hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.FileSystem#getLive() | ||
299 | * @see #getFileSystem() | ||
300 | * @generated | ||
301 | */ | ||
302 | EReference getFileSystem_Live(); | ||
303 | |||
304 | /** | ||
305 | * Returns the meta object for class '{@link hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.FSObject <em>FS Object</em>}'. | ||
306 | * <!-- begin-user-doc --> | ||
307 | * <!-- end-user-doc --> | ||
308 | * @return the meta object for class '<em>FS Object</em>'. | ||
309 | * @see hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.FSObject | ||
310 | * @generated | ||
311 | */ | ||
312 | EClass getFSObject(); | ||
313 | |||
314 | /** | ||
315 | * Returns the meta object for the container reference '{@link hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.FSObject#getParent <em>Parent</em>}'. | ||
316 | * <!-- begin-user-doc --> | ||
317 | * <!-- end-user-doc --> | ||
318 | * @return the meta object for the container reference '<em>Parent</em>'. | ||
319 | * @see hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.FSObject#getParent() | ||
320 | * @see #getFSObject() | ||
321 | * @generated | ||
322 | */ | ||
323 | EReference getFSObject_Parent(); | ||
324 | |||
325 | /** | ||
326 | * Returns the meta object for class '{@link hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.Dir <em>Dir</em>}'. | ||
327 | * <!-- begin-user-doc --> | ||
328 | * <!-- end-user-doc --> | ||
329 | * @return the meta object for class '<em>Dir</em>'. | ||
330 | * @see hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.Dir | ||
331 | * @generated | ||
332 | */ | ||
333 | EClass getDir(); | ||
334 | |||
335 | /** | ||
336 | * Returns the meta object for the containment reference list '{@link hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.Dir#getContents <em>Contents</em>}'. | ||
337 | * <!-- begin-user-doc --> | ||
338 | * <!-- end-user-doc --> | ||
339 | * @return the meta object for the containment reference list '<em>Contents</em>'. | ||
340 | * @see hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.Dir#getContents() | ||
341 | * @see #getDir() | ||
342 | * @generated | ||
343 | */ | ||
344 | EReference getDir_Contents(); | ||
345 | |||
346 | /** | ||
347 | * Returns the meta object for class '{@link hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.File <em>File</em>}'. | ||
348 | * <!-- begin-user-doc --> | ||
349 | * <!-- end-user-doc --> | ||
350 | * @return the meta object for class '<em>File</em>'. | ||
351 | * @see hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.File | ||
352 | * @generated | ||
353 | */ | ||
354 | EClass getFile(); | ||
355 | |||
356 | /** | ||
357 | * Returns the meta object for class '{@link hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.Model <em>Model</em>}'. | ||
358 | * <!-- begin-user-doc --> | ||
359 | * <!-- end-user-doc --> | ||
360 | * @return the meta object for class '<em>Model</em>'. | ||
361 | * @see hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.Model | ||
362 | * @generated | ||
363 | */ | ||
364 | EClass getModel(); | ||
365 | |||
366 | /** | ||
367 | * Returns the meta object for the containment reference '{@link hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.Model#getFilesystems <em>Filesystems</em>}'. | ||
368 | * <!-- begin-user-doc --> | ||
369 | * <!-- end-user-doc --> | ||
370 | * @return the meta object for the containment reference '<em>Filesystems</em>'. | ||
371 | * @see hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.Model#getFilesystems() | ||
372 | * @see #getModel() | ||
373 | * @generated | ||
374 | */ | ||
375 | EReference getModel_Filesystems(); | ||
376 | |||
377 | /** | ||
378 | * Returns the meta object for the containment reference list '{@link hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.Model#getOtherFSObjects <em>Other FS Objects</em>}'. | ||
379 | * <!-- begin-user-doc --> | ||
380 | * <!-- end-user-doc --> | ||
381 | * @return the meta object for the containment reference list '<em>Other FS Objects</em>'. | ||
382 | * @see hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.Model#getOtherFSObjects() | ||
383 | * @see #getModel() | ||
384 | * @generated | ||
385 | */ | ||
386 | EReference getModel_OtherFSObjects(); | ||
387 | |||
388 | /** | ||
389 | * Returns the factory that creates the instances of the model. | ||
390 | * <!-- begin-user-doc --> | ||
391 | * <!-- end-user-doc --> | ||
392 | * @return the factory that creates the instances of the model. | ||
393 | * @generated | ||
394 | */ | ||
395 | FilesystemFactory getFilesystemFactory(); | ||
396 | |||
397 | /** | ||
398 | * <!-- begin-user-doc --> | ||
399 | * Defines literals for the meta objects that represent | ||
400 | * <ul> | ||
401 | * <li>each class,</li> | ||
402 | * <li>each feature of each class,</li> | ||
403 | * <li>each operation of each class,</li> | ||
404 | * <li>each enum,</li> | ||
405 | * <li>and each data type</li> | ||
406 | * </ul> | ||
407 | * <!-- end-user-doc --> | ||
408 | * @generated | ||
409 | */ | ||
410 | interface Literals { | ||
411 | /** | ||
412 | * The meta object literal for the '{@link hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.impl.FileSystemImpl <em>File System</em>}' class. | ||
413 | * <!-- begin-user-doc --> | ||
414 | * <!-- end-user-doc --> | ||
415 | * @see hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.impl.FileSystemImpl | ||
416 | * @see hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.impl.FilesystemPackageImpl#getFileSystem() | ||
417 | * @generated | ||
418 | */ | ||
419 | EClass FILE_SYSTEM = eINSTANCE.getFileSystem(); | ||
420 | |||
421 | /** | ||
422 | * The meta object literal for the '<em><b>Root</b></em>' containment reference feature. | ||
423 | * <!-- begin-user-doc --> | ||
424 | * <!-- end-user-doc --> | ||
425 | * @generated | ||
426 | */ | ||
427 | EReference FILE_SYSTEM__ROOT = eINSTANCE.getFileSystem_Root(); | ||
428 | |||
429 | /** | ||
430 | * The meta object literal for the '<em><b>Live</b></em>' reference list feature. | ||
431 | * <!-- begin-user-doc --> | ||
432 | * <!-- end-user-doc --> | ||
433 | * @generated | ||
434 | */ | ||
435 | EReference FILE_SYSTEM__LIVE = eINSTANCE.getFileSystem_Live(); | ||
436 | |||
437 | /** | ||
438 | * The meta object literal for the '{@link hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.impl.FSObjectImpl <em>FS Object</em>}' class. | ||
439 | * <!-- begin-user-doc --> | ||
440 | * <!-- end-user-doc --> | ||
441 | * @see hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.impl.FSObjectImpl | ||
442 | * @see hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.impl.FilesystemPackageImpl#getFSObject() | ||
443 | * @generated | ||
444 | */ | ||
445 | EClass FS_OBJECT = eINSTANCE.getFSObject(); | ||
446 | |||
447 | /** | ||
448 | * The meta object literal for the '<em><b>Parent</b></em>' container reference feature. | ||
449 | * <!-- begin-user-doc --> | ||
450 | * <!-- end-user-doc --> | ||
451 | * @generated | ||
452 | */ | ||
453 | EReference FS_OBJECT__PARENT = eINSTANCE.getFSObject_Parent(); | ||
454 | |||
455 | /** | ||
456 | * The meta object literal for the '{@link hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.impl.DirImpl <em>Dir</em>}' class. | ||
457 | * <!-- begin-user-doc --> | ||
458 | * <!-- end-user-doc --> | ||
459 | * @see hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.impl.DirImpl | ||
460 | * @see hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.impl.FilesystemPackageImpl#getDir() | ||
461 | * @generated | ||
462 | */ | ||
463 | EClass DIR = eINSTANCE.getDir(); | ||
464 | |||
465 | /** | ||
466 | * The meta object literal for the '<em><b>Contents</b></em>' containment reference list feature. | ||
467 | * <!-- begin-user-doc --> | ||
468 | * <!-- end-user-doc --> | ||
469 | * @generated | ||
470 | */ | ||
471 | EReference DIR__CONTENTS = eINSTANCE.getDir_Contents(); | ||
472 | |||
473 | /** | ||
474 | * The meta object literal for the '{@link hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.impl.FileImpl <em>File</em>}' class. | ||
475 | * <!-- begin-user-doc --> | ||
476 | * <!-- end-user-doc --> | ||
477 | * @see hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.impl.FileImpl | ||
478 | * @see hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.impl.FilesystemPackageImpl#getFile() | ||
479 | * @generated | ||
480 | */ | ||
481 | EClass FILE = eINSTANCE.getFile(); | ||
482 | |||
483 | /** | ||
484 | * The meta object literal for the '{@link hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.impl.ModelImpl <em>Model</em>}' class. | ||
485 | * <!-- begin-user-doc --> | ||
486 | * <!-- end-user-doc --> | ||
487 | * @see hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.impl.ModelImpl | ||
488 | * @see hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.impl.FilesystemPackageImpl#getModel() | ||
489 | * @generated | ||
490 | */ | ||
491 | EClass MODEL = eINSTANCE.getModel(); | ||
492 | |||
493 | /** | ||
494 | * The meta object literal for the '<em><b>Filesystems</b></em>' containment reference feature. | ||
495 | * <!-- begin-user-doc --> | ||
496 | * <!-- end-user-doc --> | ||
497 | * @generated | ||
498 | */ | ||
499 | EReference MODEL__FILESYSTEMS = eINSTANCE.getModel_Filesystems(); | ||
500 | |||
501 | /** | ||
502 | * The meta object literal for the '<em><b>Other FS Objects</b></em>' containment reference list feature. | ||
503 | * <!-- begin-user-doc --> | ||
504 | * <!-- end-user-doc --> | ||
505 | * @generated | ||
506 | */ | ||
507 | EReference MODEL__OTHER_FS_OBJECTS = eINSTANCE.getModel_OtherFSObjects(); | ||
508 | |||
509 | } | ||
510 | |||
511 | } //FilesystemPackage | ||
diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/src/hu/bme/mit/inf/dslreasoner/domains/alloyexamples/Filesystem/Model.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/src/hu/bme/mit/inf/dslreasoner/domains/alloyexamples/Filesystem/Model.java new file mode 100644 index 00000000..c67a3c8a --- /dev/null +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/src/hu/bme/mit/inf/dslreasoner/domains/alloyexamples/Filesystem/Model.java | |||
@@ -0,0 +1,69 @@ | |||
1 | /** | ||
2 | */ | ||
3 | package hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem; | ||
4 | |||
5 | import org.eclipse.emf.common.util.EList; | ||
6 | |||
7 | import org.eclipse.emf.ecore.EObject; | ||
8 | |||
9 | /** | ||
10 | * <!-- begin-user-doc --> | ||
11 | * A representation of the model object '<em><b>Model</b></em>'. | ||
12 | * <!-- end-user-doc --> | ||
13 | * | ||
14 | * <p> | ||
15 | * The following features are supported: | ||
16 | * </p> | ||
17 | * <ul> | ||
18 | * <li>{@link hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.Model#getFilesystems <em>Filesystems</em>}</li> | ||
19 | * <li>{@link hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.Model#getOtherFSObjects <em>Other FS Objects</em>}</li> | ||
20 | * </ul> | ||
21 | * | ||
22 | * @see hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.FilesystemPackage#getModel() | ||
23 | * @model | ||
24 | * @generated | ||
25 | */ | ||
26 | public interface Model extends EObject { | ||
27 | /** | ||
28 | * Returns the value of the '<em><b>Filesystems</b></em>' containment reference. | ||
29 | * <!-- begin-user-doc --> | ||
30 | * <p> | ||
31 | * If the meaning of the '<em>Filesystems</em>' containment reference isn't clear, | ||
32 | * there really should be more of a description here... | ||
33 | * </p> | ||
34 | * <!-- end-user-doc --> | ||
35 | * @return the value of the '<em>Filesystems</em>' containment reference. | ||
36 | * @see #setFilesystems(FileSystem) | ||
37 | * @see hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.FilesystemPackage#getModel_Filesystems() | ||
38 | * @model containment="true" required="true" | ||
39 | * @generated | ||
40 | */ | ||
41 | FileSystem getFilesystems(); | ||
42 | |||
43 | /** | ||
44 | * Sets the value of the '{@link hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.Model#getFilesystems <em>Filesystems</em>}' containment reference. | ||
45 | * <!-- begin-user-doc --> | ||
46 | * <!-- end-user-doc --> | ||
47 | * @param value the new value of the '<em>Filesystems</em>' containment reference. | ||
48 | * @see #getFilesystems() | ||
49 | * @generated | ||
50 | */ | ||
51 | void setFilesystems(FileSystem value); | ||
52 | |||
53 | /** | ||
54 | * Returns the value of the '<em><b>Other FS Objects</b></em>' containment reference list. | ||
55 | * The list contents are of type {@link hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.FSObject}. | ||
56 | * <!-- begin-user-doc --> | ||
57 | * <p> | ||
58 | * If the meaning of the '<em>Other FS Objects</em>' containment reference list isn't clear, | ||
59 | * there really should be more of a description here... | ||
60 | * </p> | ||
61 | * <!-- end-user-doc --> | ||
62 | * @return the value of the '<em>Other FS Objects</em>' containment reference list. | ||
63 | * @see hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.FilesystemPackage#getModel_OtherFSObjects() | ||
64 | * @model containment="true" | ||
65 | * @generated | ||
66 | */ | ||
67 | EList<FSObject> getOtherFSObjects(); | ||
68 | |||
69 | } // Model | ||
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 | */ | ||
3 | package hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.impl; | ||
4 | |||
5 | import hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.Dir; | ||
6 | import hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.FSObject; | ||
7 | import hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.FilesystemPackage; | ||
8 | |||
9 | import java.util.Collection; | ||
10 | |||
11 | import org.eclipse.emf.common.notify.NotificationChain; | ||
12 | |||
13 | import org.eclipse.emf.common.util.EList; | ||
14 | |||
15 | import org.eclipse.emf.ecore.EClass; | ||
16 | import org.eclipse.emf.ecore.InternalEObject; | ||
17 | |||
18 | import org.eclipse.emf.ecore.util.EObjectContainmentWithInverseEList; | ||
19 | import 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 | */ | ||
34 | public 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 | */ | ||
3 | package hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.impl; | ||
4 | |||
5 | import hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.Dir; | ||
6 | import hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.FSObject; | ||
7 | import hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.FilesystemPackage; | ||
8 | |||
9 | import org.eclipse.emf.common.notify.Notification; | ||
10 | import org.eclipse.emf.common.notify.NotificationChain; | ||
11 | import org.eclipse.emf.ecore.EClass; | ||
12 | |||
13 | import org.eclipse.emf.ecore.InternalEObject; | ||
14 | import org.eclipse.emf.ecore.impl.ENotificationImpl; | ||
15 | import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; | ||
16 | import 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 | */ | ||
31 | public 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 | */ | ||
3 | package hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.impl; | ||
4 | |||
5 | import hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.File; | ||
6 | import hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.FilesystemPackage; | ||
7 | import 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 | */ | ||
16 | public 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 | */ | ||
3 | package hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.impl; | ||
4 | |||
5 | import hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.Dir; | ||
6 | import hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.FSObject; | ||
7 | import hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.FileSystem; | ||
8 | import hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.FilesystemPackage; | ||
9 | |||
10 | import org.eclipse.emf.common.notify.Notification; | ||
11 | import org.eclipse.emf.common.notify.NotificationChain; | ||
12 | |||
13 | import org.eclipse.emf.common.util.EList; | ||
14 | |||
15 | import org.eclipse.emf.ecore.EClass; | ||
16 | import org.eclipse.emf.ecore.EStructuralFeature; | ||
17 | import org.eclipse.emf.ecore.InternalEObject; | ||
18 | |||
19 | import org.eclipse.emf.ecore.impl.ENotificationImpl; | ||
20 | import 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 | */ | ||
36 | public 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 | */ | ||
3 | package hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.impl; | ||
4 | |||
5 | import hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.*; | ||
6 | |||
7 | import org.eclipse.emf.ecore.EClass; | ||
8 | import org.eclipse.emf.ecore.EObject; | ||
9 | import org.eclipse.emf.ecore.EPackage; | ||
10 | |||
11 | import org.eclipse.emf.ecore.impl.EFactoryImpl; | ||
12 | |||
13 | import 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 | */ | ||
21 | public 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 | */ | ||
3 | package hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.impl; | ||
4 | |||
5 | import hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.Dir; | ||
6 | import hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.FSObject; | ||
7 | import hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.File; | ||
8 | import hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.FileSystem; | ||
9 | import hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.FilesystemFactory; | ||
10 | import hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.FilesystemPackage; | ||
11 | import hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.Model; | ||
12 | |||
13 | import org.eclipse.emf.ecore.EClass; | ||
14 | import org.eclipse.emf.ecore.EPackage; | ||
15 | import org.eclipse.emf.ecore.EReference; | ||
16 | |||
17 | import 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 | */ | ||
25 | public 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 | */ | ||
3 | package hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.impl; | ||
4 | |||
5 | import hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.FSObject; | ||
6 | import hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.FileSystem; | ||
7 | import hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.FilesystemPackage; | ||
8 | import hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.Model; | ||
9 | |||
10 | import java.util.Collection; | ||
11 | |||
12 | import org.eclipse.emf.common.notify.Notification; | ||
13 | import org.eclipse.emf.common.notify.NotificationChain; | ||
14 | |||
15 | import org.eclipse.emf.common.util.EList; | ||
16 | |||
17 | import org.eclipse.emf.ecore.EClass; | ||
18 | import org.eclipse.emf.ecore.InternalEObject; | ||
19 | |||
20 | import org.eclipse.emf.ecore.impl.ENotificationImpl; | ||
21 | import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; | ||
22 | |||
23 | import org.eclipse.emf.ecore.util.EObjectContainmentEList; | ||
24 | import 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 | */ | ||
40 | public 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 | ||
diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/src/hu/bme/mit/inf/dslreasoner/domains/alloyexamples/Filesystem/util/FilesystemAdapterFactory.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/src/hu/bme/mit/inf/dslreasoner/domains/alloyexamples/Filesystem/util/FilesystemAdapterFactory.java new file mode 100644 index 00000000..dc87e685 --- /dev/null +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/src/hu/bme/mit/inf/dslreasoner/domains/alloyexamples/Filesystem/util/FilesystemAdapterFactory.java | |||
@@ -0,0 +1,192 @@ | |||
1 | /** | ||
2 | */ | ||
3 | package hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.util; | ||
4 | |||
5 | import hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.*; | ||
6 | |||
7 | import org.eclipse.emf.common.notify.Adapter; | ||
8 | import org.eclipse.emf.common.notify.Notifier; | ||
9 | |||
10 | import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl; | ||
11 | |||
12 | import org.eclipse.emf.ecore.EObject; | ||
13 | |||
14 | /** | ||
15 | * <!-- begin-user-doc --> | ||
16 | * The <b>Adapter Factory</b> for the model. | ||
17 | * It provides an adapter <code>createXXX</code> method for each class of the model. | ||
18 | * <!-- end-user-doc --> | ||
19 | * @see hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.FilesystemPackage | ||
20 | * @generated | ||
21 | */ | ||
22 | public class FilesystemAdapterFactory extends AdapterFactoryImpl { | ||
23 | /** | ||
24 | * The cached model package. | ||
25 | * <!-- begin-user-doc --> | ||
26 | * <!-- end-user-doc --> | ||
27 | * @generated | ||
28 | */ | ||
29 | protected static FilesystemPackage modelPackage; | ||
30 | |||
31 | /** | ||
32 | * Creates an instance of the adapter factory. | ||
33 | * <!-- begin-user-doc --> | ||
34 | * <!-- end-user-doc --> | ||
35 | * @generated | ||
36 | */ | ||
37 | public FilesystemAdapterFactory() { | ||
38 | if (modelPackage == null) { | ||
39 | modelPackage = FilesystemPackage.eINSTANCE; | ||
40 | } | ||
41 | } | ||
42 | |||
43 | /** | ||
44 | * Returns whether this factory is applicable for the type of the object. | ||
45 | * <!-- begin-user-doc --> | ||
46 | * This implementation returns <code>true</code> if the object is either the model's package or is an instance object of the model. | ||
47 | * <!-- end-user-doc --> | ||
48 | * @return whether this factory is applicable for the type of the object. | ||
49 | * @generated | ||
50 | */ | ||
51 | @Override | ||
52 | public boolean isFactoryForType(Object object) { | ||
53 | if (object == modelPackage) { | ||
54 | return true; | ||
55 | } | ||
56 | if (object instanceof EObject) { | ||
57 | return ((EObject)object).eClass().getEPackage() == modelPackage; | ||
58 | } | ||
59 | return false; | ||
60 | } | ||
61 | |||
62 | /** | ||
63 | * The switch that delegates to the <code>createXXX</code> methods. | ||
64 | * <!-- begin-user-doc --> | ||
65 | * <!-- end-user-doc --> | ||
66 | * @generated | ||
67 | */ | ||
68 | protected FilesystemSwitch<Adapter> modelSwitch = | ||
69 | new FilesystemSwitch<Adapter>() { | ||
70 | @Override | ||
71 | public Adapter caseFileSystem(FileSystem object) { | ||
72 | return createFileSystemAdapter(); | ||
73 | } | ||
74 | @Override | ||
75 | public Adapter caseFSObject(FSObject object) { | ||
76 | return createFSObjectAdapter(); | ||
77 | } | ||
78 | @Override | ||
79 | public Adapter caseDir(Dir object) { | ||
80 | return createDirAdapter(); | ||
81 | } | ||
82 | @Override | ||
83 | public Adapter caseFile(File object) { | ||
84 | return createFileAdapter(); | ||
85 | } | ||
86 | @Override | ||
87 | public Adapter caseModel(Model object) { | ||
88 | return createModelAdapter(); | ||
89 | } | ||
90 | @Override | ||
91 | public Adapter defaultCase(EObject object) { | ||
92 | return createEObjectAdapter(); | ||
93 | } | ||
94 | }; | ||
95 | |||
96 | /** | ||
97 | * Creates an adapter for the <code>target</code>. | ||
98 | * <!-- begin-user-doc --> | ||
99 | * <!-- end-user-doc --> | ||
100 | * @param target the object to adapt. | ||
101 | * @return the adapter for the <code>target</code>. | ||
102 | * @generated | ||
103 | */ | ||
104 | @Override | ||
105 | public Adapter createAdapter(Notifier target) { | ||
106 | return modelSwitch.doSwitch((EObject)target); | ||
107 | } | ||
108 | |||
109 | |||
110 | /** | ||
111 | * Creates a new adapter for an object of class '{@link hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.FileSystem <em>File System</em>}'. | ||
112 | * <!-- begin-user-doc --> | ||
113 | * This default implementation returns null so that we can easily ignore cases; | ||
114 | * it's useful to ignore a case when inheritance will catch all the cases anyway. | ||
115 | * <!-- end-user-doc --> | ||
116 | * @return the new adapter. | ||
117 | * @see hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.FileSystem | ||
118 | * @generated | ||
119 | */ | ||
120 | public Adapter createFileSystemAdapter() { | ||
121 | return null; | ||
122 | } | ||
123 | |||
124 | /** | ||
125 | * Creates a new adapter for an object of class '{@link hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.FSObject <em>FS Object</em>}'. | ||
126 | * <!-- begin-user-doc --> | ||
127 | * This default implementation returns null so that we can easily ignore cases; | ||
128 | * it's useful to ignore a case when inheritance will catch all the cases anyway. | ||
129 | * <!-- end-user-doc --> | ||
130 | * @return the new adapter. | ||
131 | * @see hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.FSObject | ||
132 | * @generated | ||
133 | */ | ||
134 | public Adapter createFSObjectAdapter() { | ||
135 | return null; | ||
136 | } | ||
137 | |||
138 | /** | ||
139 | * Creates a new adapter for an object of class '{@link hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.Dir <em>Dir</em>}'. | ||
140 | * <!-- begin-user-doc --> | ||
141 | * This default implementation returns null so that we can easily ignore cases; | ||
142 | * it's useful to ignore a case when inheritance will catch all the cases anyway. | ||
143 | * <!-- end-user-doc --> | ||
144 | * @return the new adapter. | ||
145 | * @see hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.Dir | ||
146 | * @generated | ||
147 | */ | ||
148 | public Adapter createDirAdapter() { | ||
149 | return null; | ||
150 | } | ||
151 | |||
152 | /** | ||
153 | * Creates a new adapter for an object of class '{@link hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.File <em>File</em>}'. | ||
154 | * <!-- begin-user-doc --> | ||
155 | * This default implementation returns null so that we can easily ignore cases; | ||
156 | * it's useful to ignore a case when inheritance will catch all the cases anyway. | ||
157 | * <!-- end-user-doc --> | ||
158 | * @return the new adapter. | ||
159 | * @see hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.File | ||
160 | * @generated | ||
161 | */ | ||
162 | public Adapter createFileAdapter() { | ||
163 | return null; | ||
164 | } | ||
165 | |||
166 | /** | ||
167 | * Creates a new adapter for an object of class '{@link hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.Model <em>Model</em>}'. | ||
168 | * <!-- begin-user-doc --> | ||
169 | * This default implementation returns null so that we can easily ignore cases; | ||
170 | * it's useful to ignore a case when inheritance will catch all the cases anyway. | ||
171 | * <!-- end-user-doc --> | ||
172 | * @return the new adapter. | ||
173 | * @see hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.Model | ||
174 | * @generated | ||
175 | */ | ||
176 | public Adapter createModelAdapter() { | ||
177 | return null; | ||
178 | } | ||
179 | |||
180 | /** | ||
181 | * Creates a new adapter for the default case. | ||
182 | * <!-- begin-user-doc --> | ||
183 | * This default implementation returns null. | ||
184 | * <!-- end-user-doc --> | ||
185 | * @return the new adapter. | ||
186 | * @generated | ||
187 | */ | ||
188 | public Adapter createEObjectAdapter() { | ||
189 | return null; | ||
190 | } | ||
191 | |||
192 | } //FilesystemAdapterFactory | ||
diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/src/hu/bme/mit/inf/dslreasoner/domains/alloyexamples/Filesystem/util/FilesystemSwitch.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/src/hu/bme/mit/inf/dslreasoner/domains/alloyexamples/Filesystem/util/FilesystemSwitch.java new file mode 100644 index 00000000..ce2079c8 --- /dev/null +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/src/hu/bme/mit/inf/dslreasoner/domains/alloyexamples/Filesystem/util/FilesystemSwitch.java | |||
@@ -0,0 +1,196 @@ | |||
1 | /** | ||
2 | */ | ||
3 | package hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.util; | ||
4 | |||
5 | import hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.*; | ||
6 | |||
7 | import org.eclipse.emf.ecore.EObject; | ||
8 | import org.eclipse.emf.ecore.EPackage; | ||
9 | |||
10 | import org.eclipse.emf.ecore.util.Switch; | ||
11 | |||
12 | /** | ||
13 | * <!-- begin-user-doc --> | ||
14 | * The <b>Switch</b> for the model's inheritance hierarchy. | ||
15 | * It supports the call {@link #doSwitch(EObject) doSwitch(object)} | ||
16 | * to invoke the <code>caseXXX</code> method for each class of the model, | ||
17 | * starting with the actual class of the object | ||
18 | * and proceeding up the inheritance hierarchy | ||
19 | * until a non-null result is returned, | ||
20 | * which is the result of the switch. | ||
21 | * <!-- end-user-doc --> | ||
22 | * @see hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.FilesystemPackage | ||
23 | * @generated | ||
24 | */ | ||
25 | public class FilesystemSwitch<T> extends Switch<T> { | ||
26 | /** | ||
27 | * The cached model package | ||
28 | * <!-- begin-user-doc --> | ||
29 | * <!-- end-user-doc --> | ||
30 | * @generated | ||
31 | */ | ||
32 | protected static FilesystemPackage modelPackage; | ||
33 | |||
34 | /** | ||
35 | * Creates an instance of the switch. | ||
36 | * <!-- begin-user-doc --> | ||
37 | * <!-- end-user-doc --> | ||
38 | * @generated | ||
39 | */ | ||
40 | public FilesystemSwitch() { | ||
41 | if (modelPackage == null) { | ||
42 | modelPackage = FilesystemPackage.eINSTANCE; | ||
43 | } | ||
44 | } | ||
45 | |||
46 | /** | ||
47 | * Checks whether this is a switch for the given package. | ||
48 | * <!-- begin-user-doc --> | ||
49 | * <!-- end-user-doc --> | ||
50 | * @param ePackage the package in question. | ||
51 | * @return whether this is a switch for the given package. | ||
52 | * @generated | ||
53 | */ | ||
54 | @Override | ||
55 | protected boolean isSwitchFor(EPackage ePackage) { | ||
56 | return ePackage == modelPackage; | ||
57 | } | ||
58 | |||
59 | /** | ||
60 | * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result. | ||
61 | * <!-- begin-user-doc --> | ||
62 | * <!-- end-user-doc --> | ||
63 | * @return the first non-null result returned by a <code>caseXXX</code> call. | ||
64 | * @generated | ||
65 | */ | ||
66 | @Override | ||
67 | protected T doSwitch(int classifierID, EObject theEObject) { | ||
68 | switch (classifierID) { | ||
69 | case FilesystemPackage.FILE_SYSTEM: { | ||
70 | FileSystem fileSystem = (FileSystem)theEObject; | ||
71 | T result = caseFileSystem(fileSystem); | ||
72 | if (result == null) result = defaultCase(theEObject); | ||
73 | return result; | ||
74 | } | ||
75 | case FilesystemPackage.FS_OBJECT: { | ||
76 | FSObject fsObject = (FSObject)theEObject; | ||
77 | T result = caseFSObject(fsObject); | ||
78 | if (result == null) result = defaultCase(theEObject); | ||
79 | return result; | ||
80 | } | ||
81 | case FilesystemPackage.DIR: { | ||
82 | Dir dir = (Dir)theEObject; | ||
83 | T result = caseDir(dir); | ||
84 | if (result == null) result = caseFSObject(dir); | ||
85 | if (result == null) result = defaultCase(theEObject); | ||
86 | return result; | ||
87 | } | ||
88 | case FilesystemPackage.FILE: { | ||
89 | File file = (File)theEObject; | ||
90 | T result = caseFile(file); | ||
91 | if (result == null) result = caseFSObject(file); | ||
92 | if (result == null) result = defaultCase(theEObject); | ||
93 | return result; | ||
94 | } | ||
95 | case FilesystemPackage.MODEL: { | ||
96 | Model model = (Model)theEObject; | ||
97 | T result = caseModel(model); | ||
98 | if (result == null) result = defaultCase(theEObject); | ||
99 | return result; | ||
100 | } | ||
101 | default: return defaultCase(theEObject); | ||
102 | } | ||
103 | } | ||
104 | |||
105 | /** | ||
106 | * Returns the result of interpreting the object as an instance of '<em>File System</em>'. | ||
107 | * <!-- begin-user-doc --> | ||
108 | * This implementation returns null; | ||
109 | * returning a non-null result will terminate the switch. | ||
110 | * <!-- end-user-doc --> | ||
111 | * @param object the target of the switch. | ||
112 | * @return the result of interpreting the object as an instance of '<em>File System</em>'. | ||
113 | * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) | ||
114 | * @generated | ||
115 | */ | ||
116 | public T caseFileSystem(FileSystem object) { | ||
117 | return null; | ||
118 | } | ||
119 | |||
120 | /** | ||
121 | * Returns the result of interpreting the object as an instance of '<em>FS Object</em>'. | ||
122 | * <!-- begin-user-doc --> | ||
123 | * This implementation returns null; | ||
124 | * returning a non-null result will terminate the switch. | ||
125 | * <!-- end-user-doc --> | ||
126 | * @param object the target of the switch. | ||
127 | * @return the result of interpreting the object as an instance of '<em>FS Object</em>'. | ||
128 | * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) | ||
129 | * @generated | ||
130 | */ | ||
131 | public T caseFSObject(FSObject object) { | ||
132 | return null; | ||
133 | } | ||
134 | |||
135 | /** | ||
136 | * Returns the result of interpreting the object as an instance of '<em>Dir</em>'. | ||
137 | * <!-- begin-user-doc --> | ||
138 | * This implementation returns null; | ||
139 | * returning a non-null result will terminate the switch. | ||
140 | * <!-- end-user-doc --> | ||
141 | * @param object the target of the switch. | ||
142 | * @return the result of interpreting the object as an instance of '<em>Dir</em>'. | ||
143 | * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) | ||
144 | * @generated | ||
145 | */ | ||
146 | public T caseDir(Dir object) { | ||
147 | return null; | ||
148 | } | ||
149 | |||
150 | /** | ||
151 | * Returns the result of interpreting the object as an instance of '<em>File</em>'. | ||
152 | * <!-- begin-user-doc --> | ||
153 | * This implementation returns null; | ||
154 | * returning a non-null result will terminate the switch. | ||
155 | * <!-- end-user-doc --> | ||
156 | * @param object the target of the switch. | ||
157 | * @return the result of interpreting the object as an instance of '<em>File</em>'. | ||
158 | * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) | ||
159 | * @generated | ||
160 | */ | ||
161 | public T caseFile(File object) { | ||
162 | return null; | ||
163 | } | ||
164 | |||
165 | /** | ||
166 | * Returns the result of interpreting the object as an instance of '<em>Model</em>'. | ||
167 | * <!-- begin-user-doc --> | ||
168 | * This implementation returns null; | ||
169 | * returning a non-null result will terminate the switch. | ||
170 | * <!-- end-user-doc --> | ||
171 | * @param object the target of the switch. | ||
172 | * @return the result of interpreting the object as an instance of '<em>Model</em>'. | ||
173 | * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) | ||
174 | * @generated | ||
175 | */ | ||
176 | public T caseModel(Model object) { | ||
177 | return null; | ||
178 | } | ||
179 | |||
180 | /** | ||
181 | * Returns the result of interpreting the object as an instance of '<em>EObject</em>'. | ||
182 | * <!-- begin-user-doc --> | ||
183 | * This implementation returns null; | ||
184 | * returning a non-null result will terminate the switch, but this is the last case anyway. | ||
185 | * <!-- end-user-doc --> | ||
186 | * @param object the target of the switch. | ||
187 | * @return the result of interpreting the object as an instance of '<em>EObject</em>'. | ||
188 | * @see #doSwitch(org.eclipse.emf.ecore.EObject) | ||
189 | * @generated | ||
190 | */ | ||
191 | @Override | ||
192 | public T defaultCase(EObject object) { | ||
193 | return null; | ||
194 | } | ||
195 | |||
196 | } //FilesystemSwitch | ||