Class FileInfoDssDTO

  • All Implemented Interfaces:
    java.io.Serializable

    @JsonObject("FileInfoDssDTO")
    public class FileInfoDssDTO
    extends java.lang.Object
    implements java.io.Serializable
    Represents information about a file stored in DSS.
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      FileInfoDssDTO​(java.lang.String pathInDataSet, java.lang.String pathInListing, boolean isDirectory, long fileSize)  
      FileInfoDssDTO​(java.lang.String pathInDataSet, java.lang.String pathInListing, boolean isDirectory, long fileSize, java.lang.Integer crc32Checksum)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      long getFileSize()
      Return the file size if this FileInfo represents a file.
      java.lang.String getPathInDataSet()
      The path of this file in the data set (i.e., the root of the data set has a path of "").
      java.lang.String getPathInListing()
      The path of this file relative to the path of the request that produced this FileInfoDss
      boolean isDirectory()
      Return true if this FileInfo represents a folder.
      java.lang.String toString()  
      java.lang.Integer tryGetCrc32Checksum()
      Return the CRC32 checksum, if it is available and null otherwise.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • FileInfoDssDTO

        public FileInfoDssDTO​(java.lang.String pathInDataSet,
                              java.lang.String pathInListing,
                              boolean isDirectory,
                              long fileSize)
      • FileInfoDssDTO

        public FileInfoDssDTO​(java.lang.String pathInDataSet,
                              java.lang.String pathInListing,
                              boolean isDirectory,
                              long fileSize,
                              java.lang.Integer crc32Checksum)
    • Method Detail

      • getPathInDataSet

        public java.lang.String getPathInDataSet()
        The path of this file in the data set (i.e., the root of the data set has a path of "").
      • getPathInListing

        public java.lang.String getPathInListing()
        The path of this file relative to the path of the request that produced this FileInfoDss
      • isDirectory

        public boolean isDirectory()
        Return true if this FileInfo represents a folder.
      • getFileSize

        public long getFileSize()
        Return the file size if this FileInfo represents a file. If this FileInfo represents a folder, the return value is negative.
      • tryGetCrc32Checksum

        public java.lang.Integer tryGetCrc32Checksum()
        Return the CRC32 checksum, if it is available and null otherwise.

        Note that the checksum will only be available when it is precomputed and available from some sort of database, i.e. if it is computationally "cheap" to provide the checksum.

      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object