Class SequenceFile
- java.lang.Object
-
- ca.corefacility.bioinformatics.irida.model.IridaRepresentationModel
-
- ca.corefacility.bioinformatics.irida.model.sequenceFile.SequenceFile
-
- All Implemented Interfaces:
IridaSequenceFile
,IridaThing
,MutableIridaThing
,RemoteSynchronizable
,Timestamped<java.lang.Long>
,VersionedFileFields<java.lang.Long>
,java.lang.Comparable<SequenceFile>
@Entity public class SequenceFile extends IridaRepresentationModel implements MutableIridaThing, java.lang.Comparable<SequenceFile>, VersionedFileFields<java.lang.Long>, IridaSequenceFile, RemoteSynchronizable
A file that may be stored somewhere on the file system and belongs to a particularSample
.
-
-
Constructor Summary
Constructors Constructor Description SequenceFile()
SequenceFile(java.nio.file.Path sampleFile)
Create a newSequenceFile
with the given file Path
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addOptionalProperty(java.lang.String key, java.lang.String value)
Add one optional property to the map of propertiesint
compareTo(SequenceFile other)
boolean
equals(java.lang.Object other)
java.util.Date
getCreatedDate()
Get the created date of the objectAnalysisFastQC
getFastQCAnalysis()
java.nio.file.Path
getFile()
Get the location on the file system where the sequence file is storedjava.lang.String
getFileName()
The base name of the filejava.lang.Long
getFileRevisionNumber()
Get the version of the instance.java.lang.String
getFileSize()
Get the size of the file.java.lang.Long
getId()
Get the numerical identifier for this objectjava.lang.String
getLabel()
Get a human readable label for this object.java.util.Date
getModifiedDate()
Get the date that this object was last modifiedjava.util.Map<java.lang.String,java.lang.String>
getOptionalProperties()
Get the Map of optional propertiesjava.lang.String
getOptionalProperty(java.lang.String key)
Get an individual optional propertyRemoteStatus
getRemoteStatus()
Get theRemoteStatus
for this object if it was read from a remote sourcejava.lang.String
getUploadSha256()
Get the sha256 checksum for a file when it was uploaded.int
hashCode()
void
incrementFileRevisionNumber()
Internally modify the file revision number to something new.void
setFastQCAnalysis(AnalysisFastQC fastqcAnalysis)
Set theAnalysisFastQC
for thisSequenceFile
.void
setFile(java.nio.file.Path file)
void
setId(java.lang.Long id)
Set the numerical identifier for this objectvoid
setModifiedDate(java.util.Date modifiedDate)
Set the modification time of this objectvoid
setOptionalProperties(java.util.Map<java.lang.String,java.lang.String> optionalProperties)
Set the Map of optional propertiesvoid
setRemoteStatus(RemoteStatus remoteStatus)
Set theRemoteStatus
for this object if it was read from a remote sourcevoid
setUploadSha256(java.lang.String uploadSha256)
-
Methods inherited from class ca.corefacility.bioinformatics.irida.model.IridaRepresentationModel
add, add, getLink, getLinks, getSelfHref, hasLink, hasLinks, removeLinks, toString
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface ca.corefacility.bioinformatics.irida.model.IridaThing
getIdentifier, setLabel
-
Methods inherited from interface ca.corefacility.bioinformatics.irida.model.remote.RemoteSynchronizable
isRemote
-
-
-
-
Constructor Detail
-
SequenceFile
public SequenceFile()
-
SequenceFile
public SequenceFile(java.nio.file.Path sampleFile)
Create a newSequenceFile
with the given file Path- Parameters:
sampleFile
- The Path to aSequenceFile
-
-
Method Detail
-
equals
public boolean equals(java.lang.Object other)
Description copied from class:IridaRepresentationModel
- Overrides:
equals
in classIridaRepresentationModel
-
hashCode
public int hashCode()
Description copied from class:IridaRepresentationModel
- Overrides:
hashCode
in classIridaRepresentationModel
-
compareTo
public int compareTo(SequenceFile other)
- Specified by:
compareTo
in interfacejava.lang.Comparable<SequenceFile>
-
getCreatedDate
public java.util.Date getCreatedDate()
Description copied from interface:Timestamped
Get the created date of the object- Specified by:
getCreatedDate
in interfaceTimestamped<java.lang.Long>
- Returns:
- A
Date
object of the created date
-
getFile
public java.nio.file.Path getFile()
Description copied from interface:IridaSequenceFile
Get the location on the file system where the sequence file is stored- Specified by:
getFile
in interfaceIridaSequenceFile
- Returns:
- the physical location of the file.
-
setFile
public void setFile(java.nio.file.Path file)
-
getLabel
public java.lang.String getLabel()
Description copied from interface:IridaThing
Get a human readable label for this object.- Specified by:
getLabel
in interfaceIridaThing
- Returns:
- a human-readable label for the object.
-
getId
public java.lang.Long getId()
Description copied from interface:IridaThing
Get the numerical identifier for this object- Specified by:
getId
in interfaceIridaThing
- Specified by:
getId
in interfaceTimestamped<java.lang.Long>
- Returns:
- the numerical identifier for the object
-
setId
public void setId(java.lang.Long id)
Description copied from interface:MutableIridaThing
Set the numerical identifier for this object- Specified by:
setId
in interfaceMutableIridaThing
- Parameters:
id
- The ID to set
-
getModifiedDate
public java.util.Date getModifiedDate()
Description copied from interface:MutableIridaThing
Get the date that this object was last modified- Specified by:
getModifiedDate
in interfaceMutableIridaThing
- Returns:
Date
object of the modified date
-
setModifiedDate
public void setModifiedDate(java.util.Date modifiedDate)
Description copied from interface:MutableIridaThing
Set the modification time of this object- Specified by:
setModifiedDate
in interfaceMutableIridaThing
- Parameters:
modifiedDate
- The date where this object was modified
-
getFileRevisionNumber
public java.lang.Long getFileRevisionNumber()
Description copied from interface:VersionedFileFields
Get the version of the instance.- Specified by:
getFileRevisionNumber
in interfaceVersionedFileFields<java.lang.Long>
- Returns:
- the version of the instance.
-
addOptionalProperty
public void addOptionalProperty(java.lang.String key, java.lang.String value)
Add one optional property to the map of properties- Parameters:
key
- The key of the property to addvalue
- The value of the property to add
-
getOptionalProperties
public java.util.Map<java.lang.String,java.lang.String> getOptionalProperties()
Get the Map of optional properties- Returns:
- A
Map<String,String>
of all the optional propertie
-
getOptionalProperty
public java.lang.String getOptionalProperty(java.lang.String key)
Get an individual optional property- Parameters:
key
- The key of the property to read- Returns:
- A String of the property's value
-
getFileSize
public java.lang.String getFileSize()
Get the size of the file.- Specified by:
getFileSize
in interfaceIridaSequenceFile
- Returns:
- The String representation of the file size
-
setOptionalProperties
public void setOptionalProperties(java.util.Map<java.lang.String,java.lang.String> optionalProperties)
Set the Map of optional properties- Parameters:
optionalProperties
- AMap<String,String>
of all the optional properties for this object
-
incrementFileRevisionNumber
public void incrementFileRevisionNumber()
Description copied from interface:VersionedFileFields
Internally modify the file revision number to something new.- Specified by:
incrementFileRevisionNumber
in interfaceVersionedFileFields<java.lang.Long>
-
getFileName
public java.lang.String getFileName()
Description copied from interface:IridaSequenceFile
The base name of the file- Specified by:
getFileName
in interfaceIridaSequenceFile
- Returns:
- a string base name of the file
-
getFastQCAnalysis
public AnalysisFastQC getFastQCAnalysis()
-
setFastQCAnalysis
public void setFastQCAnalysis(AnalysisFastQC fastqcAnalysis) throws AnalysisAlreadySetException
Set theAnalysisFastQC
for thisSequenceFile
.- Parameters:
fastqcAnalysis
- the analysis to set.- Throws:
AnalysisAlreadySetException
- if the analysis has already been set for thisSequenceFile
.
-
getRemoteStatus
public RemoteStatus getRemoteStatus()
Description copied from class:IridaRepresentationModel
Get theRemoteStatus
for this object if it was read from a remote source- Specified by:
getRemoteStatus
in interfaceRemoteSynchronizable
- Overrides:
getRemoteStatus
in classIridaRepresentationModel
- Returns:
- a
RemoteStatus
-
setRemoteStatus
public void setRemoteStatus(RemoteStatus remoteStatus)
Description copied from class:IridaRepresentationModel
Set theRemoteStatus
for this object if it was read from a remote source- Specified by:
setRemoteStatus
in interfaceRemoteSynchronizable
- Overrides:
setRemoteStatus
in classIridaRepresentationModel
- Parameters:
remoteStatus
- theRemoteStatus
object
-
getUploadSha256
public java.lang.String getUploadSha256()
Get the sha256 checksum for a file when it was uploaded. NOTE: This checksum may not be the same as the sha256 for the current file. The checksum from the originally uploaded file is saved so an uploader can verify its file upload.- Returns:
- the string sha256 for the uploaded file.
-
setUploadSha256
public void setUploadSha256(java.lang.String uploadSha256)
-
-