Interface ISubmission

  • All Superinterfaces:
    java.lang.Comparable<ISubmission>
    All Known Implementing Classes:
    EntityArchive

    public interface ISubmission
    extends java.lang.Comparable<ISubmission>
    Interface for accessing data from a single submission, this contains many files and might contain many child submission, which represent directories within the submission
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      boolean equals​(ISubmission o)
      submission equality check
      java.util.List<ISourceFile> getAllFiles()
      Returns a list of all files, across all levels of this submission
      java.util.List<ISubmission> getContainedDirectories()
      Returns a list of sub-directories on this level of the submission structure
      java.util.List<ISourceFile> getContainedFiles()
      Returns a list of files on this level of the submission structure
      int getFileCount()
      Calculates the file count of this directory and all subdirectories
      long getId()
      Fetches the submission unique id
      java.lang.String getName()
      The name of the submission, should uniquely identify the submission content
      ISubmission getParent()
      Get the parent, return null if no parent exists
      int getTotalFileCount()
      Returns the total count of all files in this submission
      boolean hasParent()
      Does this instance have a parent submission.
      void remove()
      Remove the submission from the database, cannot be recovered.
      • Methods inherited from interface java.lang.Comparable

        compareTo
    • Method Detail

      • equals

        boolean equals​(ISubmission o)
        submission equality check
        Parameters:
        o - submission to check against
        Returns:
        is submission equal
      • getAllFiles

        java.util.List<ISourceFile> getAllFiles()
        Returns a list of all files, across all levels of this submission
        Returns:
        total list of files
      • getContainedDirectories

        java.util.List<ISubmission> getContainedDirectories()
        Returns a list of sub-directories on this level of the submission structure
        Returns:
        the list of immediate sub-directories
      • getContainedFiles

        java.util.List<ISourceFile> getContainedFiles()
        Returns a list of files on this level of the submission structure
        Returns:
        the list of files in this directory
      • getFileCount

        int getFileCount()
        Calculates the file count of this directory and all subdirectories
        Returns:
        count
      • getId

        long getId()
        Fetches the submission unique id
        Returns:
        the unique id
      • getName

        java.lang.String getName()
        The name of the submission, should uniquely identify the submission content
        Returns:
        String containing the name
      • getParent

        ISubmission getParent()
        Get the parent, return null if no parent exists
        Returns:
        parent or null if there isn't one
      • getTotalFileCount

        int getTotalFileCount()
        Returns the total count of all files in this submission
        Returns:
        the total file count
      • hasParent

        boolean hasParent()
        Does this instance have a parent submission. If true this instance is a containedDirectory of the parent
        Returns:
        has a parent
      • remove

        void remove()
        Remove the submission from the database, cannot be recovered.