Package studentrepoloader.model.villecsv.mapper
package studentrepoloader.model.villecsv.mapper
Defines the interface and mapping logic for structured ViLLe submission objects.
This package provides type-safe abstractions and a reflection-based mapping utility to convert raw parsed CSV rows into typed submission objects.
Core interfaces:
VilleSubmissionFields
– Base interface for all ViLLe submission records. Defines core fields like email, names, timestamp, and student ID.GitLabSubmissionFields
– Extension ofVilleSubmission
for submissions that include a GitLab repository URL and metadata about AI use and group work.
Core mapper:
SubmissionMapper
– Uses reflection to instantiate aVilleSubmission
implementation from each parsed CSV row. All mapped classes must define a constructor with the signature(String[] row, ViLLeCsvFile source)
.
The mapper layer delegates validation to the constructors of the target implementation classes. By enforcing a consistent constructor signature, it enables plug-and-play support for custom submission models without modifying upstream parsing logic.
Example usage:
ViLLeCsvFile csv = new ViLLeCsvFile(file); SubmissionMappermapper = new SubmissionMapperinvalid input: '<'>(csv, DefaultGitLabSubmission.class); List submissions = mapper.getSubmissionList();
This package enables a clean separation between format parsing and data semantics.
-
ClassDescriptionAn extension of
VilleSubmissionFields
representing a submission made via a GitLab link box in ViLLe.SubmissionMapper<T extends VilleSubmissionFields>SubmissionMapper transforms rows from a parsed ViLLe CSV file into typed Java objects that implement theVilleSubmissionFields
interface or its subinterfaces.Base interface for all ViLLe submission types.