diff --git a/Assignment/.classpath b/Assignment/.classpath new file mode 100644 index 0000000000000000000000000000000000000000..38b48f0bb245e32324c9d71603215309645d8f1d --- /dev/null +++ b/Assignment/.classpath @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="UTF-8"?> +<classpath> + <classpathentry kind="src" path="src-gen"/> + <classpathentry kind="src" path="xtend-gen"/> + <classpathentry kind="src" path="src"/> + <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/> + <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/> + <classpathentry kind="output" path="bin"/> +</classpath> diff --git a/Assignment/.gitignore b/Assignment/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..ae3c1726048cd06b9a143e0376ed46dd9b9a8d53 --- /dev/null +++ b/Assignment/.gitignore @@ -0,0 +1 @@ +/bin/ diff --git a/Assignment/.project b/Assignment/.project new file mode 100644 index 0000000000000000000000000000000000000000..6755d467042a38611346e3f2038fea37d2846f9d --- /dev/null +++ b/Assignment/.project @@ -0,0 +1,35 @@ +<?xml version="1.0" encoding="UTF-8"?> +<projectDescription> + <name>Assignment</name> + <comment></comment> + <projects> + </projects> + <buildSpec> + <buildCommand> + <name>org.eclipse.xtext.ui.shared.xtextBuilder</name> + <arguments> + </arguments> + </buildCommand> + <buildCommand> + <name>org.eclipse.jdt.core.javabuilder</name> + <arguments> + </arguments> + </buildCommand> + <buildCommand> + <name>org.eclipse.pde.ManifestBuilder</name> + <arguments> + </arguments> + </buildCommand> + <buildCommand> + <name>org.eclipse.pde.SchemaBuilder</name> + <arguments> + </arguments> + </buildCommand> + </buildSpec> + <natures> + <nature>org.eclipse.sirius.nature.modelingproject</nature> + <nature>org.eclipse.jdt.core.javanature</nature> + <nature>org.eclipse.pde.PluginNature</nature> + <nature>org.eclipse.xtext.ui.shared.xtextNature</nature> + </natures> +</projectDescription> diff --git a/Assignment/META-INF/MANIFEST.MF b/Assignment/META-INF/MANIFEST.MF new file mode 100644 index 0000000000000000000000000000000000000000..501cce06b00163548fa8f101d6b6c2f454fdf332 --- /dev/null +++ b/Assignment/META-INF/MANIFEST.MF @@ -0,0 +1,22 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: %pluginName +Bundle-SymbolicName: Assignment;singleton:=true +Automatic-Module-Name: Assignment +Bundle-Version: 0.1.0.qualifier +Bundle-ClassPath: . +Bundle-Vendor: %providerName +Bundle-Localization: plugin +Bundle-RequiredExecutionEnvironment: JavaSE-1.8 +Export-Package: assignment, + assignment.impl, + assignment.util +Require-Bundle: org.eclipse.emf.ecore;visibility:=reexport, + org.eclipse.emf.ecore.xmi;visibility:=reexport, + org.eclipse.core.runtime, + com.google.guava, + org.eclipse.xtext.xbase.lib, + org.eclipse.xtend.lib, + org.eclipse.xtend.lib.macro +Bundle-ActivationPolicy: lazy + diff --git a/Assignment/build.properties b/Assignment/build.properties new file mode 100644 index 0000000000000000000000000000000000000000..697ca964527a545764d3a69847c122b371257973 --- /dev/null +++ b/Assignment/build.properties @@ -0,0 +1,10 @@ +# + +bin.includes = .,\ + model/,\ + META-INF/,\ + plugin.xml,\ + plugin.properties +jars.compile.order = . +source.. = src-gen/ +output.. = bin/ diff --git a/Assignment/model/Course.xmi b/Assignment/model/Course.xmi new file mode 100644 index 0000000000000000000000000000000000000000..c54802fc041d4e20ad2823f355af5d6d06c0282c --- /dev/null +++ b/Assignment/model/Course.xmi @@ -0,0 +1,18 @@ +<?xml version="1.0" encoding="UTF-8"?> +<assignment:Course + xmi:version="2.0" + xmlns:xmi="http://www.omg.org/XMI" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xmlns:assignment="http://www.example.org/assignment" + xsi:schemaLocation="http://www.example.org/assignment assignment.ecore" + code="TDT4250" + content="Learn alot"> + <instances + year="2018"> + <evaluationForm + percentage="30"/> + <evaluationForm + percentage="70" + type="Exam"/> + </instances> +</assignment:Course> diff --git a/Assignment/model/Department.xmi b/Assignment/model/Department.xmi new file mode 100644 index 0000000000000000000000000000000000000000..ba5c5b1b2d42ae18f3b5922d80127e81fc80eee0 --- /dev/null +++ b/Assignment/model/Department.xmi @@ -0,0 +1,42 @@ +<?xml version="1.0" encoding="UTF-8"?> +<assignment:Department + xmi:version="2.0" + xmlns:xmi="http://www.omg.org/XMI" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xmlns:assignment="http://www.example.org/assignment" + xsi:schemaLocation="http://www.example.org/assignment assignment.ecore" + name="Data"> + <courses name="Hard" + code="TDT4250" + creditsNumber="7.5" + recommendedCourses="//@courses.1" + content="A subject"> + <instances + year="2018"> + <evaluationForm + percentage="30"/> + <evaluationForm + percentage="70" + type="Exam"/> + <labHours + duration="2" + room="R54" + beginning="2" + day="Monday"/> + <lectureHours/> + <courseWork + lectureHours="2" + labHours="2"/> + <staff + people="//@staff.0"/> + <staff + type="Student"/> + </instances> + </courses> + <courses name="Java" + code="TDT4100" + creditsNumber="7.5" + content="Learn code in Java"/> + <staff name="Some@fd.fd" + email="MrMan"/> +</assignment:Department> diff --git a/Assignment/model/People.xmi b/Assignment/model/People.xmi new file mode 100644 index 0000000000000000000000000000000000000000..4f72231875cdaca575b83f49df65276291d53798 --- /dev/null +++ b/Assignment/model/People.xmi @@ -0,0 +1,2 @@ +<?xml version="1.0" encoding="UTF-8"?> +<assignment:People xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:assignment="http://www.example.org/assignment" xsi:schemaLocation="http://www.example.org/assignment assignment.ecore" name="MrMan" email="Mr@dsf.dfsd"/> diff --git a/Assignment/model/assignment.aird b/Assignment/model/assignment.aird new file mode 100644 index 0000000000000000000000000000000000000000..34341c9e5814e8ed9777a54a963566a648a44e16 --- /dev/null +++ b/Assignment/model/assignment.aird @@ -0,0 +1,34 @@ +<?xml version="1.0" encoding="UTF-8"?> +<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:description="http://www.eclipse.org/sirius/description/1.1.0" xmlns:description_1="http://www.eclipse.org/sirius/diagram/description/1.1.0" xmlns:diagram="http://www.eclipse.org/sirius/diagram/1.1.0" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.2/notation" xmlns:viewpoint="http://www.eclipse.org/sirius/1.1.0" xsi:schemaLocation="http://www.eclipse.org/sirius/description/1.1.0 http://www.eclipse.org/sirius/1.1.0#//description http://www.eclipse.org/sirius/diagram/description/1.1.0 http://www.eclipse.org/sirius/diagram/1.1.0#//description"> + <viewpoint:DAnalysis xmi:id="_D8fh4NIEEei8H6ARBqz5Tw" selectedViews="_EgXD8NIEEei8H6ARBqz5Tw" version="13.0.0.201804031646"> + <semanticResources>assignment.ecore</semanticResources> + <semanticResources>assignment.genmodel</semanticResources> + <semanticResources>People.xmi</semanticResources> + <semanticResources>Department.xmi</semanticResources> + <semanticResources>Course.xmi</semanticResources> + <semanticResources>../src-gen/html/GenHtml.xtend</semanticResources> + <ownedViews xmi:type="viewpoint:DView" xmi:id="_EgXD8NIEEei8H6ARBqz5Tw"> + <viewpoint xmi:type="description:Viewpoint" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']"/> + <ownedRepresentationDescriptors xmi:type="viewpoint:DRepresentationDescriptor" xmi:id="_EsA6UNIEEei8H6ARBqz5Tw" name="assignment" repPath="#_Ekxp4NIEEei8H6ARBqz5Tw"> + <description xmi:type="description_1:DiagramDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']"/> + <target xmi:type="ecore:EPackage" href="assignment.ecore#/"/> + </ownedRepresentationDescriptors> + </ownedViews> + </viewpoint:DAnalysis> + <diagram:DSemanticDiagram xmi:id="_Er7awNIEEei8H6ARBqz5Tw" name="assignment" uid="_Ekxp4NIEEei8H6ARBqz5Tw"> + <ownedAnnotationEntries xmi:type="description:AnnotationEntry" xmi:id="_Er7awdIEEei8H6ARBqz5Tw" source="DANNOTATION_CUSTOMIZATION_KEY"> + <data xmi:type="diagram:ComputedStyleDescriptionRegistry" xmi:id="_Er7awtIEEei8H6ARBqz5Tw"/> + </ownedAnnotationEntries> + <ownedAnnotationEntries xmi:type="description:AnnotationEntry" xmi:id="_EsuE8NIEEei8H6ARBqz5Tw" source="GMF_DIAGRAMS"> + <data xmi:type="notation:Diagram" xmi:id="_EsuE8dIEEei8H6ARBqz5Tw" type="Sirius" element="_Er7awNIEEei8H6ARBqz5Tw" measurementUnit="Pixel"> + <styles xmi:type="notation:DiagramStyle" xmi:id="_EsuE8tIEEei8H6ARBqz5Tw"/> + </data> + </ownedAnnotationEntries> + <description xmi:type="description_1:DiagramDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']"/> + <filterVariableHistory xmi:type="diagram:FilterVariableHistory" xmi:id="_Er7axNIEEei8H6ARBqz5Tw"/> + <activatedLayers xmi:type="description_1:Layer" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer"/> + <activatedLayers xmi:type="description_1:AdditionalLayer" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@additionalLayers[name='Package']"/> + <activatedLayers xmi:type="description_1:AdditionalLayer" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@additionalLayers[name='Validation']"/> + <target xmi:type="ecore:EPackage" href="assignment.ecore#/"/> + </diagram:DSemanticDiagram> +</xmi:XMI> diff --git a/Assignment/model/assignment.ecore b/Assignment/model/assignment.ecore new file mode 100644 index 0000000000000000000000000000000000000000..22b21427dc967f5f758fde87dc8d94684b16750f --- /dev/null +++ b/Assignment/model/assignment.ecore @@ -0,0 +1,102 @@ +<?xml version="1.0" encoding="UTF-8"?> +<ecore:EPackage xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="assignment" nsURI="http://www.example.org/assignment" nsPrefix="assignment"> + <eClassifiers xsi:type="ecore:EClass" name="Course"> + <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/> + <eStructuralFeatures xsi:type="ecore:EAttribute" name="code" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/> + <eStructuralFeatures xsi:type="ecore:EAttribute" name="creditsNumber" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EFloat"/> + <eStructuralFeatures xsi:type="ecore:EReference" name="instances" upperBound="-1" + eType="#//CourseInstance" containment="true" eOpposite="#//CourseInstance/course"/> + <eStructuralFeatures xsi:type="ecore:EReference" name="requiredCourses" upperBound="-1" + eType="#//Course"/> + <eStructuralFeatures xsi:type="ecore:EReference" name="recommendedCourses" upperBound="-1" + eType="#//Course"/> + <eStructuralFeatures xsi:type="ecore:EAttribute" name="content" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/> + <eStructuralFeatures xsi:type="ecore:EReference" name="creditsReduction" upperBound="-1" + eType="#//CourseRelation" containment="true"/> + <eStructuralFeatures xsi:type="ecore:EReference" name="department" eType="#//Department" + eOpposite="#//Department/courses"/> + </eClassifiers> + <eClassifiers xsi:type="ecore:EClass" name="CourseRelation"> + <eStructuralFeatures xsi:type="ecore:EReference" name="course" eType="#//Course"/> + <eStructuralFeatures xsi:type="ecore:EAttribute" name="creditsReduction" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EFloat"/> + </eClassifiers> + <eClassifiers xsi:type="ecore:EClass" name="CourseInstance"> + <eAnnotations source="http://www.eclipse.org/emf/2002/Ecore"> + <details key="constraints" value="percentageSum hasACoordinator timetableCorrespondsToCoursework"/> + </eAnnotations> + <eAnnotations source="http://www.eclipse.org/acceleo/query/1.0"> + <details key="percentageSum" value="self.evaluationForm.percentage->sum() == 100"/> + <details key="hasACoordinator" value="self.staff.type->select(item | item == "coordinator")->length == 1"/> + </eAnnotations> + <eStructuralFeatures xsi:type="ecore:EReference" name="evaluationForm" upperBound="-1" + eType="#//Work" containment="true"/> + <eStructuralFeatures xsi:type="ecore:EAttribute" name="year" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"/> + <eStructuralFeatures xsi:type="ecore:EAttribute" name="semester" eType="#//Semester"/> + <eStructuralFeatures xsi:type="ecore:EReference" name="labHours" upperBound="-1" + eType="#//ScheduledHour" containment="true"/> + <eStructuralFeatures xsi:type="ecore:EReference" name="lectureHours" upperBound="-1" + eType="#//ScheduledHour" containment="true"/> + <eStructuralFeatures xsi:type="ecore:EReference" name="courseWork" eType="#//CourseWork" + containment="true"/> + <eStructuralFeatures xsi:type="ecore:EReference" name="staff" upperBound="-1" + eType="#//Role" containment="true"/> + <eStructuralFeatures xsi:type="ecore:EReference" name="studyPrograms" upperBound="-1" + eType="#//StudyProgram"/> + <eStructuralFeatures xsi:type="ecore:EReference" name="course" eType="#//Course" + eOpposite="#//Course/instances"/> + </eClassifiers> + <eClassifiers xsi:type="ecore:EClass" name="CourseWork"> + <eStructuralFeatures xsi:type="ecore:EAttribute" name="lectureHours" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"/> + <eStructuralFeatures xsi:type="ecore:EAttribute" name="labHours" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"/> + </eClassifiers> + <eClassifiers xsi:type="ecore:EClass" name="Role"> + <eStructuralFeatures xsi:type="ecore:EAttribute" name="type" eType="#//RoleType"/> + <eStructuralFeatures xsi:type="ecore:EReference" name="people" eType="#//People"/> + </eClassifiers> + <eClassifiers xsi:type="ecore:EClass" name="People"> + <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/> + <eStructuralFeatures xsi:type="ecore:EAttribute" name="email" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/> + </eClassifiers> + <eClassifiers xsi:type="ecore:EClass" name="StudyProgram"> + <eStructuralFeatures xsi:type="ecore:EAttribute" name="code" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/> + </eClassifiers> + <eClassifiers xsi:type="ecore:EClass" name="Work"> + <eStructuralFeatures xsi:type="ecore:EAttribute" name="percentage" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"/> + <eStructuralFeatures xsi:type="ecore:EAttribute" name="type" eType="#//WorkType"/> + </eClassifiers> + <eClassifiers xsi:type="ecore:EClass" name="Department"> + <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/> + <eStructuralFeatures xsi:type="ecore:EReference" name="courses" upperBound="-1" + eType="#//Course" containment="true" eOpposite="#//Course/department"/> + <eStructuralFeatures xsi:type="ecore:EReference" name="staff" upperBound="-1" + eType="#//People" containment="true"/> + </eClassifiers> + <eClassifiers xsi:type="ecore:EClass" name="ScheduledHour"> + <eStructuralFeatures xsi:type="ecore:EAttribute" name="duration" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"/> + <eStructuralFeatures xsi:type="ecore:EAttribute" name="room" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/> + <eStructuralFeatures xsi:type="ecore:EAttribute" name="beginning" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/> + <eStructuralFeatures xsi:type="ecore:EReference" name="reservedForProgram" upperBound="-1" + eType="#//StudyProgram"/> + <eStructuralFeatures xsi:type="ecore:EAttribute" name="day" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/> + <eStructuralFeatures xsi:type="ecore:EAttribute" name="type" eType="#//HourType"/> + </eClassifiers> + <eClassifiers xsi:type="ecore:EEnum" name="Semester"> + <eLiterals name="Autumn" literal="Autumn"/> + <eLiterals name="Spring" value="1"/> + </eClassifiers> + <eClassifiers xsi:type="ecore:EEnum" name="WorkType"> + <eLiterals name="Assignment"/> + <eLiterals name="Exam" value="1"/> + <eLiterals name="Project" value="2"/> + </eClassifiers> + <eClassifiers xsi:type="ecore:EEnum" name="HourType"> + <eLiterals name="Lab" literal="Lab"/> + <eLiterals name="Lecture" value="1" literal="Lecture"/> + </eClassifiers> + <eClassifiers xsi:type="ecore:EEnum" name="RoleType"> + <eLiterals name="Lecturer"/> + <eLiterals name="StudentAssistent" value="1"/> + <eLiterals name="Student" value="2"/> + </eClassifiers> +</ecore:EPackage> diff --git a/Assignment/model/assignment.genmodel b/Assignment/model/assignment.genmodel new file mode 100644 index 0000000000000000000000000000000000000000..7dc9f46683733f186681cd6490daf4817e3bc194 --- /dev/null +++ b/Assignment/model/assignment.genmodel @@ -0,0 +1,90 @@ +<?xml version="1.0" encoding="UTF-8"?> +<genmodel:GenModel xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:genmodel="http://www.eclipse.org/emf/2002/GenModel" + modelDirectory="/Assignment/src-gen" creationIcons="false" editDirectory="/Assignment.edit/src-gen" + editorDirectory="/Assignment.editor/src-gen" modelPluginID="Assignment" modelName="Assignment" + rootExtendsClass="org.eclipse.emf.ecore.impl.MinimalEObjectImpl$Container" codeFormatting="true" + importerID="org.eclipse.emf.importer.ecore" complianceLevel="8.0" copyrightFields="false" + operationReflection="true" importOrganizing="true"> + <foreignModel>assignment.ecore</foreignModel> + <testsDirectory xsi:nil="true"/> + <genPackages prefix="Assignment" resource="XMI" disposableProviderFactory="true" + ecorePackage="assignment.ecore#/"> + <genEnums typeSafeEnumCompatible="false" ecoreEnum="assignment.ecore#//Semester"> + <genEnumLiterals ecoreEnumLiteral="assignment.ecore#//Semester/Autumn"/> + <genEnumLiterals ecoreEnumLiteral="assignment.ecore#//Semester/Spring"/> + </genEnums> + <genEnums typeSafeEnumCompatible="false" ecoreEnum="assignment.ecore#//WorkType"> + <genEnumLiterals ecoreEnumLiteral="assignment.ecore#//WorkType/Assignment"/> + <genEnumLiterals ecoreEnumLiteral="assignment.ecore#//WorkType/Exam"/> + <genEnumLiterals ecoreEnumLiteral="assignment.ecore#//WorkType/Project"/> + </genEnums> + <genEnums typeSafeEnumCompatible="false" ecoreEnum="assignment.ecore#//HourType"> + <genEnumLiterals ecoreEnumLiteral="assignment.ecore#//HourType/Lab"/> + <genEnumLiterals ecoreEnumLiteral="assignment.ecore#//HourType/Lecture"/> + </genEnums> + <genEnums typeSafeEnumCompatible="false" ecoreEnum="assignment.ecore#//RoleType"> + <genEnumLiterals ecoreEnumLiteral="assignment.ecore#//RoleType/Lecturer"/> + <genEnumLiterals ecoreEnumLiteral="assignment.ecore#//RoleType/StudentAssistent"/> + <genEnumLiterals ecoreEnumLiteral="assignment.ecore#//RoleType/Student"/> + </genEnums> + <genClasses ecoreClass="assignment.ecore#//Course"> + <genFeatures createChild="false" ecoreFeature="ecore:EAttribute assignment.ecore#//Course/name"/> + <genFeatures createChild="false" ecoreFeature="ecore:EAttribute assignment.ecore#//Course/code"/> + <genFeatures createChild="false" ecoreFeature="ecore:EAttribute assignment.ecore#//Course/creditsNumber"/> + <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference assignment.ecore#//Course/instances"/> + <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference assignment.ecore#//Course/requiredCourses"/> + <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference assignment.ecore#//Course/recommendedCourses"/> + <genFeatures createChild="false" ecoreFeature="ecore:EAttribute assignment.ecore#//Course/content"/> + <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference assignment.ecore#//Course/creditsReduction"/> + <genFeatures property="None" notify="false" createChild="false" ecoreFeature="ecore:EReference assignment.ecore#//Course/department"/> + </genClasses> + <genClasses ecoreClass="assignment.ecore#//CourseRelation"> + <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference assignment.ecore#//CourseRelation/course"/> + <genFeatures createChild="false" ecoreFeature="ecore:EAttribute assignment.ecore#//CourseRelation/creditsReduction"/> + </genClasses> + <genClasses ecoreClass="assignment.ecore#//CourseInstance"> + <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference assignment.ecore#//CourseInstance/evaluationForm"/> + <genFeatures createChild="false" ecoreFeature="ecore:EAttribute assignment.ecore#//CourseInstance/year"/> + <genFeatures createChild="false" ecoreFeature="ecore:EAttribute assignment.ecore#//CourseInstance/semester"/> + <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference assignment.ecore#//CourseInstance/labHours"/> + <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference assignment.ecore#//CourseInstance/lectureHours"/> + <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference assignment.ecore#//CourseInstance/courseWork"/> + <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference assignment.ecore#//CourseInstance/staff"/> + <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference assignment.ecore#//CourseInstance/studyPrograms"/> + <genFeatures property="None" notify="false" createChild="false" ecoreFeature="ecore:EReference assignment.ecore#//CourseInstance/course"/> + </genClasses> + <genClasses ecoreClass="assignment.ecore#//CourseWork"> + <genFeatures createChild="false" ecoreFeature="ecore:EAttribute assignment.ecore#//CourseWork/lectureHours"/> + <genFeatures createChild="false" ecoreFeature="ecore:EAttribute assignment.ecore#//CourseWork/labHours"/> + </genClasses> + <genClasses ecoreClass="assignment.ecore#//Role"> + <genFeatures createChild="false" ecoreFeature="ecore:EAttribute assignment.ecore#//Role/type"/> + <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference assignment.ecore#//Role/people"/> + </genClasses> + <genClasses ecoreClass="assignment.ecore#//People"> + <genFeatures createChild="false" ecoreFeature="ecore:EAttribute assignment.ecore#//People/name"/> + <genFeatures createChild="false" ecoreFeature="ecore:EAttribute assignment.ecore#//People/email"/> + </genClasses> + <genClasses ecoreClass="assignment.ecore#//StudyProgram"> + <genFeatures createChild="false" ecoreFeature="ecore:EAttribute assignment.ecore#//StudyProgram/code"/> + </genClasses> + <genClasses ecoreClass="assignment.ecore#//Work"> + <genFeatures createChild="false" ecoreFeature="ecore:EAttribute assignment.ecore#//Work/percentage"/> + <genFeatures createChild="false" ecoreFeature="ecore:EAttribute assignment.ecore#//Work/type"/> + </genClasses> + <genClasses ecoreClass="assignment.ecore#//Department"> + <genFeatures createChild="false" ecoreFeature="ecore:EAttribute assignment.ecore#//Department/name"/> + <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference assignment.ecore#//Department/courses"/> + <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference assignment.ecore#//Department/staff"/> + </genClasses> + <genClasses ecoreClass="assignment.ecore#//ScheduledHour"> + <genFeatures createChild="false" ecoreFeature="ecore:EAttribute assignment.ecore#//ScheduledHour/duration"/> + <genFeatures createChild="false" ecoreFeature="ecore:EAttribute assignment.ecore#//ScheduledHour/room"/> + <genFeatures createChild="false" ecoreFeature="ecore:EAttribute assignment.ecore#//ScheduledHour/beginning"/> + <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference assignment.ecore#//ScheduledHour/reservedForProgram"/> + <genFeatures createChild="false" ecoreFeature="ecore:EAttribute assignment.ecore#//ScheduledHour/day"/> + <genFeatures createChild="false" ecoreFeature="ecore:EAttribute assignment.ecore#//ScheduledHour/type"/> + </genClasses> + </genPackages> +</genmodel:GenModel> diff --git a/Assignment/plugin.properties b/Assignment/plugin.properties new file mode 100644 index 0000000000000000000000000000000000000000..db1a017b802c67a512c5c600244318e638adb6fb --- /dev/null +++ b/Assignment/plugin.properties @@ -0,0 +1,4 @@ +# + +pluginName = Assignment +providerName = www.example.org diff --git a/Assignment/plugin.xml b/Assignment/plugin.xml new file mode 100644 index 0000000000000000000000000000000000000000..d928a0ac977ca5697d42f76abb36b64e81483ce1 --- /dev/null +++ b/Assignment/plugin.xml @@ -0,0 +1,24 @@ +<?xml version="1.0" encoding="UTF-8"?> +<?eclipse version="3.0"?> + +<!-- +--> + +<plugin> + + <extension point="org.eclipse.emf.ecore.generated_package"> + <!-- @generated assignment --> + <package + uri="http://www.example.org/assignment" + class="assignment.AssignmentPackage" + genModel="model/assignment.genmodel"/> + </extension> + + <extension point="org.eclipse.emf.ecore.extension_parser"> + <!-- @generated assignment --> + <parser + type="assignment" + class="assignment.util.AssignmentResourceFactoryImpl"/> + </extension> + +</plugin> diff --git a/Assignment/src-gen/assignment/AssignmentFactory.java b/Assignment/src-gen/assignment/AssignmentFactory.java new file mode 100644 index 0000000000000000000000000000000000000000..9cf49e2a4dd41f17dd949f3d4e157207a2302f7d --- /dev/null +++ b/Assignment/src-gen/assignment/AssignmentFactory.java @@ -0,0 +1,123 @@ +/** + */ +package assignment; + +import org.eclipse.emf.ecore.EFactory; + +/** + * <!-- begin-user-doc --> + * The <b>Factory</b> for the model. + * It provides a create method for each non-abstract class of the model. + * <!-- end-user-doc --> + * @see assignment.AssignmentPackage + * @generated + */ +public interface AssignmentFactory extends EFactory { + /** + * The singleton instance of the factory. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + AssignmentFactory eINSTANCE = assignment.impl.AssignmentFactoryImpl.init(); + + /** + * Returns a new object of class '<em>Course</em>'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return a new object of class '<em>Course</em>'. + * @generated + */ + Course createCourse(); + + /** + * Returns a new object of class '<em>Course Relation</em>'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return a new object of class '<em>Course Relation</em>'. + * @generated + */ + CourseRelation createCourseRelation(); + + /** + * Returns a new object of class '<em>Course Instance</em>'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return a new object of class '<em>Course Instance</em>'. + * @generated + */ + CourseInstance createCourseInstance(); + + /** + * Returns a new object of class '<em>Course Work</em>'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return a new object of class '<em>Course Work</em>'. + * @generated + */ + CourseWork createCourseWork(); + + /** + * Returns a new object of class '<em>Role</em>'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return a new object of class '<em>Role</em>'. + * @generated + */ + Role createRole(); + + /** + * Returns a new object of class '<em>People</em>'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return a new object of class '<em>People</em>'. + * @generated + */ + People createPeople(); + + /** + * Returns a new object of class '<em>Study Program</em>'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return a new object of class '<em>Study Program</em>'. + * @generated + */ + StudyProgram createStudyProgram(); + + /** + * Returns a new object of class '<em>Work</em>'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return a new object of class '<em>Work</em>'. + * @generated + */ + Work createWork(); + + /** + * Returns a new object of class '<em>Department</em>'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return a new object of class '<em>Department</em>'. + * @generated + */ + Department createDepartment(); + + /** + * Returns a new object of class '<em>Scheduled Hour</em>'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return a new object of class '<em>Scheduled Hour</em>'. + * @generated + */ + ScheduledHour createScheduledHour(); + + /** + * Returns the package supported by this factory. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the package supported by this factory. + * @generated + */ + AssignmentPackage getAssignmentPackage(); + +} //AssignmentFactory diff --git a/Assignment/src-gen/assignment/AssignmentPackage.java b/Assignment/src-gen/assignment/AssignmentPackage.java new file mode 100644 index 0000000000000000000000000000000000000000..89266a2792005d5c31667bfd1b803d97cb6b153a --- /dev/null +++ b/Assignment/src-gen/assignment/AssignmentPackage.java @@ -0,0 +1,1749 @@ +/** + */ +package assignment; + +import org.eclipse.emf.ecore.EAttribute; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EEnum; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.EReference; + +/** + * <!-- begin-user-doc --> + * The <b>Package</b> for the model. + * It contains accessors for the meta objects to represent + * <ul> + * <li>each class,</li> + * <li>each feature of each class,</li> + * <li>each operation of each class,</li> + * <li>each enum,</li> + * <li>and each data type</li> + * </ul> + * <!-- end-user-doc --> + * @see assignment.AssignmentFactory + * @model kind="package" + * @generated + */ +public interface AssignmentPackage extends EPackage { + /** + * The package name. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + String eNAME = "assignment"; + + /** + * The package namespace URI. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + String eNS_URI = "http://www.example.org/assignment"; + + /** + * The package namespace name. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + String eNS_PREFIX = "assignment"; + + /** + * The singleton instance of the package. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + AssignmentPackage eINSTANCE = assignment.impl.AssignmentPackageImpl.init(); + + /** + * The meta object id for the '{@link assignment.impl.CourseImpl <em>Course</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see assignment.impl.CourseImpl + * @see assignment.impl.AssignmentPackageImpl#getCourse() + * @generated + */ + int COURSE = 0; + + /** + * The feature id for the '<em><b>Name</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int COURSE__NAME = 0; + + /** + * The feature id for the '<em><b>Code</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int COURSE__CODE = 1; + + /** + * The feature id for the '<em><b>Credits Number</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int COURSE__CREDITS_NUMBER = 2; + + /** + * The feature id for the '<em><b>Instances</b></em>' containment reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int COURSE__INSTANCES = 3; + + /** + * The feature id for the '<em><b>Required Courses</b></em>' reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int COURSE__REQUIRED_COURSES = 4; + + /** + * The feature id for the '<em><b>Recommended Courses</b></em>' reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int COURSE__RECOMMENDED_COURSES = 5; + + /** + * The feature id for the '<em><b>Content</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int COURSE__CONTENT = 6; + + /** + * The feature id for the '<em><b>Credits Reduction</b></em>' containment reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int COURSE__CREDITS_REDUCTION = 7; + + /** + * The feature id for the '<em><b>Department</b></em>' container reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int COURSE__DEPARTMENT = 8; + + /** + * The number of structural features of the '<em>Course</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int COURSE_FEATURE_COUNT = 9; + + /** + * The number of operations of the '<em>Course</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int COURSE_OPERATION_COUNT = 0; + + /** + * The meta object id for the '{@link assignment.impl.CourseRelationImpl <em>Course Relation</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see assignment.impl.CourseRelationImpl + * @see assignment.impl.AssignmentPackageImpl#getCourseRelation() + * @generated + */ + int COURSE_RELATION = 1; + + /** + * The feature id for the '<em><b>Course</b></em>' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int COURSE_RELATION__COURSE = 0; + + /** + * The feature id for the '<em><b>Credits Reduction</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int COURSE_RELATION__CREDITS_REDUCTION = 1; + + /** + * The number of structural features of the '<em>Course Relation</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int COURSE_RELATION_FEATURE_COUNT = 2; + + /** + * The number of operations of the '<em>Course Relation</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int COURSE_RELATION_OPERATION_COUNT = 0; + + /** + * The meta object id for the '{@link assignment.impl.CourseInstanceImpl <em>Course Instance</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see assignment.impl.CourseInstanceImpl + * @see assignment.impl.AssignmentPackageImpl#getCourseInstance() + * @generated + */ + int COURSE_INSTANCE = 2; + + /** + * The feature id for the '<em><b>Evaluation Form</b></em>' containment reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int COURSE_INSTANCE__EVALUATION_FORM = 0; + + /** + * The feature id for the '<em><b>Year</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int COURSE_INSTANCE__YEAR = 1; + + /** + * The feature id for the '<em><b>Semester</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int COURSE_INSTANCE__SEMESTER = 2; + + /** + * The feature id for the '<em><b>Lab Hours</b></em>' containment reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int COURSE_INSTANCE__LAB_HOURS = 3; + + /** + * The feature id for the '<em><b>Lecture Hours</b></em>' containment reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int COURSE_INSTANCE__LECTURE_HOURS = 4; + + /** + * The feature id for the '<em><b>Course Work</b></em>' containment reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int COURSE_INSTANCE__COURSE_WORK = 5; + + /** + * The feature id for the '<em><b>Staff</b></em>' containment reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int COURSE_INSTANCE__STAFF = 6; + + /** + * The feature id for the '<em><b>Study Programs</b></em>' reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int COURSE_INSTANCE__STUDY_PROGRAMS = 7; + + /** + * The feature id for the '<em><b>Course</b></em>' container reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int COURSE_INSTANCE__COURSE = 8; + + /** + * The number of structural features of the '<em>Course Instance</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int COURSE_INSTANCE_FEATURE_COUNT = 9; + + /** + * The number of operations of the '<em>Course Instance</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int COURSE_INSTANCE_OPERATION_COUNT = 0; + + /** + * The meta object id for the '{@link assignment.impl.CourseWorkImpl <em>Course Work</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see assignment.impl.CourseWorkImpl + * @see assignment.impl.AssignmentPackageImpl#getCourseWork() + * @generated + */ + int COURSE_WORK = 3; + + /** + * The feature id for the '<em><b>Lecture Hours</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int COURSE_WORK__LECTURE_HOURS = 0; + + /** + * The feature id for the '<em><b>Lab Hours</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int COURSE_WORK__LAB_HOURS = 1; + + /** + * The number of structural features of the '<em>Course Work</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int COURSE_WORK_FEATURE_COUNT = 2; + + /** + * The number of operations of the '<em>Course Work</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int COURSE_WORK_OPERATION_COUNT = 0; + + /** + * The meta object id for the '{@link assignment.impl.RoleImpl <em>Role</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see assignment.impl.RoleImpl + * @see assignment.impl.AssignmentPackageImpl#getRole() + * @generated + */ + int ROLE = 4; + + /** + * The feature id for the '<em><b>Type</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int ROLE__TYPE = 0; + + /** + * The feature id for the '<em><b>People</b></em>' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int ROLE__PEOPLE = 1; + + /** + * The number of structural features of the '<em>Role</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int ROLE_FEATURE_COUNT = 2; + + /** + * The number of operations of the '<em>Role</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int ROLE_OPERATION_COUNT = 0; + + /** + * The meta object id for the '{@link assignment.impl.PeopleImpl <em>People</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see assignment.impl.PeopleImpl + * @see assignment.impl.AssignmentPackageImpl#getPeople() + * @generated + */ + int PEOPLE = 5; + + /** + * The feature id for the '<em><b>Name</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int PEOPLE__NAME = 0; + + /** + * The feature id for the '<em><b>Email</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int PEOPLE__EMAIL = 1; + + /** + * The number of structural features of the '<em>People</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int PEOPLE_FEATURE_COUNT = 2; + + /** + * The number of operations of the '<em>People</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int PEOPLE_OPERATION_COUNT = 0; + + /** + * The meta object id for the '{@link assignment.impl.StudyProgramImpl <em>Study Program</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see assignment.impl.StudyProgramImpl + * @see assignment.impl.AssignmentPackageImpl#getStudyProgram() + * @generated + */ + int STUDY_PROGRAM = 6; + + /** + * The feature id for the '<em><b>Code</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int STUDY_PROGRAM__CODE = 0; + + /** + * The number of structural features of the '<em>Study Program</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int STUDY_PROGRAM_FEATURE_COUNT = 1; + + /** + * The number of operations of the '<em>Study Program</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int STUDY_PROGRAM_OPERATION_COUNT = 0; + + /** + * The meta object id for the '{@link assignment.impl.WorkImpl <em>Work</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see assignment.impl.WorkImpl + * @see assignment.impl.AssignmentPackageImpl#getWork() + * @generated + */ + int WORK = 7; + + /** + * The feature id for the '<em><b>Percentage</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int WORK__PERCENTAGE = 0; + + /** + * The feature id for the '<em><b>Type</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int WORK__TYPE = 1; + + /** + * The number of structural features of the '<em>Work</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int WORK_FEATURE_COUNT = 2; + + /** + * The number of operations of the '<em>Work</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int WORK_OPERATION_COUNT = 0; + + /** + * The meta object id for the '{@link assignment.impl.DepartmentImpl <em>Department</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see assignment.impl.DepartmentImpl + * @see assignment.impl.AssignmentPackageImpl#getDepartment() + * @generated + */ + int DEPARTMENT = 8; + + /** + * The feature id for the '<em><b>Name</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int DEPARTMENT__NAME = 0; + + /** + * The feature id for the '<em><b>Courses</b></em>' containment reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int DEPARTMENT__COURSES = 1; + + /** + * The feature id for the '<em><b>Staff</b></em>' containment reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int DEPARTMENT__STAFF = 2; + + /** + * The number of structural features of the '<em>Department</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int DEPARTMENT_FEATURE_COUNT = 3; + + /** + * The number of operations of the '<em>Department</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int DEPARTMENT_OPERATION_COUNT = 0; + + /** + * The meta object id for the '{@link assignment.impl.ScheduledHourImpl <em>Scheduled Hour</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see assignment.impl.ScheduledHourImpl + * @see assignment.impl.AssignmentPackageImpl#getScheduledHour() + * @generated + */ + int SCHEDULED_HOUR = 9; + + /** + * The feature id for the '<em><b>Duration</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int SCHEDULED_HOUR__DURATION = 0; + + /** + * The feature id for the '<em><b>Room</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int SCHEDULED_HOUR__ROOM = 1; + + /** + * The feature id for the '<em><b>Beginning</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int SCHEDULED_HOUR__BEGINNING = 2; + + /** + * The feature id for the '<em><b>Reserved For Program</b></em>' reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int SCHEDULED_HOUR__RESERVED_FOR_PROGRAM = 3; + + /** + * The feature id for the '<em><b>Day</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int SCHEDULED_HOUR__DAY = 4; + + /** + * The feature id for the '<em><b>Type</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int SCHEDULED_HOUR__TYPE = 5; + + /** + * The number of structural features of the '<em>Scheduled Hour</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int SCHEDULED_HOUR_FEATURE_COUNT = 6; + + /** + * The number of operations of the '<em>Scheduled Hour</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int SCHEDULED_HOUR_OPERATION_COUNT = 0; + + /** + * The meta object id for the '{@link assignment.Semester <em>Semester</em>}' enum. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see assignment.Semester + * @see assignment.impl.AssignmentPackageImpl#getSemester() + * @generated + */ + int SEMESTER = 10; + + /** + * The meta object id for the '{@link assignment.WorkType <em>Work Type</em>}' enum. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see assignment.WorkType + * @see assignment.impl.AssignmentPackageImpl#getWorkType() + * @generated + */ + int WORK_TYPE = 11; + + /** + * The meta object id for the '{@link assignment.HourType <em>Hour Type</em>}' enum. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see assignment.HourType + * @see assignment.impl.AssignmentPackageImpl#getHourType() + * @generated + */ + int HOUR_TYPE = 12; + + /** + * The meta object id for the '{@link assignment.RoleType <em>Role Type</em>}' enum. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see assignment.RoleType + * @see assignment.impl.AssignmentPackageImpl#getRoleType() + * @generated + */ + int ROLE_TYPE = 13; + + /** + * Returns the meta object for class '{@link assignment.Course <em>Course</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for class '<em>Course</em>'. + * @see assignment.Course + * @generated + */ + EClass getCourse(); + + /** + * Returns the meta object for the attribute '{@link assignment.Course#getName <em>Name</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Name</em>'. + * @see assignment.Course#getName() + * @see #getCourse() + * @generated + */ + EAttribute getCourse_Name(); + + /** + * Returns the meta object for the attribute '{@link assignment.Course#getCode <em>Code</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Code</em>'. + * @see assignment.Course#getCode() + * @see #getCourse() + * @generated + */ + EAttribute getCourse_Code(); + + /** + * Returns the meta object for the attribute '{@link assignment.Course#getCreditsNumber <em>Credits Number</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Credits Number</em>'. + * @see assignment.Course#getCreditsNumber() + * @see #getCourse() + * @generated + */ + EAttribute getCourse_CreditsNumber(); + + /** + * Returns the meta object for the containment reference list '{@link assignment.Course#getInstances <em>Instances</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the containment reference list '<em>Instances</em>'. + * @see assignment.Course#getInstances() + * @see #getCourse() + * @generated + */ + EReference getCourse_Instances(); + + /** + * Returns the meta object for the reference list '{@link assignment.Course#getRequiredCourses <em>Required Courses</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the reference list '<em>Required Courses</em>'. + * @see assignment.Course#getRequiredCourses() + * @see #getCourse() + * @generated + */ + EReference getCourse_RequiredCourses(); + + /** + * Returns the meta object for the reference list '{@link assignment.Course#getRecommendedCourses <em>Recommended Courses</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the reference list '<em>Recommended Courses</em>'. + * @see assignment.Course#getRecommendedCourses() + * @see #getCourse() + * @generated + */ + EReference getCourse_RecommendedCourses(); + + /** + * Returns the meta object for the attribute '{@link assignment.Course#getContent <em>Content</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Content</em>'. + * @see assignment.Course#getContent() + * @see #getCourse() + * @generated + */ + EAttribute getCourse_Content(); + + /** + * Returns the meta object for the containment reference list '{@link assignment.Course#getCreditsReduction <em>Credits Reduction</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the containment reference list '<em>Credits Reduction</em>'. + * @see assignment.Course#getCreditsReduction() + * @see #getCourse() + * @generated + */ + EReference getCourse_CreditsReduction(); + + /** + * Returns the meta object for the container reference '{@link assignment.Course#getDepartment <em>Department</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the container reference '<em>Department</em>'. + * @see assignment.Course#getDepartment() + * @see #getCourse() + * @generated + */ + EReference getCourse_Department(); + + /** + * Returns the meta object for class '{@link assignment.CourseRelation <em>Course Relation</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for class '<em>Course Relation</em>'. + * @see assignment.CourseRelation + * @generated + */ + EClass getCourseRelation(); + + /** + * Returns the meta object for the reference '{@link assignment.CourseRelation#getCourse <em>Course</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the reference '<em>Course</em>'. + * @see assignment.CourseRelation#getCourse() + * @see #getCourseRelation() + * @generated + */ + EReference getCourseRelation_Course(); + + /** + * Returns the meta object for the attribute '{@link assignment.CourseRelation#getCreditsReduction <em>Credits Reduction</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Credits Reduction</em>'. + * @see assignment.CourseRelation#getCreditsReduction() + * @see #getCourseRelation() + * @generated + */ + EAttribute getCourseRelation_CreditsReduction(); + + /** + * Returns the meta object for class '{@link assignment.CourseInstance <em>Course Instance</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for class '<em>Course Instance</em>'. + * @see assignment.CourseInstance + * @generated + */ + EClass getCourseInstance(); + + /** + * Returns the meta object for the containment reference list '{@link assignment.CourseInstance#getEvaluationForm <em>Evaluation Form</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the containment reference list '<em>Evaluation Form</em>'. + * @see assignment.CourseInstance#getEvaluationForm() + * @see #getCourseInstance() + * @generated + */ + EReference getCourseInstance_EvaluationForm(); + + /** + * Returns the meta object for the attribute '{@link assignment.CourseInstance#getYear <em>Year</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Year</em>'. + * @see assignment.CourseInstance#getYear() + * @see #getCourseInstance() + * @generated + */ + EAttribute getCourseInstance_Year(); + + /** + * Returns the meta object for the attribute '{@link assignment.CourseInstance#getSemester <em>Semester</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Semester</em>'. + * @see assignment.CourseInstance#getSemester() + * @see #getCourseInstance() + * @generated + */ + EAttribute getCourseInstance_Semester(); + + /** + * Returns the meta object for the containment reference list '{@link assignment.CourseInstance#getLabHours <em>Lab Hours</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the containment reference list '<em>Lab Hours</em>'. + * @see assignment.CourseInstance#getLabHours() + * @see #getCourseInstance() + * @generated + */ + EReference getCourseInstance_LabHours(); + + /** + * Returns the meta object for the containment reference list '{@link assignment.CourseInstance#getLectureHours <em>Lecture Hours</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the containment reference list '<em>Lecture Hours</em>'. + * @see assignment.CourseInstance#getLectureHours() + * @see #getCourseInstance() + * @generated + */ + EReference getCourseInstance_LectureHours(); + + /** + * Returns the meta object for the containment reference '{@link assignment.CourseInstance#getCourseWork <em>Course Work</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the containment reference '<em>Course Work</em>'. + * @see assignment.CourseInstance#getCourseWork() + * @see #getCourseInstance() + * @generated + */ + EReference getCourseInstance_CourseWork(); + + /** + * Returns the meta object for the containment reference list '{@link assignment.CourseInstance#getStaff <em>Staff</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the containment reference list '<em>Staff</em>'. + * @see assignment.CourseInstance#getStaff() + * @see #getCourseInstance() + * @generated + */ + EReference getCourseInstance_Staff(); + + /** + * Returns the meta object for the reference list '{@link assignment.CourseInstance#getStudyPrograms <em>Study Programs</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the reference list '<em>Study Programs</em>'. + * @see assignment.CourseInstance#getStudyPrograms() + * @see #getCourseInstance() + * @generated + */ + EReference getCourseInstance_StudyPrograms(); + + /** + * Returns the meta object for the container reference '{@link assignment.CourseInstance#getCourse <em>Course</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the container reference '<em>Course</em>'. + * @see assignment.CourseInstance#getCourse() + * @see #getCourseInstance() + * @generated + */ + EReference getCourseInstance_Course(); + + /** + * Returns the meta object for class '{@link assignment.CourseWork <em>Course Work</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for class '<em>Course Work</em>'. + * @see assignment.CourseWork + * @generated + */ + EClass getCourseWork(); + + /** + * Returns the meta object for the attribute '{@link assignment.CourseWork#getLectureHours <em>Lecture Hours</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Lecture Hours</em>'. + * @see assignment.CourseWork#getLectureHours() + * @see #getCourseWork() + * @generated + */ + EAttribute getCourseWork_LectureHours(); + + /** + * Returns the meta object for the attribute '{@link assignment.CourseWork#getLabHours <em>Lab Hours</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Lab Hours</em>'. + * @see assignment.CourseWork#getLabHours() + * @see #getCourseWork() + * @generated + */ + EAttribute getCourseWork_LabHours(); + + /** + * Returns the meta object for class '{@link assignment.Role <em>Role</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for class '<em>Role</em>'. + * @see assignment.Role + * @generated + */ + EClass getRole(); + + /** + * Returns the meta object for the attribute '{@link assignment.Role#getType <em>Type</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Type</em>'. + * @see assignment.Role#getType() + * @see #getRole() + * @generated + */ + EAttribute getRole_Type(); + + /** + * Returns the meta object for the reference '{@link assignment.Role#getPeople <em>People</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the reference '<em>People</em>'. + * @see assignment.Role#getPeople() + * @see #getRole() + * @generated + */ + EReference getRole_People(); + + /** + * Returns the meta object for class '{@link assignment.People <em>People</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for class '<em>People</em>'. + * @see assignment.People + * @generated + */ + EClass getPeople(); + + /** + * Returns the meta object for the attribute '{@link assignment.People#getName <em>Name</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Name</em>'. + * @see assignment.People#getName() + * @see #getPeople() + * @generated + */ + EAttribute getPeople_Name(); + + /** + * Returns the meta object for the attribute '{@link assignment.People#getEmail <em>Email</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Email</em>'. + * @see assignment.People#getEmail() + * @see #getPeople() + * @generated + */ + EAttribute getPeople_Email(); + + /** + * Returns the meta object for class '{@link assignment.StudyProgram <em>Study Program</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for class '<em>Study Program</em>'. + * @see assignment.StudyProgram + * @generated + */ + EClass getStudyProgram(); + + /** + * Returns the meta object for the attribute '{@link assignment.StudyProgram#getCode <em>Code</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Code</em>'. + * @see assignment.StudyProgram#getCode() + * @see #getStudyProgram() + * @generated + */ + EAttribute getStudyProgram_Code(); + + /** + * Returns the meta object for class '{@link assignment.Work <em>Work</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for class '<em>Work</em>'. + * @see assignment.Work + * @generated + */ + EClass getWork(); + + /** + * Returns the meta object for the attribute '{@link assignment.Work#getPercentage <em>Percentage</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Percentage</em>'. + * @see assignment.Work#getPercentage() + * @see #getWork() + * @generated + */ + EAttribute getWork_Percentage(); + + /** + * Returns the meta object for the attribute '{@link assignment.Work#getType <em>Type</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Type</em>'. + * @see assignment.Work#getType() + * @see #getWork() + * @generated + */ + EAttribute getWork_Type(); + + /** + * Returns the meta object for class '{@link assignment.Department <em>Department</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for class '<em>Department</em>'. + * @see assignment.Department + * @generated + */ + EClass getDepartment(); + + /** + * Returns the meta object for the attribute '{@link assignment.Department#getName <em>Name</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Name</em>'. + * @see assignment.Department#getName() + * @see #getDepartment() + * @generated + */ + EAttribute getDepartment_Name(); + + /** + * Returns the meta object for the containment reference list '{@link assignment.Department#getCourses <em>Courses</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the containment reference list '<em>Courses</em>'. + * @see assignment.Department#getCourses() + * @see #getDepartment() + * @generated + */ + EReference getDepartment_Courses(); + + /** + * Returns the meta object for the containment reference list '{@link assignment.Department#getStaff <em>Staff</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the containment reference list '<em>Staff</em>'. + * @see assignment.Department#getStaff() + * @see #getDepartment() + * @generated + */ + EReference getDepartment_Staff(); + + /** + * Returns the meta object for class '{@link assignment.ScheduledHour <em>Scheduled Hour</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for class '<em>Scheduled Hour</em>'. + * @see assignment.ScheduledHour + * @generated + */ + EClass getScheduledHour(); + + /** + * Returns the meta object for the attribute '{@link assignment.ScheduledHour#getDuration <em>Duration</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Duration</em>'. + * @see assignment.ScheduledHour#getDuration() + * @see #getScheduledHour() + * @generated + */ + EAttribute getScheduledHour_Duration(); + + /** + * Returns the meta object for the attribute '{@link assignment.ScheduledHour#getRoom <em>Room</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Room</em>'. + * @see assignment.ScheduledHour#getRoom() + * @see #getScheduledHour() + * @generated + */ + EAttribute getScheduledHour_Room(); + + /** + * Returns the meta object for the attribute '{@link assignment.ScheduledHour#getBeginning <em>Beginning</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Beginning</em>'. + * @see assignment.ScheduledHour#getBeginning() + * @see #getScheduledHour() + * @generated + */ + EAttribute getScheduledHour_Beginning(); + + /** + * Returns the meta object for the reference list '{@link assignment.ScheduledHour#getReservedForProgram <em>Reserved For Program</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the reference list '<em>Reserved For Program</em>'. + * @see assignment.ScheduledHour#getReservedForProgram() + * @see #getScheduledHour() + * @generated + */ + EReference getScheduledHour_ReservedForProgram(); + + /** + * Returns the meta object for the attribute '{@link assignment.ScheduledHour#getDay <em>Day</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Day</em>'. + * @see assignment.ScheduledHour#getDay() + * @see #getScheduledHour() + * @generated + */ + EAttribute getScheduledHour_Day(); + + /** + * Returns the meta object for the attribute '{@link assignment.ScheduledHour#getType <em>Type</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Type</em>'. + * @see assignment.ScheduledHour#getType() + * @see #getScheduledHour() + * @generated + */ + EAttribute getScheduledHour_Type(); + + /** + * Returns the meta object for enum '{@link assignment.Semester <em>Semester</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for enum '<em>Semester</em>'. + * @see assignment.Semester + * @generated + */ + EEnum getSemester(); + + /** + * Returns the meta object for enum '{@link assignment.WorkType <em>Work Type</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for enum '<em>Work Type</em>'. + * @see assignment.WorkType + * @generated + */ + EEnum getWorkType(); + + /** + * Returns the meta object for enum '{@link assignment.HourType <em>Hour Type</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for enum '<em>Hour Type</em>'. + * @see assignment.HourType + * @generated + */ + EEnum getHourType(); + + /** + * Returns the meta object for enum '{@link assignment.RoleType <em>Role Type</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for enum '<em>Role Type</em>'. + * @see assignment.RoleType + * @generated + */ + EEnum getRoleType(); + + /** + * Returns the factory that creates the instances of the model. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the factory that creates the instances of the model. + * @generated + */ + AssignmentFactory getAssignmentFactory(); + + /** + * <!-- begin-user-doc --> + * Defines literals for the meta objects that represent + * <ul> + * <li>each class,</li> + * <li>each feature of each class,</li> + * <li>each operation of each class,</li> + * <li>each enum,</li> + * <li>and each data type</li> + * </ul> + * <!-- end-user-doc --> + * @generated + */ + interface Literals { + /** + * The meta object literal for the '{@link assignment.impl.CourseImpl <em>Course</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see assignment.impl.CourseImpl + * @see assignment.impl.AssignmentPackageImpl#getCourse() + * @generated + */ + EClass COURSE = eINSTANCE.getCourse(); + + /** + * The meta object literal for the '<em><b>Name</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute COURSE__NAME = eINSTANCE.getCourse_Name(); + + /** + * The meta object literal for the '<em><b>Code</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute COURSE__CODE = eINSTANCE.getCourse_Code(); + + /** + * The meta object literal for the '<em><b>Credits Number</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute COURSE__CREDITS_NUMBER = eINSTANCE.getCourse_CreditsNumber(); + + /** + * The meta object literal for the '<em><b>Instances</b></em>' containment reference list feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EReference COURSE__INSTANCES = eINSTANCE.getCourse_Instances(); + + /** + * The meta object literal for the '<em><b>Required Courses</b></em>' reference list feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EReference COURSE__REQUIRED_COURSES = eINSTANCE.getCourse_RequiredCourses(); + + /** + * The meta object literal for the '<em><b>Recommended Courses</b></em>' reference list feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EReference COURSE__RECOMMENDED_COURSES = eINSTANCE.getCourse_RecommendedCourses(); + + /** + * The meta object literal for the '<em><b>Content</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute COURSE__CONTENT = eINSTANCE.getCourse_Content(); + + /** + * The meta object literal for the '<em><b>Credits Reduction</b></em>' containment reference list feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EReference COURSE__CREDITS_REDUCTION = eINSTANCE.getCourse_CreditsReduction(); + + /** + * The meta object literal for the '<em><b>Department</b></em>' container reference feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EReference COURSE__DEPARTMENT = eINSTANCE.getCourse_Department(); + + /** + * The meta object literal for the '{@link assignment.impl.CourseRelationImpl <em>Course Relation</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see assignment.impl.CourseRelationImpl + * @see assignment.impl.AssignmentPackageImpl#getCourseRelation() + * @generated + */ + EClass COURSE_RELATION = eINSTANCE.getCourseRelation(); + + /** + * The meta object literal for the '<em><b>Course</b></em>' reference feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EReference COURSE_RELATION__COURSE = eINSTANCE.getCourseRelation_Course(); + + /** + * The meta object literal for the '<em><b>Credits Reduction</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute COURSE_RELATION__CREDITS_REDUCTION = eINSTANCE.getCourseRelation_CreditsReduction(); + + /** + * The meta object literal for the '{@link assignment.impl.CourseInstanceImpl <em>Course Instance</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see assignment.impl.CourseInstanceImpl + * @see assignment.impl.AssignmentPackageImpl#getCourseInstance() + * @generated + */ + EClass COURSE_INSTANCE = eINSTANCE.getCourseInstance(); + + /** + * The meta object literal for the '<em><b>Evaluation Form</b></em>' containment reference list feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EReference COURSE_INSTANCE__EVALUATION_FORM = eINSTANCE.getCourseInstance_EvaluationForm(); + + /** + * The meta object literal for the '<em><b>Year</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute COURSE_INSTANCE__YEAR = eINSTANCE.getCourseInstance_Year(); + + /** + * The meta object literal for the '<em><b>Semester</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute COURSE_INSTANCE__SEMESTER = eINSTANCE.getCourseInstance_Semester(); + + /** + * The meta object literal for the '<em><b>Lab Hours</b></em>' containment reference list feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EReference COURSE_INSTANCE__LAB_HOURS = eINSTANCE.getCourseInstance_LabHours(); + + /** + * The meta object literal for the '<em><b>Lecture Hours</b></em>' containment reference list feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EReference COURSE_INSTANCE__LECTURE_HOURS = eINSTANCE.getCourseInstance_LectureHours(); + + /** + * The meta object literal for the '<em><b>Course Work</b></em>' containment reference feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EReference COURSE_INSTANCE__COURSE_WORK = eINSTANCE.getCourseInstance_CourseWork(); + + /** + * The meta object literal for the '<em><b>Staff</b></em>' containment reference list feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EReference COURSE_INSTANCE__STAFF = eINSTANCE.getCourseInstance_Staff(); + + /** + * The meta object literal for the '<em><b>Study Programs</b></em>' reference list feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EReference COURSE_INSTANCE__STUDY_PROGRAMS = eINSTANCE.getCourseInstance_StudyPrograms(); + + /** + * The meta object literal for the '<em><b>Course</b></em>' container reference feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EReference COURSE_INSTANCE__COURSE = eINSTANCE.getCourseInstance_Course(); + + /** + * The meta object literal for the '{@link assignment.impl.CourseWorkImpl <em>Course Work</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see assignment.impl.CourseWorkImpl + * @see assignment.impl.AssignmentPackageImpl#getCourseWork() + * @generated + */ + EClass COURSE_WORK = eINSTANCE.getCourseWork(); + + /** + * The meta object literal for the '<em><b>Lecture Hours</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute COURSE_WORK__LECTURE_HOURS = eINSTANCE.getCourseWork_LectureHours(); + + /** + * The meta object literal for the '<em><b>Lab Hours</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute COURSE_WORK__LAB_HOURS = eINSTANCE.getCourseWork_LabHours(); + + /** + * The meta object literal for the '{@link assignment.impl.RoleImpl <em>Role</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see assignment.impl.RoleImpl + * @see assignment.impl.AssignmentPackageImpl#getRole() + * @generated + */ + EClass ROLE = eINSTANCE.getRole(); + + /** + * The meta object literal for the '<em><b>Type</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute ROLE__TYPE = eINSTANCE.getRole_Type(); + + /** + * The meta object literal for the '<em><b>People</b></em>' reference feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EReference ROLE__PEOPLE = eINSTANCE.getRole_People(); + + /** + * The meta object literal for the '{@link assignment.impl.PeopleImpl <em>People</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see assignment.impl.PeopleImpl + * @see assignment.impl.AssignmentPackageImpl#getPeople() + * @generated + */ + EClass PEOPLE = eINSTANCE.getPeople(); + + /** + * The meta object literal for the '<em><b>Name</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute PEOPLE__NAME = eINSTANCE.getPeople_Name(); + + /** + * The meta object literal for the '<em><b>Email</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute PEOPLE__EMAIL = eINSTANCE.getPeople_Email(); + + /** + * The meta object literal for the '{@link assignment.impl.StudyProgramImpl <em>Study Program</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see assignment.impl.StudyProgramImpl + * @see assignment.impl.AssignmentPackageImpl#getStudyProgram() + * @generated + */ + EClass STUDY_PROGRAM = eINSTANCE.getStudyProgram(); + + /** + * The meta object literal for the '<em><b>Code</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute STUDY_PROGRAM__CODE = eINSTANCE.getStudyProgram_Code(); + + /** + * The meta object literal for the '{@link assignment.impl.WorkImpl <em>Work</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see assignment.impl.WorkImpl + * @see assignment.impl.AssignmentPackageImpl#getWork() + * @generated + */ + EClass WORK = eINSTANCE.getWork(); + + /** + * The meta object literal for the '<em><b>Percentage</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute WORK__PERCENTAGE = eINSTANCE.getWork_Percentage(); + + /** + * The meta object literal for the '<em><b>Type</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute WORK__TYPE = eINSTANCE.getWork_Type(); + + /** + * The meta object literal for the '{@link assignment.impl.DepartmentImpl <em>Department</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see assignment.impl.DepartmentImpl + * @see assignment.impl.AssignmentPackageImpl#getDepartment() + * @generated + */ + EClass DEPARTMENT = eINSTANCE.getDepartment(); + + /** + * The meta object literal for the '<em><b>Name</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute DEPARTMENT__NAME = eINSTANCE.getDepartment_Name(); + + /** + * The meta object literal for the '<em><b>Courses</b></em>' containment reference list feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EReference DEPARTMENT__COURSES = eINSTANCE.getDepartment_Courses(); + + /** + * The meta object literal for the '<em><b>Staff</b></em>' containment reference list feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EReference DEPARTMENT__STAFF = eINSTANCE.getDepartment_Staff(); + + /** + * The meta object literal for the '{@link assignment.impl.ScheduledHourImpl <em>Scheduled Hour</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see assignment.impl.ScheduledHourImpl + * @see assignment.impl.AssignmentPackageImpl#getScheduledHour() + * @generated + */ + EClass SCHEDULED_HOUR = eINSTANCE.getScheduledHour(); + + /** + * The meta object literal for the '<em><b>Duration</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute SCHEDULED_HOUR__DURATION = eINSTANCE.getScheduledHour_Duration(); + + /** + * The meta object literal for the '<em><b>Room</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute SCHEDULED_HOUR__ROOM = eINSTANCE.getScheduledHour_Room(); + + /** + * The meta object literal for the '<em><b>Beginning</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute SCHEDULED_HOUR__BEGINNING = eINSTANCE.getScheduledHour_Beginning(); + + /** + * The meta object literal for the '<em><b>Reserved For Program</b></em>' reference list feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EReference SCHEDULED_HOUR__RESERVED_FOR_PROGRAM = eINSTANCE.getScheduledHour_ReservedForProgram(); + + /** + * The meta object literal for the '<em><b>Day</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute SCHEDULED_HOUR__DAY = eINSTANCE.getScheduledHour_Day(); + + /** + * The meta object literal for the '<em><b>Type</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute SCHEDULED_HOUR__TYPE = eINSTANCE.getScheduledHour_Type(); + + /** + * The meta object literal for the '{@link assignment.Semester <em>Semester</em>}' enum. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see assignment.Semester + * @see assignment.impl.AssignmentPackageImpl#getSemester() + * @generated + */ + EEnum SEMESTER = eINSTANCE.getSemester(); + + /** + * The meta object literal for the '{@link assignment.WorkType <em>Work Type</em>}' enum. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see assignment.WorkType + * @see assignment.impl.AssignmentPackageImpl#getWorkType() + * @generated + */ + EEnum WORK_TYPE = eINSTANCE.getWorkType(); + + /** + * The meta object literal for the '{@link assignment.HourType <em>Hour Type</em>}' enum. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see assignment.HourType + * @see assignment.impl.AssignmentPackageImpl#getHourType() + * @generated + */ + EEnum HOUR_TYPE = eINSTANCE.getHourType(); + + /** + * The meta object literal for the '{@link assignment.RoleType <em>Role Type</em>}' enum. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see assignment.RoleType + * @see assignment.impl.AssignmentPackageImpl#getRoleType() + * @generated + */ + EEnum ROLE_TYPE = eINSTANCE.getRoleType(); + + } + +} //AssignmentPackage diff --git a/Assignment/src-gen/assignment/Course.java b/Assignment/src-gen/assignment/Course.java new file mode 100644 index 0000000000000000000000000000000000000000..8d55c8749ff8843c24556f6c7d374108978e6480 --- /dev/null +++ b/Assignment/src-gen/assignment/Course.java @@ -0,0 +1,232 @@ +/** + */ +package assignment; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EObject; + +/** + * <!-- begin-user-doc --> + * A representation of the model object '<em><b>Course</b></em>'. + * <!-- end-user-doc --> + * + * <p> + * The following features are supported: + * </p> + * <ul> + * <li>{@link assignment.Course#getName <em>Name</em>}</li> + * <li>{@link assignment.Course#getCode <em>Code</em>}</li> + * <li>{@link assignment.Course#getCreditsNumber <em>Credits Number</em>}</li> + * <li>{@link assignment.Course#getInstances <em>Instances</em>}</li> + * <li>{@link assignment.Course#getRequiredCourses <em>Required Courses</em>}</li> + * <li>{@link assignment.Course#getRecommendedCourses <em>Recommended Courses</em>}</li> + * <li>{@link assignment.Course#getContent <em>Content</em>}</li> + * <li>{@link assignment.Course#getCreditsReduction <em>Credits Reduction</em>}</li> + * <li>{@link assignment.Course#getDepartment <em>Department</em>}</li> + * </ul> + * + * @see assignment.AssignmentPackage#getCourse() + * @model + * @generated + */ +public interface Course extends EObject { + /** + * Returns the value of the '<em><b>Name</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Name</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Name</em>' attribute. + * @see #setName(String) + * @see assignment.AssignmentPackage#getCourse_Name() + * @model + * @generated + */ + String getName(); + + /** + * Sets the value of the '{@link assignment.Course#getName <em>Name</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Name</em>' attribute. + * @see #getName() + * @generated + */ + void setName(String value); + + /** + * Returns the value of the '<em><b>Code</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Code</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Code</em>' attribute. + * @see #setCode(String) + * @see assignment.AssignmentPackage#getCourse_Code() + * @model + * @generated + */ + String getCode(); + + /** + * Sets the value of the '{@link assignment.Course#getCode <em>Code</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Code</em>' attribute. + * @see #getCode() + * @generated + */ + void setCode(String value); + + /** + * Returns the value of the '<em><b>Credits Number</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Credits Number</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Credits Number</em>' attribute. + * @see #setCreditsNumber(float) + * @see assignment.AssignmentPackage#getCourse_CreditsNumber() + * @model + * @generated + */ + float getCreditsNumber(); + + /** + * Sets the value of the '{@link assignment.Course#getCreditsNumber <em>Credits Number</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Credits Number</em>' attribute. + * @see #getCreditsNumber() + * @generated + */ + void setCreditsNumber(float value); + + /** + * Returns the value of the '<em><b>Instances</b></em>' containment reference list. + * The list contents are of type {@link assignment.CourseInstance}. + * It is bidirectional and its opposite is '{@link assignment.CourseInstance#getCourse <em>Course</em>}'. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Instances</em>' containment reference list isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Instances</em>' containment reference list. + * @see assignment.AssignmentPackage#getCourse_Instances() + * @see assignment.CourseInstance#getCourse + * @model opposite="course" containment="true" + * @generated + */ + EList<CourseInstance> getInstances(); + + /** + * Returns the value of the '<em><b>Required Courses</b></em>' reference list. + * The list contents are of type {@link assignment.Course}. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Required Courses</em>' reference list isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Required Courses</em>' reference list. + * @see assignment.AssignmentPackage#getCourse_RequiredCourses() + * @model + * @generated + */ + EList<Course> getRequiredCourses(); + + /** + * Returns the value of the '<em><b>Recommended Courses</b></em>' reference list. + * The list contents are of type {@link assignment.Course}. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Recommended Courses</em>' reference list isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Recommended Courses</em>' reference list. + * @see assignment.AssignmentPackage#getCourse_RecommendedCourses() + * @model + * @generated + */ + EList<Course> getRecommendedCourses(); + + /** + * Returns the value of the '<em><b>Content</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Content</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Content</em>' attribute. + * @see #setContent(String) + * @see assignment.AssignmentPackage#getCourse_Content() + * @model + * @generated + */ + String getContent(); + + /** + * Sets the value of the '{@link assignment.Course#getContent <em>Content</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Content</em>' attribute. + * @see #getContent() + * @generated + */ + void setContent(String value); + + /** + * Returns the value of the '<em><b>Credits Reduction</b></em>' containment reference list. + * The list contents are of type {@link assignment.CourseRelation}. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Credits Reduction</em>' containment reference list isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Credits Reduction</em>' containment reference list. + * @see assignment.AssignmentPackage#getCourse_CreditsReduction() + * @model containment="true" + * @generated + */ + EList<CourseRelation> getCreditsReduction(); + + /** + * Returns the value of the '<em><b>Department</b></em>' container reference. + * It is bidirectional and its opposite is '{@link assignment.Department#getCourses <em>Courses</em>}'. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Department</em>' container reference isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Department</em>' container reference. + * @see #setDepartment(Department) + * @see assignment.AssignmentPackage#getCourse_Department() + * @see assignment.Department#getCourses + * @model opposite="courses" transient="false" + * @generated + */ + Department getDepartment(); + + /** + * Sets the value of the '{@link assignment.Course#getDepartment <em>Department</em>}' container reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Department</em>' container reference. + * @see #getDepartment() + * @generated + */ + void setDepartment(Department value); + +} // Course diff --git a/Assignment/src-gen/assignment/CourseInstance.java b/Assignment/src-gen/assignment/CourseInstance.java new file mode 100644 index 0000000000000000000000000000000000000000..07e217b20432be5d1534723ad0a06b603919ee2f --- /dev/null +++ b/Assignment/src-gen/assignment/CourseInstance.java @@ -0,0 +1,224 @@ +/** + */ +package assignment; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EObject; + +/** + * <!-- begin-user-doc --> + * A representation of the model object '<em><b>Course Instance</b></em>'. + * <!-- end-user-doc --> + * + * <p> + * The following features are supported: + * </p> + * <ul> + * <li>{@link assignment.CourseInstance#getEvaluationForm <em>Evaluation Form</em>}</li> + * <li>{@link assignment.CourseInstance#getYear <em>Year</em>}</li> + * <li>{@link assignment.CourseInstance#getSemester <em>Semester</em>}</li> + * <li>{@link assignment.CourseInstance#getLabHours <em>Lab Hours</em>}</li> + * <li>{@link assignment.CourseInstance#getLectureHours <em>Lecture Hours</em>}</li> + * <li>{@link assignment.CourseInstance#getCourseWork <em>Course Work</em>}</li> + * <li>{@link assignment.CourseInstance#getStaff <em>Staff</em>}</li> + * <li>{@link assignment.CourseInstance#getStudyPrograms <em>Study Programs</em>}</li> + * <li>{@link assignment.CourseInstance#getCourse <em>Course</em>}</li> + * </ul> + * + * @see assignment.AssignmentPackage#getCourseInstance() + * @model annotation="http://www.eclipse.org/emf/2002/Ecore constraints='percentageSum hasACoordinator timetableCorrespondsToCoursework'" + * annotation="http://www.eclipse.org/acceleo/query/1.0 percentageSum='self.evaluationForm.percentage->sum() == 100' hasACoordinator='self.staff.type->select(item | item == \"coordinator\")->length == 1'" + * @generated + */ +public interface CourseInstance extends EObject { + /** + * Returns the value of the '<em><b>Evaluation Form</b></em>' containment reference list. + * The list contents are of type {@link assignment.Work}. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Evaluation Form</em>' containment reference list isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Evaluation Form</em>' containment reference list. + * @see assignment.AssignmentPackage#getCourseInstance_EvaluationForm() + * @model containment="true" + * @generated + */ + EList<Work> getEvaluationForm(); + + /** + * Returns the value of the '<em><b>Year</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Year</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Year</em>' attribute. + * @see #setYear(int) + * @see assignment.AssignmentPackage#getCourseInstance_Year() + * @model + * @generated + */ + int getYear(); + + /** + * Sets the value of the '{@link assignment.CourseInstance#getYear <em>Year</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Year</em>' attribute. + * @see #getYear() + * @generated + */ + void setYear(int value); + + /** + * Returns the value of the '<em><b>Semester</b></em>' attribute. + * The literals are from the enumeration {@link assignment.Semester}. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Semester</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Semester</em>' attribute. + * @see assignment.Semester + * @see #setSemester(Semester) + * @see assignment.AssignmentPackage#getCourseInstance_Semester() + * @model + * @generated + */ + Semester getSemester(); + + /** + * Sets the value of the '{@link assignment.CourseInstance#getSemester <em>Semester</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Semester</em>' attribute. + * @see assignment.Semester + * @see #getSemester() + * @generated + */ + void setSemester(Semester value); + + /** + * Returns the value of the '<em><b>Lab Hours</b></em>' containment reference list. + * The list contents are of type {@link assignment.ScheduledHour}. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Lab Hours</em>' containment reference list isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Lab Hours</em>' containment reference list. + * @see assignment.AssignmentPackage#getCourseInstance_LabHours() + * @model containment="true" + * @generated + */ + EList<ScheduledHour> getLabHours(); + + /** + * Returns the value of the '<em><b>Lecture Hours</b></em>' containment reference list. + * The list contents are of type {@link assignment.ScheduledHour}. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Lecture Hours</em>' containment reference list isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Lecture Hours</em>' containment reference list. + * @see assignment.AssignmentPackage#getCourseInstance_LectureHours() + * @model containment="true" + * @generated + */ + EList<ScheduledHour> getLectureHours(); + + /** + * Returns the value of the '<em><b>Course Work</b></em>' containment reference. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Course Work</em>' containment reference isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Course Work</em>' containment reference. + * @see #setCourseWork(CourseWork) + * @see assignment.AssignmentPackage#getCourseInstance_CourseWork() + * @model containment="true" + * @generated + */ + CourseWork getCourseWork(); + + /** + * Sets the value of the '{@link assignment.CourseInstance#getCourseWork <em>Course Work</em>}' containment reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Course Work</em>' containment reference. + * @see #getCourseWork() + * @generated + */ + void setCourseWork(CourseWork value); + + /** + * Returns the value of the '<em><b>Staff</b></em>' containment reference list. + * The list contents are of type {@link assignment.Role}. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Staff</em>' containment reference list isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Staff</em>' containment reference list. + * @see assignment.AssignmentPackage#getCourseInstance_Staff() + * @model containment="true" + * @generated + */ + EList<Role> getStaff(); + + /** + * Returns the value of the '<em><b>Study Programs</b></em>' reference list. + * The list contents are of type {@link assignment.StudyProgram}. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Study Programs</em>' reference list isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Study Programs</em>' reference list. + * @see assignment.AssignmentPackage#getCourseInstance_StudyPrograms() + * @model + * @generated + */ + EList<StudyProgram> getStudyPrograms(); + + /** + * Returns the value of the '<em><b>Course</b></em>' container reference. + * It is bidirectional and its opposite is '{@link assignment.Course#getInstances <em>Instances</em>}'. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Course</em>' container reference isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Course</em>' container reference. + * @see #setCourse(Course) + * @see assignment.AssignmentPackage#getCourseInstance_Course() + * @see assignment.Course#getInstances + * @model opposite="instances" transient="false" + * @generated + */ + Course getCourse(); + + /** + * Sets the value of the '{@link assignment.CourseInstance#getCourse <em>Course</em>}' container reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Course</em>' container reference. + * @see #getCourse() + * @generated + */ + void setCourse(Course value); + +} // CourseInstance diff --git a/Assignment/src-gen/assignment/CourseRelation.java b/Assignment/src-gen/assignment/CourseRelation.java new file mode 100644 index 0000000000000000000000000000000000000000..fcf511ea4f481e68122a9c1d204f41af1fc3717f --- /dev/null +++ b/Assignment/src-gen/assignment/CourseRelation.java @@ -0,0 +1,77 @@ +/** + */ +package assignment; + +import org.eclipse.emf.ecore.EObject; + +/** + * <!-- begin-user-doc --> + * A representation of the model object '<em><b>Course Relation</b></em>'. + * <!-- end-user-doc --> + * + * <p> + * The following features are supported: + * </p> + * <ul> + * <li>{@link assignment.CourseRelation#getCourse <em>Course</em>}</li> + * <li>{@link assignment.CourseRelation#getCreditsReduction <em>Credits Reduction</em>}</li> + * </ul> + * + * @see assignment.AssignmentPackage#getCourseRelation() + * @model + * @generated + */ +public interface CourseRelation extends EObject { + /** + * Returns the value of the '<em><b>Course</b></em>' reference. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Course</em>' reference isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Course</em>' reference. + * @see #setCourse(Course) + * @see assignment.AssignmentPackage#getCourseRelation_Course() + * @model + * @generated + */ + Course getCourse(); + + /** + * Sets the value of the '{@link assignment.CourseRelation#getCourse <em>Course</em>}' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Course</em>' reference. + * @see #getCourse() + * @generated + */ + void setCourse(Course value); + + /** + * Returns the value of the '<em><b>Credits Reduction</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Credits Reduction</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Credits Reduction</em>' attribute. + * @see #setCreditsReduction(float) + * @see assignment.AssignmentPackage#getCourseRelation_CreditsReduction() + * @model + * @generated + */ + float getCreditsReduction(); + + /** + * Sets the value of the '{@link assignment.CourseRelation#getCreditsReduction <em>Credits Reduction</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Credits Reduction</em>' attribute. + * @see #getCreditsReduction() + * @generated + */ + void setCreditsReduction(float value); + +} // CourseRelation diff --git a/Assignment/src-gen/assignment/CourseWork.java b/Assignment/src-gen/assignment/CourseWork.java new file mode 100644 index 0000000000000000000000000000000000000000..dd451fe836df76aed6af06dfbdb50cd02aed8d9e --- /dev/null +++ b/Assignment/src-gen/assignment/CourseWork.java @@ -0,0 +1,77 @@ +/** + */ +package assignment; + +import org.eclipse.emf.ecore.EObject; + +/** + * <!-- begin-user-doc --> + * A representation of the model object '<em><b>Course Work</b></em>'. + * <!-- end-user-doc --> + * + * <p> + * The following features are supported: + * </p> + * <ul> + * <li>{@link assignment.CourseWork#getLectureHours <em>Lecture Hours</em>}</li> + * <li>{@link assignment.CourseWork#getLabHours <em>Lab Hours</em>}</li> + * </ul> + * + * @see assignment.AssignmentPackage#getCourseWork() + * @model + * @generated + */ +public interface CourseWork extends EObject { + /** + * Returns the value of the '<em><b>Lecture Hours</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Lecture Hours</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Lecture Hours</em>' attribute. + * @see #setLectureHours(int) + * @see assignment.AssignmentPackage#getCourseWork_LectureHours() + * @model + * @generated + */ + int getLectureHours(); + + /** + * Sets the value of the '{@link assignment.CourseWork#getLectureHours <em>Lecture Hours</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Lecture Hours</em>' attribute. + * @see #getLectureHours() + * @generated + */ + void setLectureHours(int value); + + /** + * Returns the value of the '<em><b>Lab Hours</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Lab Hours</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Lab Hours</em>' attribute. + * @see #setLabHours(int) + * @see assignment.AssignmentPackage#getCourseWork_LabHours() + * @model + * @generated + */ + int getLabHours(); + + /** + * Sets the value of the '{@link assignment.CourseWork#getLabHours <em>Lab Hours</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Lab Hours</em>' attribute. + * @see #getLabHours() + * @generated + */ + void setLabHours(int value); + +} // CourseWork diff --git a/Assignment/src-gen/assignment/Department.java b/Assignment/src-gen/assignment/Department.java new file mode 100644 index 0000000000000000000000000000000000000000..fbf20ed56673669aeb32915c6f21d132dccbb304 --- /dev/null +++ b/Assignment/src-gen/assignment/Department.java @@ -0,0 +1,88 @@ +/** + */ +package assignment; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EObject; + +/** + * <!-- begin-user-doc --> + * A representation of the model object '<em><b>Department</b></em>'. + * <!-- end-user-doc --> + * + * <p> + * The following features are supported: + * </p> + * <ul> + * <li>{@link assignment.Department#getName <em>Name</em>}</li> + * <li>{@link assignment.Department#getCourses <em>Courses</em>}</li> + * <li>{@link assignment.Department#getStaff <em>Staff</em>}</li> + * </ul> + * + * @see assignment.AssignmentPackage#getDepartment() + * @model + * @generated + */ +public interface Department extends EObject { + /** + * Returns the value of the '<em><b>Name</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Name</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Name</em>' attribute. + * @see #setName(String) + * @see assignment.AssignmentPackage#getDepartment_Name() + * @model + * @generated + */ + String getName(); + + /** + * Sets the value of the '{@link assignment.Department#getName <em>Name</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Name</em>' attribute. + * @see #getName() + * @generated + */ + void setName(String value); + + /** + * Returns the value of the '<em><b>Courses</b></em>' containment reference list. + * The list contents are of type {@link assignment.Course}. + * It is bidirectional and its opposite is '{@link assignment.Course#getDepartment <em>Department</em>}'. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Courses</em>' containment reference list isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Courses</em>' containment reference list. + * @see assignment.AssignmentPackage#getDepartment_Courses() + * @see assignment.Course#getDepartment + * @model opposite="department" containment="true" + * @generated + */ + EList<Course> getCourses(); + + /** + * Returns the value of the '<em><b>Staff</b></em>' containment reference list. + * The list contents are of type {@link assignment.People}. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Staff</em>' containment reference list isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Staff</em>' containment reference list. + * @see assignment.AssignmentPackage#getDepartment_Staff() + * @model containment="true" + * @generated + */ + EList<People> getStaff(); + +} // Department diff --git a/Assignment/src-gen/assignment/HourType.java b/Assignment/src-gen/assignment/HourType.java new file mode 100644 index 0000000000000000000000000000000000000000..a034e270a833e8f659c9c7dd2b5ee5cff3235f87 --- /dev/null +++ b/Assignment/src-gen/assignment/HourType.java @@ -0,0 +1,212 @@ +/** + */ +package assignment; + +import java.util.Arrays; +import java.util.Collections; +import java.util.List; + +import org.eclipse.emf.common.util.Enumerator; + +/** + * <!-- begin-user-doc --> + * A representation of the literals of the enumeration '<em><b>Hour Type</b></em>', + * and utility methods for working with them. + * <!-- end-user-doc --> + * @see assignment.AssignmentPackage#getHourType() + * @model + * @generated + */ +public enum HourType implements Enumerator { + /** + * The '<em><b>Lab</b></em>' literal object. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #LAB_VALUE + * @generated + * @ordered + */ + LAB(0, "Lab", "Lab"), + + /** + * The '<em><b>Lecture</b></em>' literal object. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #LECTURE_VALUE + * @generated + * @ordered + */ + LECTURE(1, "Lecture", "Lecture"); + + /** + * The '<em><b>Lab</b></em>' literal value. + * <!-- begin-user-doc --> + * <p> + * If the meaning of '<em><b>Lab</b></em>' literal object isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @see #LAB + * @model name="Lab" + * @generated + * @ordered + */ + public static final int LAB_VALUE = 0; + + /** + * The '<em><b>Lecture</b></em>' literal value. + * <!-- begin-user-doc --> + * <p> + * If the meaning of '<em><b>Lecture</b></em>' literal object isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @see #LECTURE + * @model name="Lecture" + * @generated + * @ordered + */ + public static final int LECTURE_VALUE = 1; + + /** + * An array of all the '<em><b>Hour Type</b></em>' enumerators. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private static final HourType[] VALUES_ARRAY = new HourType[] { LAB, LECTURE, }; + + /** + * A public read-only list of all the '<em><b>Hour Type</b></em>' enumerators. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public static final List<HourType> VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY)); + + /** + * Returns the '<em><b>Hour Type</b></em>' literal with the specified literal value. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param literal the literal. + * @return the matching enumerator or <code>null</code>. + * @generated + */ + public static HourType get(String literal) { + for (int i = 0; i < VALUES_ARRAY.length; ++i) { + HourType result = VALUES_ARRAY[i]; + if (result.toString().equals(literal)) { + return result; + } + } + return null; + } + + /** + * Returns the '<em><b>Hour Type</b></em>' literal with the specified name. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param name the name. + * @return the matching enumerator or <code>null</code>. + * @generated + */ + public static HourType getByName(String name) { + for (int i = 0; i < VALUES_ARRAY.length; ++i) { + HourType result = VALUES_ARRAY[i]; + if (result.getName().equals(name)) { + return result; + } + } + return null; + } + + /** + * Returns the '<em><b>Hour Type</b></em>' literal with the specified integer value. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the integer value. + * @return the matching enumerator or <code>null</code>. + * @generated + */ + public static HourType get(int value) { + switch (value) { + case LAB_VALUE: + return LAB; + case LECTURE_VALUE: + return LECTURE; + } + return null; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private final int value; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private final String name; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private final String literal; + + /** + * Only this class can construct instances. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private HourType(int value, String name, String literal) { + this.value = value; + this.name = name; + this.literal = literal; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public int getValue() { + return value; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getName() { + return name; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getLiteral() { + return literal; + } + + /** + * Returns the literal value of the enumerator, which is its string representation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public String toString() { + return literal; + } + +} //HourType diff --git a/Assignment/src-gen/assignment/People.java b/Assignment/src-gen/assignment/People.java new file mode 100644 index 0000000000000000000000000000000000000000..cb876cfea4d6b57b4a10952dfbc6a39c9b5d5788 --- /dev/null +++ b/Assignment/src-gen/assignment/People.java @@ -0,0 +1,77 @@ +/** + */ +package assignment; + +import org.eclipse.emf.ecore.EObject; + +/** + * <!-- begin-user-doc --> + * A representation of the model object '<em><b>People</b></em>'. + * <!-- end-user-doc --> + * + * <p> + * The following features are supported: + * </p> + * <ul> + * <li>{@link assignment.People#getName <em>Name</em>}</li> + * <li>{@link assignment.People#getEmail <em>Email</em>}</li> + * </ul> + * + * @see assignment.AssignmentPackage#getPeople() + * @model + * @generated + */ +public interface People extends EObject { + /** + * Returns the value of the '<em><b>Name</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Name</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Name</em>' attribute. + * @see #setName(String) + * @see assignment.AssignmentPackage#getPeople_Name() + * @model + * @generated + */ + String getName(); + + /** + * Sets the value of the '{@link assignment.People#getName <em>Name</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Name</em>' attribute. + * @see #getName() + * @generated + */ + void setName(String value); + + /** + * Returns the value of the '<em><b>Email</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Email</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Email</em>' attribute. + * @see #setEmail(String) + * @see assignment.AssignmentPackage#getPeople_Email() + * @model + * @generated + */ + String getEmail(); + + /** + * Sets the value of the '{@link assignment.People#getEmail <em>Email</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Email</em>' attribute. + * @see #getEmail() + * @generated + */ + void setEmail(String value); + +} // People diff --git a/Assignment/src-gen/assignment/Role.java b/Assignment/src-gen/assignment/Role.java new file mode 100644 index 0000000000000000000000000000000000000000..c0d8fb6b007dac77a7a95153bd68e3729651e343 --- /dev/null +++ b/Assignment/src-gen/assignment/Role.java @@ -0,0 +1,80 @@ +/** + */ +package assignment; + +import org.eclipse.emf.ecore.EObject; + +/** + * <!-- begin-user-doc --> + * A representation of the model object '<em><b>Role</b></em>'. + * <!-- end-user-doc --> + * + * <p> + * The following features are supported: + * </p> + * <ul> + * <li>{@link assignment.Role#getType <em>Type</em>}</li> + * <li>{@link assignment.Role#getPeople <em>People</em>}</li> + * </ul> + * + * @see assignment.AssignmentPackage#getRole() + * @model + * @generated + */ +public interface Role extends EObject { + /** + * Returns the value of the '<em><b>Type</b></em>' attribute. + * The literals are from the enumeration {@link assignment.RoleType}. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Type</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Type</em>' attribute. + * @see assignment.RoleType + * @see #setType(RoleType) + * @see assignment.AssignmentPackage#getRole_Type() + * @model + * @generated + */ + RoleType getType(); + + /** + * Sets the value of the '{@link assignment.Role#getType <em>Type</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Type</em>' attribute. + * @see assignment.RoleType + * @see #getType() + * @generated + */ + void setType(RoleType value); + + /** + * Returns the value of the '<em><b>People</b></em>' reference. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>People</em>' reference isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>People</em>' reference. + * @see #setPeople(People) + * @see assignment.AssignmentPackage#getRole_People() + * @model + * @generated + */ + People getPeople(); + + /** + * Sets the value of the '{@link assignment.Role#getPeople <em>People</em>}' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>People</em>' reference. + * @see #getPeople() + * @generated + */ + void setPeople(People value); + +} // Role diff --git a/Assignment/src-gen/assignment/RoleType.java b/Assignment/src-gen/assignment/RoleType.java new file mode 100644 index 0000000000000000000000000000000000000000..1093d0579d9a96d2d059b8c2ba00ea50fbd89448 --- /dev/null +++ b/Assignment/src-gen/assignment/RoleType.java @@ -0,0 +1,239 @@ +/** + */ +package assignment; + +import java.util.Arrays; +import java.util.Collections; +import java.util.List; + +import org.eclipse.emf.common.util.Enumerator; + +/** + * <!-- begin-user-doc --> + * A representation of the literals of the enumeration '<em><b>Role Type</b></em>', + * and utility methods for working with them. + * <!-- end-user-doc --> + * @see assignment.AssignmentPackage#getRoleType() + * @model + * @generated + */ +public enum RoleType implements Enumerator { + /** + * The '<em><b>Lecturer</b></em>' literal object. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #LECTURER_VALUE + * @generated + * @ordered + */ + LECTURER(0, "Lecturer", "Lecturer"), + + /** + * The '<em><b>Student Assistent</b></em>' literal object. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #STUDENT_ASSISTENT_VALUE + * @generated + * @ordered + */ + STUDENT_ASSISTENT(1, "StudentAssistent", "StudentAssistent"), + + /** + * The '<em><b>Student</b></em>' literal object. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #STUDENT_VALUE + * @generated + * @ordered + */ + STUDENT(2, "Student", "Student"); + + /** + * The '<em><b>Lecturer</b></em>' literal value. + * <!-- begin-user-doc --> + * <p> + * If the meaning of '<em><b>Lecturer</b></em>' literal object isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @see #LECTURER + * @model name="Lecturer" + * @generated + * @ordered + */ + public static final int LECTURER_VALUE = 0; + + /** + * The '<em><b>Student Assistent</b></em>' literal value. + * <!-- begin-user-doc --> + * <p> + * If the meaning of '<em><b>Student Assistent</b></em>' literal object isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @see #STUDENT_ASSISTENT + * @model name="StudentAssistent" + * @generated + * @ordered + */ + public static final int STUDENT_ASSISTENT_VALUE = 1; + + /** + * The '<em><b>Student</b></em>' literal value. + * <!-- begin-user-doc --> + * <p> + * If the meaning of '<em><b>Student</b></em>' literal object isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @see #STUDENT + * @model name="Student" + * @generated + * @ordered + */ + public static final int STUDENT_VALUE = 2; + + /** + * An array of all the '<em><b>Role Type</b></em>' enumerators. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private static final RoleType[] VALUES_ARRAY = new RoleType[] { LECTURER, STUDENT_ASSISTENT, STUDENT, }; + + /** + * A public read-only list of all the '<em><b>Role Type</b></em>' enumerators. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public static final List<RoleType> VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY)); + + /** + * Returns the '<em><b>Role Type</b></em>' literal with the specified literal value. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param literal the literal. + * @return the matching enumerator or <code>null</code>. + * @generated + */ + public static RoleType get(String literal) { + for (int i = 0; i < VALUES_ARRAY.length; ++i) { + RoleType result = VALUES_ARRAY[i]; + if (result.toString().equals(literal)) { + return result; + } + } + return null; + } + + /** + * Returns the '<em><b>Role Type</b></em>' literal with the specified name. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param name the name. + * @return the matching enumerator or <code>null</code>. + * @generated + */ + public static RoleType getByName(String name) { + for (int i = 0; i < VALUES_ARRAY.length; ++i) { + RoleType result = VALUES_ARRAY[i]; + if (result.getName().equals(name)) { + return result; + } + } + return null; + } + + /** + * Returns the '<em><b>Role Type</b></em>' literal with the specified integer value. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the integer value. + * @return the matching enumerator or <code>null</code>. + * @generated + */ + public static RoleType get(int value) { + switch (value) { + case LECTURER_VALUE: + return LECTURER; + case STUDENT_ASSISTENT_VALUE: + return STUDENT_ASSISTENT; + case STUDENT_VALUE: + return STUDENT; + } + return null; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private final int value; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private final String name; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private final String literal; + + /** + * Only this class can construct instances. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private RoleType(int value, String name, String literal) { + this.value = value; + this.name = name; + this.literal = literal; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public int getValue() { + return value; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getName() { + return name; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getLiteral() { + return literal; + } + + /** + * Returns the literal value of the enumerator, which is its string representation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public String toString() { + return literal; + } + +} //RoleType diff --git a/Assignment/src-gen/assignment/ScheduledHour.java b/Assignment/src-gen/assignment/ScheduledHour.java new file mode 100644 index 0000000000000000000000000000000000000000..d0288fe5d844177f272b8cb0ac63980209b012fb --- /dev/null +++ b/Assignment/src-gen/assignment/ScheduledHour.java @@ -0,0 +1,180 @@ +/** + */ +package assignment; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EObject; + +/** + * <!-- begin-user-doc --> + * A representation of the model object '<em><b>Scheduled Hour</b></em>'. + * <!-- end-user-doc --> + * + * <p> + * The following features are supported: + * </p> + * <ul> + * <li>{@link assignment.ScheduledHour#getDuration <em>Duration</em>}</li> + * <li>{@link assignment.ScheduledHour#getRoom <em>Room</em>}</li> + * <li>{@link assignment.ScheduledHour#getBeginning <em>Beginning</em>}</li> + * <li>{@link assignment.ScheduledHour#getReservedForProgram <em>Reserved For Program</em>}</li> + * <li>{@link assignment.ScheduledHour#getDay <em>Day</em>}</li> + * <li>{@link assignment.ScheduledHour#getType <em>Type</em>}</li> + * </ul> + * + * @see assignment.AssignmentPackage#getScheduledHour() + * @model + * @generated + */ +public interface ScheduledHour extends EObject { + /** + * Returns the value of the '<em><b>Duration</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Duration</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Duration</em>' attribute. + * @see #setDuration(int) + * @see assignment.AssignmentPackage#getScheduledHour_Duration() + * @model + * @generated + */ + int getDuration(); + + /** + * Sets the value of the '{@link assignment.ScheduledHour#getDuration <em>Duration</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Duration</em>' attribute. + * @see #getDuration() + * @generated + */ + void setDuration(int value); + + /** + * Returns the value of the '<em><b>Room</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Room</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Room</em>' attribute. + * @see #setRoom(String) + * @see assignment.AssignmentPackage#getScheduledHour_Room() + * @model + * @generated + */ + String getRoom(); + + /** + * Sets the value of the '{@link assignment.ScheduledHour#getRoom <em>Room</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Room</em>' attribute. + * @see #getRoom() + * @generated + */ + void setRoom(String value); + + /** + * Returns the value of the '<em><b>Beginning</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Beginning</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Beginning</em>' attribute. + * @see #setBeginning(String) + * @see assignment.AssignmentPackage#getScheduledHour_Beginning() + * @model + * @generated + */ + String getBeginning(); + + /** + * Sets the value of the '{@link assignment.ScheduledHour#getBeginning <em>Beginning</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Beginning</em>' attribute. + * @see #getBeginning() + * @generated + */ + void setBeginning(String value); + + /** + * Returns the value of the '<em><b>Reserved For Program</b></em>' reference list. + * The list contents are of type {@link assignment.StudyProgram}. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Reserved For Program</em>' reference list isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Reserved For Program</em>' reference list. + * @see assignment.AssignmentPackage#getScheduledHour_ReservedForProgram() + * @model + * @generated + */ + EList<StudyProgram> getReservedForProgram(); + + /** + * Returns the value of the '<em><b>Day</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Day</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Day</em>' attribute. + * @see #setDay(String) + * @see assignment.AssignmentPackage#getScheduledHour_Day() + * @model + * @generated + */ + String getDay(); + + /** + * Sets the value of the '{@link assignment.ScheduledHour#getDay <em>Day</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Day</em>' attribute. + * @see #getDay() + * @generated + */ + void setDay(String value); + + /** + * Returns the value of the '<em><b>Type</b></em>' attribute. + * The literals are from the enumeration {@link assignment.HourType}. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Type</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Type</em>' attribute. + * @see assignment.HourType + * @see #setType(HourType) + * @see assignment.AssignmentPackage#getScheduledHour_Type() + * @model + * @generated + */ + HourType getType(); + + /** + * Sets the value of the '{@link assignment.ScheduledHour#getType <em>Type</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Type</em>' attribute. + * @see assignment.HourType + * @see #getType() + * @generated + */ + void setType(HourType value); + +} // ScheduledHour diff --git a/Assignment/src-gen/assignment/Semester.java b/Assignment/src-gen/assignment/Semester.java new file mode 100644 index 0000000000000000000000000000000000000000..34ae89f586cbf8908f475bbd8b10d79bb63b06db --- /dev/null +++ b/Assignment/src-gen/assignment/Semester.java @@ -0,0 +1,212 @@ +/** + */ +package assignment; + +import java.util.Arrays; +import java.util.Collections; +import java.util.List; + +import org.eclipse.emf.common.util.Enumerator; + +/** + * <!-- begin-user-doc --> + * A representation of the literals of the enumeration '<em><b>Semester</b></em>', + * and utility methods for working with them. + * <!-- end-user-doc --> + * @see assignment.AssignmentPackage#getSemester() + * @model + * @generated + */ +public enum Semester implements Enumerator { + /** + * The '<em><b>Autumn</b></em>' literal object. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #AUTUMN_VALUE + * @generated + * @ordered + */ + AUTUMN(0, "Autumn", "Autumn"), + + /** + * The '<em><b>Spring</b></em>' literal object. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #SPRING_VALUE + * @generated + * @ordered + */ + SPRING(1, "Spring", "Spring"); + + /** + * The '<em><b>Autumn</b></em>' literal value. + * <!-- begin-user-doc --> + * <p> + * If the meaning of '<em><b>Autumn</b></em>' literal object isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @see #AUTUMN + * @model name="Autumn" + * @generated + * @ordered + */ + public static final int AUTUMN_VALUE = 0; + + /** + * The '<em><b>Spring</b></em>' literal value. + * <!-- begin-user-doc --> + * <p> + * If the meaning of '<em><b>Spring</b></em>' literal object isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @see #SPRING + * @model name="Spring" + * @generated + * @ordered + */ + public static final int SPRING_VALUE = 1; + + /** + * An array of all the '<em><b>Semester</b></em>' enumerators. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private static final Semester[] VALUES_ARRAY = new Semester[] { AUTUMN, SPRING, }; + + /** + * A public read-only list of all the '<em><b>Semester</b></em>' enumerators. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public static final List<Semester> VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY)); + + /** + * Returns the '<em><b>Semester</b></em>' literal with the specified literal value. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param literal the literal. + * @return the matching enumerator or <code>null</code>. + * @generated + */ + public static Semester get(String literal) { + for (int i = 0; i < VALUES_ARRAY.length; ++i) { + Semester result = VALUES_ARRAY[i]; + if (result.toString().equals(literal)) { + return result; + } + } + return null; + } + + /** + * Returns the '<em><b>Semester</b></em>' literal with the specified name. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param name the name. + * @return the matching enumerator or <code>null</code>. + * @generated + */ + public static Semester getByName(String name) { + for (int i = 0; i < VALUES_ARRAY.length; ++i) { + Semester result = VALUES_ARRAY[i]; + if (result.getName().equals(name)) { + return result; + } + } + return null; + } + + /** + * Returns the '<em><b>Semester</b></em>' literal with the specified integer value. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the integer value. + * @return the matching enumerator or <code>null</code>. + * @generated + */ + public static Semester get(int value) { + switch (value) { + case AUTUMN_VALUE: + return AUTUMN; + case SPRING_VALUE: + return SPRING; + } + return null; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private final int value; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private final String name; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private final String literal; + + /** + * Only this class can construct instances. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private Semester(int value, String name, String literal) { + this.value = value; + this.name = name; + this.literal = literal; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public int getValue() { + return value; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getName() { + return name; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getLiteral() { + return literal; + } + + /** + * Returns the literal value of the enumerator, which is its string representation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public String toString() { + return literal; + } + +} //Semester diff --git a/Assignment/src-gen/assignment/StudyProgram.java b/Assignment/src-gen/assignment/StudyProgram.java new file mode 100644 index 0000000000000000000000000000000000000000..c6bcc4e8a84bad765e2af1682d52164026c63385 --- /dev/null +++ b/Assignment/src-gen/assignment/StudyProgram.java @@ -0,0 +1,50 @@ +/** + */ +package assignment; + +import org.eclipse.emf.ecore.EObject; + +/** + * <!-- begin-user-doc --> + * A representation of the model object '<em><b>Study Program</b></em>'. + * <!-- end-user-doc --> + * + * <p> + * The following features are supported: + * </p> + * <ul> + * <li>{@link assignment.StudyProgram#getCode <em>Code</em>}</li> + * </ul> + * + * @see assignment.AssignmentPackage#getStudyProgram() + * @model + * @generated + */ +public interface StudyProgram extends EObject { + /** + * Returns the value of the '<em><b>Code</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Code</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Code</em>' attribute. + * @see #setCode(String) + * @see assignment.AssignmentPackage#getStudyProgram_Code() + * @model + * @generated + */ + String getCode(); + + /** + * Sets the value of the '{@link assignment.StudyProgram#getCode <em>Code</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Code</em>' attribute. + * @see #getCode() + * @generated + */ + void setCode(String value); + +} // StudyProgram diff --git a/Assignment/src-gen/assignment/Work.java b/Assignment/src-gen/assignment/Work.java new file mode 100644 index 0000000000000000000000000000000000000000..4e489384065a7fb48297f4c738343c60489171b3 --- /dev/null +++ b/Assignment/src-gen/assignment/Work.java @@ -0,0 +1,80 @@ +/** + */ +package assignment; + +import org.eclipse.emf.ecore.EObject; + +/** + * <!-- begin-user-doc --> + * A representation of the model object '<em><b>Work</b></em>'. + * <!-- end-user-doc --> + * + * <p> + * The following features are supported: + * </p> + * <ul> + * <li>{@link assignment.Work#getPercentage <em>Percentage</em>}</li> + * <li>{@link assignment.Work#getType <em>Type</em>}</li> + * </ul> + * + * @see assignment.AssignmentPackage#getWork() + * @model + * @generated + */ +public interface Work extends EObject { + /** + * Returns the value of the '<em><b>Percentage</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Percentage</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Percentage</em>' attribute. + * @see #setPercentage(int) + * @see assignment.AssignmentPackage#getWork_Percentage() + * @model + * @generated + */ + int getPercentage(); + + /** + * Sets the value of the '{@link assignment.Work#getPercentage <em>Percentage</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Percentage</em>' attribute. + * @see #getPercentage() + * @generated + */ + void setPercentage(int value); + + /** + * Returns the value of the '<em><b>Type</b></em>' attribute. + * The literals are from the enumeration {@link assignment.WorkType}. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Type</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Type</em>' attribute. + * @see assignment.WorkType + * @see #setType(WorkType) + * @see assignment.AssignmentPackage#getWork_Type() + * @model + * @generated + */ + WorkType getType(); + + /** + * Sets the value of the '{@link assignment.Work#getType <em>Type</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Type</em>' attribute. + * @see assignment.WorkType + * @see #getType() + * @generated + */ + void setType(WorkType value); + +} // Work diff --git a/Assignment/src-gen/assignment/WorkType.java b/Assignment/src-gen/assignment/WorkType.java new file mode 100644 index 0000000000000000000000000000000000000000..4ae32cf9b0185380901cf2b8c4136cbc450484de --- /dev/null +++ b/Assignment/src-gen/assignment/WorkType.java @@ -0,0 +1,239 @@ +/** + */ +package assignment; + +import java.util.Arrays; +import java.util.Collections; +import java.util.List; + +import org.eclipse.emf.common.util.Enumerator; + +/** + * <!-- begin-user-doc --> + * A representation of the literals of the enumeration '<em><b>Work Type</b></em>', + * and utility methods for working with them. + * <!-- end-user-doc --> + * @see assignment.AssignmentPackage#getWorkType() + * @model + * @generated + */ +public enum WorkType implements Enumerator { + /** + * The '<em><b>Assignment</b></em>' literal object. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #ASSIGNMENT_VALUE + * @generated + * @ordered + */ + ASSIGNMENT(0, "Assignment", "Assignment"), + + /** + * The '<em><b>Exam</b></em>' literal object. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #EXAM_VALUE + * @generated + * @ordered + */ + EXAM(1, "Exam", "Exam"), + + /** + * The '<em><b>Project</b></em>' literal object. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #PROJECT_VALUE + * @generated + * @ordered + */ + PROJECT(2, "Project", "Project"); + + /** + * The '<em><b>Assignment</b></em>' literal value. + * <!-- begin-user-doc --> + * <p> + * If the meaning of '<em><b>Assignment</b></em>' literal object isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @see #ASSIGNMENT + * @model name="Assignment" + * @generated + * @ordered + */ + public static final int ASSIGNMENT_VALUE = 0; + + /** + * The '<em><b>Exam</b></em>' literal value. + * <!-- begin-user-doc --> + * <p> + * If the meaning of '<em><b>Exam</b></em>' literal object isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @see #EXAM + * @model name="Exam" + * @generated + * @ordered + */ + public static final int EXAM_VALUE = 1; + + /** + * The '<em><b>Project</b></em>' literal value. + * <!-- begin-user-doc --> + * <p> + * If the meaning of '<em><b>Project</b></em>' literal object isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @see #PROJECT + * @model name="Project" + * @generated + * @ordered + */ + public static final int PROJECT_VALUE = 2; + + /** + * An array of all the '<em><b>Work Type</b></em>' enumerators. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private static final WorkType[] VALUES_ARRAY = new WorkType[] { ASSIGNMENT, EXAM, PROJECT, }; + + /** + * A public read-only list of all the '<em><b>Work Type</b></em>' enumerators. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public static final List<WorkType> VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY)); + + /** + * Returns the '<em><b>Work Type</b></em>' literal with the specified literal value. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param literal the literal. + * @return the matching enumerator or <code>null</code>. + * @generated + */ + public static WorkType get(String literal) { + for (int i = 0; i < VALUES_ARRAY.length; ++i) { + WorkType result = VALUES_ARRAY[i]; + if (result.toString().equals(literal)) { + return result; + } + } + return null; + } + + /** + * Returns the '<em><b>Work Type</b></em>' literal with the specified name. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param name the name. + * @return the matching enumerator or <code>null</code>. + * @generated + */ + public static WorkType getByName(String name) { + for (int i = 0; i < VALUES_ARRAY.length; ++i) { + WorkType result = VALUES_ARRAY[i]; + if (result.getName().equals(name)) { + return result; + } + } + return null; + } + + /** + * Returns the '<em><b>Work Type</b></em>' literal with the specified integer value. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the integer value. + * @return the matching enumerator or <code>null</code>. + * @generated + */ + public static WorkType get(int value) { + switch (value) { + case ASSIGNMENT_VALUE: + return ASSIGNMENT; + case EXAM_VALUE: + return EXAM; + case PROJECT_VALUE: + return PROJECT; + } + return null; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private final int value; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private final String name; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private final String literal; + + /** + * Only this class can construct instances. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private WorkType(int value, String name, String literal) { + this.value = value; + this.name = name; + this.literal = literal; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public int getValue() { + return value; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getName() { + return name; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getLiteral() { + return literal; + } + + /** + * Returns the literal value of the enumerator, which is its string representation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public String toString() { + return literal; + } + +} //WorkType diff --git a/Assignment/src-gen/assignment/impl/AssignmentFactoryImpl.java b/Assignment/src-gen/assignment/impl/AssignmentFactoryImpl.java new file mode 100644 index 0000000000000000000000000000000000000000..d77d0164d2bb9d027a7fd13db1f7d586b69d1926 --- /dev/null +++ b/Assignment/src-gen/assignment/impl/AssignmentFactoryImpl.java @@ -0,0 +1,335 @@ +/** + */ +package assignment.impl; + +import assignment.*; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EDataType; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EPackage; + +import org.eclipse.emf.ecore.impl.EFactoryImpl; + +import org.eclipse.emf.ecore.plugin.EcorePlugin; + +/** + * <!-- begin-user-doc --> + * An implementation of the model <b>Factory</b>. + * <!-- end-user-doc --> + * @generated + */ +public class AssignmentFactoryImpl extends EFactoryImpl implements AssignmentFactory { + /** + * Creates the default factory implementation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public static AssignmentFactory init() { + try { + AssignmentFactory theAssignmentFactory = (AssignmentFactory) EPackage.Registry.INSTANCE + .getEFactory(AssignmentPackage.eNS_URI); + if (theAssignmentFactory != null) { + return theAssignmentFactory; + } + } catch (Exception exception) { + EcorePlugin.INSTANCE.log(exception); + } + return new AssignmentFactoryImpl(); + } + + /** + * Creates an instance of the factory. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public AssignmentFactoryImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public EObject create(EClass eClass) { + switch (eClass.getClassifierID()) { + case AssignmentPackage.COURSE: + return createCourse(); + case AssignmentPackage.COURSE_RELATION: + return createCourseRelation(); + case AssignmentPackage.COURSE_INSTANCE: + return createCourseInstance(); + case AssignmentPackage.COURSE_WORK: + return createCourseWork(); + case AssignmentPackage.ROLE: + return createRole(); + case AssignmentPackage.PEOPLE: + return createPeople(); + case AssignmentPackage.STUDY_PROGRAM: + return createStudyProgram(); + case AssignmentPackage.WORK: + return createWork(); + case AssignmentPackage.DEPARTMENT: + return createDepartment(); + case AssignmentPackage.SCHEDULED_HOUR: + return createScheduledHour(); + default: + throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); + } + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public Object createFromString(EDataType eDataType, String initialValue) { + switch (eDataType.getClassifierID()) { + case AssignmentPackage.SEMESTER: + return createSemesterFromString(eDataType, initialValue); + case AssignmentPackage.WORK_TYPE: + return createWorkTypeFromString(eDataType, initialValue); + case AssignmentPackage.HOUR_TYPE: + return createHourTypeFromString(eDataType, initialValue); + case AssignmentPackage.ROLE_TYPE: + return createRoleTypeFromString(eDataType, initialValue); + default: + throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier"); + } + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public String convertToString(EDataType eDataType, Object instanceValue) { + switch (eDataType.getClassifierID()) { + case AssignmentPackage.SEMESTER: + return convertSemesterToString(eDataType, instanceValue); + case AssignmentPackage.WORK_TYPE: + return convertWorkTypeToString(eDataType, instanceValue); + case AssignmentPackage.HOUR_TYPE: + return convertHourTypeToString(eDataType, instanceValue); + case AssignmentPackage.ROLE_TYPE: + return convertRoleTypeToString(eDataType, instanceValue); + default: + throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier"); + } + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public Course createCourse() { + CourseImpl course = new CourseImpl(); + return course; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public CourseRelation createCourseRelation() { + CourseRelationImpl courseRelation = new CourseRelationImpl(); + return courseRelation; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public CourseInstance createCourseInstance() { + CourseInstanceImpl courseInstance = new CourseInstanceImpl(); + return courseInstance; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public CourseWork createCourseWork() { + CourseWorkImpl courseWork = new CourseWorkImpl(); + return courseWork; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public Role createRole() { + RoleImpl role = new RoleImpl(); + return role; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public People createPeople() { + PeopleImpl people = new PeopleImpl(); + return people; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public StudyProgram createStudyProgram() { + StudyProgramImpl studyProgram = new StudyProgramImpl(); + return studyProgram; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public Work createWork() { + WorkImpl work = new WorkImpl(); + return work; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public Department createDepartment() { + DepartmentImpl department = new DepartmentImpl(); + return department; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public ScheduledHour createScheduledHour() { + ScheduledHourImpl scheduledHour = new ScheduledHourImpl(); + return scheduledHour; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public Semester createSemesterFromString(EDataType eDataType, String initialValue) { + Semester result = Semester.get(initialValue); + if (result == null) + throw new IllegalArgumentException( + "The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'"); + return result; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String convertSemesterToString(EDataType eDataType, Object instanceValue) { + return instanceValue == null ? null : instanceValue.toString(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public WorkType createWorkTypeFromString(EDataType eDataType, String initialValue) { + WorkType result = WorkType.get(initialValue); + if (result == null) + throw new IllegalArgumentException( + "The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'"); + return result; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String convertWorkTypeToString(EDataType eDataType, Object instanceValue) { + return instanceValue == null ? null : instanceValue.toString(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public HourType createHourTypeFromString(EDataType eDataType, String initialValue) { + HourType result = HourType.get(initialValue); + if (result == null) + throw new IllegalArgumentException( + "The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'"); + return result; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String convertHourTypeToString(EDataType eDataType, Object instanceValue) { + return instanceValue == null ? null : instanceValue.toString(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public RoleType createRoleTypeFromString(EDataType eDataType, String initialValue) { + RoleType result = RoleType.get(initialValue); + if (result == null) + throw new IllegalArgumentException( + "The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'"); + return result; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String convertRoleTypeToString(EDataType eDataType, Object instanceValue) { + return instanceValue == null ? null : instanceValue.toString(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public AssignmentPackage getAssignmentPackage() { + return (AssignmentPackage) getEPackage(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @deprecated + * @generated + */ + @Deprecated + public static AssignmentPackage getPackage() { + return AssignmentPackage.eINSTANCE; + } + +} //AssignmentFactoryImpl diff --git a/Assignment/src-gen/assignment/impl/AssignmentPackageImpl.java b/Assignment/src-gen/assignment/impl/AssignmentPackageImpl.java new file mode 100644 index 0000000000000000000000000000000000000000..ff6a9c57e3d0f01ae49bfed8eb403fc363c69b57 --- /dev/null +++ b/Assignment/src-gen/assignment/impl/AssignmentPackageImpl.java @@ -0,0 +1,978 @@ +/** + */ +package assignment.impl; + +import assignment.AssignmentFactory; +import assignment.AssignmentPackage; +import assignment.Course; +import assignment.CourseInstance; +import assignment.CourseRelation; +import assignment.CourseWork; +import assignment.Department; +import assignment.HourType; +import assignment.People; +import assignment.Role; +import assignment.RoleType; +import assignment.ScheduledHour; +import assignment.Semester; +import assignment.StudyProgram; +import assignment.Work; +import assignment.WorkType; + +import assignment.util.AssignmentValidator; + +import org.eclipse.emf.ecore.EAttribute; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EEnum; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.EReference; +import org.eclipse.emf.ecore.EValidator; + +import org.eclipse.emf.ecore.impl.EPackageImpl; + +/** + * <!-- begin-user-doc --> + * An implementation of the model <b>Package</b>. + * <!-- end-user-doc --> + * @generated + */ +public class AssignmentPackageImpl extends EPackageImpl implements AssignmentPackage { + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass courseEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass courseRelationEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass courseInstanceEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass courseWorkEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass roleEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass peopleEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass studyProgramEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass workEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass departmentEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass scheduledHourEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EEnum semesterEEnum = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EEnum workTypeEEnum = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EEnum hourTypeEEnum = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EEnum roleTypeEEnum = null; + + /** + * Creates an instance of the model <b>Package</b>, registered with + * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package + * package URI value. + * <p>Note: the correct way to create the package is via the static + * factory method {@link #init init()}, which also performs + * initialization of the package, or returns the registered package, + * if one already exists. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see org.eclipse.emf.ecore.EPackage.Registry + * @see assignment.AssignmentPackage#eNS_URI + * @see #init() + * @generated + */ + private AssignmentPackageImpl() { + super(eNS_URI, AssignmentFactory.eINSTANCE); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private static boolean isInited = false; + + /** + * Creates, registers, and initializes the <b>Package</b> for this model, and for any others upon which it depends. + * + * <p>This method is used to initialize {@link AssignmentPackage#eINSTANCE} when that field is accessed. + * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #eNS_URI + * @see #createPackageContents() + * @see #initializePackageContents() + * @generated + */ + public static AssignmentPackage init() { + if (isInited) + return (AssignmentPackage) EPackage.Registry.INSTANCE.getEPackage(AssignmentPackage.eNS_URI); + + // Obtain or create and register package + Object registeredAssignmentPackage = EPackage.Registry.INSTANCE.get(eNS_URI); + AssignmentPackageImpl theAssignmentPackage = registeredAssignmentPackage instanceof AssignmentPackageImpl + ? (AssignmentPackageImpl) registeredAssignmentPackage + : new AssignmentPackageImpl(); + + isInited = true; + + // Create package meta-data objects + theAssignmentPackage.createPackageContents(); + + // Initialize created meta-data + theAssignmentPackage.initializePackageContents(); + + // Register package validator + EValidator.Registry.INSTANCE.put(theAssignmentPackage, new EValidator.Descriptor() { + public EValidator getEValidator() { + return AssignmentValidator.INSTANCE; + } + }); + + // Mark meta-data to indicate it can't be changed + theAssignmentPackage.freeze(); + + // Update the registry and return the package + EPackage.Registry.INSTANCE.put(AssignmentPackage.eNS_URI, theAssignmentPackage); + return theAssignmentPackage; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getCourse() { + return courseEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getCourse_Name() { + return (EAttribute) courseEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getCourse_Code() { + return (EAttribute) courseEClass.getEStructuralFeatures().get(1); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getCourse_CreditsNumber() { + return (EAttribute) courseEClass.getEStructuralFeatures().get(2); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EReference getCourse_Instances() { + return (EReference) courseEClass.getEStructuralFeatures().get(3); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EReference getCourse_RequiredCourses() { + return (EReference) courseEClass.getEStructuralFeatures().get(4); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EReference getCourse_RecommendedCourses() { + return (EReference) courseEClass.getEStructuralFeatures().get(5); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getCourse_Content() { + return (EAttribute) courseEClass.getEStructuralFeatures().get(6); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EReference getCourse_CreditsReduction() { + return (EReference) courseEClass.getEStructuralFeatures().get(7); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EReference getCourse_Department() { + return (EReference) courseEClass.getEStructuralFeatures().get(8); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getCourseRelation() { + return courseRelationEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EReference getCourseRelation_Course() { + return (EReference) courseRelationEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getCourseRelation_CreditsReduction() { + return (EAttribute) courseRelationEClass.getEStructuralFeatures().get(1); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getCourseInstance() { + return courseInstanceEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EReference getCourseInstance_EvaluationForm() { + return (EReference) courseInstanceEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getCourseInstance_Year() { + return (EAttribute) courseInstanceEClass.getEStructuralFeatures().get(1); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getCourseInstance_Semester() { + return (EAttribute) courseInstanceEClass.getEStructuralFeatures().get(2); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EReference getCourseInstance_LabHours() { + return (EReference) courseInstanceEClass.getEStructuralFeatures().get(3); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EReference getCourseInstance_LectureHours() { + return (EReference) courseInstanceEClass.getEStructuralFeatures().get(4); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EReference getCourseInstance_CourseWork() { + return (EReference) courseInstanceEClass.getEStructuralFeatures().get(5); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EReference getCourseInstance_Staff() { + return (EReference) courseInstanceEClass.getEStructuralFeatures().get(6); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EReference getCourseInstance_StudyPrograms() { + return (EReference) courseInstanceEClass.getEStructuralFeatures().get(7); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EReference getCourseInstance_Course() { + return (EReference) courseInstanceEClass.getEStructuralFeatures().get(8); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getCourseWork() { + return courseWorkEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getCourseWork_LectureHours() { + return (EAttribute) courseWorkEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getCourseWork_LabHours() { + return (EAttribute) courseWorkEClass.getEStructuralFeatures().get(1); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getRole() { + return roleEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getRole_Type() { + return (EAttribute) roleEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EReference getRole_People() { + return (EReference) roleEClass.getEStructuralFeatures().get(1); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getPeople() { + return peopleEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getPeople_Name() { + return (EAttribute) peopleEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getPeople_Email() { + return (EAttribute) peopleEClass.getEStructuralFeatures().get(1); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getStudyProgram() { + return studyProgramEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getStudyProgram_Code() { + return (EAttribute) studyProgramEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getWork() { + return workEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getWork_Percentage() { + return (EAttribute) workEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getWork_Type() { + return (EAttribute) workEClass.getEStructuralFeatures().get(1); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getDepartment() { + return departmentEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getDepartment_Name() { + return (EAttribute) departmentEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EReference getDepartment_Courses() { + return (EReference) departmentEClass.getEStructuralFeatures().get(1); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EReference getDepartment_Staff() { + return (EReference) departmentEClass.getEStructuralFeatures().get(2); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getScheduledHour() { + return scheduledHourEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getScheduledHour_Duration() { + return (EAttribute) scheduledHourEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getScheduledHour_Room() { + return (EAttribute) scheduledHourEClass.getEStructuralFeatures().get(1); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getScheduledHour_Beginning() { + return (EAttribute) scheduledHourEClass.getEStructuralFeatures().get(2); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EReference getScheduledHour_ReservedForProgram() { + return (EReference) scheduledHourEClass.getEStructuralFeatures().get(3); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getScheduledHour_Day() { + return (EAttribute) scheduledHourEClass.getEStructuralFeatures().get(4); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getScheduledHour_Type() { + return (EAttribute) scheduledHourEClass.getEStructuralFeatures().get(5); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EEnum getSemester() { + return semesterEEnum; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EEnum getWorkType() { + return workTypeEEnum; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EEnum getHourType() { + return hourTypeEEnum; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EEnum getRoleType() { + return roleTypeEEnum; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public AssignmentFactory getAssignmentFactory() { + return (AssignmentFactory) getEFactoryInstance(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private boolean isCreated = false; + + /** + * Creates the meta-model objects for the package. This method is + * guarded to have no affect on any invocation but its first. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void createPackageContents() { + if (isCreated) + return; + isCreated = true; + + // Create classes and their features + courseEClass = createEClass(COURSE); + createEAttribute(courseEClass, COURSE__NAME); + createEAttribute(courseEClass, COURSE__CODE); + createEAttribute(courseEClass, COURSE__CREDITS_NUMBER); + createEReference(courseEClass, COURSE__INSTANCES); + createEReference(courseEClass, COURSE__REQUIRED_COURSES); + createEReference(courseEClass, COURSE__RECOMMENDED_COURSES); + createEAttribute(courseEClass, COURSE__CONTENT); + createEReference(courseEClass, COURSE__CREDITS_REDUCTION); + createEReference(courseEClass, COURSE__DEPARTMENT); + + courseRelationEClass = createEClass(COURSE_RELATION); + createEReference(courseRelationEClass, COURSE_RELATION__COURSE); + createEAttribute(courseRelationEClass, COURSE_RELATION__CREDITS_REDUCTION); + + courseInstanceEClass = createEClass(COURSE_INSTANCE); + createEReference(courseInstanceEClass, COURSE_INSTANCE__EVALUATION_FORM); + createEAttribute(courseInstanceEClass, COURSE_INSTANCE__YEAR); + createEAttribute(courseInstanceEClass, COURSE_INSTANCE__SEMESTER); + createEReference(courseInstanceEClass, COURSE_INSTANCE__LAB_HOURS); + createEReference(courseInstanceEClass, COURSE_INSTANCE__LECTURE_HOURS); + createEReference(courseInstanceEClass, COURSE_INSTANCE__COURSE_WORK); + createEReference(courseInstanceEClass, COURSE_INSTANCE__STAFF); + createEReference(courseInstanceEClass, COURSE_INSTANCE__STUDY_PROGRAMS); + createEReference(courseInstanceEClass, COURSE_INSTANCE__COURSE); + + courseWorkEClass = createEClass(COURSE_WORK); + createEAttribute(courseWorkEClass, COURSE_WORK__LECTURE_HOURS); + createEAttribute(courseWorkEClass, COURSE_WORK__LAB_HOURS); + + roleEClass = createEClass(ROLE); + createEAttribute(roleEClass, ROLE__TYPE); + createEReference(roleEClass, ROLE__PEOPLE); + + peopleEClass = createEClass(PEOPLE); + createEAttribute(peopleEClass, PEOPLE__NAME); + createEAttribute(peopleEClass, PEOPLE__EMAIL); + + studyProgramEClass = createEClass(STUDY_PROGRAM); + createEAttribute(studyProgramEClass, STUDY_PROGRAM__CODE); + + workEClass = createEClass(WORK); + createEAttribute(workEClass, WORK__PERCENTAGE); + createEAttribute(workEClass, WORK__TYPE); + + departmentEClass = createEClass(DEPARTMENT); + createEAttribute(departmentEClass, DEPARTMENT__NAME); + createEReference(departmentEClass, DEPARTMENT__COURSES); + createEReference(departmentEClass, DEPARTMENT__STAFF); + + scheduledHourEClass = createEClass(SCHEDULED_HOUR); + createEAttribute(scheduledHourEClass, SCHEDULED_HOUR__DURATION); + createEAttribute(scheduledHourEClass, SCHEDULED_HOUR__ROOM); + createEAttribute(scheduledHourEClass, SCHEDULED_HOUR__BEGINNING); + createEReference(scheduledHourEClass, SCHEDULED_HOUR__RESERVED_FOR_PROGRAM); + createEAttribute(scheduledHourEClass, SCHEDULED_HOUR__DAY); + createEAttribute(scheduledHourEClass, SCHEDULED_HOUR__TYPE); + + // Create enums + semesterEEnum = createEEnum(SEMESTER); + workTypeEEnum = createEEnum(WORK_TYPE); + hourTypeEEnum = createEEnum(HOUR_TYPE); + roleTypeEEnum = createEEnum(ROLE_TYPE); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private boolean isInitialized = false; + + /** + * Complete the initialization of the package and its meta-model. This + * method is guarded to have no affect on any invocation but its first. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void initializePackageContents() { + if (isInitialized) + return; + isInitialized = true; + + // Initialize package + setName(eNAME); + setNsPrefix(eNS_PREFIX); + setNsURI(eNS_URI); + + // Create type parameters + + // Set bounds for type parameters + + // Add supertypes to classes + + // Initialize classes, features, and operations; add parameters + initEClass(courseEClass, Course.class, "Course", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getCourse_Name(), ecorePackage.getEString(), "name", null, 0, 1, Course.class, !IS_TRANSIENT, + !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getCourse_Code(), ecorePackage.getEString(), "code", null, 0, 1, Course.class, !IS_TRANSIENT, + !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getCourse_CreditsNumber(), ecorePackage.getEFloat(), "creditsNumber", null, 0, 1, Course.class, + !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getCourse_Instances(), this.getCourseInstance(), this.getCourseInstance_Course(), "instances", + null, 0, -1, Course.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, + !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getCourse_RequiredCourses(), this.getCourse(), null, "requiredCourses", null, 0, -1, + Course.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, + !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getCourse_RecommendedCourses(), this.getCourse(), null, "recommendedCourses", null, 0, -1, + Course.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, + !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getCourse_Content(), ecorePackage.getEString(), "content", null, 0, 1, Course.class, + !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getCourse_CreditsReduction(), this.getCourseRelation(), null, "creditsReduction", null, 0, -1, + Course.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, + !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getCourse_Department(), this.getDepartment(), this.getDepartment_Courses(), "department", null, + 0, 1, Course.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, + !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(courseRelationEClass, CourseRelation.class, "CourseRelation", !IS_ABSTRACT, !IS_INTERFACE, + IS_GENERATED_INSTANCE_CLASS); + initEReference(getCourseRelation_Course(), this.getCourse(), null, "course", null, 0, 1, CourseRelation.class, + !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, + IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getCourseRelation_CreditsReduction(), ecorePackage.getEFloat(), "creditsReduction", null, 0, 1, + CourseRelation.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, + !IS_DERIVED, IS_ORDERED); + + initEClass(courseInstanceEClass, CourseInstance.class, "CourseInstance", !IS_ABSTRACT, !IS_INTERFACE, + IS_GENERATED_INSTANCE_CLASS); + initEReference(getCourseInstance_EvaluationForm(), this.getWork(), null, "evaluationForm", null, 0, -1, + CourseInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, + !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getCourseInstance_Year(), ecorePackage.getEInt(), "year", null, 0, 1, CourseInstance.class, + !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getCourseInstance_Semester(), this.getSemester(), "semester", null, 0, 1, CourseInstance.class, + !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getCourseInstance_LabHours(), this.getScheduledHour(), null, "labHours", null, 0, -1, + CourseInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, + !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getCourseInstance_LectureHours(), this.getScheduledHour(), null, "lectureHours", null, 0, -1, + CourseInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, + !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getCourseInstance_CourseWork(), this.getCourseWork(), null, "courseWork", null, 0, 1, + CourseInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, + !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getCourseInstance_Staff(), this.getRole(), null, "staff", null, 0, -1, CourseInstance.class, + !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, + IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getCourseInstance_StudyPrograms(), this.getStudyProgram(), null, "studyPrograms", null, 0, -1, + CourseInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, + !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getCourseInstance_Course(), this.getCourse(), this.getCourse_Instances(), "course", null, 0, 1, + CourseInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, + !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(courseWorkEClass, CourseWork.class, "CourseWork", !IS_ABSTRACT, !IS_INTERFACE, + IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getCourseWork_LectureHours(), ecorePackage.getEInt(), "lectureHours", null, 0, 1, + CourseWork.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, + !IS_DERIVED, IS_ORDERED); + initEAttribute(getCourseWork_LabHours(), ecorePackage.getEInt(), "labHours", null, 0, 1, CourseWork.class, + !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(roleEClass, Role.class, "Role", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getRole_Type(), this.getRoleType(), "type", null, 0, 1, Role.class, !IS_TRANSIENT, !IS_VOLATILE, + IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getRole_People(), this.getPeople(), null, "people", null, 0, 1, Role.class, !IS_TRANSIENT, + !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, + IS_ORDERED); + + initEClass(peopleEClass, People.class, "People", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getPeople_Name(), ecorePackage.getEString(), "name", null, 0, 1, People.class, !IS_TRANSIENT, + !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getPeople_Email(), ecorePackage.getEString(), "email", null, 0, 1, People.class, !IS_TRANSIENT, + !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(studyProgramEClass, StudyProgram.class, "StudyProgram", !IS_ABSTRACT, !IS_INTERFACE, + IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getStudyProgram_Code(), ecorePackage.getEString(), "code", null, 0, 1, StudyProgram.class, + !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(workEClass, Work.class, "Work", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getWork_Percentage(), ecorePackage.getEInt(), "percentage", null, 0, 1, Work.class, + !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getWork_Type(), this.getWorkType(), "type", null, 0, 1, Work.class, !IS_TRANSIENT, !IS_VOLATILE, + IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(departmentEClass, Department.class, "Department", !IS_ABSTRACT, !IS_INTERFACE, + IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getDepartment_Name(), ecorePackage.getEString(), "name", null, 0, 1, Department.class, + !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getDepartment_Courses(), this.getCourse(), this.getCourse_Department(), "courses", null, 0, -1, + Department.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, + !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getDepartment_Staff(), this.getPeople(), null, "staff", null, 0, -1, Department.class, + !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, + IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(scheduledHourEClass, ScheduledHour.class, "ScheduledHour", !IS_ABSTRACT, !IS_INTERFACE, + IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getScheduledHour_Duration(), ecorePackage.getEInt(), "duration", null, 0, 1, ScheduledHour.class, + !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getScheduledHour_Room(), ecorePackage.getEString(), "room", null, 0, 1, ScheduledHour.class, + !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getScheduledHour_Beginning(), ecorePackage.getEString(), "beginning", null, 0, 1, + ScheduledHour.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, + !IS_DERIVED, IS_ORDERED); + initEReference(getScheduledHour_ReservedForProgram(), this.getStudyProgram(), null, "reservedForProgram", null, + 0, -1, ScheduledHour.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, + IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getScheduledHour_Day(), ecorePackage.getEString(), "day", null, 0, 1, ScheduledHour.class, + !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getScheduledHour_Type(), this.getHourType(), "type", null, 0, 1, ScheduledHour.class, + !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + // Initialize enums and add enum literals + initEEnum(semesterEEnum, Semester.class, "Semester"); + addEEnumLiteral(semesterEEnum, Semester.AUTUMN); + addEEnumLiteral(semesterEEnum, Semester.SPRING); + + initEEnum(workTypeEEnum, WorkType.class, "WorkType"); + addEEnumLiteral(workTypeEEnum, WorkType.ASSIGNMENT); + addEEnumLiteral(workTypeEEnum, WorkType.EXAM); + addEEnumLiteral(workTypeEEnum, WorkType.PROJECT); + + initEEnum(hourTypeEEnum, HourType.class, "HourType"); + addEEnumLiteral(hourTypeEEnum, HourType.LAB); + addEEnumLiteral(hourTypeEEnum, HourType.LECTURE); + + initEEnum(roleTypeEEnum, RoleType.class, "RoleType"); + addEEnumLiteral(roleTypeEEnum, RoleType.LECTURER); + addEEnumLiteral(roleTypeEEnum, RoleType.STUDENT_ASSISTENT); + addEEnumLiteral(roleTypeEEnum, RoleType.STUDENT); + + // Create resource + createResource(eNS_URI); + + // Create annotations + // http://www.eclipse.org/emf/2002/Ecore + createEcoreAnnotations(); + // http://www.eclipse.org/acceleo/query/1.0 + create_1Annotations(); + } + + /** + * Initializes the annotations for <b>http://www.eclipse.org/emf/2002/Ecore</b>. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected void createEcoreAnnotations() { + String source = "http://www.eclipse.org/emf/2002/Ecore"; + addAnnotation(courseInstanceEClass, source, + new String[] { "constraints", "percentageSum hasACoordinator timetableCorrespondsToCoursework" }); + } + + /** + * Initializes the annotations for <b>http://www.eclipse.org/acceleo/query/1.0</b>. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected void create_1Annotations() { + String source = "http://www.eclipse.org/acceleo/query/1.0"; + addAnnotation(courseInstanceEClass, source, + new String[] { "percentageSum", "self.evaluationForm.percentage->sum() == 100", "hasACoordinator", + "self.staff.type->select(item | item == \"coordinator\")->length == 1" }); + } + +} //AssignmentPackageImpl diff --git a/Assignment/src-gen/assignment/impl/CourseImpl.java b/Assignment/src-gen/assignment/impl/CourseImpl.java new file mode 100644 index 0000000000000000000000000000000000000000..150b6164564cd16a26720bdb245bf117b03bf66a --- /dev/null +++ b/Assignment/src-gen/assignment/impl/CourseImpl.java @@ -0,0 +1,592 @@ +/** + */ +package assignment.impl; + +import assignment.AssignmentPackage; +import assignment.Course; +import assignment.CourseInstance; +import assignment.CourseRelation; +import assignment.Department; + +import java.util.Collection; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; + +import org.eclipse.emf.ecore.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.EObjectContainmentWithInverseEList; +import org.eclipse.emf.ecore.util.EObjectResolvingEList; +import org.eclipse.emf.ecore.util.EcoreUtil; +import org.eclipse.emf.ecore.util.InternalEList; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Course</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * </p> + * <ul> + * <li>{@link assignment.impl.CourseImpl#getName <em>Name</em>}</li> + * <li>{@link assignment.impl.CourseImpl#getCode <em>Code</em>}</li> + * <li>{@link assignment.impl.CourseImpl#getCreditsNumber <em>Credits Number</em>}</li> + * <li>{@link assignment.impl.CourseImpl#getInstances <em>Instances</em>}</li> + * <li>{@link assignment.impl.CourseImpl#getRequiredCourses <em>Required Courses</em>}</li> + * <li>{@link assignment.impl.CourseImpl#getRecommendedCourses <em>Recommended Courses</em>}</li> + * <li>{@link assignment.impl.CourseImpl#getContent <em>Content</em>}</li> + * <li>{@link assignment.impl.CourseImpl#getCreditsReduction <em>Credits Reduction</em>}</li> + * <li>{@link assignment.impl.CourseImpl#getDepartment <em>Department</em>}</li> + * </ul> + * + * @generated + */ +public class CourseImpl extends MinimalEObjectImpl.Container implements Course { + /** + * The default value of the '{@link #getName() <em>Name</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getName() + * @generated + * @ordered + */ + protected static final String NAME_EDEFAULT = null; + + /** + * The cached value of the '{@link #getName() <em>Name</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getName() + * @generated + * @ordered + */ + protected String name = NAME_EDEFAULT; + + /** + * The default value of the '{@link #getCode() <em>Code</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getCode() + * @generated + * @ordered + */ + protected static final String CODE_EDEFAULT = null; + + /** + * The cached value of the '{@link #getCode() <em>Code</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getCode() + * @generated + * @ordered + */ + protected String code = CODE_EDEFAULT; + + /** + * The default value of the '{@link #getCreditsNumber() <em>Credits Number</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getCreditsNumber() + * @generated + * @ordered + */ + protected static final float CREDITS_NUMBER_EDEFAULT = 0.0F; + + /** + * The cached value of the '{@link #getCreditsNumber() <em>Credits Number</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getCreditsNumber() + * @generated + * @ordered + */ + protected float creditsNumber = CREDITS_NUMBER_EDEFAULT; + + /** + * The cached value of the '{@link #getInstances() <em>Instances</em>}' containment reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getInstances() + * @generated + * @ordered + */ + protected EList<CourseInstance> instances; + + /** + * The cached value of the '{@link #getRequiredCourses() <em>Required Courses</em>}' reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getRequiredCourses() + * @generated + * @ordered + */ + protected EList<Course> requiredCourses; + + /** + * The cached value of the '{@link #getRecommendedCourses() <em>Recommended Courses</em>}' reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getRecommendedCourses() + * @generated + * @ordered + */ + protected EList<Course> recommendedCourses; + + /** + * The default value of the '{@link #getContent() <em>Content</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getContent() + * @generated + * @ordered + */ + protected static final String CONTENT_EDEFAULT = null; + + /** + * The cached value of the '{@link #getContent() <em>Content</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getContent() + * @generated + * @ordered + */ + protected String content = CONTENT_EDEFAULT; + + /** + * The cached value of the '{@link #getCreditsReduction() <em>Credits Reduction</em>}' containment reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getCreditsReduction() + * @generated + * @ordered + */ + protected EList<CourseRelation> creditsReduction; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected CourseImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return AssignmentPackage.Literals.COURSE; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getName() { + return name; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setName(String newName) { + String oldName = name; + name = newName; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, AssignmentPackage.COURSE__NAME, oldName, name)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getCode() { + return code; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setCode(String newCode) { + String oldCode = code; + code = newCode; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, AssignmentPackage.COURSE__CODE, oldCode, code)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public float getCreditsNumber() { + return creditsNumber; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setCreditsNumber(float newCreditsNumber) { + float oldCreditsNumber = creditsNumber; + creditsNumber = newCreditsNumber; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, AssignmentPackage.COURSE__CREDITS_NUMBER, + oldCreditsNumber, creditsNumber)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EList<CourseInstance> getInstances() { + if (instances == null) { + instances = new EObjectContainmentWithInverseEList<CourseInstance>(CourseInstance.class, this, + AssignmentPackage.COURSE__INSTANCES, AssignmentPackage.COURSE_INSTANCE__COURSE); + } + return instances; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EList<Course> getRequiredCourses() { + if (requiredCourses == null) { + requiredCourses = new EObjectResolvingEList<Course>(Course.class, this, + AssignmentPackage.COURSE__REQUIRED_COURSES); + } + return requiredCourses; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EList<Course> getRecommendedCourses() { + if (recommendedCourses == null) { + recommendedCourses = new EObjectResolvingEList<Course>(Course.class, this, + AssignmentPackage.COURSE__RECOMMENDED_COURSES); + } + return recommendedCourses; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getContent() { + return content; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setContent(String newContent) { + String oldContent = content; + content = newContent; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, AssignmentPackage.COURSE__CONTENT, oldContent, + content)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EList<CourseRelation> getCreditsReduction() { + if (creditsReduction == null) { + creditsReduction = new EObjectContainmentEList<CourseRelation>(CourseRelation.class, this, + AssignmentPackage.COURSE__CREDITS_REDUCTION); + } + return creditsReduction; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public Department getDepartment() { + if (eContainerFeatureID() != AssignmentPackage.COURSE__DEPARTMENT) + return null; + return (Department) eInternalContainer(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public NotificationChain basicSetDepartment(Department newDepartment, NotificationChain msgs) { + msgs = eBasicSetContainer((InternalEObject) newDepartment, AssignmentPackage.COURSE__DEPARTMENT, msgs); + return msgs; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setDepartment(Department newDepartment) { + if (newDepartment != eInternalContainer() + || (eContainerFeatureID() != AssignmentPackage.COURSE__DEPARTMENT && newDepartment != null)) { + if (EcoreUtil.isAncestor(this, newDepartment)) + throw new IllegalArgumentException("Recursive containment not allowed for " + toString()); + NotificationChain msgs = null; + if (eInternalContainer() != null) + msgs = eBasicRemoveFromContainer(msgs); + if (newDepartment != null) + msgs = ((InternalEObject) newDepartment).eInverseAdd(this, AssignmentPackage.DEPARTMENT__COURSES, + Department.class, msgs); + msgs = basicSetDepartment(newDepartment, msgs); + if (msgs != null) + msgs.dispatch(); + } else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, AssignmentPackage.COURSE__DEPARTMENT, newDepartment, + newDepartment)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case AssignmentPackage.COURSE__INSTANCES: + return ((InternalEList<InternalEObject>) (InternalEList<?>) getInstances()).basicAdd(otherEnd, msgs); + case AssignmentPackage.COURSE__DEPARTMENT: + if (eInternalContainer() != null) + msgs = eBasicRemoveFromContainer(msgs); + return basicSetDepartment((Department) otherEnd, msgs); + } + return super.eInverseAdd(otherEnd, featureID, msgs); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case AssignmentPackage.COURSE__INSTANCES: + return ((InternalEList<?>) getInstances()).basicRemove(otherEnd, msgs); + case AssignmentPackage.COURSE__CREDITS_REDUCTION: + return ((InternalEList<?>) getCreditsReduction()).basicRemove(otherEnd, msgs); + case AssignmentPackage.COURSE__DEPARTMENT: + return basicSetDepartment(null, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public NotificationChain eBasicRemoveFromContainerFeature(NotificationChain msgs) { + switch (eContainerFeatureID()) { + case AssignmentPackage.COURSE__DEPARTMENT: + return eInternalContainer().eInverseRemove(this, AssignmentPackage.DEPARTMENT__COURSES, Department.class, + msgs); + } + return super.eBasicRemoveFromContainerFeature(msgs); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case AssignmentPackage.COURSE__NAME: + return getName(); + case AssignmentPackage.COURSE__CODE: + return getCode(); + case AssignmentPackage.COURSE__CREDITS_NUMBER: + return getCreditsNumber(); + case AssignmentPackage.COURSE__INSTANCES: + return getInstances(); + case AssignmentPackage.COURSE__REQUIRED_COURSES: + return getRequiredCourses(); + case AssignmentPackage.COURSE__RECOMMENDED_COURSES: + return getRecommendedCourses(); + case AssignmentPackage.COURSE__CONTENT: + return getContent(); + case AssignmentPackage.COURSE__CREDITS_REDUCTION: + return getCreditsReduction(); + case AssignmentPackage.COURSE__DEPARTMENT: + return getDepartment(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case AssignmentPackage.COURSE__NAME: + setName((String) newValue); + return; + case AssignmentPackage.COURSE__CODE: + setCode((String) newValue); + return; + case AssignmentPackage.COURSE__CREDITS_NUMBER: + setCreditsNumber((Float) newValue); + return; + case AssignmentPackage.COURSE__INSTANCES: + getInstances().clear(); + getInstances().addAll((Collection<? extends CourseInstance>) newValue); + return; + case AssignmentPackage.COURSE__REQUIRED_COURSES: + getRequiredCourses().clear(); + getRequiredCourses().addAll((Collection<? extends Course>) newValue); + return; + case AssignmentPackage.COURSE__RECOMMENDED_COURSES: + getRecommendedCourses().clear(); + getRecommendedCourses().addAll((Collection<? extends Course>) newValue); + return; + case AssignmentPackage.COURSE__CONTENT: + setContent((String) newValue); + return; + case AssignmentPackage.COURSE__CREDITS_REDUCTION: + getCreditsReduction().clear(); + getCreditsReduction().addAll((Collection<? extends CourseRelation>) newValue); + return; + case AssignmentPackage.COURSE__DEPARTMENT: + setDepartment((Department) newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case AssignmentPackage.COURSE__NAME: + setName(NAME_EDEFAULT); + return; + case AssignmentPackage.COURSE__CODE: + setCode(CODE_EDEFAULT); + return; + case AssignmentPackage.COURSE__CREDITS_NUMBER: + setCreditsNumber(CREDITS_NUMBER_EDEFAULT); + return; + case AssignmentPackage.COURSE__INSTANCES: + getInstances().clear(); + return; + case AssignmentPackage.COURSE__REQUIRED_COURSES: + getRequiredCourses().clear(); + return; + case AssignmentPackage.COURSE__RECOMMENDED_COURSES: + getRecommendedCourses().clear(); + return; + case AssignmentPackage.COURSE__CONTENT: + setContent(CONTENT_EDEFAULT); + return; + case AssignmentPackage.COURSE__CREDITS_REDUCTION: + getCreditsReduction().clear(); + return; + case AssignmentPackage.COURSE__DEPARTMENT: + setDepartment((Department) null); + return; + } + super.eUnset(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case AssignmentPackage.COURSE__NAME: + return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name); + case AssignmentPackage.COURSE__CODE: + return CODE_EDEFAULT == null ? code != null : !CODE_EDEFAULT.equals(code); + case AssignmentPackage.COURSE__CREDITS_NUMBER: + return creditsNumber != CREDITS_NUMBER_EDEFAULT; + case AssignmentPackage.COURSE__INSTANCES: + return instances != null && !instances.isEmpty(); + case AssignmentPackage.COURSE__REQUIRED_COURSES: + return requiredCourses != null && !requiredCourses.isEmpty(); + case AssignmentPackage.COURSE__RECOMMENDED_COURSES: + return recommendedCourses != null && !recommendedCourses.isEmpty(); + case AssignmentPackage.COURSE__CONTENT: + return CONTENT_EDEFAULT == null ? content != null : !CONTENT_EDEFAULT.equals(content); + case AssignmentPackage.COURSE__CREDITS_REDUCTION: + return creditsReduction != null && !creditsReduction.isEmpty(); + case AssignmentPackage.COURSE__DEPARTMENT: + return getDepartment() != null; + } + return super.eIsSet(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) + return super.toString(); + + StringBuilder result = new StringBuilder(super.toString()); + result.append(" (name: "); + result.append(name); + result.append(", code: "); + result.append(code); + result.append(", creditsNumber: "); + result.append(creditsNumber); + result.append(", content: "); + result.append(content); + result.append(')'); + return result.toString(); + } + +} //CourseImpl diff --git a/Assignment/src-gen/assignment/impl/CourseInstanceImpl.java b/Assignment/src-gen/assignment/impl/CourseInstanceImpl.java new file mode 100644 index 0000000000000000000000000000000000000000..cc40d3dbb4bcf713a4411184ca5af508cc50ca1f --- /dev/null +++ b/Assignment/src-gen/assignment/impl/CourseInstanceImpl.java @@ -0,0 +1,594 @@ +/** + */ +package assignment.impl; + +import assignment.AssignmentPackage; +import assignment.Course; +import assignment.CourseInstance; +import assignment.CourseWork; +import assignment.Role; +import assignment.ScheduledHour; +import assignment.Semester; +import assignment.StudyProgram; +import assignment.Work; + +import java.util.Collection; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; + +import org.eclipse.emf.ecore.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.EObjectResolvingEList; +import org.eclipse.emf.ecore.util.EcoreUtil; +import org.eclipse.emf.ecore.util.InternalEList; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Course Instance</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * </p> + * <ul> + * <li>{@link assignment.impl.CourseInstanceImpl#getEvaluationForm <em>Evaluation Form</em>}</li> + * <li>{@link assignment.impl.CourseInstanceImpl#getYear <em>Year</em>}</li> + * <li>{@link assignment.impl.CourseInstanceImpl#getSemester <em>Semester</em>}</li> + * <li>{@link assignment.impl.CourseInstanceImpl#getLabHours <em>Lab Hours</em>}</li> + * <li>{@link assignment.impl.CourseInstanceImpl#getLectureHours <em>Lecture Hours</em>}</li> + * <li>{@link assignment.impl.CourseInstanceImpl#getCourseWork <em>Course Work</em>}</li> + * <li>{@link assignment.impl.CourseInstanceImpl#getStaff <em>Staff</em>}</li> + * <li>{@link assignment.impl.CourseInstanceImpl#getStudyPrograms <em>Study Programs</em>}</li> + * <li>{@link assignment.impl.CourseInstanceImpl#getCourse <em>Course</em>}</li> + * </ul> + * + * @generated + */ +public class CourseInstanceImpl extends MinimalEObjectImpl.Container implements CourseInstance { + /** + * The cached value of the '{@link #getEvaluationForm() <em>Evaluation Form</em>}' containment reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getEvaluationForm() + * @generated + * @ordered + */ + protected EList<Work> evaluationForm; + + /** + * The default value of the '{@link #getYear() <em>Year</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getYear() + * @generated + * @ordered + */ + protected static final int YEAR_EDEFAULT = 0; + + /** + * The cached value of the '{@link #getYear() <em>Year</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getYear() + * @generated + * @ordered + */ + protected int year = YEAR_EDEFAULT; + + /** + * The default value of the '{@link #getSemester() <em>Semester</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getSemester() + * @generated + * @ordered + */ + protected static final Semester SEMESTER_EDEFAULT = Semester.AUTUMN; + + /** + * The cached value of the '{@link #getSemester() <em>Semester</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getSemester() + * @generated + * @ordered + */ + protected Semester semester = SEMESTER_EDEFAULT; + + /** + * The cached value of the '{@link #getLabHours() <em>Lab Hours</em>}' containment reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getLabHours() + * @generated + * @ordered + */ + protected EList<ScheduledHour> labHours; + + /** + * The cached value of the '{@link #getLectureHours() <em>Lecture Hours</em>}' containment reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getLectureHours() + * @generated + * @ordered + */ + protected EList<ScheduledHour> lectureHours; + + /** + * The cached value of the '{@link #getCourseWork() <em>Course Work</em>}' containment reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getCourseWork() + * @generated + * @ordered + */ + protected CourseWork courseWork; + + /** + * The cached value of the '{@link #getStaff() <em>Staff</em>}' containment reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getStaff() + * @generated + * @ordered + */ + protected EList<Role> staff; + + /** + * The cached value of the '{@link #getStudyPrograms() <em>Study Programs</em>}' reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getStudyPrograms() + * @generated + * @ordered + */ + protected EList<StudyProgram> studyPrograms; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected CourseInstanceImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return AssignmentPackage.Literals.COURSE_INSTANCE; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EList<Work> getEvaluationForm() { + if (evaluationForm == null) { + evaluationForm = new EObjectContainmentEList<Work>(Work.class, this, + AssignmentPackage.COURSE_INSTANCE__EVALUATION_FORM); + } + return evaluationForm; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public int getYear() { + return year; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setYear(int newYear) { + int oldYear = year; + year = newYear; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, AssignmentPackage.COURSE_INSTANCE__YEAR, oldYear, + year)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public Semester getSemester() { + return semester; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setSemester(Semester newSemester) { + Semester oldSemester = semester; + semester = newSemester == null ? SEMESTER_EDEFAULT : newSemester; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, AssignmentPackage.COURSE_INSTANCE__SEMESTER, + oldSemester, semester)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EList<ScheduledHour> getLabHours() { + if (labHours == null) { + labHours = new EObjectContainmentEList<ScheduledHour>(ScheduledHour.class, this, + AssignmentPackage.COURSE_INSTANCE__LAB_HOURS); + } + return labHours; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EList<ScheduledHour> getLectureHours() { + if (lectureHours == null) { + lectureHours = new EObjectContainmentEList<ScheduledHour>(ScheduledHour.class, this, + AssignmentPackage.COURSE_INSTANCE__LECTURE_HOURS); + } + return lectureHours; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public CourseWork getCourseWork() { + return courseWork; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public NotificationChain basicSetCourseWork(CourseWork newCourseWork, NotificationChain msgs) { + CourseWork oldCourseWork = courseWork; + courseWork = newCourseWork; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, + AssignmentPackage.COURSE_INSTANCE__COURSE_WORK, oldCourseWork, newCourseWork); + if (msgs == null) + msgs = notification; + else + msgs.add(notification); + } + return msgs; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setCourseWork(CourseWork newCourseWork) { + if (newCourseWork != courseWork) { + NotificationChain msgs = null; + if (courseWork != null) + msgs = ((InternalEObject) courseWork).eInverseRemove(this, + EOPPOSITE_FEATURE_BASE - AssignmentPackage.COURSE_INSTANCE__COURSE_WORK, null, msgs); + if (newCourseWork != null) + msgs = ((InternalEObject) newCourseWork).eInverseAdd(this, + EOPPOSITE_FEATURE_BASE - AssignmentPackage.COURSE_INSTANCE__COURSE_WORK, null, msgs); + msgs = basicSetCourseWork(newCourseWork, msgs); + if (msgs != null) + msgs.dispatch(); + } else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, AssignmentPackage.COURSE_INSTANCE__COURSE_WORK, + newCourseWork, newCourseWork)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EList<Role> getStaff() { + if (staff == null) { + staff = new EObjectContainmentEList<Role>(Role.class, this, AssignmentPackage.COURSE_INSTANCE__STAFF); + } + return staff; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EList<StudyProgram> getStudyPrograms() { + if (studyPrograms == null) { + studyPrograms = new EObjectResolvingEList<StudyProgram>(StudyProgram.class, this, + AssignmentPackage.COURSE_INSTANCE__STUDY_PROGRAMS); + } + return studyPrograms; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public Course getCourse() { + if (eContainerFeatureID() != AssignmentPackage.COURSE_INSTANCE__COURSE) + return null; + return (Course) eInternalContainer(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public NotificationChain basicSetCourse(Course newCourse, NotificationChain msgs) { + msgs = eBasicSetContainer((InternalEObject) newCourse, AssignmentPackage.COURSE_INSTANCE__COURSE, msgs); + return msgs; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setCourse(Course newCourse) { + if (newCourse != eInternalContainer() + || (eContainerFeatureID() != AssignmentPackage.COURSE_INSTANCE__COURSE && newCourse != null)) { + if (EcoreUtil.isAncestor(this, newCourse)) + throw new IllegalArgumentException("Recursive containment not allowed for " + toString()); + NotificationChain msgs = null; + if (eInternalContainer() != null) + msgs = eBasicRemoveFromContainer(msgs); + if (newCourse != null) + msgs = ((InternalEObject) newCourse).eInverseAdd(this, AssignmentPackage.COURSE__INSTANCES, + Course.class, msgs); + msgs = basicSetCourse(newCourse, msgs); + if (msgs != null) + msgs.dispatch(); + } else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, AssignmentPackage.COURSE_INSTANCE__COURSE, newCourse, + newCourse)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case AssignmentPackage.COURSE_INSTANCE__COURSE: + if (eInternalContainer() != null) + msgs = eBasicRemoveFromContainer(msgs); + return basicSetCourse((Course) otherEnd, msgs); + } + return super.eInverseAdd(otherEnd, featureID, msgs); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case AssignmentPackage.COURSE_INSTANCE__EVALUATION_FORM: + return ((InternalEList<?>) getEvaluationForm()).basicRemove(otherEnd, msgs); + case AssignmentPackage.COURSE_INSTANCE__LAB_HOURS: + return ((InternalEList<?>) getLabHours()).basicRemove(otherEnd, msgs); + case AssignmentPackage.COURSE_INSTANCE__LECTURE_HOURS: + return ((InternalEList<?>) getLectureHours()).basicRemove(otherEnd, msgs); + case AssignmentPackage.COURSE_INSTANCE__COURSE_WORK: + return basicSetCourseWork(null, msgs); + case AssignmentPackage.COURSE_INSTANCE__STAFF: + return ((InternalEList<?>) getStaff()).basicRemove(otherEnd, msgs); + case AssignmentPackage.COURSE_INSTANCE__COURSE: + return basicSetCourse(null, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public NotificationChain eBasicRemoveFromContainerFeature(NotificationChain msgs) { + switch (eContainerFeatureID()) { + case AssignmentPackage.COURSE_INSTANCE__COURSE: + return eInternalContainer().eInverseRemove(this, AssignmentPackage.COURSE__INSTANCES, Course.class, msgs); + } + return super.eBasicRemoveFromContainerFeature(msgs); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case AssignmentPackage.COURSE_INSTANCE__EVALUATION_FORM: + return getEvaluationForm(); + case AssignmentPackage.COURSE_INSTANCE__YEAR: + return getYear(); + case AssignmentPackage.COURSE_INSTANCE__SEMESTER: + return getSemester(); + case AssignmentPackage.COURSE_INSTANCE__LAB_HOURS: + return getLabHours(); + case AssignmentPackage.COURSE_INSTANCE__LECTURE_HOURS: + return getLectureHours(); + case AssignmentPackage.COURSE_INSTANCE__COURSE_WORK: + return getCourseWork(); + case AssignmentPackage.COURSE_INSTANCE__STAFF: + return getStaff(); + case AssignmentPackage.COURSE_INSTANCE__STUDY_PROGRAMS: + return getStudyPrograms(); + case AssignmentPackage.COURSE_INSTANCE__COURSE: + return getCourse(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case AssignmentPackage.COURSE_INSTANCE__EVALUATION_FORM: + getEvaluationForm().clear(); + getEvaluationForm().addAll((Collection<? extends Work>) newValue); + return; + case AssignmentPackage.COURSE_INSTANCE__YEAR: + setYear((Integer) newValue); + return; + case AssignmentPackage.COURSE_INSTANCE__SEMESTER: + setSemester((Semester) newValue); + return; + case AssignmentPackage.COURSE_INSTANCE__LAB_HOURS: + getLabHours().clear(); + getLabHours().addAll((Collection<? extends ScheduledHour>) newValue); + return; + case AssignmentPackage.COURSE_INSTANCE__LECTURE_HOURS: + getLectureHours().clear(); + getLectureHours().addAll((Collection<? extends ScheduledHour>) newValue); + return; + case AssignmentPackage.COURSE_INSTANCE__COURSE_WORK: + setCourseWork((CourseWork) newValue); + return; + case AssignmentPackage.COURSE_INSTANCE__STAFF: + getStaff().clear(); + getStaff().addAll((Collection<? extends Role>) newValue); + return; + case AssignmentPackage.COURSE_INSTANCE__STUDY_PROGRAMS: + getStudyPrograms().clear(); + getStudyPrograms().addAll((Collection<? extends StudyProgram>) newValue); + return; + case AssignmentPackage.COURSE_INSTANCE__COURSE: + setCourse((Course) newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case AssignmentPackage.COURSE_INSTANCE__EVALUATION_FORM: + getEvaluationForm().clear(); + return; + case AssignmentPackage.COURSE_INSTANCE__YEAR: + setYear(YEAR_EDEFAULT); + return; + case AssignmentPackage.COURSE_INSTANCE__SEMESTER: + setSemester(SEMESTER_EDEFAULT); + return; + case AssignmentPackage.COURSE_INSTANCE__LAB_HOURS: + getLabHours().clear(); + return; + case AssignmentPackage.COURSE_INSTANCE__LECTURE_HOURS: + getLectureHours().clear(); + return; + case AssignmentPackage.COURSE_INSTANCE__COURSE_WORK: + setCourseWork((CourseWork) null); + return; + case AssignmentPackage.COURSE_INSTANCE__STAFF: + getStaff().clear(); + return; + case AssignmentPackage.COURSE_INSTANCE__STUDY_PROGRAMS: + getStudyPrograms().clear(); + return; + case AssignmentPackage.COURSE_INSTANCE__COURSE: + setCourse((Course) null); + return; + } + super.eUnset(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case AssignmentPackage.COURSE_INSTANCE__EVALUATION_FORM: + return evaluationForm != null && !evaluationForm.isEmpty(); + case AssignmentPackage.COURSE_INSTANCE__YEAR: + return year != YEAR_EDEFAULT; + case AssignmentPackage.COURSE_INSTANCE__SEMESTER: + return semester != SEMESTER_EDEFAULT; + case AssignmentPackage.COURSE_INSTANCE__LAB_HOURS: + return labHours != null && !labHours.isEmpty(); + case AssignmentPackage.COURSE_INSTANCE__LECTURE_HOURS: + return lectureHours != null && !lectureHours.isEmpty(); + case AssignmentPackage.COURSE_INSTANCE__COURSE_WORK: + return courseWork != null; + case AssignmentPackage.COURSE_INSTANCE__STAFF: + return staff != null && !staff.isEmpty(); + case AssignmentPackage.COURSE_INSTANCE__STUDY_PROGRAMS: + return studyPrograms != null && !studyPrograms.isEmpty(); + case AssignmentPackage.COURSE_INSTANCE__COURSE: + return getCourse() != null; + } + return super.eIsSet(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) + return super.toString(); + + StringBuilder result = new StringBuilder(super.toString()); + result.append(" (year: "); + result.append(year); + result.append(", semester: "); + result.append(semester); + result.append(')'); + return result.toString(); + } + +} //CourseInstanceImpl diff --git a/Assignment/src-gen/assignment/impl/CourseRelationImpl.java b/Assignment/src-gen/assignment/impl/CourseRelationImpl.java new file mode 100644 index 0000000000000000000000000000000000000000..a793c438a99482255e7dcf7884e63ea166971dd9 --- /dev/null +++ b/Assignment/src-gen/assignment/impl/CourseRelationImpl.java @@ -0,0 +1,230 @@ +/** + */ +package assignment.impl; + +import assignment.AssignmentPackage; +import assignment.Course; +import assignment.CourseRelation; + +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Course Relation</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * </p> + * <ul> + * <li>{@link assignment.impl.CourseRelationImpl#getCourse <em>Course</em>}</li> + * <li>{@link assignment.impl.CourseRelationImpl#getCreditsReduction <em>Credits Reduction</em>}</li> + * </ul> + * + * @generated + */ +public class CourseRelationImpl extends MinimalEObjectImpl.Container implements CourseRelation { + /** + * The cached value of the '{@link #getCourse() <em>Course</em>}' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getCourse() + * @generated + * @ordered + */ + protected Course course; + + /** + * The default value of the '{@link #getCreditsReduction() <em>Credits Reduction</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getCreditsReduction() + * @generated + * @ordered + */ + protected static final float CREDITS_REDUCTION_EDEFAULT = 0.0F; + + /** + * The cached value of the '{@link #getCreditsReduction() <em>Credits Reduction</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getCreditsReduction() + * @generated + * @ordered + */ + protected float creditsReduction = CREDITS_REDUCTION_EDEFAULT; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected CourseRelationImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return AssignmentPackage.Literals.COURSE_RELATION; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public Course getCourse() { + if (course != null && course.eIsProxy()) { + InternalEObject oldCourse = (InternalEObject) course; + course = (Course) eResolveProxy(oldCourse); + if (course != oldCourse) { + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.RESOLVE, AssignmentPackage.COURSE_RELATION__COURSE, + oldCourse, course)); + } + } + return course; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public Course basicGetCourse() { + return course; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setCourse(Course newCourse) { + Course oldCourse = course; + course = newCourse; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, AssignmentPackage.COURSE_RELATION__COURSE, oldCourse, + course)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public float getCreditsReduction() { + return creditsReduction; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setCreditsReduction(float newCreditsReduction) { + float oldCreditsReduction = creditsReduction; + creditsReduction = newCreditsReduction; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, AssignmentPackage.COURSE_RELATION__CREDITS_REDUCTION, + oldCreditsReduction, creditsReduction)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case AssignmentPackage.COURSE_RELATION__COURSE: + if (resolve) + return getCourse(); + return basicGetCourse(); + case AssignmentPackage.COURSE_RELATION__CREDITS_REDUCTION: + return getCreditsReduction(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case AssignmentPackage.COURSE_RELATION__COURSE: + setCourse((Course) newValue); + return; + case AssignmentPackage.COURSE_RELATION__CREDITS_REDUCTION: + setCreditsReduction((Float) newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case AssignmentPackage.COURSE_RELATION__COURSE: + setCourse((Course) null); + return; + case AssignmentPackage.COURSE_RELATION__CREDITS_REDUCTION: + setCreditsReduction(CREDITS_REDUCTION_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case AssignmentPackage.COURSE_RELATION__COURSE: + return course != null; + case AssignmentPackage.COURSE_RELATION__CREDITS_REDUCTION: + return creditsReduction != CREDITS_REDUCTION_EDEFAULT; + } + return super.eIsSet(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) + return super.toString(); + + StringBuilder result = new StringBuilder(super.toString()); + result.append(" (creditsReduction: "); + result.append(creditsReduction); + result.append(')'); + return result.toString(); + } + +} //CourseRelationImpl diff --git a/Assignment/src-gen/assignment/impl/CourseWorkImpl.java b/Assignment/src-gen/assignment/impl/CourseWorkImpl.java new file mode 100644 index 0000000000000000000000000000000000000000..38a2ed5871f185e415b4f02f18e82f51bff65642 --- /dev/null +++ b/Assignment/src-gen/assignment/impl/CourseWorkImpl.java @@ -0,0 +1,220 @@ +/** + */ +package assignment.impl; + +import assignment.AssignmentPackage; +import assignment.CourseWork; + +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Course Work</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * </p> + * <ul> + * <li>{@link assignment.impl.CourseWorkImpl#getLectureHours <em>Lecture Hours</em>}</li> + * <li>{@link assignment.impl.CourseWorkImpl#getLabHours <em>Lab Hours</em>}</li> + * </ul> + * + * @generated + */ +public class CourseWorkImpl extends MinimalEObjectImpl.Container implements CourseWork { + /** + * The default value of the '{@link #getLectureHours() <em>Lecture Hours</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getLectureHours() + * @generated + * @ordered + */ + protected static final int LECTURE_HOURS_EDEFAULT = 0; + + /** + * The cached value of the '{@link #getLectureHours() <em>Lecture Hours</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getLectureHours() + * @generated + * @ordered + */ + protected int lectureHours = LECTURE_HOURS_EDEFAULT; + + /** + * The default value of the '{@link #getLabHours() <em>Lab Hours</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getLabHours() + * @generated + * @ordered + */ + protected static final int LAB_HOURS_EDEFAULT = 0; + + /** + * The cached value of the '{@link #getLabHours() <em>Lab Hours</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getLabHours() + * @generated + * @ordered + */ + protected int labHours = LAB_HOURS_EDEFAULT; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected CourseWorkImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return AssignmentPackage.Literals.COURSE_WORK; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public int getLectureHours() { + return lectureHours; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setLectureHours(int newLectureHours) { + int oldLectureHours = lectureHours; + lectureHours = newLectureHours; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, AssignmentPackage.COURSE_WORK__LECTURE_HOURS, + oldLectureHours, lectureHours)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public int getLabHours() { + return labHours; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setLabHours(int newLabHours) { + int oldLabHours = labHours; + labHours = newLabHours; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, AssignmentPackage.COURSE_WORK__LAB_HOURS, oldLabHours, + labHours)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case AssignmentPackage.COURSE_WORK__LECTURE_HOURS: + return getLectureHours(); + case AssignmentPackage.COURSE_WORK__LAB_HOURS: + return getLabHours(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case AssignmentPackage.COURSE_WORK__LECTURE_HOURS: + setLectureHours((Integer) newValue); + return; + case AssignmentPackage.COURSE_WORK__LAB_HOURS: + setLabHours((Integer) newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case AssignmentPackage.COURSE_WORK__LECTURE_HOURS: + setLectureHours(LECTURE_HOURS_EDEFAULT); + return; + case AssignmentPackage.COURSE_WORK__LAB_HOURS: + setLabHours(LAB_HOURS_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case AssignmentPackage.COURSE_WORK__LECTURE_HOURS: + return lectureHours != LECTURE_HOURS_EDEFAULT; + case AssignmentPackage.COURSE_WORK__LAB_HOURS: + return labHours != LAB_HOURS_EDEFAULT; + } + return super.eIsSet(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) + return super.toString(); + + StringBuilder result = new StringBuilder(super.toString()); + result.append(" (lectureHours: "); + result.append(lectureHours); + result.append(", labHours: "); + result.append(labHours); + result.append(')'); + return result.toString(); + } + +} //CourseWorkImpl diff --git a/Assignment/src-gen/assignment/impl/DepartmentImpl.java b/Assignment/src-gen/assignment/impl/DepartmentImpl.java new file mode 100644 index 0000000000000000000000000000000000000000..52b40f405ea0893958162f0dbbea2e3a3584788a --- /dev/null +++ b/Assignment/src-gen/assignment/impl/DepartmentImpl.java @@ -0,0 +1,277 @@ +/** + */ +package assignment.impl; + +import assignment.AssignmentPackage; +import assignment.Course; +import assignment.Department; +import assignment.People; + +import java.util.Collection; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; + +import org.eclipse.emf.ecore.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.EObjectContainmentWithInverseEList; +import org.eclipse.emf.ecore.util.InternalEList; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Department</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * </p> + * <ul> + * <li>{@link assignment.impl.DepartmentImpl#getName <em>Name</em>}</li> + * <li>{@link assignment.impl.DepartmentImpl#getCourses <em>Courses</em>}</li> + * <li>{@link assignment.impl.DepartmentImpl#getStaff <em>Staff</em>}</li> + * </ul> + * + * @generated + */ +public class DepartmentImpl extends MinimalEObjectImpl.Container implements Department { + /** + * The default value of the '{@link #getName() <em>Name</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getName() + * @generated + * @ordered + */ + protected static final String NAME_EDEFAULT = null; + + /** + * The cached value of the '{@link #getName() <em>Name</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getName() + * @generated + * @ordered + */ + protected String name = NAME_EDEFAULT; + + /** + * The cached value of the '{@link #getCourses() <em>Courses</em>}' containment reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getCourses() + * @generated + * @ordered + */ + protected EList<Course> courses; + + /** + * The cached value of the '{@link #getStaff() <em>Staff</em>}' containment reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getStaff() + * @generated + * @ordered + */ + protected EList<People> staff; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected DepartmentImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return AssignmentPackage.Literals.DEPARTMENT; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getName() { + return name; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setName(String newName) { + String oldName = name; + name = newName; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, AssignmentPackage.DEPARTMENT__NAME, oldName, name)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EList<Course> getCourses() { + if (courses == null) { + courses = new EObjectContainmentWithInverseEList<Course>(Course.class, this, + AssignmentPackage.DEPARTMENT__COURSES, AssignmentPackage.COURSE__DEPARTMENT); + } + return courses; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EList<People> getStaff() { + if (staff == null) { + staff = new EObjectContainmentEList<People>(People.class, this, AssignmentPackage.DEPARTMENT__STAFF); + } + return staff; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case AssignmentPackage.DEPARTMENT__COURSES: + return ((InternalEList<InternalEObject>) (InternalEList<?>) getCourses()).basicAdd(otherEnd, msgs); + } + return super.eInverseAdd(otherEnd, featureID, msgs); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case AssignmentPackage.DEPARTMENT__COURSES: + return ((InternalEList<?>) getCourses()).basicRemove(otherEnd, msgs); + case AssignmentPackage.DEPARTMENT__STAFF: + return ((InternalEList<?>) getStaff()).basicRemove(otherEnd, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case AssignmentPackage.DEPARTMENT__NAME: + return getName(); + case AssignmentPackage.DEPARTMENT__COURSES: + return getCourses(); + case AssignmentPackage.DEPARTMENT__STAFF: + return getStaff(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case AssignmentPackage.DEPARTMENT__NAME: + setName((String) newValue); + return; + case AssignmentPackage.DEPARTMENT__COURSES: + getCourses().clear(); + getCourses().addAll((Collection<? extends Course>) newValue); + return; + case AssignmentPackage.DEPARTMENT__STAFF: + getStaff().clear(); + getStaff().addAll((Collection<? extends People>) newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case AssignmentPackage.DEPARTMENT__NAME: + setName(NAME_EDEFAULT); + return; + case AssignmentPackage.DEPARTMENT__COURSES: + getCourses().clear(); + return; + case AssignmentPackage.DEPARTMENT__STAFF: + getStaff().clear(); + return; + } + super.eUnset(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case AssignmentPackage.DEPARTMENT__NAME: + return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name); + case AssignmentPackage.DEPARTMENT__COURSES: + return courses != null && !courses.isEmpty(); + case AssignmentPackage.DEPARTMENT__STAFF: + return staff != null && !staff.isEmpty(); + } + return super.eIsSet(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) + return super.toString(); + + StringBuilder result = new StringBuilder(super.toString()); + result.append(" (name: "); + result.append(name); + result.append(')'); + return result.toString(); + } + +} //DepartmentImpl diff --git a/Assignment/src-gen/assignment/impl/PeopleImpl.java b/Assignment/src-gen/assignment/impl/PeopleImpl.java new file mode 100644 index 0000000000000000000000000000000000000000..c0221765632536bb2e30c7edc5448fa2e53b9335 --- /dev/null +++ b/Assignment/src-gen/assignment/impl/PeopleImpl.java @@ -0,0 +1,218 @@ +/** + */ +package assignment.impl; + +import assignment.AssignmentPackage; +import assignment.People; + +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>People</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * </p> + * <ul> + * <li>{@link assignment.impl.PeopleImpl#getName <em>Name</em>}</li> + * <li>{@link assignment.impl.PeopleImpl#getEmail <em>Email</em>}</li> + * </ul> + * + * @generated + */ +public class PeopleImpl extends MinimalEObjectImpl.Container implements People { + /** + * The default value of the '{@link #getName() <em>Name</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getName() + * @generated + * @ordered + */ + protected static final String NAME_EDEFAULT = null; + + /** + * The cached value of the '{@link #getName() <em>Name</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getName() + * @generated + * @ordered + */ + protected String name = NAME_EDEFAULT; + + /** + * The default value of the '{@link #getEmail() <em>Email</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getEmail() + * @generated + * @ordered + */ + protected static final String EMAIL_EDEFAULT = null; + + /** + * The cached value of the '{@link #getEmail() <em>Email</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getEmail() + * @generated + * @ordered + */ + protected String email = EMAIL_EDEFAULT; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected PeopleImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return AssignmentPackage.Literals.PEOPLE; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getName() { + return name; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setName(String newName) { + String oldName = name; + name = newName; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, AssignmentPackage.PEOPLE__NAME, oldName, name)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getEmail() { + return email; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setEmail(String newEmail) { + String oldEmail = email; + email = newEmail; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, AssignmentPackage.PEOPLE__EMAIL, oldEmail, email)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case AssignmentPackage.PEOPLE__NAME: + return getName(); + case AssignmentPackage.PEOPLE__EMAIL: + return getEmail(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case AssignmentPackage.PEOPLE__NAME: + setName((String) newValue); + return; + case AssignmentPackage.PEOPLE__EMAIL: + setEmail((String) newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case AssignmentPackage.PEOPLE__NAME: + setName(NAME_EDEFAULT); + return; + case AssignmentPackage.PEOPLE__EMAIL: + setEmail(EMAIL_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case AssignmentPackage.PEOPLE__NAME: + return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name); + case AssignmentPackage.PEOPLE__EMAIL: + return EMAIL_EDEFAULT == null ? email != null : !EMAIL_EDEFAULT.equals(email); + } + return super.eIsSet(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) + return super.toString(); + + StringBuilder result = new StringBuilder(super.toString()); + result.append(" (name: "); + result.append(name); + result.append(", email: "); + result.append(email); + result.append(')'); + return result.toString(); + } + +} //PeopleImpl diff --git a/Assignment/src-gen/assignment/impl/RoleImpl.java b/Assignment/src-gen/assignment/impl/RoleImpl.java new file mode 100644 index 0000000000000000000000000000000000000000..447b53bb6037a56def2ebc520928173c24616f5c --- /dev/null +++ b/Assignment/src-gen/assignment/impl/RoleImpl.java @@ -0,0 +1,229 @@ +/** + */ +package assignment.impl; + +import assignment.AssignmentPackage; +import assignment.People; +import assignment.Role; +import assignment.RoleType; + +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Role</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * </p> + * <ul> + * <li>{@link assignment.impl.RoleImpl#getType <em>Type</em>}</li> + * <li>{@link assignment.impl.RoleImpl#getPeople <em>People</em>}</li> + * </ul> + * + * @generated + */ +public class RoleImpl extends MinimalEObjectImpl.Container implements Role { + /** + * The default value of the '{@link #getType() <em>Type</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getType() + * @generated + * @ordered + */ + protected static final RoleType TYPE_EDEFAULT = RoleType.LECTURER; + + /** + * The cached value of the '{@link #getType() <em>Type</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getType() + * @generated + * @ordered + */ + protected RoleType type = TYPE_EDEFAULT; + + /** + * The cached value of the '{@link #getPeople() <em>People</em>}' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getPeople() + * @generated + * @ordered + */ + protected People people; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected RoleImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return AssignmentPackage.Literals.ROLE; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public RoleType getType() { + return type; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setType(RoleType newType) { + RoleType oldType = type; + type = newType == null ? TYPE_EDEFAULT : newType; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, AssignmentPackage.ROLE__TYPE, oldType, type)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public People getPeople() { + if (people != null && people.eIsProxy()) { + InternalEObject oldPeople = (InternalEObject) people; + people = (People) eResolveProxy(oldPeople); + if (people != oldPeople) { + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.RESOLVE, AssignmentPackage.ROLE__PEOPLE, oldPeople, + people)); + } + } + return people; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public People basicGetPeople() { + return people; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setPeople(People newPeople) { + People oldPeople = people; + people = newPeople; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, AssignmentPackage.ROLE__PEOPLE, oldPeople, people)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case AssignmentPackage.ROLE__TYPE: + return getType(); + case AssignmentPackage.ROLE__PEOPLE: + if (resolve) + return getPeople(); + return basicGetPeople(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case AssignmentPackage.ROLE__TYPE: + setType((RoleType) newValue); + return; + case AssignmentPackage.ROLE__PEOPLE: + setPeople((People) newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case AssignmentPackage.ROLE__TYPE: + setType(TYPE_EDEFAULT); + return; + case AssignmentPackage.ROLE__PEOPLE: + setPeople((People) null); + return; + } + super.eUnset(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case AssignmentPackage.ROLE__TYPE: + return type != TYPE_EDEFAULT; + case AssignmentPackage.ROLE__PEOPLE: + return people != null; + } + return super.eIsSet(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) + return super.toString(); + + StringBuilder result = new StringBuilder(super.toString()); + result.append(" (type: "); + result.append(type); + result.append(')'); + return result.toString(); + } + +} //RoleImpl diff --git a/Assignment/src-gen/assignment/impl/ScheduledHourImpl.java b/Assignment/src-gen/assignment/impl/ScheduledHourImpl.java new file mode 100644 index 0000000000000000000000000000000000000000..b7548e838e799d6a60686db0df65709189c4d5ac --- /dev/null +++ b/Assignment/src-gen/assignment/impl/ScheduledHourImpl.java @@ -0,0 +1,428 @@ +/** + */ +package assignment.impl; + +import assignment.AssignmentPackage; +import assignment.HourType; +import assignment.ScheduledHour; +import assignment.StudyProgram; + +import java.util.Collection; + +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; + +import org.eclipse.emf.ecore.util.EObjectResolvingEList; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Scheduled Hour</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * </p> + * <ul> + * <li>{@link assignment.impl.ScheduledHourImpl#getDuration <em>Duration</em>}</li> + * <li>{@link assignment.impl.ScheduledHourImpl#getRoom <em>Room</em>}</li> + * <li>{@link assignment.impl.ScheduledHourImpl#getBeginning <em>Beginning</em>}</li> + * <li>{@link assignment.impl.ScheduledHourImpl#getReservedForProgram <em>Reserved For Program</em>}</li> + * <li>{@link assignment.impl.ScheduledHourImpl#getDay <em>Day</em>}</li> + * <li>{@link assignment.impl.ScheduledHourImpl#getType <em>Type</em>}</li> + * </ul> + * + * @generated + */ +public class ScheduledHourImpl extends MinimalEObjectImpl.Container implements ScheduledHour { + /** + * The default value of the '{@link #getDuration() <em>Duration</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getDuration() + * @generated + * @ordered + */ + protected static final int DURATION_EDEFAULT = 0; + + /** + * The cached value of the '{@link #getDuration() <em>Duration</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getDuration() + * @generated + * @ordered + */ + protected int duration = DURATION_EDEFAULT; + + /** + * The default value of the '{@link #getRoom() <em>Room</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getRoom() + * @generated + * @ordered + */ + protected static final String ROOM_EDEFAULT = null; + + /** + * The cached value of the '{@link #getRoom() <em>Room</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getRoom() + * @generated + * @ordered + */ + protected String room = ROOM_EDEFAULT; + + /** + * The default value of the '{@link #getBeginning() <em>Beginning</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getBeginning() + * @generated + * @ordered + */ + protected static final String BEGINNING_EDEFAULT = null; + + /** + * The cached value of the '{@link #getBeginning() <em>Beginning</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getBeginning() + * @generated + * @ordered + */ + protected String beginning = BEGINNING_EDEFAULT; + + /** + * The cached value of the '{@link #getReservedForProgram() <em>Reserved For Program</em>}' reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getReservedForProgram() + * @generated + * @ordered + */ + protected EList<StudyProgram> reservedForProgram; + + /** + * The default value of the '{@link #getDay() <em>Day</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getDay() + * @generated + * @ordered + */ + protected static final String DAY_EDEFAULT = null; + + /** + * The cached value of the '{@link #getDay() <em>Day</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getDay() + * @generated + * @ordered + */ + protected String day = DAY_EDEFAULT; + + /** + * The default value of the '{@link #getType() <em>Type</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getType() + * @generated + * @ordered + */ + protected static final HourType TYPE_EDEFAULT = HourType.LAB; + + /** + * The cached value of the '{@link #getType() <em>Type</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getType() + * @generated + * @ordered + */ + protected HourType type = TYPE_EDEFAULT; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected ScheduledHourImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return AssignmentPackage.Literals.SCHEDULED_HOUR; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public int getDuration() { + return duration; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setDuration(int newDuration) { + int oldDuration = duration; + duration = newDuration; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, AssignmentPackage.SCHEDULED_HOUR__DURATION, + oldDuration, duration)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getRoom() { + return room; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setRoom(String newRoom) { + String oldRoom = room; + room = newRoom; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, AssignmentPackage.SCHEDULED_HOUR__ROOM, oldRoom, + room)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getBeginning() { + return beginning; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setBeginning(String newBeginning) { + String oldBeginning = beginning; + beginning = newBeginning; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, AssignmentPackage.SCHEDULED_HOUR__BEGINNING, + oldBeginning, beginning)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EList<StudyProgram> getReservedForProgram() { + if (reservedForProgram == null) { + reservedForProgram = new EObjectResolvingEList<StudyProgram>(StudyProgram.class, this, + AssignmentPackage.SCHEDULED_HOUR__RESERVED_FOR_PROGRAM); + } + return reservedForProgram; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getDay() { + return day; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setDay(String newDay) { + String oldDay = day; + day = newDay; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, AssignmentPackage.SCHEDULED_HOUR__DAY, oldDay, day)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public HourType getType() { + return type; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setType(HourType newType) { + HourType oldType = type; + type = newType == null ? TYPE_EDEFAULT : newType; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, AssignmentPackage.SCHEDULED_HOUR__TYPE, oldType, + type)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case AssignmentPackage.SCHEDULED_HOUR__DURATION: + return getDuration(); + case AssignmentPackage.SCHEDULED_HOUR__ROOM: + return getRoom(); + case AssignmentPackage.SCHEDULED_HOUR__BEGINNING: + return getBeginning(); + case AssignmentPackage.SCHEDULED_HOUR__RESERVED_FOR_PROGRAM: + return getReservedForProgram(); + case AssignmentPackage.SCHEDULED_HOUR__DAY: + return getDay(); + case AssignmentPackage.SCHEDULED_HOUR__TYPE: + return getType(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case AssignmentPackage.SCHEDULED_HOUR__DURATION: + setDuration((Integer) newValue); + return; + case AssignmentPackage.SCHEDULED_HOUR__ROOM: + setRoom((String) newValue); + return; + case AssignmentPackage.SCHEDULED_HOUR__BEGINNING: + setBeginning((String) newValue); + return; + case AssignmentPackage.SCHEDULED_HOUR__RESERVED_FOR_PROGRAM: + getReservedForProgram().clear(); + getReservedForProgram().addAll((Collection<? extends StudyProgram>) newValue); + return; + case AssignmentPackage.SCHEDULED_HOUR__DAY: + setDay((String) newValue); + return; + case AssignmentPackage.SCHEDULED_HOUR__TYPE: + setType((HourType) newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case AssignmentPackage.SCHEDULED_HOUR__DURATION: + setDuration(DURATION_EDEFAULT); + return; + case AssignmentPackage.SCHEDULED_HOUR__ROOM: + setRoom(ROOM_EDEFAULT); + return; + case AssignmentPackage.SCHEDULED_HOUR__BEGINNING: + setBeginning(BEGINNING_EDEFAULT); + return; + case AssignmentPackage.SCHEDULED_HOUR__RESERVED_FOR_PROGRAM: + getReservedForProgram().clear(); + return; + case AssignmentPackage.SCHEDULED_HOUR__DAY: + setDay(DAY_EDEFAULT); + return; + case AssignmentPackage.SCHEDULED_HOUR__TYPE: + setType(TYPE_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case AssignmentPackage.SCHEDULED_HOUR__DURATION: + return duration != DURATION_EDEFAULT; + case AssignmentPackage.SCHEDULED_HOUR__ROOM: + return ROOM_EDEFAULT == null ? room != null : !ROOM_EDEFAULT.equals(room); + case AssignmentPackage.SCHEDULED_HOUR__BEGINNING: + return BEGINNING_EDEFAULT == null ? beginning != null : !BEGINNING_EDEFAULT.equals(beginning); + case AssignmentPackage.SCHEDULED_HOUR__RESERVED_FOR_PROGRAM: + return reservedForProgram != null && !reservedForProgram.isEmpty(); + case AssignmentPackage.SCHEDULED_HOUR__DAY: + return DAY_EDEFAULT == null ? day != null : !DAY_EDEFAULT.equals(day); + case AssignmentPackage.SCHEDULED_HOUR__TYPE: + return type != TYPE_EDEFAULT; + } + return super.eIsSet(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) + return super.toString(); + + StringBuilder result = new StringBuilder(super.toString()); + result.append(" (duration: "); + result.append(duration); + result.append(", room: "); + result.append(room); + result.append(", beginning: "); + result.append(beginning); + result.append(", day: "); + result.append(day); + result.append(", type: "); + result.append(type); + result.append(')'); + return result.toString(); + } + +} //ScheduledHourImpl diff --git a/Assignment/src-gen/assignment/impl/StudyProgramImpl.java b/Assignment/src-gen/assignment/impl/StudyProgramImpl.java new file mode 100644 index 0000000000000000000000000000000000000000..188ee674de15d6f53d61bf6d1541ab9de58fb6e7 --- /dev/null +++ b/Assignment/src-gen/assignment/impl/StudyProgramImpl.java @@ -0,0 +1,165 @@ +/** + */ +package assignment.impl; + +import assignment.AssignmentPackage; +import assignment.StudyProgram; + +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Study Program</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * </p> + * <ul> + * <li>{@link assignment.impl.StudyProgramImpl#getCode <em>Code</em>}</li> + * </ul> + * + * @generated + */ +public class StudyProgramImpl extends MinimalEObjectImpl.Container implements StudyProgram { + /** + * The default value of the '{@link #getCode() <em>Code</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getCode() + * @generated + * @ordered + */ + protected static final String CODE_EDEFAULT = null; + + /** + * The cached value of the '{@link #getCode() <em>Code</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getCode() + * @generated + * @ordered + */ + protected String code = CODE_EDEFAULT; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected StudyProgramImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return AssignmentPackage.Literals.STUDY_PROGRAM; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getCode() { + return code; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setCode(String newCode) { + String oldCode = code; + code = newCode; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, AssignmentPackage.STUDY_PROGRAM__CODE, oldCode, + code)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case AssignmentPackage.STUDY_PROGRAM__CODE: + return getCode(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case AssignmentPackage.STUDY_PROGRAM__CODE: + setCode((String) newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case AssignmentPackage.STUDY_PROGRAM__CODE: + setCode(CODE_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case AssignmentPackage.STUDY_PROGRAM__CODE: + return CODE_EDEFAULT == null ? code != null : !CODE_EDEFAULT.equals(code); + } + return super.eIsSet(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) + return super.toString(); + + StringBuilder result = new StringBuilder(super.toString()); + result.append(" (code: "); + result.append(code); + result.append(')'); + return result.toString(); + } + +} //StudyProgramImpl diff --git a/Assignment/src-gen/assignment/impl/WorkImpl.java b/Assignment/src-gen/assignment/impl/WorkImpl.java new file mode 100644 index 0000000000000000000000000000000000000000..73a358b5e57cf60024e171287167850c75ed5a14 --- /dev/null +++ b/Assignment/src-gen/assignment/impl/WorkImpl.java @@ -0,0 +1,220 @@ +/** + */ +package assignment.impl; + +import assignment.AssignmentPackage; +import assignment.Work; +import assignment.WorkType; + +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Work</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * </p> + * <ul> + * <li>{@link assignment.impl.WorkImpl#getPercentage <em>Percentage</em>}</li> + * <li>{@link assignment.impl.WorkImpl#getType <em>Type</em>}</li> + * </ul> + * + * @generated + */ +public class WorkImpl extends MinimalEObjectImpl.Container implements Work { + /** + * The default value of the '{@link #getPercentage() <em>Percentage</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getPercentage() + * @generated + * @ordered + */ + protected static final int PERCENTAGE_EDEFAULT = 0; + + /** + * The cached value of the '{@link #getPercentage() <em>Percentage</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getPercentage() + * @generated + * @ordered + */ + protected int percentage = PERCENTAGE_EDEFAULT; + + /** + * The default value of the '{@link #getType() <em>Type</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getType() + * @generated + * @ordered + */ + protected static final WorkType TYPE_EDEFAULT = WorkType.ASSIGNMENT; + + /** + * The cached value of the '{@link #getType() <em>Type</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getType() + * @generated + * @ordered + */ + protected WorkType type = TYPE_EDEFAULT; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected WorkImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return AssignmentPackage.Literals.WORK; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public int getPercentage() { + return percentage; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setPercentage(int newPercentage) { + int oldPercentage = percentage; + percentage = newPercentage; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, AssignmentPackage.WORK__PERCENTAGE, oldPercentage, + percentage)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public WorkType getType() { + return type; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setType(WorkType newType) { + WorkType oldType = type; + type = newType == null ? TYPE_EDEFAULT : newType; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, AssignmentPackage.WORK__TYPE, oldType, type)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case AssignmentPackage.WORK__PERCENTAGE: + return getPercentage(); + case AssignmentPackage.WORK__TYPE: + return getType(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case AssignmentPackage.WORK__PERCENTAGE: + setPercentage((Integer) newValue); + return; + case AssignmentPackage.WORK__TYPE: + setType((WorkType) newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case AssignmentPackage.WORK__PERCENTAGE: + setPercentage(PERCENTAGE_EDEFAULT); + return; + case AssignmentPackage.WORK__TYPE: + setType(TYPE_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case AssignmentPackage.WORK__PERCENTAGE: + return percentage != PERCENTAGE_EDEFAULT; + case AssignmentPackage.WORK__TYPE: + return type != TYPE_EDEFAULT; + } + return super.eIsSet(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) + return super.toString(); + + StringBuilder result = new StringBuilder(super.toString()); + result.append(" (percentage: "); + result.append(percentage); + result.append(", type: "); + result.append(type); + result.append(')'); + return result.toString(); + } + +} //WorkImpl diff --git a/Assignment/src-gen/assignment/util/AssignmentAdapterFactory.java b/Assignment/src-gen/assignment/util/AssignmentAdapterFactory.java new file mode 100644 index 0000000000000000000000000000000000000000..c284ccf5d47d6806881d040ca4d4d6746c78edda --- /dev/null +++ b/Assignment/src-gen/assignment/util/AssignmentAdapterFactory.java @@ -0,0 +1,290 @@ +/** + */ +package assignment.util; + +import assignment.*; + +import org.eclipse.emf.common.notify.Adapter; +import org.eclipse.emf.common.notify.Notifier; + +import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl; + +import org.eclipse.emf.ecore.EObject; + +/** + * <!-- begin-user-doc --> + * The <b>Adapter Factory</b> for the model. + * It provides an adapter <code>createXXX</code> method for each class of the model. + * <!-- end-user-doc --> + * @see assignment.AssignmentPackage + * @generated + */ +public class AssignmentAdapterFactory extends AdapterFactoryImpl { + /** + * The cached model package. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected static AssignmentPackage modelPackage; + + /** + * Creates an instance of the adapter factory. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public AssignmentAdapterFactory() { + if (modelPackage == null) { + modelPackage = AssignmentPackage.eINSTANCE; + } + } + + /** + * Returns whether this factory is applicable for the type of the object. + * <!-- begin-user-doc --> + * This implementation returns <code>true</code> if the object is either the model's package or is an instance object of the model. + * <!-- end-user-doc --> + * @return whether this factory is applicable for the type of the object. + * @generated + */ + @Override + public boolean isFactoryForType(Object object) { + if (object == modelPackage) { + return true; + } + if (object instanceof EObject) { + return ((EObject) object).eClass().getEPackage() == modelPackage; + } + return false; + } + + /** + * The switch that delegates to the <code>createXXX</code> methods. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected AssignmentSwitch<Adapter> modelSwitch = new AssignmentSwitch<Adapter>() { + @Override + public Adapter caseCourse(Course object) { + return createCourseAdapter(); + } + + @Override + public Adapter caseCourseRelation(CourseRelation object) { + return createCourseRelationAdapter(); + } + + @Override + public Adapter caseCourseInstance(CourseInstance object) { + return createCourseInstanceAdapter(); + } + + @Override + public Adapter caseCourseWork(CourseWork object) { + return createCourseWorkAdapter(); + } + + @Override + public Adapter caseRole(Role object) { + return createRoleAdapter(); + } + + @Override + public Adapter casePeople(People object) { + return createPeopleAdapter(); + } + + @Override + public Adapter caseStudyProgram(StudyProgram object) { + return createStudyProgramAdapter(); + } + + @Override + public Adapter caseWork(Work object) { + return createWorkAdapter(); + } + + @Override + public Adapter caseDepartment(Department object) { + return createDepartmentAdapter(); + } + + @Override + public Adapter caseScheduledHour(ScheduledHour object) { + return createScheduledHourAdapter(); + } + + @Override + public Adapter defaultCase(EObject object) { + return createEObjectAdapter(); + } + }; + + /** + * Creates an adapter for the <code>target</code>. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param target the object to adapt. + * @return the adapter for the <code>target</code>. + * @generated + */ + @Override + public Adapter createAdapter(Notifier target) { + return modelSwitch.doSwitch((EObject) target); + } + + /** + * Creates a new adapter for an object of class '{@link assignment.Course <em>Course</em>}'. + * <!-- begin-user-doc --> + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * <!-- end-user-doc --> + * @return the new adapter. + * @see assignment.Course + * @generated + */ + public Adapter createCourseAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link assignment.CourseRelation <em>Course Relation</em>}'. + * <!-- begin-user-doc --> + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * <!-- end-user-doc --> + * @return the new adapter. + * @see assignment.CourseRelation + * @generated + */ + public Adapter createCourseRelationAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link assignment.CourseInstance <em>Course Instance</em>}'. + * <!-- begin-user-doc --> + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * <!-- end-user-doc --> + * @return the new adapter. + * @see assignment.CourseInstance + * @generated + */ + public Adapter createCourseInstanceAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link assignment.CourseWork <em>Course Work</em>}'. + * <!-- begin-user-doc --> + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * <!-- end-user-doc --> + * @return the new adapter. + * @see assignment.CourseWork + * @generated + */ + public Adapter createCourseWorkAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link assignment.Role <em>Role</em>}'. + * <!-- begin-user-doc --> + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * <!-- end-user-doc --> + * @return the new adapter. + * @see assignment.Role + * @generated + */ + public Adapter createRoleAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link assignment.People <em>People</em>}'. + * <!-- begin-user-doc --> + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * <!-- end-user-doc --> + * @return the new adapter. + * @see assignment.People + * @generated + */ + public Adapter createPeopleAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link assignment.StudyProgram <em>Study Program</em>}'. + * <!-- begin-user-doc --> + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * <!-- end-user-doc --> + * @return the new adapter. + * @see assignment.StudyProgram + * @generated + */ + public Adapter createStudyProgramAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link assignment.Work <em>Work</em>}'. + * <!-- begin-user-doc --> + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * <!-- end-user-doc --> + * @return the new adapter. + * @see assignment.Work + * @generated + */ + public Adapter createWorkAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link assignment.Department <em>Department</em>}'. + * <!-- begin-user-doc --> + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * <!-- end-user-doc --> + * @return the new adapter. + * @see assignment.Department + * @generated + */ + public Adapter createDepartmentAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link assignment.ScheduledHour <em>Scheduled Hour</em>}'. + * <!-- begin-user-doc --> + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * <!-- end-user-doc --> + * @return the new adapter. + * @see assignment.ScheduledHour + * @generated + */ + public Adapter createScheduledHourAdapter() { + return null; + } + + /** + * Creates a new adapter for the default case. + * <!-- begin-user-doc --> + * This default implementation returns null. + * <!-- end-user-doc --> + * @return the new adapter. + * @generated + */ + public Adapter createEObjectAdapter() { + return null; + } + +} //AssignmentAdapterFactory diff --git a/Assignment/src-gen/assignment/util/AssignmentResourceFactoryImpl.java b/Assignment/src-gen/assignment/util/AssignmentResourceFactoryImpl.java new file mode 100644 index 0000000000000000000000000000000000000000..c5cab031f6c6141f57f46f77a47aa0728025bd1a --- /dev/null +++ b/Assignment/src-gen/assignment/util/AssignmentResourceFactoryImpl.java @@ -0,0 +1,41 @@ +/** + */ +package assignment.util; + +import org.eclipse.emf.common.util.URI; + +import org.eclipse.emf.ecore.resource.Resource; + +import org.eclipse.emf.ecore.resource.impl.ResourceFactoryImpl; + +/** + * <!-- begin-user-doc --> + * The <b>Resource Factory</b> associated with the package. + * <!-- end-user-doc --> + * @see assignment.util.AssignmentResourceImpl + * @generated + */ +public class AssignmentResourceFactoryImpl extends ResourceFactoryImpl { + /** + * Creates an instance of the resource factory. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public AssignmentResourceFactoryImpl() { + super(); + } + + /** + * Creates an instance of the resource. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public Resource createResource(URI uri) { + Resource result = new AssignmentResourceImpl(uri); + return result; + } + +} //AssignmentResourceFactoryImpl diff --git a/Assignment/src-gen/assignment/util/AssignmentResourceImpl.java b/Assignment/src-gen/assignment/util/AssignmentResourceImpl.java new file mode 100644 index 0000000000000000000000000000000000000000..d66a0820f02c259f9075bd798a512406f04d2c53 --- /dev/null +++ b/Assignment/src-gen/assignment/util/AssignmentResourceImpl.java @@ -0,0 +1,28 @@ +/** + */ +package assignment.util; + +import org.eclipse.emf.common.util.URI; + +import org.eclipse.emf.ecore.xmi.impl.XMIResourceImpl; + +/** + * <!-- begin-user-doc --> + * The <b>Resource </b> associated with the package. + * <!-- end-user-doc --> + * @see assignment.util.AssignmentResourceFactoryImpl + * @generated + */ +public class AssignmentResourceImpl extends XMIResourceImpl { + /** + * Creates an instance of the resource. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param uri the URI of the new resource. + * @generated + */ + public AssignmentResourceImpl(URI uri) { + super(uri); + } + +} //AssignmentResourceImpl diff --git a/Assignment/src-gen/assignment/util/AssignmentSwitch.java b/Assignment/src-gen/assignment/util/AssignmentSwitch.java new file mode 100644 index 0000000000000000000000000000000000000000..d1130114942760c2273bebd311a90b038e256b38 --- /dev/null +++ b/Assignment/src-gen/assignment/util/AssignmentSwitch.java @@ -0,0 +1,310 @@ +/** + */ +package assignment.util; + +import assignment.*; + +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EPackage; + +import org.eclipse.emf.ecore.util.Switch; + +/** + * <!-- begin-user-doc --> + * The <b>Switch</b> for the model's inheritance hierarchy. + * It supports the call {@link #doSwitch(EObject) doSwitch(object)} + * to invoke the <code>caseXXX</code> method for each class of the model, + * starting with the actual class of the object + * and proceeding up the inheritance hierarchy + * until a non-null result is returned, + * which is the result of the switch. + * <!-- end-user-doc --> + * @see assignment.AssignmentPackage + * @generated + */ +public class AssignmentSwitch<T> extends Switch<T> { + /** + * The cached model package + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected static AssignmentPackage modelPackage; + + /** + * Creates an instance of the switch. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public AssignmentSwitch() { + if (modelPackage == null) { + modelPackage = AssignmentPackage.eINSTANCE; + } + } + + /** + * Checks whether this is a switch for the given package. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param ePackage the package in question. + * @return whether this is a switch for the given package. + * @generated + */ + @Override + protected boolean isSwitchFor(EPackage ePackage) { + return ePackage == modelPackage; + } + + /** + * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the first non-null result returned by a <code>caseXXX</code> call. + * @generated + */ + @Override + protected T doSwitch(int classifierID, EObject theEObject) { + switch (classifierID) { + case AssignmentPackage.COURSE: { + Course course = (Course) theEObject; + T result = caseCourse(course); + if (result == null) + result = defaultCase(theEObject); + return result; + } + case AssignmentPackage.COURSE_RELATION: { + CourseRelation courseRelation = (CourseRelation) theEObject; + T result = caseCourseRelation(courseRelation); + if (result == null) + result = defaultCase(theEObject); + return result; + } + case AssignmentPackage.COURSE_INSTANCE: { + CourseInstance courseInstance = (CourseInstance) theEObject; + T result = caseCourseInstance(courseInstance); + if (result == null) + result = defaultCase(theEObject); + return result; + } + case AssignmentPackage.COURSE_WORK: { + CourseWork courseWork = (CourseWork) theEObject; + T result = caseCourseWork(courseWork); + if (result == null) + result = defaultCase(theEObject); + return result; + } + case AssignmentPackage.ROLE: { + Role role = (Role) theEObject; + T result = caseRole(role); + if (result == null) + result = defaultCase(theEObject); + return result; + } + case AssignmentPackage.PEOPLE: { + People people = (People) theEObject; + T result = casePeople(people); + if (result == null) + result = defaultCase(theEObject); + return result; + } + case AssignmentPackage.STUDY_PROGRAM: { + StudyProgram studyProgram = (StudyProgram) theEObject; + T result = caseStudyProgram(studyProgram); + if (result == null) + result = defaultCase(theEObject); + return result; + } + case AssignmentPackage.WORK: { + Work work = (Work) theEObject; + T result = caseWork(work); + if (result == null) + result = defaultCase(theEObject); + return result; + } + case AssignmentPackage.DEPARTMENT: { + Department department = (Department) theEObject; + T result = caseDepartment(department); + if (result == null) + result = defaultCase(theEObject); + return result; + } + case AssignmentPackage.SCHEDULED_HOUR: { + ScheduledHour scheduledHour = (ScheduledHour) theEObject; + T result = caseScheduledHour(scheduledHour); + if (result == null) + result = defaultCase(theEObject); + return result; + } + default: + return defaultCase(theEObject); + } + } + + /** + * Returns the result of interpreting the object as an instance of '<em>Course</em>'. + * <!-- begin-user-doc --> + * This implementation returns null; + * returning a non-null result will terminate the switch. + * <!-- end-user-doc --> + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of '<em>Course</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseCourse(Course object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of '<em>Course Relation</em>'. + * <!-- begin-user-doc --> + * This implementation returns null; + * returning a non-null result will terminate the switch. + * <!-- end-user-doc --> + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of '<em>Course Relation</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseCourseRelation(CourseRelation object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of '<em>Course Instance</em>'. + * <!-- begin-user-doc --> + * This implementation returns null; + * returning a non-null result will terminate the switch. + * <!-- end-user-doc --> + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of '<em>Course Instance</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseCourseInstance(CourseInstance object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of '<em>Course Work</em>'. + * <!-- begin-user-doc --> + * This implementation returns null; + * returning a non-null result will terminate the switch. + * <!-- end-user-doc --> + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of '<em>Course Work</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseCourseWork(CourseWork object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of '<em>Role</em>'. + * <!-- begin-user-doc --> + * This implementation returns null; + * returning a non-null result will terminate the switch. + * <!-- end-user-doc --> + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of '<em>Role</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseRole(Role object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of '<em>People</em>'. + * <!-- begin-user-doc --> + * This implementation returns null; + * returning a non-null result will terminate the switch. + * <!-- end-user-doc --> + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of '<em>People</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T casePeople(People object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of '<em>Study Program</em>'. + * <!-- begin-user-doc --> + * This implementation returns null; + * returning a non-null result will terminate the switch. + * <!-- end-user-doc --> + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of '<em>Study Program</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseStudyProgram(StudyProgram object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of '<em>Work</em>'. + * <!-- begin-user-doc --> + * This implementation returns null; + * returning a non-null result will terminate the switch. + * <!-- end-user-doc --> + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of '<em>Work</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseWork(Work object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of '<em>Department</em>'. + * <!-- begin-user-doc --> + * This implementation returns null; + * returning a non-null result will terminate the switch. + * <!-- end-user-doc --> + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of '<em>Department</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseDepartment(Department object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of '<em>Scheduled Hour</em>'. + * <!-- begin-user-doc --> + * This implementation returns null; + * returning a non-null result will terminate the switch. + * <!-- end-user-doc --> + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of '<em>Scheduled Hour</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseScheduledHour(ScheduledHour object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of '<em>EObject</em>'. + * <!-- begin-user-doc --> + * This implementation returns null; + * returning a non-null result will terminate the switch, but this is the last case anyway. + * <!-- end-user-doc --> + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of '<em>EObject</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) + * @generated + */ + @Override + public T defaultCase(EObject object) { + return null; + } + +} //AssignmentSwitch diff --git a/Assignment/src-gen/assignment/util/AssignmentValidator.java b/Assignment/src-gen/assignment/util/AssignmentValidator.java new file mode 100644 index 0000000000000000000000000000000000000000..22778d75245f261c0a3e525fcb7aa5af7ca8e410 --- /dev/null +++ b/Assignment/src-gen/assignment/util/AssignmentValidator.java @@ -0,0 +1,362 @@ +/** + */ +package assignment.util; + +import assignment.*; + +import java.util.Map; + +import org.eclipse.emf.common.util.Diagnostic; +import org.eclipse.emf.common.util.DiagnosticChain; +import org.eclipse.emf.common.util.ResourceLocator; + +import org.eclipse.emf.ecore.EPackage; + +import org.eclipse.emf.ecore.util.EObjectValidator; + +/** + * <!-- begin-user-doc --> + * The <b>Validator</b> for the model. + * <!-- end-user-doc --> + * @see assignment.AssignmentPackage + * @generated + */ +public class AssignmentValidator extends EObjectValidator { + /** + * The cached model package + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public static final AssignmentValidator INSTANCE = new AssignmentValidator(); + + /** + * A constant for the {@link org.eclipse.emf.common.util.Diagnostic#getSource() source} of diagnostic {@link org.eclipse.emf.common.util.Diagnostic#getCode() codes} from this package. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see org.eclipse.emf.common.util.Diagnostic#getSource() + * @see org.eclipse.emf.common.util.Diagnostic#getCode() + * @generated + */ + public static final String DIAGNOSTIC_SOURCE = "assignment"; + + /** + * A constant with a fixed name that can be used as the base value for additional hand written constants. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private static final int GENERATED_DIAGNOSTIC_CODE_COUNT = 0; + + /** + * A constant with a fixed name that can be used as the base value for additional hand written constants in a derived class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected static final int DIAGNOSTIC_CODE_COUNT = GENERATED_DIAGNOSTIC_CODE_COUNT; + + /** + * Creates an instance of the switch. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public AssignmentValidator() { + super(); + } + + /** + * Returns the package of this validator switch. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EPackage getEPackage() { + return AssignmentPackage.eINSTANCE; + } + + /** + * Calls <code>validateXXX</code> for the corresponding classifier of the model. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected boolean validate(int classifierID, Object value, DiagnosticChain diagnostics, + Map<Object, Object> context) { + switch (classifierID) { + case AssignmentPackage.COURSE: + return validateCourse((Course) value, diagnostics, context); + case AssignmentPackage.COURSE_RELATION: + return validateCourseRelation((CourseRelation) value, diagnostics, context); + case AssignmentPackage.COURSE_INSTANCE: + return validateCourseInstance((CourseInstance) value, diagnostics, context); + case AssignmentPackage.COURSE_WORK: + return validateCourseWork((CourseWork) value, diagnostics, context); + case AssignmentPackage.ROLE: + return validateRole((Role) value, diagnostics, context); + case AssignmentPackage.PEOPLE: + return validatePeople((People) value, diagnostics, context); + case AssignmentPackage.STUDY_PROGRAM: + return validateStudyProgram((StudyProgram) value, diagnostics, context); + case AssignmentPackage.WORK: + return validateWork((Work) value, diagnostics, context); + case AssignmentPackage.DEPARTMENT: + return validateDepartment((Department) value, diagnostics, context); + case AssignmentPackage.SCHEDULED_HOUR: + return validateScheduledHour((ScheduledHour) value, diagnostics, context); + case AssignmentPackage.SEMESTER: + return validateSemester((Semester) value, diagnostics, context); + case AssignmentPackage.WORK_TYPE: + return validateWorkType((WorkType) value, diagnostics, context); + case AssignmentPackage.HOUR_TYPE: + return validateHourType((HourType) value, diagnostics, context); + case AssignmentPackage.ROLE_TYPE: + return validateRoleType((RoleType) value, diagnostics, context); + default: + return true; + } + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public boolean validateCourse(Course course, DiagnosticChain diagnostics, Map<Object, Object> context) { + return validate_EveryDefaultConstraint(course, diagnostics, context); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public boolean validateCourseRelation(CourseRelation courseRelation, DiagnosticChain diagnostics, + Map<Object, Object> context) { + return validate_EveryDefaultConstraint(courseRelation, diagnostics, context); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public boolean validateCourseInstance(CourseInstance courseInstance, DiagnosticChain diagnostics, + Map<Object, Object> context) { + if (!validate_NoCircularContainment(courseInstance, diagnostics, context)) + return false; + boolean result = validate_EveryMultiplicityConforms(courseInstance, diagnostics, context); + if (result || diagnostics != null) + result &= validate_EveryDataValueConforms(courseInstance, diagnostics, context); + if (result || diagnostics != null) + result &= validate_EveryReferenceIsContained(courseInstance, diagnostics, context); + if (result || diagnostics != null) + result &= validate_EveryBidirectionalReferenceIsPaired(courseInstance, diagnostics, context); + if (result || diagnostics != null) + result &= validate_EveryProxyResolves(courseInstance, diagnostics, context); + if (result || diagnostics != null) + result &= validate_UniqueID(courseInstance, diagnostics, context); + if (result || diagnostics != null) + result &= validate_EveryKeyUnique(courseInstance, diagnostics, context); + if (result || diagnostics != null) + result &= validate_EveryMapEntryUnique(courseInstance, diagnostics, context); + if (result || diagnostics != null) + result &= validateCourseInstance_percentageSum(courseInstance, diagnostics, context); + if (result || diagnostics != null) + result &= validateCourseInstance_hasACoordinator(courseInstance, diagnostics, context); + if (result || diagnostics != null) + result &= validateCourseInstance_timetableCorrespondsToCoursework(courseInstance, diagnostics, context); + return result; + } + + /** + * Validates the percentageSum constraint of '<em>Course Instance</em>'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public boolean validateCourseInstance_percentageSum(CourseInstance courseInstance, DiagnosticChain diagnostics, + Map<Object, Object> context) { + // TODO implement the constraint + // -> specify the condition that violates the constraint + // -> verify the diagnostic details, including severity, code, and message + // Ensure that you remove @generated or mark it @generated NOT + if (false) { + if (diagnostics != null) { + diagnostics.add( + createDiagnostic(Diagnostic.ERROR, DIAGNOSTIC_SOURCE, 0, "_UI_GenericConstraint_diagnostic", + new Object[] { "percentageSum", getObjectLabel(courseInstance, context) }, + new Object[] { courseInstance }, context)); + } + return false; + } + return true; + } + + /** + * Validates the hasACoordinator constraint of '<em>Course Instance</em>'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public boolean validateCourseInstance_hasACoordinator(CourseInstance courseInstance, DiagnosticChain diagnostics, + Map<Object, Object> context) { + // TODO implement the constraint + // -> specify the condition that violates the constraint + // -> verify the diagnostic details, including severity, code, and message + // Ensure that you remove @generated or mark it @generated NOT + if (false) { + if (diagnostics != null) { + diagnostics.add( + createDiagnostic(Diagnostic.ERROR, DIAGNOSTIC_SOURCE, 0, "_UI_GenericConstraint_diagnostic", + new Object[] { "hasACoordinator", getObjectLabel(courseInstance, context) }, + new Object[] { courseInstance }, context)); + } + return false; + } + return true; + } + + /** + * Validates the timetableCorrespondsToCoursework constraint of '<em>Course Instance</em>'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public boolean validateCourseInstance_timetableCorrespondsToCoursework(CourseInstance courseInstance, + DiagnosticChain diagnostics, Map<Object, Object> context) { + // TODO implement the constraint + // -> specify the condition that violates the constraint + // -> verify the diagnostic details, including severity, code, and message + // Ensure that you remove @generated or mark it @generated NOT + if (false) { + if (diagnostics != null) { + diagnostics.add(createDiagnostic(Diagnostic.ERROR, DIAGNOSTIC_SOURCE, 0, + "_UI_GenericConstraint_diagnostic", + new Object[] { "timetableCorrespondsToCoursework", getObjectLabel(courseInstance, context) }, + new Object[] { courseInstance }, context)); + } + return false; + } + return true; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public boolean validateCourseWork(CourseWork courseWork, DiagnosticChain diagnostics, Map<Object, Object> context) { + return validate_EveryDefaultConstraint(courseWork, diagnostics, context); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public boolean validateRole(Role role, DiagnosticChain diagnostics, Map<Object, Object> context) { + return validate_EveryDefaultConstraint(role, diagnostics, context); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public boolean validatePeople(People people, DiagnosticChain diagnostics, Map<Object, Object> context) { + return validate_EveryDefaultConstraint(people, diagnostics, context); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public boolean validateStudyProgram(StudyProgram studyProgram, DiagnosticChain diagnostics, + Map<Object, Object> context) { + return validate_EveryDefaultConstraint(studyProgram, diagnostics, context); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public boolean validateWork(Work work, DiagnosticChain diagnostics, Map<Object, Object> context) { + return validate_EveryDefaultConstraint(work, diagnostics, context); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public boolean validateDepartment(Department department, DiagnosticChain diagnostics, Map<Object, Object> context) { + return validate_EveryDefaultConstraint(department, diagnostics, context); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public boolean validateScheduledHour(ScheduledHour scheduledHour, DiagnosticChain diagnostics, + Map<Object, Object> context) { + return validate_EveryDefaultConstraint(scheduledHour, diagnostics, context); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public boolean validateSemester(Semester semester, DiagnosticChain diagnostics, Map<Object, Object> context) { + return true; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public boolean validateWorkType(WorkType workType, DiagnosticChain diagnostics, Map<Object, Object> context) { + return true; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public boolean validateHourType(HourType hourType, DiagnosticChain diagnostics, Map<Object, Object> context) { + return true; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public boolean validateRoleType(RoleType roleType, DiagnosticChain diagnostics, Map<Object, Object> context) { + return true; + } + + /** + * Returns the resource locator that will be used to fetch messages for this validator's diagnostics. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public ResourceLocator getResourceLocator() { + // TODO + // Specialize this to return a resource locator for messages specific to this validator. + // Ensure that you remove @generated or mark it @generated NOT + return super.getResourceLocator(); + } + +} //AssignmentValidator diff --git a/Assignment/src-gen/html/Course.xmi b/Assignment/src-gen/html/Course.xmi new file mode 100644 index 0000000000000000000000000000000000000000..6acefa9694394c050e8bb3f92db63e8a1fcb7310 --- /dev/null +++ b/Assignment/src-gen/html/Course.xmi @@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="UTF-8"?> +<assignment:Course + xmi:version="2.0" + xmlns:xmi="http://www.omg.org/XMI" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xmlns:assignment="http://www.example.org/assignment" + xsi:schemaLocation="http://www.example.org/assignment ../../model/assignment.ecore" + name="Hard class" + code="TDT4250" + content="Learn alot"> + <instances + year="2018"> + <evaluationForm + percentage="30"/> + <evaluationForm + percentage="70" + type="Exam"/> + </instances> +</assignment:Course> diff --git a/Assignment/src-gen/html/Department.xmi b/Assignment/src-gen/html/Department.xmi new file mode 100644 index 0000000000000000000000000000000000000000..13c9315fa06d1556200c39d9c2201d600e05790a --- /dev/null +++ b/Assignment/src-gen/html/Department.xmi @@ -0,0 +1,53 @@ +<?xml version="1.0" encoding="UTF-8"?> +<assignment:Department + xmi:version="2.0" + xmlns:xmi="http://www.omg.org/XMI" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xmlns:assignment="http://www.example.org/assignment" + xsi:schemaLocation="http://www.example.org/assignment ../../model/assignment.ecore" + name="Data"> + <courses name="Hard" + code="TDT4250" + creditsNumber="7.5" + recommendedCourses="//@courses.1" + content="A subject"> + <instances + year="2018"> + <evaluationForm + percentage="30"/> + <evaluationForm + percentage="70" + type="Exam"/> + <labHours + duration="2" + room="R54" + beginning="2" + day="Monday"/> + <lectureHours + duration="2" + room="R52" + beginning="6" + day="Sunday" + type="Lecture"/> + <courseWork + lectureHours="2" + labHours="2"/> + <staff + people="//@staff.1"/> + <staff + type="Student" + people="//@staff.0"/> + </instances> + <creditsReduction + course="//@courses.1" + creditsReduction="3.75"/> + </courses> + <courses name="Java" + code="TDT4100" + creditsNumber="7.5" + content="Learn code in Java"/> + <staff name="Mr. Student" + email="student@stud.ntnu.no"/> + <staff name="Mr. Teach" + email="teacher@ntnu.no"/> +</assignment:Department> diff --git a/Assignment/src-gen/html/GenHtml.xtend b/Assignment/src-gen/html/GenHtml.xtend new file mode 100644 index 0000000000000000000000000000000000000000..1dc8c199006c310f9884e8e4af709506bf1caf3b --- /dev/null +++ b/Assignment/src-gen/html/GenHtml.xtend @@ -0,0 +1,199 @@ +package html + +import java.io.IOException +import assignment.Course +import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl +import assignment.AssignmentPackage +import assignment.Department +import org.eclipse.emf.ecore.EObject +import org.eclipse.emf.common.util.URI +import org.eclipse.emf.ecore.resource.impl.ResourceFactoryImpl +import assignment.util.AssignmentResourceFactoryImpl +import assignment.CourseInstance +import assignment.Role +import assignment.ScheduledHour +import assignment.Work +import java.util.Arrays +import java.io.PrintStream +import assignment.CourseRelation + +class GenHtml { + + def CharSequence generateHtml(Course course, StringBuilder stringBuilder) { + generatePreHtml(course.code, course.name, stringBuilder) + generateContent(course, stringBuilder); + testSomething(course, stringBuilder); + generatePostHtml(stringBuilder); + } + + def CharSequence generatePreHtml(String code, String name, StringBuilder stringBuilder) { + stringBuilder.append(''' +<!DOCTYPE html> +<html> +<head> + <title>�code� - �name�</title> + <meta charset="utf-8"/> + <style> + table, th, td { + border: 1px solid black; + } + </style> +</head> +<body> +'''); + } + + def CharSequence generatePostHtml(StringBuilder stringBuilder) { + stringBuilder.append("\n</body></html>"); + } + + def static Course getCourse(String uriString) throws IOException { + val resSet = new ResourceSetImpl(); + resSet.getPackageRegistry().put(AssignmentPackage.eNS_URI, AssignmentPackage.eINSTANCE); + resSet.getResourceFactoryRegistry().getExtensionToFactoryMap().put("xmi", new AssignmentResourceFactoryImpl()); + val resource = resSet.getResource(URI.createURI(uriString), true); + for (EObject eObject : resource.getContents()) { + if (eObject instanceof Department) { + return eObject.courses.get(0); + } + } + return null; + } + + + def CharSequence generateContent(Course course, StringBuilder stringBuilder) { + stringBuilder.append(''' + <h1>�course.code� - �course.name�</h1> + <h2>Content</h2> + �course.content� + '''); + for (CourseInstance ci : course.instances) { + stringBuilder.append(''' + <h2>�ci.semester� - �ci.year�</h2> + ''') + generateEvaluationForm(ci, stringBuilder); + generateTimetable(ci, stringBuilder); + generateStaff(ci, stringBuilder); + } + stringBuilder.append(''''''); + } + + def CharSequence generateEvaluationForm(CourseInstance courseInstance, StringBuilder stringBuilder) { + stringBuilder.append(''' + <h3>Examination arrangement</h3> + <table> + <tr> + <th>Evaluation Form</th> + <th>Weighting</th> + </tr> + ''') + for (Work w : courseInstance.evaluationForm) { + stringBuilder.append(''' + <tr> + <td>�w.type�</td> + <td>�w.percentage�/100</td> + </tr> + ''') + } + stringBuilder.append(''' + </table>''') + } + + def CharSequence testSomething(Course course, StringBuilder stringBuilder) { + stringBuilder.append("<h3>Point reductions</h3>") + stringBuilder.append(''' + <table> + <tr> + <th> Course </th> + <th> Reduction </th> + </tr> + ''' + ) + for (CourseRelation relation : course.creditsReduction) { + stringBuilder.append(''' + <tr> + <td>�relation.course.name�</td> + <td>�relation.creditsReduction�</td> + </tr> + ''') + } + stringBuilder.append("</table>") + return stringBuilder; + } + + def CharSequence generateTimetable(CourseInstance courseInstance, StringBuilder stringBuilder) { + stringBuilder.append(''' + <h3>Timetable</h3> + <table> + <tr> + <th>Day</th> + <th>Type</th> + <th>Room</th> + <th>Time</th> + <th>Length</th> + </tr> + ''') + for (ScheduledHour lh : courseInstance.labHours) { + stringBuilder.append(''' + <tr> + <td>�lh.day�</td> + <td>�lh.type�</td> + <td>�lh.room�</td> + <td>�lh.beginning�</td> + <td>�lh.duration�</td> + </tr> + ''') + } + for (ScheduledHour lh : courseInstance.lectureHours) { + stringBuilder.append(''' + <tr> + <td>�lh.day�</td> + <td>�lh.type�</td> + <td>�lh.room�</td> + <td>�lh.beginning�</td> + <td>�lh.duration�</td> + </tr> + ''') + } + stringBuilder.append(''' + </table>''') + } + + def CharSequence generateStaff(CourseInstance courseInstance, StringBuilder stringBuilder) { + stringBuilder.append(''' + <h3>Contact information</h3> + Department with academic responsibility : + �courseInstance.course.department.name� + <table> + <tr> + <th>Name</th> + <th>Email</th> + <th>Role</th> + </tr> + ''') + for (Role r : courseInstance.staff) { + stringBuilder.append(''' + <tr> + <td>�r.people.name�</td> + <td>�r.people.email�</td> + <td>�r.type�</td> + </tr> + ''') + } + stringBuilder.append(''' + </table>''') + } + + def static void main(String[] args) throws IOException { + val argsAsList = Arrays.asList(args) + val course = if(argsAsList.size > 0) getCourse(argsAsList.get(0)) else getCourse(GenHtml.getResource("Department.xmi").toString()); + val html = new GenHtml().generateHtml(course, new StringBuilder); + if (args.length > 1) { + val target = URI.createURI(argsAsList.get(1)); + val ps = new PrintStream(course.eResource().getResourceSet().getURIConverter().createOutputStream(target)) + ps.print(html); + } else { + System.out.println(html); + } + } +} \ No newline at end of file diff --git a/Assignment/src-gen/html/genHtml.html b/Assignment/src-gen/html/genHtml.html new file mode 100644 index 0000000000000000000000000000000000000000..4f6b08f15f6ae806628e2dc13e3fca549b169ea9 --- /dev/null +++ b/Assignment/src-gen/html/genHtml.html @@ -0,0 +1,83 @@ +<!DOCTYPE html> +<html> +<head> + <title>TDT4250 - Hard</title> + <meta charset="utf-8"/> + <style> + table, th, td { + border: 1px solid black; + } + </style> +</head> +<body> +<h1>TDT4250 - Hard</h1> +<h2>Content</h2> +A subject +<h2>Autumn - 2018</h2> +<h3>Examination arrangement</h3> +<table> + <tr> + <th>Evaluation Form</th> + <th>Weighting</th> + </tr> +<tr> + <td>Assignment</td> + <td>30/100</td> +</tr> +<tr> + <td>Exam</td> + <td>70/100</td> +</tr> +</table><h3>Timetable</h3> +<table> + <tr> + <th>Day</th> + <th>Type</th> + <th>Room</th> + <th>Time</th> + <th>Length</th> + </tr> +<tr> + <td>Monday</td> + <td>Lab</td> + <td>R54</td> + <td>2</td> + <td>2</td> +</tr> +<tr> + <td>Sunday</td> + <td>Lecture</td> + <td>R52</td> + <td>6</td> + <td>2</td> +</tr> +</table><h3>Contact information</h3> +Department with academic responsibility : +Data +<table> + <tr> + <th>Name</th> + <th>Email</th> + <th>Role</th> + </tr> +<tr> + <td>Mr. Teach</td> + <td>teacher@ntnu.no</td> + <td>Lecturer</td> +</tr> +<tr> + <td>Mr. Student</td> + <td>student@stud.ntnu.no</td> + <td>Student</td> +</tr> +</table><h3>Point reductions</h3><table> + <tr> + <th> Course </th> + <th> Reduction </th> + </tr> +<tr> + <td>Java</td> + <td>3.75</td> +</tr> +</table> +</body></html> \ No newline at end of file diff --git a/Assignment/xtend-gen/html/.gitignore b/Assignment/xtend-gen/html/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..6f75962ac08ad6390b374fd67cd3a3c1a2a063b2 --- /dev/null +++ b/Assignment/xtend-gen/html/.gitignore @@ -0,0 +1,3 @@ +/.GenHtml.java._trace +/.GenHtml.xtendbin +/GenHtml.java