Package com.dnanexus
Class DXAnalysis
- java.lang.Object
-
- com.dnanexus.DXObject
-
- com.dnanexus.DXExecution
-
- com.dnanexus.DXAnalysis
-
public final class DXAnalysis extends DXExecution
An analysis object (a specific instantiation of a workflow).
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classDXAnalysis.DescribeContains metadata about an analysis.
-
Field Summary
-
Fields inherited from class com.dnanexus.DXExecution
cachedDescribe
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description DXAnalysis.Describedescribe()Obtains metadata about the execution.DXAnalysis.DescribegetCachedDescribe()Returns metadata about the data object, likeDXExecution.describe(), but without making an API call.static DXAnalysisgetInstance(String analysisId)Returns aDXAnalysisrepresenting the specified analysis.static DXAnalysisgetInstanceWithEnvironment(String analysisId, DXEnvironment env)Returns aDXAnalysisrepresenting the specified analysis using the specified environment.<T> TgetOutput(Class<T> outputClass)Returns the output of the execution, deserialized to the specified class.voidterminate()Terminates the execution.DXAnalysiswaitUntilDone()Waits until the analysis has successfully completed and is in the DONE state.-
Methods inherited from class com.dnanexus.DXExecution
checkCachedDescribeAvailable
-
Methods inherited from class com.dnanexus.DXObject
apiCallOnObject, apiCallOnObject, equals, getId, hashCode, toString
-
-
-
-
Method Detail
-
getInstance
public static DXAnalysis getInstance(String analysisId)
Returns aDXAnalysisrepresenting the specified analysis.- Parameters:
analysisId- Analysis ID, of the form"analysis-xxxx"- Returns:
- a
DXAnalysis - Throws:
NullPointerException- IfanalysisIdis null
-
getInstanceWithEnvironment
public static DXAnalysis getInstanceWithEnvironment(String analysisId, DXEnvironment env)
Returns aDXAnalysisrepresenting the specified analysis using the specified environment.- Parameters:
analysisId- Analysis ID, of the form"analysis-xxxx"env- environment to use for making subsequent API calls- Returns:
- a
DXAnalysis - Throws:
NullPointerException- IfanalysisIdorenvis null
-
describe
public DXAnalysis.Describe describe()
Description copied from class:DXExecutionObtains metadata about the execution.- Specified by:
describein classDXExecution- Returns:
- a
Describecontaining execution metadata
-
getCachedDescribe
public DXAnalysis.Describe getCachedDescribe()
Description copied from class:DXExecutionReturns metadata about the data object, likeDXExecution.describe(), but without making an API call.This cached describe info is only available if this object appears in the result of a
DXSearch.findExecutions()call that specifiedDXSearch.FindExecutionsRequestBuilder.includeDescribeOutput(). The describe info that is returned reflects the state of the object at the time that the search was performed.- Specified by:
getCachedDescribein classDXExecution- Returns:
- a
Describecontaining the execution's metadata
-
getOutput
public <T> T getOutput(Class<T> outputClass) throws IllegalStateException
Description copied from class:DXExecutionReturns the output of the execution, deserialized to the specified class.- Specified by:
getOutputin classDXExecution- Parameters:
outputClass- class to deserialize to- Returns:
- execution output
- Throws:
IllegalStateException- if the execution is not in the DONE state.
-
terminate
public void terminate()
Description copied from class:DXExecutionTerminates the execution.- Specified by:
terminatein classDXExecution
-
waitUntilDone
public DXAnalysis waitUntilDone() throws IllegalStateException
Waits until the analysis has successfully completed and is in the DONE state.- Specified by:
waitUntilDonein classDXExecution- Returns:
- the same DXAnalysis object
- Throws:
IllegalStateException- if the analysis reaches the FAILED or TERMINATED state
-
-