Class ImportingFileRecord


  • public class ImportingFileRecord
    extends Object
    Represents a file to import in an importing job. Multiple files can be imported to form the same project.
    • Method Detail

      • getLocation

        public String getLocation()
      • getFileName

        public String getFileName()
      • getCachedSize

        public long getCachedSize()
      • getOrigin

        public String getOrigin()
      • getDeclaredMimeType

        public String getDeclaredMimeType()
      • getMimeType

        public String getMimeType()
      • getUrl

        public String getUrl()
      • getEncoding

        public String getEncoding()
      • getDeclaredEncoding

        public String getDeclaredEncoding()
      • getFormat

        public String getFormat()
      • getArchiveFileName

        public String getArchiveFileName()
      • getFileSource

        public String getFileSource()
        Returns a string which represents where the file came from (URL, spark URI or filename).
      • getFile

        public File getFile​(File rawDataDir)
        Returns a path to the file stored in the raw data directory corresponding to this file record.
        Parameters:
        rawDataDir - the directory where the files pertaining to the corresponding importing job are stored.
      • getSize

        public long getSize​(File rawDataDir)
        Returns the number of bytes in this file. If this is cached in this record, the cached value will be returned.
        Parameters:
        rawDataDir - the directory where the files pertaining to the corresponding importing
        Returns:
        the length of the file in bytes
      • getDerivedEncoding

        public String getDerivedEncoding()
      • setDeclaredEncoding

        public void setDeclaredEncoding​(String declaredEncoding)
      • setDeclaredMimeType

        public void setDeclaredMimeType​(String declaredMimeType)
        TODO remove this and make field final
      • setLocation

        public void setLocation​(String location)
        TODO remove this and make field final
      • setFormat

        public void setFormat​(String format)
        TODO remove this and make field final
      • setFileName

        public void setFileName​(String name)
        TODO remove this and make field final
      • setSize

        public void setSize​(long size)
        TODO remove this and make field final
      • setEncoding

        public void setEncoding​(String encoding)
        TODO remove this and make field final