Class S3StorageFile

java.lang.Object
de.dlr.proseo.storagemgr.s3.S3StorageFile
All Implemented Interfaces:
StorageFile

public class S3StorageFile extends Object implements StorageFile
Represents a file within a S3-based storage system. It implements the StorageFile interface and provides functionality related to the file's properties and operations. Full path: "s3:/" + bucket + relativePath (with fileName)
Author:
Denys Chaykovskiy
  • Constructor Details

    • S3StorageFile

      public S3StorageFile(String bucket, String relativePath)
      Constructor
      Parameters:
      bucket - bucket
      relativePath - relative path
    • S3StorageFile

      public S3StorageFile(StorageFile storageFile)
      Copy Constructor
      Parameters:
      storageFile - Storage file
  • Method Details

    • getFullPath

      public String getFullPath()
      Gets the full path
      Specified by:
      getFullPath in interface StorageFile
      Returns:
      the full path
    • getBasePath

      public String getBasePath()
      Gets the base path
      Specified by:
      getBasePath in interface StorageFile
      Returns:
      the base path
    • setBasePath

      public void setBasePath(String basePath)
      Sets the base path
      Specified by:
      setBasePath in interface StorageFile
      Parameters:
      basePath - base path
    • getBucket

      public String getBucket()
      Gets the bucket
      Specified by:
      getBucket in interface StorageFile
      Returns:
      the bucket
    • setBucket

      public void setBucket(String bucket)
      Sets the bucket
      Specified by:
      setBucket in interface StorageFile
      Parameters:
      bucket - the bucket
    • getRelativePath

      public String getRelativePath()
      Gets relative path
      Specified by:
      getRelativePath in interface StorageFile
      Returns:
      relative path
    • setRelativePath

      public void setRelativePath(String relativePath)
      Sets relative path
      Specified by:
      setRelativePath in interface StorageFile
      Parameters:
      relativePath - relative path
    • getFileName

      public String getFileName()
      Gets file name
      Specified by:
      getFileName in interface StorageFile
      Returns:
      file name
    • getStorageType

      public StorageType getStorageType()
      Gets storage type
      Specified by:
      getStorageType in interface StorageFile
      Returns:
      storage type
    • getExtension

      public String getExtension()
      Gets extension from file name
      Specified by:
      getExtension in interface StorageFile
      Returns:
      extension
    • isDirectory

      public boolean isDirectory()
      Checks if path is a directory path
      Specified by:
      isDirectory in interface StorageFile
      Returns:
      true if directory