aboutsummaryrefslogtreecommitdiffstats
path: root/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/filesystem
diff options
context:
space:
mode:
Diffstat (limited to 'Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/filesystem')
-rw-r--r--Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/filesystem/Dir.java42
-rw-r--r--Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/filesystem/FSObject.java52
-rw-r--r--Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/filesystem/File.java17
-rw-r--r--Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/filesystem/FileSystem.java70
-rw-r--r--Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/filesystem/Model.java69
-rw-r--r--Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/filesystem/filesystemFactory.java69
-rw-r--r--Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/filesystem/filesystemPackage.java511
-rw-r--r--Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/filesystem/impl/DirImpl.java165
-rw-r--r--Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/filesystem/impl/FSObjectImpl.java196
-rw-r--r--Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/filesystem/impl/FileImpl.java37
-rw-r--r--Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/filesystem/impl/FileSystemImpl.java205
-rw-r--r--Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/filesystem/impl/ModelImpl.java221
-rw-r--r--Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/filesystem/impl/filesystemFactoryImpl.java128
-rw-r--r--Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/filesystem/impl/filesystemPackageImpl.java356
-rw-r--r--Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/filesystem/queries/FileSystem.vql24
-rw-r--r--Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/filesystem/util/filesystemAdapterFactory.java192
-rw-r--r--Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/filesystem/util/filesystemSwitch.java196
17 files changed, 2550 insertions, 0 deletions
diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/filesystem/Dir.java b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/filesystem/Dir.java
new file mode 100644
index 00000000..03290097
--- /dev/null
+++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/filesystem/Dir.java
@@ -0,0 +1,42 @@
1/**
2 */
3package ca.mcgill.ecse.dslreasoner.standalone.test.filesystem;
4
5import 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 ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.Dir#getContents <em>Contents</em>}</li>
17 * </ul>
18 *
19 * @see ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.filesystemPackage#getDir()
20 * @model
21 * @generated
22 */
23public 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 ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.FSObject}.
27 * It is bidirectional and its opposite is '{@link ca.mcgill.ecse.dslreasoner.standalone.test.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 ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.filesystemPackage#getDir_Contents()
36 * @see ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.FSObject#getParent
37 * @model opposite="parent" containment="true"
38 * @generated
39 */
40 EList<FSObject> getContents();
41
42} // Dir
diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/filesystem/FSObject.java b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/filesystem/FSObject.java
new file mode 100644
index 00000000..87e4e4df
--- /dev/null
+++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/filesystem/FSObject.java
@@ -0,0 +1,52 @@
1/**
2 */
3package ca.mcgill.ecse.dslreasoner.standalone.test.filesystem;
4
5import 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 ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.FSObject#getParent <em>Parent</em>}</li>
17 * </ul>
18 *
19 * @see ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.filesystemPackage#getFSObject()
20 * @model abstract="true"
21 * @generated
22 */
23public interface FSObject extends EObject {
24 /**
25 * Returns the value of the '<em><b>Parent</b></em>' container reference.
26 * It is bidirectional and its opposite is '{@link ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.Dir#getContents <em>Contents</em>}'.
27 * <!-- begin-user-doc -->
28 * <p>
29 * If the meaning of the '<em>Parent</em>' container reference isn't clear,
30 * there really should be more of a description here...
31 * </p>
32 * <!-- end-user-doc -->
33 * @return the value of the '<em>Parent</em>' container reference.
34 * @see #setParent(Dir)
35 * @see ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.filesystemPackage#getFSObject_Parent()
36 * @see ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.Dir#getContents
37 * @model opposite="contents" transient="false"
38 * @generated
39 */
40 Dir getParent();
41
42 /**
43 * Sets the value of the '{@link ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.FSObject#getParent <em>Parent</em>}' container reference.
44 * <!-- begin-user-doc -->
45 * <!-- end-user-doc -->
46 * @param value the new value of the '<em>Parent</em>' container reference.
47 * @see #getParent()
48 * @generated
49 */
50 void setParent(Dir value);
51
52} // FSObject
diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/filesystem/File.java b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/filesystem/File.java
new file mode 100644
index 00000000..f829076c
--- /dev/null
+++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/filesystem/File.java
@@ -0,0 +1,17 @@
1/**
2 */
3package ca.mcgill.ecse.dslreasoner.standalone.test.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 ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.filesystemPackage#getFile()
13 * @model
14 * @generated
15 */
16public interface File extends FSObject {
17} // File
diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/filesystem/FileSystem.java b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/filesystem/FileSystem.java
new file mode 100644
index 00000000..c1c75043
--- /dev/null
+++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/filesystem/FileSystem.java
@@ -0,0 +1,70 @@
1/**
2 */
3package ca.mcgill.ecse.dslreasoner.standalone.test.filesystem;
4
5import org.eclipse.emf.common.util.EList;
6
7import 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 ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.FileSystem#getRoot <em>Root</em>}</li>
19 * <li>{@link ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.FileSystem#getLive <em>Live</em>}</li>
20 * </ul>
21 *
22 * @see ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.filesystemPackage#getFileSystem()
23 * @model
24 * @generated
25 */
26public 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 ca.mcgill.ecse.dslreasoner.standalone.test.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 ca.mcgill.ecse.dslreasoner.standalone.test.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 ca.mcgill.ecse.dslreasoner.standalone.test.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 ca.mcgill.ecse.dslreasoner.standalone.test.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/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/filesystem/Model.java b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/filesystem/Model.java
new file mode 100644
index 00000000..e75bd41a
--- /dev/null
+++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/filesystem/Model.java
@@ -0,0 +1,69 @@
1/**
2 */
3package ca.mcgill.ecse.dslreasoner.standalone.test.filesystem;
4
5import org.eclipse.emf.common.util.EList;
6
7import 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 ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.Model#getFilesystems <em>Filesystems</em>}</li>
19 * <li>{@link ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.Model#getOtherFSObjects <em>Other FS Objects</em>}</li>
20 * </ul>
21 *
22 * @see ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.filesystemPackage#getModel()
23 * @model
24 * @generated
25 */
26public 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 ca.mcgill.ecse.dslreasoner.standalone.test.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 ca.mcgill.ecse.dslreasoner.standalone.test.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 ca.mcgill.ecse.dslreasoner.standalone.test.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 ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.filesystemPackage#getModel_OtherFSObjects()
64 * @model containment="true"
65 * @generated
66 */
67 EList<FSObject> getOtherFSObjects();
68
69} // Model
diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/filesystem/filesystemFactory.java b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/filesystem/filesystemFactory.java
new file mode 100644
index 00000000..401becfb
--- /dev/null
+++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/filesystem/filesystemFactory.java
@@ -0,0 +1,69 @@
1/**
2 */
3package ca.mcgill.ecse.dslreasoner.standalone.test.filesystem;
4
5import 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 ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.filesystemPackage
13 * @generated
14 */
15public 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 = ca.mcgill.ecse.dslreasoner.standalone.test.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/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/filesystem/filesystemPackage.java b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/filesystem/filesystemPackage.java
new file mode 100644
index 00000000..08133f96
--- /dev/null
+++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/filesystem/filesystemPackage.java
@@ -0,0 +1,511 @@
1/**
2 */
3package ca.mcgill.ecse.dslreasoner.standalone.test.filesystem;
4
5import org.eclipse.emf.ecore.EClass;
6import org.eclipse.emf.ecore.EPackage;
7import 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 ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.filesystemFactory
22 * @model kind="package"
23 * annotation="http://www.eclipse.org/emf/2002/Ecore settingDelegates='org.eclipse.viatra.query.querybasedfeature'"
24 * @generated
25 */
26public 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 = "FileSystemMetamodel";
42
43 /**
44 * The package namespace name.
45 * <!-- begin-user-doc -->
46 * <!-- end-user-doc -->
47 * @generated
48 */
49 String eNS_PREFIX = "filesystem";
50
51 /**
52 * The singleton instance of the package.
53 * <!-- begin-user-doc -->
54 * <!-- end-user-doc -->
55 * @generated
56 */
57 filesystemPackage eINSTANCE = ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.impl.filesystemPackageImpl.init();
58
59 /**
60 * The meta object id for the '{@link ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.impl.FileSystemImpl <em>File System</em>}' class.
61 * <!-- begin-user-doc -->
62 * <!-- end-user-doc -->
63 * @see ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.impl.FileSystemImpl
64 * @see ca.mcgill.ecse.dslreasoner.standalone.test.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 ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.impl.FSObjectImpl <em>FS Object</em>}' class.
107 * <!-- begin-user-doc -->
108 * <!-- end-user-doc -->
109 * @see ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.impl.FSObjectImpl
110 * @see ca.mcgill.ecse.dslreasoner.standalone.test.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 ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.impl.DirImpl <em>Dir</em>}' class.
144 * <!-- begin-user-doc -->
145 * <!-- end-user-doc -->
146 * @see ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.impl.DirImpl
147 * @see ca.mcgill.ecse.dslreasoner.standalone.test.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 ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.impl.FileImpl <em>File</em>}' class.
190 * <!-- begin-user-doc -->
191 * <!-- end-user-doc -->
192 * @see ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.impl.FileImpl
193 * @see ca.mcgill.ecse.dslreasoner.standalone.test.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 ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.impl.ModelImpl <em>Model</em>}' class.
227 * <!-- begin-user-doc -->
228 * <!-- end-user-doc -->
229 * @see ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.impl.ModelImpl
230 * @see ca.mcgill.ecse.dslreasoner.standalone.test.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 ca.mcgill.ecse.dslreasoner.standalone.test.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 ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.FileSystem
278 * @generated
279 */
280 EClass getFileSystem();
281
282 /**
283 * Returns the meta object for the containment reference '{@link ca.mcgill.ecse.dslreasoner.standalone.test.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 ca.mcgill.ecse.dslreasoner.standalone.test.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 ca.mcgill.ecse.dslreasoner.standalone.test.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 ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.FileSystem#getLive()
299 * @see #getFileSystem()
300 * @generated
301 */
302 EReference getFileSystem_Live();
303
304 /**
305 * Returns the meta object for class '{@link ca.mcgill.ecse.dslreasoner.standalone.test.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 ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.FSObject
310 * @generated
311 */
312 EClass getFSObject();
313
314 /**
315 * Returns the meta object for the container reference '{@link ca.mcgill.ecse.dslreasoner.standalone.test.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 ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.FSObject#getParent()
320 * @see #getFSObject()
321 * @generated
322 */
323 EReference getFSObject_Parent();
324
325 /**
326 * Returns the meta object for class '{@link ca.mcgill.ecse.dslreasoner.standalone.test.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 ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.Dir
331 * @generated
332 */
333 EClass getDir();
334
335 /**
336 * Returns the meta object for the containment reference list '{@link ca.mcgill.ecse.dslreasoner.standalone.test.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 ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.Dir#getContents()
341 * @see #getDir()
342 * @generated
343 */
344 EReference getDir_Contents();
345
346 /**
347 * Returns the meta object for class '{@link ca.mcgill.ecse.dslreasoner.standalone.test.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 ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.File
352 * @generated
353 */
354 EClass getFile();
355
356 /**
357 * Returns the meta object for class '{@link ca.mcgill.ecse.dslreasoner.standalone.test.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 ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.Model
362 * @generated
363 */
364 EClass getModel();
365
366 /**
367 * Returns the meta object for the containment reference '{@link ca.mcgill.ecse.dslreasoner.standalone.test.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 ca.mcgill.ecse.dslreasoner.standalone.test.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 ca.mcgill.ecse.dslreasoner.standalone.test.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 ca.mcgill.ecse.dslreasoner.standalone.test.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 ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.impl.FileSystemImpl <em>File System</em>}' class.
413 * <!-- begin-user-doc -->
414 * <!-- end-user-doc -->
415 * @see ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.impl.FileSystemImpl
416 * @see ca.mcgill.ecse.dslreasoner.standalone.test.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 ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.impl.FSObjectImpl <em>FS Object</em>}' class.
439 * <!-- begin-user-doc -->
440 * <!-- end-user-doc -->
441 * @see ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.impl.FSObjectImpl
442 * @see ca.mcgill.ecse.dslreasoner.standalone.test.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 ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.impl.DirImpl <em>Dir</em>}' class.
457 * <!-- begin-user-doc -->
458 * <!-- end-user-doc -->
459 * @see ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.impl.DirImpl
460 * @see ca.mcgill.ecse.dslreasoner.standalone.test.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 ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.impl.FileImpl <em>File</em>}' class.
475 * <!-- begin-user-doc -->
476 * <!-- end-user-doc -->
477 * @see ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.impl.FileImpl
478 * @see ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.impl.filesystemPackageImpl#getFile()
479 * @generated
480 */
481 EClass FILE = eINSTANCE.getFile();
482
483 /**
484 * The meta object literal for the '{@link ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.impl.ModelImpl <em>Model</em>}' class.
485 * <!-- begin-user-doc -->
486 * <!-- end-user-doc -->
487 * @see ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.impl.ModelImpl
488 * @see ca.mcgill.ecse.dslreasoner.standalone.test.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/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/filesystem/impl/DirImpl.java b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/filesystem/impl/DirImpl.java
new file mode 100644
index 00000000..2e2fbcba
--- /dev/null
+++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/filesystem/impl/DirImpl.java
@@ -0,0 +1,165 @@
1/**
2 */
3package ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.impl;
4
5import ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.Dir;
6import ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.FSObject;
7import ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.filesystemPackage;
8
9import java.util.Collection;
10
11import org.eclipse.emf.common.notify.NotificationChain;
12
13import org.eclipse.emf.common.util.EList;
14
15import org.eclipse.emf.ecore.EClass;
16import org.eclipse.emf.ecore.InternalEObject;
17
18import org.eclipse.emf.ecore.util.EObjectContainmentWithInverseEList;
19import org.eclipse.emf.ecore.util.InternalEList;
20
21/**
22 * <!-- begin-user-doc -->
23 * An implementation of the model object '<em><b>Dir</b></em>'.
24 * <!-- end-user-doc -->
25 * <p>
26 * The following features are implemented:
27 * </p>
28 * <ul>
29 * <li>{@link ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.impl.DirImpl#getContents <em>Contents</em>}</li>
30 * </ul>
31 *
32 * @generated
33 */
34public class DirImpl extends FSObjectImpl implements Dir {
35 /**
36 * The cached value of the '{@link #getContents() <em>Contents</em>}' containment reference list.
37 * <!-- begin-user-doc -->
38 * <!-- end-user-doc -->
39 * @see #getContents()
40 * @generated
41 * @ordered
42 */
43 protected EList<FSObject> contents;
44
45 /**
46 * <!-- begin-user-doc -->
47 * <!-- end-user-doc -->
48 * @generated
49 */
50 protected DirImpl() {
51 super();
52 }
53
54 /**
55 * <!-- begin-user-doc -->
56 * <!-- end-user-doc -->
57 * @generated
58 */
59 @Override
60 protected EClass eStaticClass() {
61 return filesystemPackage.Literals.DIR;
62 }
63
64 /**
65 * <!-- begin-user-doc -->
66 * <!-- end-user-doc -->
67 * @generated
68 */
69 public EList<FSObject> getContents() {
70 if (contents == null) {
71 contents = new EObjectContainmentWithInverseEList<FSObject>(FSObject.class, this, filesystemPackage.DIR__CONTENTS, filesystemPackage.FS_OBJECT__PARENT);
72 }
73 return contents;
74 }
75
76 /**
77 * <!-- begin-user-doc -->
78 * <!-- end-user-doc -->
79 * @generated
80 */
81 @SuppressWarnings("unchecked")
82 @Override
83 public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
84 switch (featureID) {
85 case filesystemPackage.DIR__CONTENTS:
86 return ((InternalEList<InternalEObject>)(InternalEList<?>)getContents()).basicAdd(otherEnd, msgs);
87 }
88 return super.eInverseAdd(otherEnd, featureID, msgs);
89 }
90
91 /**
92 * <!-- begin-user-doc -->
93 * <!-- end-user-doc -->
94 * @generated
95 */
96 @Override
97 public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
98 switch (featureID) {
99 case filesystemPackage.DIR__CONTENTS:
100 return ((InternalEList<?>)getContents()).basicRemove(otherEnd, msgs);
101 }
102 return super.eInverseRemove(otherEnd, featureID, msgs);
103 }
104
105 /**
106 * <!-- begin-user-doc -->
107 * <!-- end-user-doc -->
108 * @generated
109 */
110 @Override
111 public Object eGet(int featureID, boolean resolve, boolean coreType) {
112 switch (featureID) {
113 case filesystemPackage.DIR__CONTENTS:
114 return getContents();
115 }
116 return super.eGet(featureID, resolve, coreType);
117 }
118
119 /**
120 * <!-- begin-user-doc -->
121 * <!-- end-user-doc -->
122 * @generated
123 */
124 @SuppressWarnings("unchecked")
125 @Override
126 public void eSet(int featureID, Object newValue) {
127 switch (featureID) {
128 case filesystemPackage.DIR__CONTENTS:
129 getContents().clear();
130 getContents().addAll((Collection<? extends FSObject>)newValue);
131 return;
132 }
133 super.eSet(featureID, newValue);
134 }
135
136 /**
137 * <!-- begin-user-doc -->
138 * <!-- end-user-doc -->
139 * @generated
140 */
141 @Override
142 public void eUnset(int featureID) {
143 switch (featureID) {
144 case filesystemPackage.DIR__CONTENTS:
145 getContents().clear();
146 return;
147 }
148 super.eUnset(featureID);
149 }
150
151 /**
152 * <!-- begin-user-doc -->
153 * <!-- end-user-doc -->
154 * @generated
155 */
156 @Override
157 public boolean eIsSet(int featureID) {
158 switch (featureID) {
159 case filesystemPackage.DIR__CONTENTS:
160 return contents != null && !contents.isEmpty();
161 }
162 return super.eIsSet(featureID);
163 }
164
165} //DirImpl
diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/filesystem/impl/FSObjectImpl.java b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/filesystem/impl/FSObjectImpl.java
new file mode 100644
index 00000000..25ea1fbb
--- /dev/null
+++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/filesystem/impl/FSObjectImpl.java
@@ -0,0 +1,196 @@
1/**
2 */
3package ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.impl;
4
5import ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.Dir;
6import ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.FSObject;
7import ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.filesystemPackage;
8
9import org.eclipse.emf.common.notify.Notification;
10import org.eclipse.emf.common.notify.NotificationChain;
11
12import org.eclipse.emf.ecore.EClass;
13import org.eclipse.emf.ecore.InternalEObject;
14
15import org.eclipse.emf.ecore.impl.ENotificationImpl;
16import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
17
18import org.eclipse.emf.ecore.util.EcoreUtil;
19
20/**
21 * <!-- begin-user-doc -->
22 * An implementation of the model object '<em><b>FS Object</b></em>'.
23 * <!-- end-user-doc -->
24 * <p>
25 * The following features are implemented:
26 * </p>
27 * <ul>
28 * <li>{@link ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.impl.FSObjectImpl#getParent <em>Parent</em>}</li>
29 * </ul>
30 *
31 * @generated
32 */
33public abstract class FSObjectImpl extends MinimalEObjectImpl.Container implements FSObject {
34 /**
35 * <!-- begin-user-doc -->
36 * <!-- end-user-doc -->
37 * @generated
38 */
39 protected FSObjectImpl() {
40 super();
41 }
42
43 /**
44 * <!-- begin-user-doc -->
45 * <!-- end-user-doc -->
46 * @generated
47 */
48 @Override
49 protected EClass eStaticClass() {
50 return filesystemPackage.Literals.FS_OBJECT;
51 }
52
53 /**
54 * <!-- begin-user-doc -->
55 * <!-- end-user-doc -->
56 * @generated
57 */
58 public Dir getParent() {
59 if (eContainerFeatureID() != filesystemPackage.FS_OBJECT__PARENT) return null;
60 return (Dir)eInternalContainer();
61 }
62
63 /**
64 * <!-- begin-user-doc -->
65 * <!-- end-user-doc -->
66 * @generated
67 */
68 public NotificationChain basicSetParent(Dir newParent, NotificationChain msgs) {
69 msgs = eBasicSetContainer((InternalEObject)newParent, filesystemPackage.FS_OBJECT__PARENT, msgs);
70 return msgs;
71 }
72
73 /**
74 * <!-- begin-user-doc -->
75 * <!-- end-user-doc -->
76 * @generated
77 */
78 public void setParent(Dir newParent) {
79 if (newParent != eInternalContainer() || (eContainerFeatureID() != filesystemPackage.FS_OBJECT__PARENT && newParent != null)) {
80 if (EcoreUtil.isAncestor(this, newParent))
81 throw new IllegalArgumentException("Recursive containment not allowed for " + toString());
82 NotificationChain msgs = null;
83 if (eInternalContainer() != null)
84 msgs = eBasicRemoveFromContainer(msgs);
85 if (newParent != null)
86 msgs = ((InternalEObject)newParent).eInverseAdd(this, filesystemPackage.DIR__CONTENTS, Dir.class, msgs);
87 msgs = basicSetParent(newParent, msgs);
88 if (msgs != null) msgs.dispatch();
89 }
90 else if (eNotificationRequired())
91 eNotify(new ENotificationImpl(this, Notification.SET, filesystemPackage.FS_OBJECT__PARENT, newParent, newParent));
92 }
93
94 /**
95 * <!-- begin-user-doc -->
96 * <!-- end-user-doc -->
97 * @generated
98 */
99 @Override
100 public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
101 switch (featureID) {
102 case filesystemPackage.FS_OBJECT__PARENT:
103 if (eInternalContainer() != null)
104 msgs = eBasicRemoveFromContainer(msgs);
105 return basicSetParent((Dir)otherEnd, msgs);
106 }
107 return super.eInverseAdd(otherEnd, featureID, msgs);
108 }
109
110 /**
111 * <!-- begin-user-doc -->
112 * <!-- end-user-doc -->
113 * @generated
114 */
115 @Override
116 public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
117 switch (featureID) {
118 case filesystemPackage.FS_OBJECT__PARENT:
119 return basicSetParent(null, msgs);
120 }
121 return super.eInverseRemove(otherEnd, featureID, msgs);
122 }
123
124 /**
125 * <!-- begin-user-doc -->
126 * <!-- end-user-doc -->
127 * @generated
128 */
129 @Override
130 public NotificationChain eBasicRemoveFromContainerFeature(NotificationChain msgs) {
131 switch (eContainerFeatureID()) {
132 case filesystemPackage.FS_OBJECT__PARENT:
133 return eInternalContainer().eInverseRemove(this, filesystemPackage.DIR__CONTENTS, Dir.class, msgs);
134 }
135 return super.eBasicRemoveFromContainerFeature(msgs);
136 }
137
138 /**
139 * <!-- begin-user-doc -->
140 * <!-- end-user-doc -->
141 * @generated
142 */
143 @Override
144 public Object eGet(int featureID, boolean resolve, boolean coreType) {
145 switch (featureID) {
146 case filesystemPackage.FS_OBJECT__PARENT:
147 return getParent();
148 }
149 return super.eGet(featureID, resolve, coreType);
150 }
151
152 /**
153 * <!-- begin-user-doc -->
154 * <!-- end-user-doc -->
155 * @generated
156 */
157 @Override
158 public void eSet(int featureID, Object newValue) {
159 switch (featureID) {
160 case filesystemPackage.FS_OBJECT__PARENT:
161 setParent((Dir)newValue);
162 return;
163 }
164 super.eSet(featureID, newValue);
165 }
166
167 /**
168 * <!-- begin-user-doc -->
169 * <!-- end-user-doc -->
170 * @generated
171 */
172 @Override
173 public void eUnset(int featureID) {
174 switch (featureID) {
175 case filesystemPackage.FS_OBJECT__PARENT:
176 setParent((Dir)null);
177 return;
178 }
179 super.eUnset(featureID);
180 }
181
182 /**
183 * <!-- begin-user-doc -->
184 * <!-- end-user-doc -->
185 * @generated
186 */
187 @Override
188 public boolean eIsSet(int featureID) {
189 switch (featureID) {
190 case filesystemPackage.FS_OBJECT__PARENT:
191 return getParent() != null;
192 }
193 return super.eIsSet(featureID);
194 }
195
196} //FSObjectImpl
diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/filesystem/impl/FileImpl.java b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/filesystem/impl/FileImpl.java
new file mode 100644
index 00000000..29eb47fd
--- /dev/null
+++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/filesystem/impl/FileImpl.java
@@ -0,0 +1,37 @@
1/**
2 */
3package ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.impl;
4
5import ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.File;
6import ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.filesystemPackage;
7
8import org.eclipse.emf.ecore.EClass;
9
10/**
11 * <!-- begin-user-doc -->
12 * An implementation of the model object '<em><b>File</b></em>'.
13 * <!-- end-user-doc -->
14 *
15 * @generated
16 */
17public class FileImpl extends FSObjectImpl implements File {
18 /**
19 * <!-- begin-user-doc -->
20 * <!-- end-user-doc -->
21 * @generated
22 */
23 protected FileImpl() {
24 super();
25 }
26
27 /**
28 * <!-- begin-user-doc -->
29 * <!-- end-user-doc -->
30 * @generated
31 */
32 @Override
33 protected EClass eStaticClass() {
34 return filesystemPackage.Literals.FILE;
35 }
36
37} //FileImpl
diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/filesystem/impl/FileSystemImpl.java b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/filesystem/impl/FileSystemImpl.java
new file mode 100644
index 00000000..8bbc6a74
--- /dev/null
+++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/filesystem/impl/FileSystemImpl.java
@@ -0,0 +1,205 @@
1/**
2 */
3package ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.impl;
4
5import ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.Dir;
6import ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.FSObject;
7import ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.FileSystem;
8import ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.filesystemPackage;
9
10import org.eclipse.emf.common.notify.Notification;
11import org.eclipse.emf.common.notify.NotificationChain;
12
13import org.eclipse.emf.common.util.EList;
14
15import org.eclipse.emf.ecore.EClass;
16import org.eclipse.emf.ecore.EStructuralFeature;
17import org.eclipse.emf.ecore.InternalEObject;
18
19import org.eclipse.emf.ecore.impl.ENotificationImpl;
20import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
21
22/**
23 * <!-- begin-user-doc -->
24 * An implementation of the model object '<em><b>File System</b></em>'.
25 * <!-- end-user-doc -->
26 * <p>
27 * The following features are implemented:
28 * </p>
29 * <ul>
30 * <li>{@link ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.impl.FileSystemImpl#getRoot <em>Root</em>}</li>
31 * <li>{@link ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.impl.FileSystemImpl#getLive <em>Live</em>}</li>
32 * </ul>
33 *
34 * @generated
35 */
36public class FileSystemImpl extends MinimalEObjectImpl.Container implements FileSystem {
37 /**
38 * The cached value of the '{@link #getRoot() <em>Root</em>}' containment reference.
39 * <!-- begin-user-doc -->
40 * <!-- end-user-doc -->
41 * @see #getRoot()
42 * @generated
43 * @ordered
44 */
45 protected Dir root;
46
47 /**
48 * The cached setting delegate for the '{@link #getLive() <em>Live</em>}' reference list.
49 * <!-- begin-user-doc -->
50 * <!-- end-user-doc -->
51 * @see #getLive()
52 * @generated
53 * @ordered
54 */
55 protected EStructuralFeature.Internal.SettingDelegate LIVE__ESETTING_DELEGATE = ((EStructuralFeature.Internal)filesystemPackage.Literals.FILE_SYSTEM__LIVE).getSettingDelegate();
56
57 /**
58 * <!-- begin-user-doc -->
59 * <!-- end-user-doc -->
60 * @generated
61 */
62 protected FileSystemImpl() {
63 super();
64 }
65
66 /**
67 * <!-- begin-user-doc -->
68 * <!-- end-user-doc -->
69 * @generated
70 */
71 @Override
72 protected EClass eStaticClass() {
73 return filesystemPackage.Literals.FILE_SYSTEM;
74 }
75
76 /**
77 * <!-- begin-user-doc -->
78 * <!-- end-user-doc -->
79 * @generated
80 */
81 public Dir getRoot() {
82 return root;
83 }
84
85 /**
86 * <!-- begin-user-doc -->
87 * <!-- end-user-doc -->
88 * @generated
89 */
90 public NotificationChain basicSetRoot(Dir newRoot, NotificationChain msgs) {
91 Dir oldRoot = root;
92 root = newRoot;
93 if (eNotificationRequired()) {
94 ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, filesystemPackage.FILE_SYSTEM__ROOT, oldRoot, newRoot);
95 if (msgs == null) msgs = notification; else msgs.add(notification);
96 }
97 return msgs;
98 }
99
100 /**
101 * <!-- begin-user-doc -->
102 * <!-- end-user-doc -->
103 * @generated
104 */
105 public void setRoot(Dir newRoot) {
106 if (newRoot != root) {
107 NotificationChain msgs = null;
108 if (root != null)
109 msgs = ((InternalEObject)root).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - filesystemPackage.FILE_SYSTEM__ROOT, null, msgs);
110 if (newRoot != null)
111 msgs = ((InternalEObject)newRoot).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - filesystemPackage.FILE_SYSTEM__ROOT, null, msgs);
112 msgs = basicSetRoot(newRoot, msgs);
113 if (msgs != null) msgs.dispatch();
114 }
115 else if (eNotificationRequired())
116 eNotify(new ENotificationImpl(this, Notification.SET, filesystemPackage.FILE_SYSTEM__ROOT, newRoot, newRoot));
117 }
118
119 /**
120 * <!-- begin-user-doc -->
121 * <!-- end-user-doc -->
122 * @generated
123 */
124 @SuppressWarnings("unchecked")
125 public EList<FSObject> getLive() {
126 return (EList<FSObject>)LIVE__ESETTING_DELEGATE.dynamicGet(this, null, 0, true, false);
127 }
128
129 /**
130 * <!-- begin-user-doc -->
131 * <!-- end-user-doc -->
132 * @generated
133 */
134 @Override
135 public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
136 switch (featureID) {
137 case filesystemPackage.FILE_SYSTEM__ROOT:
138 return basicSetRoot(null, msgs);
139 }
140 return super.eInverseRemove(otherEnd, featureID, msgs);
141 }
142
143 /**
144 * <!-- begin-user-doc -->
145 * <!-- end-user-doc -->
146 * @generated
147 */
148 @Override
149 public Object eGet(int featureID, boolean resolve, boolean coreType) {
150 switch (featureID) {
151 case filesystemPackage.FILE_SYSTEM__ROOT:
152 return getRoot();
153 case filesystemPackage.FILE_SYSTEM__LIVE:
154 return getLive();
155 }
156 return super.eGet(featureID, resolve, coreType);
157 }
158
159 /**
160 * <!-- begin-user-doc -->
161 * <!-- end-user-doc -->
162 * @generated
163 */
164 @Override
165 public void eSet(int featureID, Object newValue) {
166 switch (featureID) {
167 case filesystemPackage.FILE_SYSTEM__ROOT:
168 setRoot((Dir)newValue);
169 return;
170 }
171 super.eSet(featureID, newValue);
172 }
173
174 /**
175 * <!-- begin-user-doc -->
176 * <!-- end-user-doc -->
177 * @generated
178 */
179 @Override
180 public void eUnset(int featureID) {
181 switch (featureID) {
182 case filesystemPackage.FILE_SYSTEM__ROOT:
183 setRoot((Dir)null);
184 return;
185 }
186 super.eUnset(featureID);
187 }
188
189 /**
190 * <!-- begin-user-doc -->
191 * <!-- end-user-doc -->
192 * @generated
193 */
194 @Override
195 public boolean eIsSet(int featureID) {
196 switch (featureID) {
197 case filesystemPackage.FILE_SYSTEM__ROOT:
198 return root != null;
199 case filesystemPackage.FILE_SYSTEM__LIVE:
200 return LIVE__ESETTING_DELEGATE.dynamicIsSet(this, null, 0);
201 }
202 return super.eIsSet(featureID);
203 }
204
205} //FileSystemImpl
diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/filesystem/impl/ModelImpl.java b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/filesystem/impl/ModelImpl.java
new file mode 100644
index 00000000..a21f5b6e
--- /dev/null
+++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/filesystem/impl/ModelImpl.java
@@ -0,0 +1,221 @@
1/**
2 */
3package ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.impl;
4
5import ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.FSObject;
6import ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.FileSystem;
7import ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.Model;
8import ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.filesystemPackage;
9
10import java.util.Collection;
11
12import org.eclipse.emf.common.notify.Notification;
13import org.eclipse.emf.common.notify.NotificationChain;
14
15import org.eclipse.emf.common.util.EList;
16
17import org.eclipse.emf.ecore.EClass;
18import org.eclipse.emf.ecore.InternalEObject;
19
20import org.eclipse.emf.ecore.impl.ENotificationImpl;
21import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
22
23import org.eclipse.emf.ecore.util.EObjectContainmentEList;
24import org.eclipse.emf.ecore.util.InternalEList;
25
26/**
27 * <!-- begin-user-doc -->
28 * An implementation of the model object '<em><b>Model</b></em>'.
29 * <!-- end-user-doc -->
30 * <p>
31 * The following features are implemented:
32 * </p>
33 * <ul>
34 * <li>{@link ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.impl.ModelImpl#getFilesystems <em>Filesystems</em>}</li>
35 * <li>{@link ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.impl.ModelImpl#getOtherFSObjects <em>Other FS Objects</em>}</li>
36 * </ul>
37 *
38 * @generated
39 */
40public class ModelImpl extends MinimalEObjectImpl.Container implements Model {
41 /**
42 * The cached value of the '{@link #getFilesystems() <em>Filesystems</em>}' containment reference.
43 * <!-- begin-user-doc -->
44 * <!-- end-user-doc -->
45 * @see #getFilesystems()
46 * @generated
47 * @ordered
48 */
49 protected FileSystem filesystems;
50
51 /**
52 * The cached value of the '{@link #getOtherFSObjects() <em>Other FS Objects</em>}' containment reference list.
53 * <!-- begin-user-doc -->
54 * <!-- end-user-doc -->
55 * @see #getOtherFSObjects()
56 * @generated
57 * @ordered
58 */
59 protected EList<FSObject> otherFSObjects;
60
61 /**
62 * <!-- begin-user-doc -->
63 * <!-- end-user-doc -->
64 * @generated
65 */
66 protected ModelImpl() {
67 super();
68 }
69
70 /**
71 * <!-- begin-user-doc -->
72 * <!-- end-user-doc -->
73 * @generated
74 */
75 @Override
76 protected EClass eStaticClass() {
77 return filesystemPackage.Literals.MODEL;
78 }
79
80 /**
81 * <!-- begin-user-doc -->
82 * <!-- end-user-doc -->
83 * @generated
84 */
85 public FileSystem getFilesystems() {
86 return filesystems;
87 }
88
89 /**
90 * <!-- begin-user-doc -->
91 * <!-- end-user-doc -->
92 * @generated
93 */
94 public NotificationChain basicSetFilesystems(FileSystem newFilesystems, NotificationChain msgs) {
95 FileSystem oldFilesystems = filesystems;
96 filesystems = newFilesystems;
97 if (eNotificationRequired()) {
98 ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, filesystemPackage.MODEL__FILESYSTEMS, oldFilesystems, newFilesystems);
99 if (msgs == null) msgs = notification; else msgs.add(notification);
100 }
101 return msgs;
102 }
103
104 /**
105 * <!-- begin-user-doc -->
106 * <!-- end-user-doc -->
107 * @generated
108 */
109 public void setFilesystems(FileSystem newFilesystems) {
110 if (newFilesystems != filesystems) {
111 NotificationChain msgs = null;
112 if (filesystems != null)
113 msgs = ((InternalEObject)filesystems).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - filesystemPackage.MODEL__FILESYSTEMS, null, msgs);
114 if (newFilesystems != null)
115 msgs = ((InternalEObject)newFilesystems).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - filesystemPackage.MODEL__FILESYSTEMS, null, msgs);
116 msgs = basicSetFilesystems(newFilesystems, msgs);
117 if (msgs != null) msgs.dispatch();
118 }
119 else if (eNotificationRequired())
120 eNotify(new ENotificationImpl(this, Notification.SET, filesystemPackage.MODEL__FILESYSTEMS, newFilesystems, newFilesystems));
121 }
122
123 /**
124 * <!-- begin-user-doc -->
125 * <!-- end-user-doc -->
126 * @generated
127 */
128 public EList<FSObject> getOtherFSObjects() {
129 if (otherFSObjects == null) {
130 otherFSObjects = new EObjectContainmentEList<FSObject>(FSObject.class, this, filesystemPackage.MODEL__OTHER_FS_OBJECTS);
131 }
132 return otherFSObjects;
133 }
134
135 /**
136 * <!-- begin-user-doc -->
137 * <!-- end-user-doc -->
138 * @generated
139 */
140 @Override
141 public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
142 switch (featureID) {
143 case filesystemPackage.MODEL__FILESYSTEMS:
144 return basicSetFilesystems(null, msgs);
145 case filesystemPackage.MODEL__OTHER_FS_OBJECTS:
146 return ((InternalEList<?>)getOtherFSObjects()).basicRemove(otherEnd, msgs);
147 }
148 return super.eInverseRemove(otherEnd, featureID, msgs);
149 }
150
151 /**
152 * <!-- begin-user-doc -->
153 * <!-- end-user-doc -->
154 * @generated
155 */
156 @Override
157 public Object eGet(int featureID, boolean resolve, boolean coreType) {
158 switch (featureID) {
159 case filesystemPackage.MODEL__FILESYSTEMS:
160 return getFilesystems();
161 case filesystemPackage.MODEL__OTHER_FS_OBJECTS:
162 return getOtherFSObjects();
163 }
164 return super.eGet(featureID, resolve, coreType);
165 }
166
167 /**
168 * <!-- begin-user-doc -->
169 * <!-- end-user-doc -->
170 * @generated
171 */
172 @SuppressWarnings("unchecked")
173 @Override
174 public void eSet(int featureID, Object newValue) {
175 switch (featureID) {
176 case filesystemPackage.MODEL__FILESYSTEMS:
177 setFilesystems((FileSystem)newValue);
178 return;
179 case filesystemPackage.MODEL__OTHER_FS_OBJECTS:
180 getOtherFSObjects().clear();
181 getOtherFSObjects().addAll((Collection<? extends FSObject>)newValue);
182 return;
183 }
184 super.eSet(featureID, newValue);
185 }
186
187 /**
188 * <!-- begin-user-doc -->
189 * <!-- end-user-doc -->
190 * @generated
191 */
192 @Override
193 public void eUnset(int featureID) {
194 switch (featureID) {
195 case filesystemPackage.MODEL__FILESYSTEMS:
196 setFilesystems((FileSystem)null);
197 return;
198 case filesystemPackage.MODEL__OTHER_FS_OBJECTS:
199 getOtherFSObjects().clear();
200 return;
201 }
202 super.eUnset(featureID);
203 }
204
205 /**
206 * <!-- begin-user-doc -->
207 * <!-- end-user-doc -->
208 * @generated
209 */
210 @Override
211 public boolean eIsSet(int featureID) {
212 switch (featureID) {
213 case filesystemPackage.MODEL__FILESYSTEMS:
214 return filesystems != null;
215 case filesystemPackage.MODEL__OTHER_FS_OBJECTS:
216 return otherFSObjects != null && !otherFSObjects.isEmpty();
217 }
218 return super.eIsSet(featureID);
219 }
220
221} //ModelImpl
diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/filesystem/impl/filesystemFactoryImpl.java b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/filesystem/impl/filesystemFactoryImpl.java
new file mode 100644
index 00000000..a3526e36
--- /dev/null
+++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/filesystem/impl/filesystemFactoryImpl.java
@@ -0,0 +1,128 @@
1/**
2 */
3package ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.impl;
4
5import ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.*;
6
7import org.eclipse.emf.ecore.EClass;
8import org.eclipse.emf.ecore.EObject;
9import org.eclipse.emf.ecore.EPackage;
10
11import org.eclipse.emf.ecore.impl.EFactoryImpl;
12
13import org.eclipse.emf.ecore.plugin.EcorePlugin;
14
15/**
16 * <!-- begin-user-doc -->
17 * An implementation of the model <b>Factory</b>.
18 * <!-- end-user-doc -->
19 * @generated
20 */
21public class filesystemFactoryImpl extends EFactoryImpl implements filesystemFactory {
22 /**
23 * Creates the default factory implementation.
24 * <!-- begin-user-doc -->
25 * <!-- end-user-doc -->
26 * @generated
27 */
28 public static filesystemFactory init() {
29 try {
30 filesystemFactory thefilesystemFactory = (filesystemFactory)EPackage.Registry.INSTANCE.getEFactory(filesystemPackage.eNS_URI);
31 if (thefilesystemFactory != null) {
32 return thefilesystemFactory;
33 }
34 }
35 catch (Exception exception) {
36 EcorePlugin.INSTANCE.log(exception);
37 }
38 return new filesystemFactoryImpl();
39 }
40
41 /**
42 * Creates an instance of the factory.
43 * <!-- begin-user-doc -->
44 * <!-- end-user-doc -->
45 * @generated
46 */
47 public filesystemFactoryImpl() {
48 super();
49 }
50
51 /**
52 * <!-- begin-user-doc -->
53 * <!-- end-user-doc -->
54 * @generated
55 */
56 @Override
57 public EObject create(EClass eClass) {
58 switch (eClass.getClassifierID()) {
59 case filesystemPackage.FILE_SYSTEM: return createFileSystem();
60 case filesystemPackage.DIR: return createDir();
61 case filesystemPackage.FILE: return createFile();
62 case filesystemPackage.MODEL: return createModel();
63 default:
64 throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
65 }
66 }
67
68 /**
69 * <!-- begin-user-doc -->
70 * <!-- end-user-doc -->
71 * @generated
72 */
73 public FileSystem createFileSystem() {
74 FileSystemImpl fileSystem = new FileSystemImpl();
75 return fileSystem;
76 }
77
78 /**
79 * <!-- begin-user-doc -->
80 * <!-- end-user-doc -->
81 * @generated
82 */
83 public Dir createDir() {
84 DirImpl dir = new DirImpl();
85 return dir;
86 }
87
88 /**
89 * <!-- begin-user-doc -->
90 * <!-- end-user-doc -->
91 * @generated
92 */
93 public File createFile() {
94 FileImpl file = new FileImpl();
95 return file;
96 }
97
98 /**
99 * <!-- begin-user-doc -->
100 * <!-- end-user-doc -->
101 * @generated
102 */
103 public Model createModel() {
104 ModelImpl model = new ModelImpl();
105 return model;
106 }
107
108 /**
109 * <!-- begin-user-doc -->
110 * <!-- end-user-doc -->
111 * @generated
112 */
113 public filesystemPackage getfilesystemPackage() {
114 return (filesystemPackage)getEPackage();
115 }
116
117 /**
118 * <!-- begin-user-doc -->
119 * <!-- end-user-doc -->
120 * @deprecated
121 * @generated
122 */
123 @Deprecated
124 public static filesystemPackage getPackage() {
125 return filesystemPackage.eINSTANCE;
126 }
127
128} //filesystemFactoryImpl
diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/filesystem/impl/filesystemPackageImpl.java b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/filesystem/impl/filesystemPackageImpl.java
new file mode 100644
index 00000000..5c6dd21e
--- /dev/null
+++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/filesystem/impl/filesystemPackageImpl.java
@@ -0,0 +1,356 @@
1/**
2 */
3package ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.impl;
4
5import ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.Dir;
6import ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.FSObject;
7import ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.File;
8import ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.FileSystem;
9import ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.Model;
10import ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.filesystemFactory;
11import ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.filesystemPackage;
12
13import org.eclipse.emf.ecore.EClass;
14import org.eclipse.emf.ecore.EPackage;
15import org.eclipse.emf.ecore.EReference;
16
17import org.eclipse.emf.ecore.impl.EPackageImpl;
18
19/**
20 * <!-- begin-user-doc -->
21 * An implementation of the model <b>Package</b>.
22 * <!-- end-user-doc -->
23 * @generated
24 */
25public class filesystemPackageImpl extends EPackageImpl implements filesystemPackage {
26 /**
27 * <!-- begin-user-doc -->
28 * <!-- end-user-doc -->
29 * @generated
30 */
31 private EClass fileSystemEClass = null;
32
33 /**
34 * <!-- begin-user-doc -->
35 * <!-- end-user-doc -->
36 * @generated
37 */
38 private EClass fsObjectEClass = null;
39
40 /**
41 * <!-- begin-user-doc -->
42 * <!-- end-user-doc -->
43 * @generated
44 */
45 private EClass dirEClass = null;
46
47 /**
48 * <!-- begin-user-doc -->
49 * <!-- end-user-doc -->
50 * @generated
51 */
52 private EClass fileEClass = null;
53
54 /**
55 * <!-- begin-user-doc -->
56 * <!-- end-user-doc -->
57 * @generated
58 */
59 private EClass modelEClass = null;
60
61 /**
62 * Creates an instance of the model <b>Package</b>, registered with
63 * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package
64 * package URI value.
65 * <p>Note: the correct way to create the package is via the static
66 * factory method {@link #init init()}, which also performs
67 * initialization of the package, or returns the registered package,
68 * if one already exists.
69 * <!-- begin-user-doc -->
70 * <!-- end-user-doc -->
71 * @see org.eclipse.emf.ecore.EPackage.Registry
72 * @see ca.mcgill.ecse.dslreasoner.standalone.test.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/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/filesystem/queries/FileSystem.vql b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/filesystem/queries/FileSystem.vql
new file mode 100644
index 00000000..269a4242
--- /dev/null
+++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/filesystem/queries/FileSystem.vql
@@ -0,0 +1,24 @@
1package ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.queries
2
3import epackage "FileSystemMetamodel"
4
5pattern patternContent(o1: FSObject, o2: FSObject) {
6 Dir.contents(o1,o2);
7}
8
9@QueryBasedFeature
10pattern live(this: FileSystem, l: FSObject) {
11 FileSystem.root(this,l);
12} or {
13 FileSystem.root(this,root);
14 find patternContent+(root,l);
15}
16
17@Constraint(key={child}, severity="error", message="error")
18pattern contentInNotLive(parent : Dir, child: FSObject) {
19 Dir.contents(parent,child);
20 neg find live(_,parent);
21} or {
22 Dir.contents(parent,child);
23 neg find live(_,child);
24}
diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/filesystem/util/filesystemAdapterFactory.java b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/filesystem/util/filesystemAdapterFactory.java
new file mode 100644
index 00000000..d9aed046
--- /dev/null
+++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/filesystem/util/filesystemAdapterFactory.java
@@ -0,0 +1,192 @@
1/**
2 */
3package ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.util;
4
5import ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.*;
6
7import org.eclipse.emf.common.notify.Adapter;
8import org.eclipse.emf.common.notify.Notifier;
9
10import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl;
11
12import 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 ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.filesystemPackage
20 * @generated
21 */
22public 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 ca.mcgill.ecse.dslreasoner.standalone.test.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 ca.mcgill.ecse.dslreasoner.standalone.test.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 ca.mcgill.ecse.dslreasoner.standalone.test.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 ca.mcgill.ecse.dslreasoner.standalone.test.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 ca.mcgill.ecse.dslreasoner.standalone.test.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 ca.mcgill.ecse.dslreasoner.standalone.test.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 ca.mcgill.ecse.dslreasoner.standalone.test.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 ca.mcgill.ecse.dslreasoner.standalone.test.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 ca.mcgill.ecse.dslreasoner.standalone.test.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 ca.mcgill.ecse.dslreasoner.standalone.test.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/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/filesystem/util/filesystemSwitch.java b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/filesystem/util/filesystemSwitch.java
new file mode 100644
index 00000000..33f4c7a4
--- /dev/null
+++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/filesystem/util/filesystemSwitch.java
@@ -0,0 +1,196 @@
1/**
2 */
3package ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.util;
4
5import ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.*;
6
7import org.eclipse.emf.ecore.EObject;
8import org.eclipse.emf.ecore.EPackage;
9
10import 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 ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.filesystemPackage
23 * @generated
24 */
25public 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