Enum Class StudentCsvFormat
- All Implemented Interfaces:
Serializable, Comparable<StudentCsvFormat>, Constable
Different schools export their class rosters with different CSV column
layouts. Each format below knows how to recognize its own header row and
how to map a data row to a
Student.
UCSB_EGRADES matches the header row exported by UCSB's
registrar (eGrades); see docs/examples/egrades.csv.
CHICO_STATE_ROSTER matches the Canvas roster export used at Chico
State (see docs/examples/chico_canvas.csv) and, along with
GENERIC, is included as a worked example of how to add support for
another school's roster format later (see issue #251); GENERIC is
also the format used for courses associated with the "Other" school.
-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E> -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionstatic StudentCsvFormatbooleanmatchesHeaders(List<String> candidateHeaders) static StudentCsvFormatReturns the enum constant of this class with the specified name.static StudentCsvFormat[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
UCSB_EGRADES
-
CHICO_STATE_ROSTER
-
GENERIC
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
getHeaders
-
matchesHeaders
-
toStudent
-
detect
- Parameters:
candidateHeaders- the header row read from an uploaded CSV file- Returns:
- the matching format, or null if no known format matches
-