gov.nih.nci.caarray.services.external.v1_0.grid.client
Class GridDataApiUtils
java.lang.Object
gov.nih.nci.caarray.services.external.v1_0.data.AbstractDataApiUtils
gov.nih.nci.caarray.services.external.v1_0.grid.client.GridDataApiUtils
- All Implemented Interfaces:
- gov.nih.nci.caarray.services.external.v1_0.data.DataApiUtils
public class GridDataApiUtils
- extends gov.nih.nci.caarray.services.external.v1_0.data.AbstractDataApiUtils
DataUtils is a helper class for working with the caArray Data API. It makes it easier to perform a variety of common
tasks.
- Author:
- dkokotov
Methods inherited from class gov.nih.nci.caarray.services.external.v1_0.data.AbstractDataApiUtils |
copyMageTabZipToOutputStream, downloadFileContentsToFile, downloadFileContentsToTempDir, downloadFileContentsToTempFile, downloadFileContentsZipToFile, downloadFileContentsZipToTempFile, downloadMageTabFileSetToDir, downloadMageTabFilesetToTempDir, downloadMageTabZipToFile, downloadMageTabZipToTempFile, getFileContents |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
GridDataApiUtils
public GridDataApiUtils(CaArraySvc_v1_0Client client)
- Parameters:
client
- the CaArraySvc_v1_0 client proxy to use for API calls
copyFileContentsToOutputStream
public void copyFileContentsToOutputStream(CaArrayEntityReference fileRef,
boolean compressed,
java.io.OutputStream os)
throws InvalidReferenceException,
DataTransferException,
java.io.IOException
-
- Throws:
InvalidReferenceException
DataTransferException
java.io.IOException
copyFileContentsZipToOutputStream
public void copyFileContentsZipToOutputStream(java.lang.Iterable<CaArrayEntityReference> fileRefs,
java.io.OutputStream ostream)
throws InvalidReferenceException,
DataTransferException,
java.io.IOException
-
- Throws:
InvalidReferenceException
DataTransferException
java.io.IOException
downloadFileContentsToDir
public void downloadFileContentsToDir(java.lang.Iterable<CaArrayEntityReference> fileRefs,
java.io.File dir)
throws InvalidReferenceException,
DataTransferException,
java.io.IOException
-
- Throws:
InvalidReferenceException
DataTransferException
java.io.IOException
exportMageTab
protected MageTabFileSet exportMageTab(CaArrayEntityReference experimentRef)
throws InvalidReferenceException,
DataTransferException
-
- Specified by:
exportMageTab
in class gov.nih.nci.caarray.services.external.v1_0.data.AbstractDataApiUtils
- Throws:
InvalidReferenceException
DataTransferException
readFully
public static void readFully(TransferServiceContextReference transferRef,
java.io.OutputStream ostream,
boolean decompress)
throws java.io.IOException,
DataTransferException
- Read data fully from the given Grid Transfer resource and write it to the given OutputStream. The Grid Transfer
resource is always destroyed at the end of this method, regardless of whether an error occurs.
- Parameters:
transferRef
- the reference to the Grid Transfer resource from which the data can be obtainedostream
- the OutputStream to write the data to.decompress
- if true, then the data is expected to be compressed with GZip and will be decompressed before
being written to the OutputStream
- Throws:
java.io.IOException
- if there is an error writing to the OutputStream
DataTransferException
- if there is an error communicating with the Grid Transfer resource.