Skip to content

Commit 69e7944

Browse files
committed
add todos on persistent data spec
1 parent 8d78d7c commit 69e7944

File tree

7 files changed

+45
-25
lines changed

7 files changed

+45
-25
lines changed

ucst-core/src/main/java/com/dvf/ucst/core/faculties/FacultyTreeNode.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,11 @@ enum SubDirectories {
157157
// also, reqs will need to be able to refer to common reqs like the engineering "impact of tech
158158
// on society" candidates, and the arts elective candidates. How to decide where to put and how
159159
// to refer to them in a way that specifies that?
160+
/*
161+
TODO [spec]: make specialization information on course requirements go under a different file
162+
hierarchy to follow their object representation:
163+
campus >> programs >> specializations >> subject >> files named after specialization UID.
164+
*/
160165
;
161166
private final Path subDirectory;
162167

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -6,28 +6,29 @@
66
import java.util.HashMap;
77
import java.util.Map;
88

9-
public enum AppliedScienceFaculties implements FacultyTreeNode {
10-
BMEG("Biomedical"),
11-
CHML("Chemical and Biological"),
12-
CIVL("Civil"),
13-
CPEN("Computer"),
14-
ELEC("Electrical"),
15-
ENPH("Engineering Physics", ""),
16-
ENVE("Environmental"),
17-
GEOE("Geological"),
18-
IGEN("Integrated"),
19-
MECH("Mechanical"),
20-
MINE("Mining"),
21-
MTRL("Materials"),
9+
public enum BascFaculties implements FacultyTreeNode {
10+
BMEG ("Biomedical"),
11+
CHML ("Chemical and Biological"),
12+
CIVL ("Civil"),
13+
CPEN ("Computer"),
14+
ELEC ("Electrical"),
15+
ENPH ("Engineering Physics", ""),
16+
ENVE ("Environmental"),
17+
GEOE ("Geological"),
18+
IGEN ("Integrated"),
19+
MANU ("Manufacturing"),
20+
MECH ("Mechanical"),
21+
MINE ("Mining"),
22+
MTRL ("Materials"),
2223
;
2324
private final String name;
2425
private final Map<String, Course> courseCodeMap;
2526

26-
AppliedScienceFaculties(String name) {
27+
BascFaculties(String name) {
2728
this.name = name + " Engineering";
2829
this.courseCodeMap = new HashMap<>();
2930
}
30-
AppliedScienceFaculties(String name, String s) {
31+
BascFaculties(String name, String s) {
3132
this.name = name;
3233
this.courseCodeMap = new HashMap<>();
3334
}

ucst-core/src/main/java/com/dvf/ucst/core/faculties/vancouver/ScienceFaculties.java renamed to ucst-core/src/main/java/com/dvf/ucst/core/faculties/vancouver/ScieFaculties.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,12 @@
33
import com.dvf.ucst.core.courseutils.Course;
44
import com.dvf.ucst.core.faculties.FacultyTreeNode;
55

6-
import java.util.Collections;
76
import java.util.HashMap;
87
import java.util.Map;
98

109
import static com.dvf.ucst.core.faculties.FacultyTreeNode.FacultyTreeNodeType.DEPARTMENT;
1110

12-
public enum ScienceFaculties implements FacultyTreeNode {
11+
public enum ScieFaculties implements FacultyTreeNode {
1312
// TODO [data]: add entries as needed. prefer alphabetical order.
1413
// ...
1514
CPSC (DEPARTMENT, "Computer Science"),
@@ -24,7 +23,7 @@ public enum ScienceFaculties implements FacultyTreeNode {
2423
private final Class<? extends FacultyTreeNode> childrenClass;
2524
private final Map<String, Course> courseCodeMap;
2625

27-
<T extends Enum<?> & FacultyTreeNode> ScienceFaculties(
26+
<T extends Enum<?> & FacultyTreeNode> ScieFaculties(
2827
final FacultyTreeNodeType facultyType,
2928
final String nonAbbreviatedName,
3029
final Class<T> childrenClass
@@ -36,7 +35,7 @@ <T extends Enum<?> & FacultyTreeNode> ScienceFaculties(
3635
}
3736

3837
// constructor for faculties without children faculties.
39-
ScienceFaculties(final FacultyTreeNodeType facultyType, final String nonAbbreviatedName) {
38+
ScieFaculties(final FacultyTreeNodeType facultyType, final String nonAbbreviatedName) {
4039
this(facultyType, nonAbbreviatedName, null);
4140
}
4241

ucst-core/src/main/java/com/dvf/ucst/core/faculties/vancouver/VancouverFaculties.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@
1414
*/
1515
public enum VancouverFaculties implements FacultyTreeNode {
1616
// TODO [data]: add entries as needed. prefer alphabetical order.
17-
APSC (FACULTY, "Applied Science", AppliedScienceFaculties.class),
17+
APSC (FACULTY, "Applied Science", BascFaculties.class),
1818
// ...
19-
SCIE (FACULTY, "Science", ScienceFaculties.class),
19+
SCIE (FACULTY, "Science", ScieFaculties.class),
2020
// ...
2121
;
2222
private final FacultyTreeNodeType facultyType;

ucst-core/src/main/java/com/dvf/ucst/core/programs/ProgramOfStudy.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,14 @@ public interface ProgramOfStudy {
2121

2222
FacultyTreeRootCampus getCampusContext();
2323

24+
/*
25+
TODO [investigate]: It seems like StudentCoreQualityReqs don't care about the
26+
actual specialization- and instead just about the subject (faculty/dept) of
27+
the specialization under a program of study. If so, it may not be necessary
28+
to implement the methods for specializations like their UID, name, and notes.
29+
actually, we probably do- assuming each specialization under the same subject
30+
can have its own mappings of years of study to course requirements.
31+
*/
2432
Map<FacultyTreeNode, Set<ProgramSpecialization>> getSpecializations(); // must be unmodifiable map.
2533

2634

ucst-core/src/main/java/com/dvf/ucst/core/programs/ProgramSpecialization.java

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
package com.dvf.ucst.core.programs;
22

33
import com.dvf.ucst.core.faculties.FacultyTreeNode;
4-
import com.dvf.ucst.core.programs.ProgramOfStudy;
4+
5+
import java.nio.file.Path;
56

67
/**
78
*
@@ -12,4 +13,10 @@ public interface ProgramSpecialization {
1213

1314
FacultyTreeNode getSubject();
1415

16+
/**
17+
* TODO: uncomment and implement. make corresponding method for ProgramOfStudy.
18+
* Path to xml file mapping YearOfStudy to course requirements
19+
*/
20+
//Path getCourseRequirementsPath();
21+
1522
}

ucst-core/src/main/java/com/dvf/ucst/core/programs/vancouver/BascSpecializations.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package com.dvf.ucst.core.programs.vancouver;
22

33
import com.dvf.ucst.core.faculties.FacultyTreeNode;
4-
import com.dvf.ucst.core.faculties.vancouver.AppliedScienceFaculties;
4+
import com.dvf.ucst.core.faculties.vancouver.BascFaculties;
55
import com.dvf.ucst.core.programs.ProgramOfStudy;
66
import com.dvf.ucst.core.programs.ProgramSpecialization;
77

@@ -34,7 +34,7 @@ default ProgramOfStudy getParentProgram() {
3434

3535
private enum CpenSpecializations implements BascProgramSpecialization {
3636
;
37-
private static final FacultyTreeNode SUBJECT = AppliedScienceFaculties.CPEN;
37+
private static final FacultyTreeNode SUBJECT = BascFaculties.CPEN;
3838

3939
@Override
4040
public FacultyTreeNode getSubject() {
@@ -44,7 +44,7 @@ public FacultyTreeNode getSubject() {
4444

4545
private enum ElecSpecializations implements BascProgramSpecialization {
4646
;
47-
private static final FacultyTreeNode SUBJECT = AppliedScienceFaculties.ELEC;
47+
private static final FacultyTreeNode SUBJECT = BascFaculties.ELEC;
4848

4949
@Override
5050
public FacultyTreeNode getSubject() {

0 commit comments

Comments
 (0)