au.edu.archer.service.ddm.api
Interface DDMService

All Known Implementing Classes:
DDMServiceImpl

public interface DDMService

Data Deposition Module Service.


Method Summary
 au.edu.archer.domain.icat.api.DataFile addDatafileToDataset(byte[] content, java.lang.String srbLocation, int datasetId)
          Insert the extracted meta data.
 DatasetDetails addDatasetToAnExpr(DatasetRequest request)
          Add dataset to an experiment.
 au.edu.archer.domain.icat.api.DataFile addGenericFileToDataset(SRBUploadRequest srbUploadRequest, java.lang.String srbLocation, int datasetId)
           
 void addGroupPermissions(SRBGroupPermissionRequest request)
          Modify group permissions.
 ProjectDetails addProject(ProjectRequest createProjectRequest)
          Create Project.
 au.edu.archer.domain.icat.api.DataFile copyDatafile(DatafileRequest request)
          Copy Datafile to another Dataset.
 DatasetDetails copyDataset(DatasetRequest request)
          Copy Dataset to another experiment.
 ExperimentDetails createExperiment(ExperimentRequest request)
          Create Experiment.
 SampleDetails createSample(SampleRequest request)
          Create sample.
 void deleteDataFile(DatafileRequest request)
          Delete DataFile by using relative path of the DataFile.
 void deleteDataset(DatasetRequest request)
          Delete dataset.
 void deleteExperiment(ExperimentRequest request)
          Delete Experiment.
 void deleteProject(ProjectRequest deleteProjectRequest)
          Delete project.
 void deleteSample(SampleRequest request)
          Delete sample.
 SRBDownloadResponse downloadSingleDataFile(SRBDownloadRequest request)
          Download a datafile from SRB.
 java.util.Map<java.lang.String,java.lang.String> getAllDataFileFormat()
          Get all existing DataFileformats.
 java.util.List<au.edu.archer.domain.icat.api.DataFile> getAllDataFiles(int datasetId)
          Get all associated datafiles for a specific dataset.
 java.util.Map<java.lang.String,java.lang.String> getAllDatasetFiles(int datasetId)
          Get all associated datafiles for a dataset.
 java.util.List<au.edu.archer.domain.icat.api.DataSet> getAllDatasetsByExpr(int experimentId)
          Get all associasted datasets.
 java.util.List<au.edu.archer.domain.icat.api.DataSet> getAllDatasetsBySampleId(int sampleId)
          Get all datasets by a sample.
 java.util.Map<java.lang.String,java.lang.String> getAllDatasetStatus()
          Get all available Dataset status.
 java.util.Map<java.lang.String,java.lang.String> getAllDatasetTypes()
          Get all available Dataset Types.
 java.util.List<au.edu.archer.domain.icat.api.Investigation> getAllExperimentsUnderProject(int projectId)
          Get All Experiments under this Project.
 java.util.List<au.edu.archer.domain.icat.api.InvestigationType> getAllExperimentTypes()
          Get all available experiment types.
 java.util.Map<java.lang.String,java.lang.String> getAllInvestigators()
          Get all Investigators.
 java.util.Map<java.lang.String,java.lang.String> getAllManagers()
          Get all available project managers.
 java.util.Map<java.lang.String,java.lang.String> getAllNonPackageDatasetType()
          Get all non-package Dataset Types.
 java.util.List<au.edu.archer.domain.icat.api.DataSet> getAllNonPackagedDatasetByExpId(int experimentId)
          Get all non-packaged datasets.
 java.util.List<au.edu.archer.domain.icat.api.DataSet> getAllPackagedDatasetsByExpId(int experimentId)
          Get all associasted datasets.
 java.util.Map<java.lang.String,java.lang.String> getAllProjectNames()
          Get all project names.
 java.util.Map<java.lang.String,java.lang.String> getAllProjectStatus()
          Retrieve a map of all available project status.
 java.util.Map<java.lang.String,java.lang.String> getAllSamplesByExpId(SampleRequest request)
          Get all samples that are attached to the given experiment id.
 java.util.Map<java.lang.String,java.lang.String> getAllSamplesByExpName(SampleRequest request)
          Get all samples that are attached to the given experiment id.
 java.util.Map<java.lang.String,java.lang.String> getAllSRBGroups(SRBRequest request)
          Retrieve all SRB groups.
 java.util.Map<java.lang.String,java.lang.String> getAllTopicNames()
          Get all Topic.
 au.edu.archer.domain.icat.api.DataFile getDataFile(int dfId)
          Get DataFile by its id.
 au.edu.archer.domain.icat.api.DataFile getDataFile(java.lang.String path)
          Get DataFile id by using relative path of the DataFile.
 au.edu.archer.domain.icat.api.DataFile getDataFile(java.lang.String projectName, java.lang.String experimentName, java.lang.String datasetName, java.lang.String datafileName)
          Get DataFile id by using project name, exepriment name, dataset name and datafile name.
 java.util.Map<java.lang.String,java.lang.String> getDatafileParametersById(DatafileRequest request)
          Retrieve datafile parameters.
 java.util.Map<java.lang.String,DatafileSliceResponse> getDatafileSliceByDatasetId(int datasetId)
          Get datafile slice by a dataset id.
 DatasetDetails getDatasetDetailsById(int datasetId, java.lang.String srbSessionId)
          Get dataset details by dataset Id.
 DatasetDetails getDatasetDetailsByName(java.lang.String projectName, java.lang.String exprName, java.lang.String datasetName, java.lang.String srbSessionId)
          Get dataset details by names.
 int getDatasetIdByHandle(java.lang.String handleId)
          Get dataset id by dataset handle id.
 java.util.Map<java.lang.String,java.lang.String> getDatasetNamesByExperimentId(int experimentId)
          getDatasetNamesByExperimentId.
 java.util.Map<java.lang.String,java.lang.String> getDatasetParametersById(DatasetRequest request)
          Retrieve Dataset parameters by Dataset Id.
 ExperimentDetails getExperimentById(int expId, java.lang.String srbSessionId)
          Get Experiment.
 ExperimentDetails getExperimentByName(ExperimentRequest request)
          Get Experiment.
 java.util.Map<java.lang.String,java.lang.String> getExperimentNamesByProjectId(int projectId)
          Get all experiment names of a given project.
 java.util.Map<java.lang.String,java.lang.String> getLock()
          Get the lock for staging transfer.
 java.lang.String getManagerDisplayById(int mgrId)
          Get manager display name form the Id.
 ProjectDetails getProjectDetailsById(int projectId, java.lang.String srbSessionId)
          Get project details.
 ProjectDetails getProjectDetailsByName(java.lang.String projectName, java.lang.String srbSessionId)
          Get project details.
 java.util.Map<java.lang.String,java.lang.String> getProjectGroups(SRBContentRequest request, java.lang.String contentType)
          Retrieve parent project groups.
 SampleDetails getSampleById(SampleRequest request)
          Get sample by sample id.
 java.util.Map<java.lang.String,java.lang.String> getSampleParametersById(SampleRequest request)
          Retrieve sample parameters.
 java.util.List<SRBContentInfo> getScratchDatasetDirs(SRBContentRequest request)
          Fetch all scratch area dataset directories content from SRB from the specified collection.
 java.util.List<SRBContentInfo> getSRBAll(SRBContentRequest request)
          Fetch all file content from SRB from the specified collection.
 java.util.List<SRBContentInfo> getSRBDirs(SRBContentRequest request)
          Fetch all directory content from SRB from the specified collection.
 java.util.List<SRBContentInfo> getStagingAreaContent(SRBContentRequest request)
          Get staging area contents.
 boolean isAuthorised(SRBContentRequest request, int operation)
          Check if user is authorised to perform a SRB operation.
 java.util.List<au.edu.archer.domain.icat.api.Investigator> listAllInvestigatorsByExperimentId(int expid)
          List all investigators by experiment id.
 java.util.List<au.edu.archer.domain.icat.api.TopicList> listAllTopicListsByExperimentId(int expid)
          List all TopicLists by ExperimentId.
 java.util.List<au.edu.archer.domain.icat.api.Topic> listAllTopics()
          List of all Topics.
 au.edu.archer.domain.icat.api.DataFile moveDatafile(DatafileRequest request)
          Move Datafile to another dataset.
 DatasetDetails moveDataset(DatasetRequest request)
          Move Dataset to another experiment.
 java.lang.String performDDMAuthentication(SRBLoginRequest request)
          Authorise request to perform srb related operations.
 au.edu.archer.domain.icat.impl.DataFileImpl resetDatafileParameters(DatafileRequest request)
          reset datafile parameters by re-extracting from the original file stored on SRB.
 au.edu.archer.domain.icat.api.DataFile retrieveMetadata(java.lang.String srbLocation)
          Retrieve Metadata information based on srbLocation.
 SearchResponse search(SearchRequest request)
          Search method.
 void setLock(java.util.Map<java.lang.String,java.lang.String> lock)
          set the lock Map.
 java.lang.Thread startMETSThread(CreateMETSRequest request)
          startMETSThread.
 java.lang.Thread startPublishThread(PublishExperimentRequest request)
          startMETSThread.
 java.lang.Thread startTransferThread(java.lang.String srbSessionId, java.lang.String stagingDir, java.lang.Integer datasetId, boolean stagTransfer, java.lang.String notificationRecv)
          Transfer all files in the staging area.
 au.edu.archer.domain.icat.api.DataFile updateDatafile(DatafileRequest request)
          Update Datafile without changing DatafileParameters.
 void updateDatafileParameters(DatafileRequest request)
          Add datafile parameters.
 DatasetDetails updateDataset(DatasetRequest request)
          Update dataset.
 void updateDatasetParameters(DatasetRequest request)
          Update Dataset parameters.
 ExperimentDetails updateExperiment(ExperimentRequest request)
          Update Experiment.
 ProjectDetails updateProject(ProjectRequest updateProjectRequest)
          Update project.
 SampleDetails updateSample(SampleRequest request)
          Update sample.
 void updateSampleParameters(SampleRequest request)
          Add sample parameters.
 au.edu.archer.domain.icat.api.DataFile uploadSingleDatafile(SRBUploadRequest srbUploadRequest)
          Upload single datafile to a dataset.
 

Method Detail

performDDMAuthentication

java.lang.String performDDMAuthentication(SRBLoginRequest request)
                                          throws InvalidDDMRequestException
Authorise request to perform srb related operations.

This authorisation will return a SRB session id which shall be refrenced for further SRB related operations.

Parameters:
request - SRBLoginRequest object.
Returns:
SRB session id to be used for further SRB related operations.
Throws:
InvalidDDMRequestException - Exception raised by DDM service when an invalid request is received for processing.

isAuthorised

boolean isAuthorised(SRBContentRequest request,
                     int operation)
                     throws InvalidSRBRequestException
Check if user is authorised to perform a SRB operation.

Parameters:
request - SRBContentRequest.
operation - operation code.
Returns:
true if authorised, false otherwise.
Throws:
InvalidSRBRequestException - if the request parameters are invalid.

getAllSRBGroups

java.util.Map<java.lang.String,java.lang.String> getAllSRBGroups(SRBRequest request)
                                                                 throws InvalidSRBRequestException
Retrieve all SRB groups.

Parameters:
request - SRBRequest object.
Returns:
Map of all SRB groups.
Throws:
InvalidSRBRequestException - if the request parameters are invalid.

addGroupPermissions

void addGroupPermissions(SRBGroupPermissionRequest request)
                         throws InvalidSRBRequestException
Modify group permissions.

Parameters:
request - SRBGroupPermissionRequest.
Throws:
InvalidSRBRequestException - if the request parameters are invalid.

getProjectGroups

java.util.Map<java.lang.String,java.lang.String> getProjectGroups(SRBContentRequest request,
                                                                  java.lang.String contentType)
                                                                  throws InvalidSRBRequestException
Retrieve parent project groups.

Parameters:
request - SRBContentRequest.
contentType - content type.
Returns:
Map of parent project groups.
Throws:
InvalidSRBRequestException - if the request parameters are invalid.

startPublishThread

java.lang.Thread startPublishThread(PublishExperimentRequest request)
                                    throws DDMServiceException,
                                           java.lang.Exception
startMETSThread.

Parameters:
request - CreateMETSRequest.
Returns:
Thread.
Throws:
DDMServiceException
java.lang.Exception

getSRBDirs

java.util.List<SRBContentInfo> getSRBDirs(SRBContentRequest request)
                                          throws InvalidDDMRequestException
Fetch all directory content from SRB from the specified collection.

Parameters:
request - SRBContentRequest.
Returns:
List of SRBContentInfo objects.
Throws:
InvalidDDMRequestException - Exception raised by DDM service when an invalid request is received for processing.

getScratchDatasetDirs

java.util.List<SRBContentInfo> getScratchDatasetDirs(SRBContentRequest request)
                                                     throws InvalidDDMRequestException
Fetch all scratch area dataset directories content from SRB from the specified collection. All scratch area dataset directories are 4 level down from the scrath area.

Parameters:
request - SRBContentRequest.
Returns:
List of SRBContentInfo objects.
Throws:
InvalidDDMRequestException - Exception raised by DDM service when an invalid request is received for processing.

getSRBAll

java.util.List<SRBContentInfo> getSRBAll(SRBContentRequest request)
                                         throws InvalidDDMRequestException
Fetch all file content from SRB from the specified collection.

Parameters:
request - SRBContentRequest.
Returns:
List of SRBContentInfo objects.
Throws:
InvalidDDMRequestException - Exception raised by DDM service when an invalid request is received for processing.

getStagingAreaContent

java.util.List<SRBContentInfo> getStagingAreaContent(SRBContentRequest request)
                                                     throws InvalidDDMRequestException
Get staging area contents.

Parameters:
request - SRBContentRequest.
Returns:
List of staging area contents.
Throws:
InvalidDDMRequestException - Exception raised by DDM service when an invalid request is received for processing.

getAllManagers

java.util.Map<java.lang.String,java.lang.String> getAllManagers()
                                                                throws DDMServiceException
Get all available project managers.

Map contains the manager id as key and 'Title + Initials + LastName' as value.

Returns:
Map of available project managers.
Throws:
DDMServiceException - Exception raised by DDM service when an error occurs.

getManagerDisplayById

java.lang.String getManagerDisplayById(int mgrId)
                                       throws InvalidDDMRequestException,
                                              DDMServiceException
Get manager display name form the Id.

Parameters:
mgrId - manager id.
Returns:
manager display name.
Throws:
InvalidDDMRequestException - Exception raised by DDM service when an invalid request is received for processing.
DDMServiceException - Exception raised by DDM service when an error occurs.

getAllProjectStatus

java.util.Map<java.lang.String,java.lang.String> getAllProjectStatus()
                                                                     throws DDMServiceException
Retrieve a map of all available project status.

Returns:
Map of project status.
Throws:
DDMServiceException - Exception raised by DDM service when an error occurs.

getProjectDetailsByName

ProjectDetails getProjectDetailsByName(java.lang.String projectName,
                                       java.lang.String srbSessionId)
                                       throws DDMServiceException,
                                              InvalidDDMRequestException
Get project details.

The project detail contains the ICAT meta data and the corresponding SRB directory info.

Parameters:
projectName - project name.
srbSessionId - srb sessionId.
Returns:
ProjectDetails object.
Throws:
DDMServiceException - Exception raised by DDM service when an error occurs.
InvalidDDMRequestException - Exception raised by DDM service when an invalid request is received for processing.

getProjectDetailsById

ProjectDetails getProjectDetailsById(int projectId,
                                     java.lang.String srbSessionId)
                                     throws DDMServiceException,
                                            InvalidDDMRequestException
Get project details.

The project detail contains the ICAT meta data and the corresponding SRB directory info.

Parameters:
projectId - project id.
srbSessionId - srb sessionId.
Returns:
ProjectDetails object.
Throws:
DDMServiceException - Exception raised by DDM service when an error occurs.
InvalidDDMRequestException - Exception raised by DDM service when an invalid request is received for processing.

addProject

ProjectDetails addProject(ProjectRequest createProjectRequest)
                          throws InvalidDDMRequestException,
                                 DDMServiceException
Create Project.

Creates an empty project directory in SRB and the project metadata in ICAT.

Parameters:
createProjectRequest - request object.
Returns:
ProjectDetails object.
Throws:
InvalidDDMRequestException - Exception raised by DDM service when an invalid request is received for processing.
DDMServiceException - Exception raised by DDM service when an error occurs.

updateProject

ProjectDetails updateProject(ProjectRequest updateProjectRequest)
                             throws InvalidDDMRequestException,
                                    DDMServiceException
Update project.

Update the project ICAT meta-data and SRB project directory name if required.

Parameters:
updateProjectRequest - request object.
Returns:
ProjectDetails object.
Throws:
InvalidDDMRequestException - Exception raised by DDM service when an invalid request is received for processing.
DDMServiceException - Exception raised by DDM service when an error occurs.

deleteProject

void deleteProject(ProjectRequest deleteProjectRequest)
                   throws InvalidDDMRequestException,
                          DDMServiceException
Delete project.

Delete the project directory from SRB and the project meta data from ICAT.

Parameters:
deleteProjectRequest - request object.
Throws:
InvalidDDMRequestException - Exception raised by DDM service when an invalid request is received for processing.
DDMServiceException - Exception raised by DDM service when an error occurs.

createExperiment

ExperimentDetails createExperiment(ExperimentRequest request)
                                   throws InvalidDDMRequestException,
                                          DDMServiceException
Create Experiment.

Create an empty experiment directory under an exist project directory in SRB and save metadata in ICAT.

Parameters:
request - ExperimentRequest request object.
Returns:
ExperimentDetails response object.
Throws:
InvalidDDMRequestException - Exception raised by DDM service when an invalid request is received for processing.
DDMServiceException - Exception raised by DDM service when an error occurs.

deleteExperiment

void deleteExperiment(ExperimentRequest request)
                      throws InvalidDDMRequestException,
                             DDMServiceException
Delete Experiment.

delete experiment directory under an exist project directory in SRB and remove metadata from ICAT.

Parameters:
request - ExperimentRequest request object.
Throws:
InvalidDDMRequestException - Exception raised by DDM service when an invalid request is received for processing.
DDMServiceException - Exception raised by DDM service when an error occurs.

updateExperiment

ExperimentDetails updateExperiment(ExperimentRequest request)
                                   throws InvalidDDMRequestException,
                                          DDMServiceException
Update Experiment.

Parameters:
request - ExperimentRequest request object.
Returns:
ExperimentDetails response object of update.
Throws:
InvalidDDMRequestException - Exception raised by DDM service when an invalid request is received for processing.
DDMServiceException - raised by DDM service when failure reached in processing.

getExperimentByName

ExperimentDetails getExperimentByName(ExperimentRequest request)
                                      throws InvalidDDMRequestException,
                                             DDMServiceException
Get Experiment.

Parameters:
request - ExperimentRequest request object.
Returns:
ExperimentDetails response object of experiment.
Throws:
InvalidDDMRequestException - Exception raised by DDM service when an invalid request is received for processing.
DDMServiceException - raised by DDM service when failure reached in processing.

getExperimentById

ExperimentDetails getExperimentById(int expId,
                                    java.lang.String srbSessionId)
                                    throws InvalidDDMRequestException,
                                           DDMServiceException
Get Experiment.

Parameters:
expId - int experiment id.
srbSessionId - String srb session id.
Returns:
ExperimentDetails response object of experiment.
Throws:
InvalidDDMRequestException - Exception raised by DDM service when an invalid request is received for processing.
DDMServiceException - raised by DDM service when failure reached in processing.

getAllExperimentTypes

java.util.List<au.edu.archer.domain.icat.api.InvestigationType> getAllExperimentTypes()
Get all available experiment types.

Returns:
List of Experiment types.

getAllDatasetTypes

java.util.Map<java.lang.String,java.lang.String> getAllDatasetTypes()
                                                                    throws InvalidDDMRequestException
Get all available Dataset Types.

Returns:
Map of dataset type values.
Throws:
InvalidDDMRequestException - Exception raised by DDM service when an invalid request is received for processing.

getAllNonPackageDatasetType

java.util.Map<java.lang.String,java.lang.String> getAllNonPackageDatasetType()
                                                                             throws InvalidDDMRequestException
Get all non-package Dataset Types.

Returns:
Map of dataset type values.
Throws:
InvalidDDMRequestException - Exception raised by DDM service when an invalid request is received for processing.

getAllPackagedDatasetsByExpId

java.util.List<au.edu.archer.domain.icat.api.DataSet> getAllPackagedDatasetsByExpId(int experimentId)
                                                                                    throws DDMServiceException
Get all associasted datasets.

Parameters:
experimentId - id.
Returns:
List of DataSet objects.
Throws:
DDMServiceException

getAllDatasetStatus

java.util.Map<java.lang.String,java.lang.String> getAllDatasetStatus()
                                                                     throws InvalidDDMRequestException
Get all available Dataset status.

Returns:
Map of dataset status values.
Throws:
InvalidDDMRequestException - Exception raised by DDM service when an invalid request is received for processing.

getDatasetDetailsByName

DatasetDetails getDatasetDetailsByName(java.lang.String projectName,
                                       java.lang.String exprName,
                                       java.lang.String datasetName,
                                       java.lang.String srbSessionId)
                                       throws DDMServiceException,
                                              InvalidDDMRequestException
Get dataset details by names.

Retrieves dataset metadata from ICAT and the dataset SRB directory info.

Parameters:
projectName - proj name.
exprName - expr name.
datasetName - dataste name.
srbSessionId - srb session id.
Returns:
DatasetDetails object.
Throws:
DDMServiceException - raised by DDM service when failure reached in processing.
InvalidDDMRequestException - Exception raised by DDM service when an invalid request is received for processing.

getAllDatasetsByExpr

java.util.List<au.edu.archer.domain.icat.api.DataSet> getAllDatasetsByExpr(int experimentId)
Get all associasted datasets.

Parameters:
experimentId - id.
Returns:
List of DataSet objects.

getAllDatasetsBySampleId

java.util.List<au.edu.archer.domain.icat.api.DataSet> getAllDatasetsBySampleId(int sampleId)
Get all datasets by a sample.

Parameters:
sampleId - id.
Returns:
List of DataSet objects.

getDatasetIdByHandle

int getDatasetIdByHandle(java.lang.String handleId)
Get dataset id by dataset handle id.

Parameters:
handleId - dataset handle id.
Returns:
dataset id.

getDatasetDetailsById

DatasetDetails getDatasetDetailsById(int datasetId,
                                     java.lang.String srbSessionId)
                                     throws DDMServiceException,
                                            InvalidDDMRequestException
Get dataset details by dataset Id.

Retrieves dataset metadata from ICAT and the dataset SRB directory info.

Parameters:
datasetId - dataset id.
srbSessionId - srb session id.
Returns:
DatasetDetails object.
Throws:
DDMServiceException - raised by DDM service when failure reached in processing.
InvalidDDMRequestException - Exception raised by DDM service when an invalid request is received for processing.

getAllDatasetFiles

java.util.Map<java.lang.String,java.lang.String> getAllDatasetFiles(int datasetId)
Get all associated datafiles for a dataset.

Parameters:
datasetId - dataset id.
Returns:
Map of dataset files.

getAllDataFiles

java.util.List<au.edu.archer.domain.icat.api.DataFile> getAllDataFiles(int datasetId)
Get all associated datafiles for a specific dataset.

Parameters:
datasetId - The dataset id.
Returns:
A list of DataFile.

addDatasetToAnExpr

DatasetDetails addDatasetToAnExpr(DatasetRequest request)
                                  throws InvalidDDMRequestException,
                                         DDMServiceException
Add dataset to an experiment.

Add dataset metadata to ICAT and dataset diredtory in SRB.

Parameters:
request - DatasetRequest object.
Returns:
DatasetDetails object.
Throws:
DDMServiceException - raised by DDM service when failure reached in processing.
InvalidDDMRequestException - Exception raised by DDM service when an invalid request is received for processing.

updateDataset

DatasetDetails updateDataset(DatasetRequest request)
                             throws InvalidDDMRequestException,
                                    DDMServiceException
Update dataset.

Updates metadata data in ICAT and directory name in SRB.

Parameters:
request - DatasetRequest object.
Returns:
DatasetDetails object.
Throws:
DDMServiceException - raised by DDM service when failure reached in processing.
InvalidDDMRequestException - Exception raised by DDM service when an invalid request is received for processing.

uploadSingleDatafile

au.edu.archer.domain.icat.api.DataFile uploadSingleDatafile(SRBUploadRequest srbUploadRequest)
                                                            throws InvalidDDMRequestException,
                                                                   DDMServiceException
Upload single datafile to a dataset.

Will upload file in SRB and persist extracted meta data based on the file type.

Parameters:
srbUploadRequest - request object.
Returns:
DataFile object.
Throws:
DDMServiceException - raised by DDM service when failure reached in processing.
InvalidDDMRequestException - Exception raised by DDM service when an invalid request is received for processing.

downloadSingleDataFile

SRBDownloadResponse downloadSingleDataFile(SRBDownloadRequest request)
                                           throws InvalidDDMRequestException
Download a datafile from SRB.

Parameters:
request - SRBDownloadRequest object.
Returns:
SRBDownloadResponse object.
Throws:
InvalidDDMRequestException - Exception raised by DDM service when an invalid request is received for processing.

createSample

SampleDetails createSample(SampleRequest request)
                           throws InvalidDDMRequestException,
                                  DDMServiceException
Create sample.

Parameters:
request - SampleRequest request object.
Returns:
SampleDetails result object.
Throws:
DDMServiceException - raised by DDM service when failure reached in processing.
InvalidDDMRequestException - Exception raised by DDM service when an invalid request is received for processing.

updateSample

SampleDetails updateSample(SampleRequest request)
                           throws InvalidDDMRequestException,
                                  DDMServiceException
Update sample.

Parameters:
request - SampleRequest request object.
Returns:
SampleDetails result object.
Throws:
DDMServiceException - raised by DDM service when failure reached in processing.
InvalidDDMRequestException - Exception raised by DDM service when an invalid request is received for processing.

deleteSample

void deleteSample(SampleRequest request)
                  throws InvalidDDMRequestException,
                         DDMServiceException
Delete sample.

Parameters:
request - SampleRequest request
Throws:
DDMServiceException - raised by DDM service when failure reached in processing.
InvalidDDMRequestException - Exception raised by DDM service when an invalid request is received for processing.

getSampleById

SampleDetails getSampleById(SampleRequest request)
                            throws InvalidDDMRequestException,
                                   DDMServiceException
Get sample by sample id.

Parameters:
request - SampleRequest request.
Returns:
SampleDetails requlst object.
Throws:
DDMServiceException - raised by DDM service when failure reached in processing.
InvalidDDMRequestException - Exception raised by DDM service when an invalid request is received for processing.

getAllSamplesByExpId

java.util.Map<java.lang.String,java.lang.String> getAllSamplesByExpId(SampleRequest request)
Get all samples that are attached to the given experiment id.

Parameters:
request - SampleRequest request.
Returns:
Map<String, String> map of sample id and sample name.

updateSampleParameters

void updateSampleParameters(SampleRequest request)
                            throws InvalidDDMRequestException,
                                   DDMServiceException
Add sample parameters. Also referred as sample variable metadata.

This method is used by UQ Meta DataEditor.

Parameters:
request - SampleRequest object.
Throws:
InvalidDDMRequestException - Exception raised by DDM service when an invalid request is received for processing.
DDMServiceException - raised by DDM service when failure reached in processing.

getSampleParametersById

java.util.Map<java.lang.String,java.lang.String> getSampleParametersById(SampleRequest request)
Retrieve sample parameters. Also referred as sample variable metadata.

This method is used by UQ Meta DataEditor.

Parameters:
request - SampleRequest object.
Returns:
Map of sample parameters.

getAllSamplesByExpName

java.util.Map<java.lang.String,java.lang.String> getAllSamplesByExpName(SampleRequest request)
Get all samples that are attached to the given experiment id.

Parameters:
request - SampleRequest request.
Returns:
Map<String, String> map of sample id and sample name.

deleteDataset

void deleteDataset(DatasetRequest request)
                   throws InvalidDDMRequestException,
                          DDMServiceException
Delete dataset.

Delets dataset metadata from ICAT and the dataset directory from SRB.

Parameters:
request - DatasetRequest object.
Throws:
InvalidDDMRequestException
DDMServiceException - raised by DDM service when failure reached in processing.
InvalidDDMRequestException - Exception raised by DDM service when an invalid request is received for processing.

updateDatasetParameters

void updateDatasetParameters(DatasetRequest request)
                             throws InvalidDDMRequestException,
                                    DDMServiceException
Update Dataset parameters. Also referred as Dataset variable metadata.

Parameters:
request - DatasetRequest object.
Throws:
DDMServiceException - raised by DDM service when failure reached in processing.
InvalidDDMRequestException - Exception raised by DDM service when an invalid request is received for processing.

getDatasetParametersById

java.util.Map<java.lang.String,java.lang.String> getDatasetParametersById(DatasetRequest request)
Retrieve Dataset parameters by Dataset Id. Also referred as Dataset variable metadata.

Parameters:
request - DatasetRequest object.
Returns:
Map of Dataset parameters.

search

SearchResponse search(SearchRequest request)
                      throws InvalidDDMRequestException
Search method.

Parameters:
request - SearchRequest search request.
Returns:
SearchResponse response object.
Throws:
InvalidDDMRequestException - throw InvalidDDMRequestException when no search criteria is provided.

addDatafileToDataset

au.edu.archer.domain.icat.api.DataFile addDatafileToDataset(byte[] content,
                                                            java.lang.String srbLocation,
                                                            int datasetId)
                                                            throws DDMServiceException,
                                                                   InvalidDDMRequestException
Insert the extracted meta data.

Parameters:
content - meta data content in XML file.
srbLocation - String location of the file.
datasetId - dataset id.
Returns:
DataFile the DataFile persistent object saved.
Throws:
InvalidDDMRequestException - Exception raised by DDM service when an invalid request is received for processing.
DDMServiceException - Exception raised by DDM service when an error occurs.

retrieveMetadata

au.edu.archer.domain.icat.api.DataFile retrieveMetadata(java.lang.String srbLocation)
                                                        throws InvalidICATRequestException
Retrieve Metadata information based on srbLocation.

Parameters:
srbLocation - String location used when inserting metadata.
Returns:
DataFile the DataFile object.
Throws:
InvalidICATRequestException - throw MetaDataIncompleteException in case validation fails.

getAllProjectNames

java.util.Map<java.lang.String,java.lang.String> getAllProjectNames()
Get all project names.

Returns:
Map<String, String> project names.

getExperimentNamesByProjectId

java.util.Map<java.lang.String,java.lang.String> getExperimentNamesByProjectId(int projectId)
                                                                               throws DDMServiceException
Get all experiment names of a given project.

Parameters:
projectId - int project id.
Returns:
Map<String, String> experiment names.
Throws:
DDMServiceException - throw DDMServiceException when an error occurs.

getAllExperimentsUnderProject

java.util.List<au.edu.archer.domain.icat.api.Investigation> getAllExperimentsUnderProject(int projectId)
                                                                                          throws DDMServiceException
Get All Experiments under this Project.

Parameters:
projectId - The project id.
Returns:
A list of Investigations.
Throws:
DDMServiceException - if any errors occur.

getDataFile

au.edu.archer.domain.icat.api.DataFile getDataFile(int dfId)
                                                   throws DDMServiceException
Get DataFile by its id.

Parameters:
dfId - int DataFile id.
Returns:
DataFile DataFile object to be returned.
Throws:
DDMServiceException - if any errors occur.

getDataFile

au.edu.archer.domain.icat.api.DataFile getDataFile(java.lang.String projectName,
                                                   java.lang.String experimentName,
                                                   java.lang.String datasetName,
                                                   java.lang.String datafileName)
                                                   throws DDMServiceException
Get DataFile id by using project name, exepriment name, dataset name and datafile name.

Parameters:
projectName - String project name.
experimentName - String experiment name.
datasetName - String dataset name.
datafileName - String datafile name.
Returns:
DataFile DataFile object to be returned.
Throws:
DDMServiceException - if any errors occur.

getDataFile

au.edu.archer.domain.icat.api.DataFile getDataFile(java.lang.String path)
                                                   throws DDMServiceException
Get DataFile id by using relative path of the DataFile.

Parameters:
path - String relative path of the DataFile.
Returns:
DataFile DataFile object to be returned.
Throws:
DDMServiceException - if any errors occur.

deleteDataFile

void deleteDataFile(DatafileRequest request)
                    throws DDMServiceException
Delete DataFile by using relative path of the DataFile.

Parameters:
request - DatafileRequest request object.
Throws:
DDMServiceException - throw DDMServiceException when an error happens.

updateDatafileParameters

void updateDatafileParameters(DatafileRequest request)
                              throws InvalidDDMRequestException,
                                     DDMServiceException
Add datafile parameters. Also referred as datafile variable metadata.

This method is used by UQ Meta DataEditor.

Parameters:
request - DatafileRequest object.
Throws:
InvalidDDMRequestException - Exception raised by DDM service when an invalid request is received for processing.
DDMServiceException - raised by DDM service when failure reached in processing.

updateDatafile

au.edu.archer.domain.icat.api.DataFile updateDatafile(DatafileRequest request)
                                                      throws InvalidDDMRequestException,
                                                             DDMServiceException
Update Datafile without changing DatafileParameters.

Parameters:
request - DatafileRequest request object.
Returns:
DataFile the updated DataFile object.
Throws:
InvalidDDMRequestException - Exception raised by DDM service when an invalid request is received for processing.
DDMServiceException - raised by DDM service when failure reached in processing.

getDatafileParametersById

java.util.Map<java.lang.String,java.lang.String> getDatafileParametersById(DatafileRequest request)
Retrieve datafile parameters. Also referred as datafile variable metadata.

This method is used by UQ Meta DataEditor.

Parameters:
request - DatafileRequest object.
Returns:
Map of datafile parameters.

moveDataset

DatasetDetails moveDataset(DatasetRequest request)
                           throws DDMServiceException,
                                  InvalidDDMRequestException
Move Dataset to another experiment.

Parameters:
request - DatasetRequest request object.
Returns:
DatasetDetails DatasetDetails object.
Throws:
DDMServiceException - throw DDMServiceException when an error occurs.
InvalidDDMRequestException - throw InvalidDDMRequestException when request object is invalid.

copyDataset

DatasetDetails copyDataset(DatasetRequest request)
                           throws DDMServiceException
Copy Dataset to another experiment.

Parameters:
request - DatasetRequest request object.
Returns:
DatasetDetails DatasetDetails object.
Throws:
DDMServiceException - throw DDMServiceException when an error occurs.

copyDatafile

au.edu.archer.domain.icat.api.DataFile copyDatafile(DatafileRequest request)
                                                    throws DDMServiceException
Copy Datafile to another Dataset.

Parameters:
request - DatafileRequest request object.
Returns:
DatafileDetails DatafileDetails object.
Throws:
DDMServiceException - throw DDMServiceException when an error occurs.

moveDatafile

au.edu.archer.domain.icat.api.DataFile moveDatafile(DatafileRequest request)
                                                    throws DDMServiceException
Move Datafile to another dataset.

Parameters:
request - DatasetRequest request object.
Returns:
DatasetDetails DatasetDetails object.
Throws:
DDMServiceException - DDMServiceException throw DDMServiceException when an error occurs.

resetDatafileParameters

au.edu.archer.domain.icat.impl.DataFileImpl resetDatafileParameters(DatafileRequest request)
                                                                    throws DDMServiceException
reset datafile parameters by re-extracting from the original file stored on SRB.

Parameters:
request - DatafileRequest request object.
Returns:
DataFileImpl changed DataFile object.
Throws:
DDMServiceException - throw DDMServiceException when an error occurs.

getAllDataFileFormat

java.util.Map<java.lang.String,java.lang.String> getAllDataFileFormat()
Get all existing DataFileformats.

Returns:
Map<String, String> mapping of Datafile format.

getDatafileSliceByDatasetId

java.util.Map<java.lang.String,DatafileSliceResponse> getDatafileSliceByDatasetId(int datasetId)
Get datafile slice by a dataset id.

Parameters:
datasetId - The dataset id.
Returns:
A Collection of DatafileSliceResponse.

startMETSThread

java.lang.Thread startMETSThread(CreateMETSRequest request)
                                 throws DDMServiceException,
                                        InvalidDDMRequestException
startMETSThread.

Parameters:
request - CreateMETSRequest.
Returns:
Thread.
Throws:
DDMServiceException
InvalidDDMRequestException

addGenericFileToDataset

au.edu.archer.domain.icat.api.DataFile addGenericFileToDataset(SRBUploadRequest srbUploadRequest,
                                                               java.lang.String srbLocation,
                                                               int datasetId)
                                                               throws DDMServiceException,
                                                                      InvalidDDMRequestException
Parameters:
content - meta data content in XML file.
srbLocation - String location of the file.
datasetId - dataset id.
Returns:
DataFile the DataFile persistent object saved.
Throws:
InvalidDDMRequestException - Exception raised by DDM service when an invalid request is received for processing.
DDMServiceException - Exception raised by DDM service when an error occurs.

startTransferThread

java.lang.Thread startTransferThread(java.lang.String srbSessionId,
                                     java.lang.String stagingDir,
                                     java.lang.Integer datasetId,
                                     boolean stagTransfer,
                                     java.lang.String notificationRecv)
Transfer all files in the staging area.

Parameters:
srbSessionId - The String srbSessionId.
stagingDir - The String stagingDir.
datasetId - The Dataset Id.
stagTransfer - The flag is stagTransfer.
notificationRecv - String.
Returns:
Thread.

getLock

java.util.Map<java.lang.String,java.lang.String> getLock()
Get the lock for staging transfer.

Returns:
The lock Map.

setLock

void setLock(java.util.Map<java.lang.String,java.lang.String> lock)
set the lock Map.

Parameters:
lock - the Map to set

getDatasetNamesByExperimentId

java.util.Map<java.lang.String,java.lang.String> getDatasetNamesByExperimentId(int experimentId)
                                                                               throws DDMServiceException
getDatasetNamesByExperimentId.

Parameters:
experimentId - int.
Returns:
Map<String, String > .
Throws:
DDMServiceException - .

listAllInvestigatorsByExperimentId

java.util.List<au.edu.archer.domain.icat.api.Investigator> listAllInvestigatorsByExperimentId(int expid)
List all investigators by experiment id.

Parameters:
expid - The experiment Id.
Returns:
A list of investigators.

listAllTopicListsByExperimentId

java.util.List<au.edu.archer.domain.icat.api.TopicList> listAllTopicListsByExperimentId(int expid)
List all TopicLists by ExperimentId.

Parameters:
expid - The experiment Id.
Returns:
A list of TopicList of the this experiment.

listAllTopics

java.util.List<au.edu.archer.domain.icat.api.Topic> listAllTopics()
                                                                  throws DDMServiceException
List of all Topics.

Returns:
A list of all Topics.
Throws:
DDMServiceException - if errors.

getAllTopicNames

java.util.Map<java.lang.String,java.lang.String> getAllTopicNames()
                                                                  throws DDMServiceException
Get all Topic.

Returns:
A Map of all Topics.
Throws:
DDMServiceException - if any errors.

getAllNonPackagedDatasetByExpId

java.util.List<au.edu.archer.domain.icat.api.DataSet> getAllNonPackagedDatasetByExpId(int experimentId)
                                                                                      throws DDMServiceException
Get all non-packaged datasets.

Parameters:
experimentId - id.
Returns:
List of DataSet objects.
Throws:
DDMServiceException

getAllInvestigators

java.util.Map<java.lang.String,java.lang.String> getAllInvestigators()
                                                                     throws DDMServiceException
Get all Investigators.

Returns:
A Map of all Investigators.
Throws:
DDMServiceException - if any errors.


Copyright © 2008-09 Monash University. All Rights Reserved.