Record Class demopalautus

java.lang.Object
java.lang.Record
studentrepoloader.cli.demopalautus
All Implemented Interfaces:
Comparable<VilleSubmissionFields>, GitLabSubmissionFields, VilleSubmissionFields

public record demopalautus(String[] row, ViLLeCsvFile source) extends Record implements GitLabSubmissionFields
  • Constructor Details

    • demopalautus

      public demopalautus(String[] row, ViLLeCsvFile source)
      Creates an instance of a demopalautus record class.
      Parameters:
      row - the value for the row record component
      source - the value for the source record component
  • Method Details

    • getUser

      public String getUser()
      Description copied from interface: VilleSubmissionFields
      Returns the full user identifier, typically an email address.

      This value should be unique across submissions, and is often used to derive internal IDs.

      Specified by:
      getUser in interface VilleSubmissionFields
      Returns:
      the user's identifier (e.g., "student@university.fi")
    • getFirstName

      public String getFirstName()
      Description copied from interface: VilleSubmissionFields
      Returns the student's given name.
      Specified by:
      getFirstName in interface VilleSubmissionFields
      Returns:
      first name
    • getLastName

      public String getLastName()
      Description copied from interface: VilleSubmissionFields
      Returns the student's surname.
      Specified by:
      getLastName in interface VilleSubmissionFields
      Returns:
      last name
    • getTime

      public String getTime()
      Description copied from interface: VilleSubmissionFields
      Returns the timestamp of the submission as a raw string.

      No specific format is enforced — it is the implementer's responsibility to parse or sanitize this if needed.

      Specified by:
      getTime in interface VilleSubmissionFields
      Returns:
      submission time as string
    • getStudentId

      public String getStudentId()
      Description copied from interface: VilleSubmissionFields
      Returns the student's official identifier, such as a student number or other ID code.
      Specified by:
      getStudentId in interface VilleSubmissionFields
      Returns:
      student ID
    • getParentFolderName

      public String getParentFolderName()
      Returns a timestamp-based folder name to group this submission.

      Since this test object is not constructed with a ViLLeCsvFile and lacks batch-level metadata, the fallback strategy is to return the raw timestamp field from the submission itself.

      This ensures submissions created from arbitrary test data can still be placed into separate subdirectories like:

       clones/
       └── 2025-06-14/
           ├── ...
       
      where 2025-06-14 comes from getTime().

      Note: this method assumes the getTime() format is already compliant with filesystem-safe and lexicographically sortable naming (e.g., yyyy-MM-dd).

      Specified by:
      getParentFolderName in interface VilleSubmissionFields
      Returns:
      timestamp string from getTime() to be used as a folder name
    • getScore

      public String getScore()
      Description copied from interface: GitLabSubmissionFields
      Returns the score assigned to this submission.

      This is typically a numeric string but may also contain comments or feedback, depending on ViLLe configuration.

      Specified by:
      getScore in interface GitLabSubmissionFields
      Returns:
      score field as-is from the CSV
    • getGitLabLink

      public String getGitLabLink()
      Description copied from interface: GitLabSubmissionFields
      Returns the raw GitLab link field as entered by the student, without any processing.

      This is the unmodified value directly from the CSV, and may include surrounding commentary, invalid protocols (e.g., SSH), UI links, or malformed fragments.

      This method is useful for diagnostics and logging.

      Specified by:
      getGitLabLink in interface GitLabSubmissionFields
      Returns:
      unprocessed input string from the GitLab link field
    • getAiDisclosure

      public String getAiDisclosure()
      Description copied from interface: GitLabSubmissionFields
      Returns the student's disclosure regarding use of AI tools (e.g., ChatGPT, GitHub Copilot).

      This field may contain multiline text or be left blank.

      Specified by:
      getAiDisclosure in interface GitLabSubmissionFields
      Returns:
      AI tool usage disclosure
    • getGroupWork

      public String getGroupWork()
      Description copied from interface: GitLabSubmissionFields
      Returns the student's response to the group work question.

      This may include the names of collaborators and a description of how the task was divided. This field may be multiline and is optional.

      Specified by:
      getGroupWork in interface GitLabSubmissionFields
      Returns:
      group work information
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • row

      public String[] row()
      Returns the value of the row record component.
      Returns:
      the value of the row record component
    • source

      public ViLLeCsvFile source()
      Returns the value of the source record component.
      Returns:
      the value of the source record component