Class AnalysisOutputFile
- java.lang.Object
-
- ca.corefacility.bioinformatics.irida.model.IridaRepresentationModel
-
- ca.corefacility.bioinformatics.irida.model.workflow.analysis.AnalysisOutputFile
-
- All Implemented Interfaces:
IridaThing
,Timestamped<java.lang.Long>
,VersionedFileFields<java.lang.Long>
@Entity public class AnalysisOutputFile extends IridaRepresentationModel implements IridaThing, VersionedFileFields<java.lang.Long>
Store file references to files produced by a workflow execution that we otherwise don't want to parse metadata from.
-
-
Constructor Summary
Constructors Constructor Description AnalysisOutputFile(java.nio.file.Path file, java.lang.String labelPrefix, java.lang.String executionManagerFileId, ToolExecution createdByTool)
Create a new instance ofAnalysisOutputFile
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object o)
byte[]
getBytesForFile()
Read the bytes for an image output fileToolExecution
getCreatedByTool()
java.util.Date
getCreatedDate()
Get the created date of the objectjava.lang.String
getExecutionManagerFileId()
java.nio.file.Path
getFile()
java.lang.Long
getFileRevisionNumber()
This intentionally always returns 0.java.lang.Long
getId()
Get the numerical identifier for this objectjava.lang.String
getLabel()
Get a human readable label for this object.int
hashCode()
void
incrementFileRevisionNumber()
This intentionally does nothing.-
Methods inherited from class ca.corefacility.bioinformatics.irida.model.IridaRepresentationModel
add, add, getLink, getLinks, getRemoteStatus, getSelfHref, hasLink, hasLinks, removeLinks, setRemoteStatus, 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
-
-
-
-
Constructor Detail
-
AnalysisOutputFile
public AnalysisOutputFile(java.nio.file.Path file, java.lang.String labelPrefix, java.lang.String executionManagerFileId, ToolExecution createdByTool)
Create a new instance ofAnalysisOutputFile
.- Parameters:
file
- the file that this resource owns.labelPrefix
- the label prefix to use for this file.executionManagerFileId
- the identifier for this file in the execution manager that it was created by.createdByTool
- the tools that were used to create the file.
-
-
Method Detail
-
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
-
getFileRevisionNumber
public java.lang.Long getFileRevisionNumber()
This intentionally always returns 0. We're abusingVersionedFileFields
so that we can get support fromFilesystemSupplementedRepository
, even thoughAnalysisOutputFile
is immutable and cannot be versioned.- Specified by:
getFileRevisionNumber
in interfaceVersionedFileFields<java.lang.Long>
- Returns:
- *always*
0L
forAnalysisOutputFile
.
-
incrementFileRevisionNumber
public void incrementFileRevisionNumber()
This intentionally does nothing. We're abusingVersionedFileFields
so that we can get support fromFilesystemSupplementedRepository
, even thoughAnalysisOutputFile
is immutable and cannot be versioned.- Specified by:
incrementFileRevisionNumber
in interfaceVersionedFileFields<java.lang.Long>
-
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
-
getFile
public java.nio.file.Path getFile()
-
getExecutionManagerFileId
public java.lang.String getExecutionManagerFileId()
-
getCreatedByTool
public ToolExecution getCreatedByTool()
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classIridaRepresentationModel
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classIridaRepresentationModel
-
getBytesForFile
public byte[] getBytesForFile()
Read the bytes for an image output file- Returns:
- the bytes for the file
-
-