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 class
LocalFile.Factory
-
Constructor Summary
Constructors Constructor Description LocalFile()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description File
asFile()
Attempt to create a java.io.File from the local URI.Boolean
canRead()
Boolean
canWrite()
boolean
equals(Object obj)
Long
getId()
URI
getLocalURL()
URI
getRemoteURL()
Long
getSize()
String
getVersion()
int
hashCode()
void
setId(Long id)
void
setLocalURL(URI localURL)
void
setRemoteURL(URI remoteURL)
void
setSize(Long size)
void
setVersion(String version)
String
toString()
-
-
-
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:
getId
in 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)
-
-