Class FileInfoDssDTO
- java.lang.Object
-
- ch.systemsx.cisd.openbis.dss.generic.shared.api.v1.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 FileInfoDssboolean
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 andnull
otherwise.
-
-
-
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 andnull
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 classjava.lang.Object
-
-