Class LocalFile
- java.lang.Object
-
- ubic.gemma.model.common.description.LocalFile
-
- All Implemented Interfaces:
Serializable,Identifiable
public class LocalFile extends Object implements Identifiable, Serializable
Not a persistent entity- Author:
- paul
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classLocalFile.Factory
-
Constructor Summary
Constructors Constructor Description LocalFile()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description FileasFile()Attempt to create a java.io.File from the local URI.BooleancanRead()BooleancanWrite()booleanequals(Object obj)LonggetId()URIgetLocalURL()URIgetRemoteURL()LonggetSize()StringgetVersion()inthashCode()voidsetId(Long id)voidsetLocalURL(URI localURL)voidsetRemoteURL(URI remoteURL)voidsetSize(Long size)voidsetVersion(String version)StringtoString()
-
-
-
Method Detail
-
asFile
public File asFile()
Attempt to create a java.io.File from the local URI. If it doesn't look like a URI, it is just treated as a path.- Returns:
- instance of File
- See Also:
asFile()
-
canRead
public Boolean canRead()
-
canWrite
public Boolean canWrite()
-
getId
public Long getId()
- Specified by:
getIdin interfaceIdentifiable
-
setId
public void setId(Long id)
-
getLocalURL
public URI getLocalURL()
- Returns:
- The location of the file on a local server
-
setLocalURL
public void setLocalURL(URI localURL)
-
getRemoteURL
public URI getRemoteURL()
- Returns:
- Source where the file was downloaded from.
-
setRemoteURL
public void setRemoteURL(URI remoteURL)
-
getSize
public Long getSize()
-
setSize
public void setSize(Long size)
-
getVersion
public String getVersion()
- Returns:
- The version identifier for the file; this could be as simple as the date of creation
-
setVersion
public void setVersion(String version)
-
-