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 newSequenceFilewith the given file Path
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddOptionalProperty(java.lang.String key, java.lang.String value)Add one optional property to the map of propertiesintcompareTo(SequenceFile other)booleanequals(java.lang.Object other)java.util.DategetCreatedDate()Get the created date of the objectAnalysisFastQCgetFastQCAnalysis()java.nio.file.PathgetFile()Get the location on the file system where the sequence file is storedjava.lang.StringgetFileName()The base name of the filejava.lang.LonggetFileRevisionNumber()Get the version of the instance.java.lang.StringgetFileSize()Get the size of the file.java.lang.LonggetId()Get the numerical identifier for this objectjava.lang.StringgetLabel()Get a human readable label for this object.java.util.DategetModifiedDate()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.StringgetOptionalProperty(java.lang.String key)Get an individual optional propertyRemoteStatusgetRemoteStatus()Get theRemoteStatusfor this object if it was read from a remote sourcejava.lang.StringgetUploadSha256()Get the sha256 checksum for a file when it was uploaded.inthashCode()voidincrementFileRevisionNumber()Internally modify the file revision number to something new.voidsetFastQCAnalysis(AnalysisFastQC fastqcAnalysis)Set theAnalysisFastQCfor thisSequenceFile.voidsetFile(java.nio.file.Path file)voidsetId(java.lang.Long id)Set the numerical identifier for this objectvoidsetModifiedDate(java.util.Date modifiedDate)Set the modification time of this objectvoidsetOptionalProperties(java.util.Map<java.lang.String,java.lang.String> optionalProperties)Set the Map of optional propertiesvoidsetRemoteStatus(RemoteStatus remoteStatus)Set theRemoteStatusfor this object if it was read from a remote sourcevoidsetUploadSha256(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 newSequenceFilewith 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:
equalsin classIridaRepresentationModel
-
hashCode
public int hashCode()
Description copied from class:IridaRepresentationModel- Overrides:
hashCodein classIridaRepresentationModel
-
compareTo
public int compareTo(SequenceFile other)
- Specified by:
compareToin interfacejava.lang.Comparable<SequenceFile>
-
getCreatedDate
public java.util.Date getCreatedDate()
Description copied from interface:TimestampedGet the created date of the object- Specified by:
getCreatedDatein interfaceTimestamped<java.lang.Long>- Returns:
- A
Dateobject of the created date
-
getFile
public java.nio.file.Path getFile()
Description copied from interface:IridaSequenceFileGet the location on the file system where the sequence file is stored- Specified by:
getFilein 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:IridaThingGet a human readable label for this object.- Specified by:
getLabelin interfaceIridaThing- Returns:
- a human-readable label for the object.
-
getId
public java.lang.Long getId()
Description copied from interface:IridaThingGet the numerical identifier for this object- Specified by:
getIdin interfaceIridaThing- Specified by:
getIdin interfaceTimestamped<java.lang.Long>- Returns:
- the numerical identifier for the object
-
setId
public void setId(java.lang.Long id)
Description copied from interface:MutableIridaThingSet the numerical identifier for this object- Specified by:
setIdin interfaceMutableIridaThing- Parameters:
id- The ID to set
-
getModifiedDate
public java.util.Date getModifiedDate()
Description copied from interface:MutableIridaThingGet the date that this object was last modified- Specified by:
getModifiedDatein interfaceMutableIridaThing- Returns:
Dateobject of the modified date
-
setModifiedDate
public void setModifiedDate(java.util.Date modifiedDate)
Description copied from interface:MutableIridaThingSet the modification time of this object- Specified by:
setModifiedDatein interfaceMutableIridaThing- Parameters:
modifiedDate- The date where this object was modified
-
getFileRevisionNumber
public java.lang.Long getFileRevisionNumber()
Description copied from interface:VersionedFileFieldsGet the version of the instance.- Specified by:
getFileRevisionNumberin 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:
getFileSizein 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:VersionedFileFieldsInternally modify the file revision number to something new.- Specified by:
incrementFileRevisionNumberin interfaceVersionedFileFields<java.lang.Long>
-
getFileName
public java.lang.String getFileName()
Description copied from interface:IridaSequenceFileThe base name of the file- Specified by:
getFileNamein interfaceIridaSequenceFile- Returns:
- a string base name of the file
-
getFastQCAnalysis
public AnalysisFastQC getFastQCAnalysis()
-
setFastQCAnalysis
public void setFastQCAnalysis(AnalysisFastQC fastqcAnalysis) throws AnalysisAlreadySetException
Set theAnalysisFastQCfor 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:IridaRepresentationModelGet theRemoteStatusfor this object if it was read from a remote source- Specified by:
getRemoteStatusin interfaceRemoteSynchronizable- Overrides:
getRemoteStatusin classIridaRepresentationModel- Returns:
- a
RemoteStatus
-
setRemoteStatus
public void setRemoteStatus(RemoteStatus remoteStatus)
Description copied from class:IridaRepresentationModelSet theRemoteStatusfor this object if it was read from a remote source- Specified by:
setRemoteStatusin interfaceRemoteSynchronizable- Overrides:
setRemoteStatusin classIridaRepresentationModel- Parameters:
remoteStatus- theRemoteStatusobject
-
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)
-
-