Package org.openrefine.importing
Class ImportingFileRecord
- java.lang.Object
-
- org.openrefine.importing.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 Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetArchiveFileName()longgetCachedSize()StringgetDeclaredEncoding()StringgetDeclaredMimeType()StringgetDerivedEncoding()StringgetEncoding()FilegetFile(File rawDataDir)Returns a path to the file stored in the raw data directory corresponding to this file record.StringgetFileName()StringgetFileSource()Returns a string which represents where the file came from (URL, spark URI or filename).StringgetFormat()StringgetLocation()StringgetMimeType()StringgetOrigin()longgetSize(File rawDataDir)Returns the number of bytes in this file.StringgetUrl()voidsetDeclaredEncoding(String declaredEncoding)voidsetDeclaredMimeType(String declaredMimeType)TODO remove this and make field finalvoidsetEncoding(String encoding)TODO remove this and make field finalvoidsetFileName(String name)TODO remove this and make field finalvoidsetFormat(String format)TODO remove this and make field finalvoidsetLocation(String location)TODO remove this and make field finalvoidsetSize(long size)TODO remove this and make field final
-
-
-
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
-
-