au.edu.archer.service.icat.impl
Class ICATServiceImpl

java.lang.Object
  extended by au.edu.archer.service.icat.impl.ICATServiceImpl
All Implemented Interfaces:
ICATService

@Transactional
public class ICATServiceImpl
extends java.lang.Object
implements ICATService

ICATServiceImpl implements ICATService.


Constructor Summary
ICATServiceImpl()
           
 
Method Summary
 au.edu.archer.domain.icat.api.DataSet addDatasetToAnExpr(DatasetRequest request)
          Persist dataset.
 au.edu.archer.domain.icat.api.Investigation addExperimentToProject(ExperimentRequest request)
          Persist experiment.
 au.edu.archer.domain.icat.api.Study addProject(ProjectRequest request)
          Persist project.
 au.edu.archer.domain.icat.api.Sample addSampleToExperiment(SampleRequest request)
          Add sample to experiment.
 au.edu.archer.domain.icat.api.DataSet copyDataset(int datasetId, int experimentId, java.lang.String handle)
          Copy DataSet to another experiment.
 void deleteDataFile(int id)
          Delete DataFile by id.
 void deleteDataset(DatasetRequest request)
          Delete dataset.
 void deleteExperiment(ExperimentRequest request)
          Delete experiment.
 void deleteProject(ProjectRequest deleteRequest)
          Delete project.
 void deleteSample(SampleRequest request)
          Delete sample.
 java.util.List<au.edu.archer.domain.icat.api.DataFileFormat> getAllDataFileFormat()
          Get all existing DataFileFormats.
 java.util.List<au.edu.archer.domain.icat.api.DataFile> 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 associasted datasets with a sample.
 java.util.List<au.edu.archer.domain.icat.api.DataSetStatus> getAllDatasetStatus()
          Get all available DataSet status.
 java.util.List<au.edu.archer.domain.icat.api.DataSetType> getAllDatasetType()
          Get all available Dataset Types.
 java.util.List<au.edu.archer.domain.icat.api.Investigation> getAllExperimentsByProjectId(int projId)
          Get all experiments by a project id.
 java.util.List<au.edu.archer.domain.icat.api.InvestigationType> getAllExperimentTypes()
          Get all available experiment types.
 java.util.List<au.edu.archer.domain.icat.api.FacilityUser> getAllFacilityUsers()
          Get list of all available facility users.
 java.util.List<au.edu.archer.domain.icat.api.Keyword> getAllKeywordsByExperimentId(int expId)
          Get all keywords by the experiment id.
 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.DataSetType> getAllNonPackagedDatasetType()
          Get all non-package DataSet status.
 java.util.List<au.edu.archer.domain.icat.api.Study> getAllProjects()
          Get all projects.
 java.util.List<au.edu.archer.domain.icat.api.StudyStatus> getAllProjectStatus()
          Retrieve all available project status.
 java.util.List<au.edu.archer.domain.icat.api.Sample> getAllSamplesByExpId(SampleRequest request)
          Get all samples by experiment id.
 java.util.List<au.edu.archer.domain.icat.api.Sample> getAllSamplesByExpName(SampleRequest request)
          Get all samples by experiment name.
 au.edu.archer.domain.icat.api.DataFile getDataFile(int dfId)
          Get DataFile by id.
 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 by name.
 java.util.List<au.edu.archer.domain.icat.api.DataFileParameter> getDataFileParametersById(DatafileRequest request)
          Retrieve datafile parameters.
 java.util.Map<java.lang.String,DatafileSliceResponse> getDatafileSliceByDatasetId(int datasetId)
          Get all datafile slices by a dataset id.
 au.edu.archer.domain.icat.api.DataSet getDataSetById(int datasetId)
          Get DataSet by Id.
 au.edu.archer.domain.icat.api.DataSet getDataSetByName(java.lang.String projectName, java.lang.String exprName, java.lang.String datasetName)
          Get Dataset by Name.
 int getDatasetIdByHandle(java.lang.String handleId)
          Get dataset id by dataset handle id.
 java.util.List<au.edu.archer.domain.icat.api.DataSetParameter> getDataSetParametersById(DatasetRequest request)
          Retrieve dataset parameters.
 au.edu.archer.domain.icat.api.DataSetStatus getDatasetStatusByName(java.lang.String datasetStatus)
          Get Dataset status by name.
 au.edu.archer.domain.icat.api.DataSetType getDatasetTypeByName(java.lang.String datasetType)
          Get Dataset type by name.
 au.edu.archer.domain.icat.api.Investigation getExperimentById(int expId)
          Get experiment by experiment id.
 au.edu.archer.domain.icat.api.Investigation getExperimentByName(java.lang.String invName, java.lang.String projectName)
          Retrieve a experiment by name.
 au.edu.archer.domain.icat.api.InvestigationType getExperimentTypeByName(java.lang.String type)
          Get the InvestigationType object by name.
 au.edu.archer.domain.icat.api.FacilityUser getFacilityUserById(int mgrId)
          Get facility user by Id.
 java.util.List<au.edu.archer.domain.icat.api.DataSet> getPackagedDatasetsByExpId(int experimentId)
          Get all packaged datasets.
 au.edu.archer.domain.icat.api.Study getProjectById(int projectId)
          Retrieve a project by id.
 au.edu.archer.domain.icat.api.Study getProjectByName(java.lang.String projectName)
          Retrieve a project by name.
 au.edu.archer.domain.icat.api.StudyStatus getProjectStatusByName(java.lang.String studyStatus)
          Get the StudyStatus object by name.
 au.edu.archer.domain.icat.api.Sample getSampleById(SampleRequest request)
          Get sample by sample id.
 java.util.List<au.edu.archer.domain.icat.api.SampleParameter> getSampleParametersById(SampleRequest request)
          Retrieve sample parameters.
 au.edu.archer.domain.icat.api.Topic getTopicById(int id)
          Get the Topic by Topic Id.
 au.edu.archer.domain.icat.api.DataFile insertMetadata(byte[] xmlMetadata, long fileSize, java.lang.String srbLocation, int datasetId)
          Insert the extracted meta data.
 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.DataSet moveDataset(int datasetId, int experimentId)
          Move DataSet to another experiment.
 au.edu.archer.domain.icat.api.DataFile retrieveMetadata(java.lang.String srbLocation)
          Retrieve Metadata information based on srbLocation.
 void setDatasetDao(au.edu.archer.dao.icat.api.DatasetDao datasetDao)
          Set DatasetDao.
 void setExperimentDao(au.edu.archer.dao.icat.api.ExperimentDao experimentDao)
          Set experimentDao.
 void setIcatDao(au.edu.archer.dao.icat.api.ICATDao icatDao)
          Set ICATDao.
 void setProjectDao(au.edu.archer.dao.icat.api.ProjectDao projectDao)
          Set ProjectDao.
 void setSampleDao(au.edu.archer.dao.icat.api.SampleDao sampleDao)
          Set sample dao.
 au.edu.archer.domain.icat.impl.DataFileImpl updateDataFile(au.edu.archer.domain.icat.api.DataFile df)
          Update Datafile object.
 void updateDatafileParameteres(DatafileRequest request)
          Add datafile parameteres.
 au.edu.archer.domain.icat.api.DataSet updateDataset(DatasetRequest request)
          Update dataset.
 void updateDatasetParameteres(DatasetRequest request)
          Update dataset parameters.Also referred as dataset variable metadata.
 au.edu.archer.domain.icat.api.Investigation updateExperiment(ExperimentRequest request)
          Update experiment.
 au.edu.archer.domain.icat.api.Study updateProject(ProjectRequest updateRequest)
          Update project.
 au.edu.archer.domain.icat.api.Sample updateSample(SampleRequest request)
          Update sample.
 void updateSampleParameters(SampleRequest request)
          Add sample parameteres.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ICATServiceImpl

public ICATServiceImpl()
Method Detail

getFacilityUserById

public au.edu.archer.domain.icat.api.FacilityUser getFacilityUserById(int mgrId)
                                                               throws ICATServiceException
Get facility user by Id.

Specified by:
getFacilityUserById in interface ICATService
Parameters:
mgrId - user id.
Returns:
FacilityUser object.
Throws:
ICATServiceException - if an error occurs while processing icat request.

getAllFacilityUsers

public java.util.List<au.edu.archer.domain.icat.api.FacilityUser> getAllFacilityUsers()
                                                                               throws ICATServiceException
Get list of all available facility users.

Specified by:
getAllFacilityUsers in interface ICATService
Returns:
list of FacilityUser object.
Throws:
ICATServiceException - if an error occurs while processing icat request.

getProjectStatusByName

public au.edu.archer.domain.icat.api.StudyStatus getProjectStatusByName(java.lang.String studyStatus)
                                                                 throws ICATServiceException
Get the StudyStatus object by name.

Specified by:
getProjectStatusByName in interface ICATService
Parameters:
studyStatus - study statuc name.
Returns:
StudyStatus object
Throws:
ICATServiceException - if an error occurs while processing icat request.

getAllProjectStatus

public java.util.List<au.edu.archer.domain.icat.api.StudyStatus> getAllProjectStatus()
                                                                              throws ICATServiceException
Retrieve all available project status.

Specified by:
getAllProjectStatus in interface ICATService
Returns:
Map of project status.
Throws:
ICATServiceException - if an error occurs while processing icat request.

getProjectById

public au.edu.archer.domain.icat.api.Study getProjectById(int projectId)
                                                   throws ICATServiceException
Retrieve a project by id.

Specified by:
getProjectById in interface ICATService
Parameters:
projectId - id.
Returns:
Study object.
Throws:
ICATServiceException - if an error occurs while processing icat request.

getProjectByName

public au.edu.archer.domain.icat.api.Study getProjectByName(java.lang.String projectName)
                                                     throws ICATServiceException
Retrieve a project by name.

Specified by:
getProjectByName in interface ICATService
Parameters:
projectName - name.
Returns:
Study object.
Throws:
ICATServiceException - if an error occurs while processing icat request.

addProject

public au.edu.archer.domain.icat.api.Study addProject(ProjectRequest request)
                                               throws InvalidICATRequestException,
                                                      ICATServiceException
Persist project.

Specified by:
addProject in interface ICATService
Parameters:
request - ProjectRequest object.
Returns:
newly created project object.
Throws:
InvalidICATRequestException - if invalid request received for processing.
ICATServiceException - if an error occurs while processing icat request.

updateProject

public au.edu.archer.domain.icat.api.Study updateProject(ProjectRequest updateRequest)
                                                  throws InvalidICATRequestException,
                                                         ICATServiceException
Update project.

Specified by:
updateProject in interface ICATService
Parameters:
updateRequest - ProjectRequest object.
Returns:
updated Project object.
Throws:
InvalidICATRequestException - if invalid request received for processing.
ICATServiceException - if an error occurs while processing icat request.

deleteProject

public void deleteProject(ProjectRequest deleteRequest)
                   throws InvalidICATRequestException,
                          ICATServiceException
Delete project.

Specified by:
deleteProject in interface ICATService
Parameters:
deleteRequest - ProjectRequest object.
Throws:
InvalidICATRequestException - if invalid request received for processing.
ICATServiceException - if an error occurs while processing icat request.

getDatasetIdByHandle

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

Specified by:
getDatasetIdByHandle in interface ICATService
Parameters:
handleId - dataset handle id.
Returns:
dataset id.

getAllDatasetType

public java.util.List<au.edu.archer.domain.icat.api.DataSetType> getAllDatasetType()
                                                                            throws ICATServiceException
Get all available Dataset Types.

Specified by:
getAllDatasetType in interface ICATService
Returns:
List of DataSetType obj.
Throws:
ICATServiceException - if an error occurs while processing icat request.

getDatasetTypeByName

public au.edu.archer.domain.icat.api.DataSetType getDatasetTypeByName(java.lang.String datasetType)
                                                               throws ICATServiceException
Get Dataset type by name.

Specified by:
getDatasetTypeByName in interface ICATService
Parameters:
datasetType - type
Returns:
DataSetType object.
Throws:
ICATServiceException - if an error occurs while processing icat request.

getAllNonPackagedDatasetType

public java.util.List<au.edu.archer.domain.icat.api.DataSetType> getAllNonPackagedDatasetType()
                                                                                       throws ICATServiceException
Get all non-package DataSet status.

Specified by:
getAllNonPackagedDatasetType in interface ICATService
Returns:
List of DataSetType
Throws:
ICATServiceException - if an error occurs while processing icat request.

getAllDatasetStatus

public java.util.List<au.edu.archer.domain.icat.api.DataSetStatus> getAllDatasetStatus()
                                                                                throws ICATServiceException
Get all available DataSet status.

Specified by:
getAllDatasetStatus in interface ICATService
Returns:
List of DataSetType
Throws:
ICATServiceException - if an error occurs while processing icat request.

getDatasetStatusByName

public au.edu.archer.domain.icat.api.DataSetStatus getDatasetStatusByName(java.lang.String datasetStatus)
                                                                   throws ICATServiceException
Get Dataset status by name.

Specified by:
getDatasetStatusByName in interface ICATService
Parameters:
datasetStatus - status name.
Returns:
DataSetStatus object.
Throws:
ICATServiceException - if an error occurs while processing icat request.

getDataSetById

public au.edu.archer.domain.icat.api.DataSet getDataSetById(int datasetId)
                                                     throws ICATServiceException
Get DataSet by Id.

Specified by:
getDataSetById in interface ICATService
Parameters:
datasetId - id.
Returns:
DataSet object.
Throws:
ICATServiceException - if an error occurs while processing icat request.

getDataSetByName

public au.edu.archer.domain.icat.api.DataSet getDataSetByName(java.lang.String projectName,
                                                              java.lang.String exprName,
                                                              java.lang.String datasetName)
                                                       throws InvalidICATRequestException,
                                                              ICATServiceException
Get Dataset by Name.

Specified by:
getDataSetByName in interface ICATService
Parameters:
projectName - project name.
exprName - experiment name.
datasetName - dataset name.
Returns:
DataSet object.
Throws:
InvalidICATRequestException - thrown when an invalid icat request is received.
ICATServiceException - if an error occurs while processing icat request.

getAllNonPackagedDatasetByExpId

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

Specified by:
getAllNonPackagedDatasetByExpId in interface ICATService
Parameters:
experimentId - id.
Returns:
List of DataSet objects.
Throws:
ICATServiceException

getPackagedDatasetsByExpId

public java.util.List<au.edu.archer.domain.icat.api.DataSet> getPackagedDatasetsByExpId(int experimentId)
                                                                                 throws ICATServiceException
Description copied from interface: ICATService
Get all packaged datasets.

Specified by:
getPackagedDatasetsByExpId in interface ICATService
Parameters:
experimentId - id.
Returns:
List of DataSet objects.
Throws:
ICATServiceException

getAllDatasetsByExpr

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

Specified by:
getAllDatasetsByExpr in interface ICATService
Parameters:
experimentId - id.
Returns:
List of DataSet objects.

getAllDatasetsBySampleId

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

Specified by:
getAllDatasetsBySampleId in interface ICATService
Parameters:
sampleId - id.
Returns:
List of DataSet objects.

getAllDatasetFiles

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

Specified by:
getAllDatasetFiles in interface ICATService
Parameters:
datasetId - dataset id.
Returns:
List of DataFile DataFile object.

addDatasetToAnExpr

public au.edu.archer.domain.icat.api.DataSet addDatasetToAnExpr(DatasetRequest request)
                                                         throws InvalidICATRequestException,
                                                                ICATServiceException
Persist dataset.

Specified by:
addDatasetToAnExpr in interface ICATService
Parameters:
request - DatasetRequest object.
Returns:
newly persisted dataset object.
Throws:
InvalidICATRequestException - thrown when an invalid icat request is received.
ICATServiceException - if an error occurs while processing icat request.

updateDataset

public au.edu.archer.domain.icat.api.DataSet updateDataset(DatasetRequest request)
                                                    throws InvalidICATRequestException,
                                                           ICATServiceException
Update dataset.

Specified by:
updateDataset in interface ICATService
Parameters:
request - DatasetRequest object.
Returns:
updated dataset object.
Throws:
InvalidICATRequestException - thrown when an invalid icat request is received.
ICATServiceException - if an error occurs while processing icat request.

deleteDataset

public void deleteDataset(DatasetRequest request)
                   throws InvalidICATRequestException,
                          ICATServiceException
Delete dataset.

Specified by:
deleteDataset in interface ICATService
Parameters:
request - DatasetRequest object.
Throws:
InvalidICATRequestException - thrown when an invalid icat request is received.
ICATServiceException - if an error occurs while processing icat request.

updateDatasetParameteres

public void updateDatasetParameteres(DatasetRequest request)
                              throws InvalidICATRequestException,
                                     ICATServiceException
Update dataset parameters.Also referred as dataset variable metadata.

Specified by:
updateDatasetParameteres in interface ICATService
Parameters:
request - DatasetRequest object.
Throws:
InvalidICATRequestException - thrown when an invalid icat request is received.
ICATServiceException - if an error occurs while processing icat request.

getDataSetParametersById

public java.util.List<au.edu.archer.domain.icat.api.DataSetParameter> getDataSetParametersById(DatasetRequest request)
Retrieve dataset parameters. Also referred as dataset variable metadata.

Specified by:
getDataSetParametersById in interface ICATService
Parameters:
request - DatasetRequest object.
Returns:
List of DatasetParameter object.

insertMetadata

public au.edu.archer.domain.icat.api.DataFile insertMetadata(byte[] xmlMetadata,
                                                             long fileSize,
                                                             java.lang.String srbLocation,
                                                             int datasetId)
                                                      throws MetadataExtractionException,
                                                             InvalidICATRequestException,
                                                             ICATServiceException
Insert the extracted meta data.

Specified by:
insertMetadata in interface ICATService
Parameters:
xmlMetadata - meta data content in XML file.
fileSize - file content size.
srbLocation - String location of the file.
datasetId - dataset id.
Returns:
DataFile the DataFile persistent object saved.
Throws:
MetadataExtractionException - thrown when unable to extract the metadata.
InvalidICATRequestException - thrown when an invalid icat request is received.
ICATServiceException - if an error occurs while processing icat request.

retrieveMetadata

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

Specified by:
retrieveMetadata in interface ICATService
Parameters:
srbLocation - String location used when inserting metadata.
Returns:
DataFile the DataFile object.
Throws:
InvalidICATRequestException - thrown when an invalid icat request is received.

getAllExperimentTypes

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

Specified by:
getAllExperimentTypes in interface ICATService
Returns:
List of Experiment types.

getExperimentTypeByName

public au.edu.archer.domain.icat.api.InvestigationType getExperimentTypeByName(java.lang.String type)
Get the InvestigationType object by name.

Specified by:
getExperimentTypeByName in interface ICATService
Parameters:
type - investigation type name.
Returns:
InvestigationType object.

getExperimentById

public au.edu.archer.domain.icat.api.Investigation getExperimentById(int expId)
Get experiment by experiment id.

Specified by:
getExperimentById in interface ICATService
Parameters:
expId - int experiment id.
Returns:
Investigation experiment object.

getAllExperimentsByProjectId

public java.util.List<au.edu.archer.domain.icat.api.Investigation> getAllExperimentsByProjectId(int projId)
Get all experiments by a project id.

Specified by:
getAllExperimentsByProjectId in interface ICATService
Parameters:
projId - The project id.
Returns:
A List of experiments.

getExperimentByName

public au.edu.archer.domain.icat.api.Investigation getExperimentByName(java.lang.String invName,
                                                                       java.lang.String projectName)
Retrieve a experiment by name.

Specified by:
getExperimentByName in interface ICATService
Parameters:
invName - String experiment name.
projectName - String project name.
Returns:
Investigation experiment object.

setProjectDao

public void setProjectDao(au.edu.archer.dao.icat.api.ProjectDao projectDao)
Set ProjectDao. Set by Spring framework.

Parameters:
projectDao - to set.

setDatasetDao

public void setDatasetDao(au.edu.archer.dao.icat.api.DatasetDao datasetDao)
Set DatasetDao. Set by Spring framework.

Parameters:
datasetDao - to set.

setIcatDao

public void setIcatDao(au.edu.archer.dao.icat.api.ICATDao icatDao)
Set ICATDao. Set by Spring framework.

Parameters:
icatDao - to set.

setExperimentDao

public void setExperimentDao(au.edu.archer.dao.icat.api.ExperimentDao experimentDao)
Set experimentDao.

Parameters:
experimentDao - ExperimentDao experiment dao.

addExperimentToProject

public au.edu.archer.domain.icat.api.Investigation addExperimentToProject(ExperimentRequest request)
                                                                   throws ICATServiceException,
                                                                          InvalidICATRequestException
Persist experiment.

Specified by:
addExperimentToProject in interface ICATService
Parameters:
request - ExperimentRequest request.
Returns:
Investigation experiment.
Throws:
ICATServiceException - if an error occurs while processing icat request.
InvalidICATRequestException - thrown when an invalid icat request is received.

updateExperiment

public au.edu.archer.domain.icat.api.Investigation updateExperiment(ExperimentRequest request)
                                                             throws ICATServiceException,
                                                                    InvalidICATRequestException
Update experiment.

Specified by:
updateExperiment in interface ICATService
Parameters:
request - ExperimentRequest request.
Returns:
Investigation updated investigation object.
Throws:
ICATServiceException - if an error occurs while processing icat request.
InvalidICATRequestException - if the request is invalid.

deleteExperiment

public void deleteExperiment(ExperimentRequest request)
                      throws ICATServiceException,
                             InvalidICATRequestException
Delete experiment.

Specified by:
deleteExperiment in interface ICATService
Parameters:
request - ExperimentRequest request.
Throws:
ICATServiceException - if an error occurs while processing icat request.
InvalidICATRequestException - if the request is invalid.

getAllSamplesByExpId

public java.util.List<au.edu.archer.domain.icat.api.Sample> getAllSamplesByExpId(SampleRequest request)
Get all samples by experiment id.

Specified by:
getAllSamplesByExpId in interface ICATService
Parameters:
request - SampleRequest request object.
Returns:
List<Sample> set of samples that belongs to the experiment.

addSampleToExperiment

public au.edu.archer.domain.icat.api.Sample addSampleToExperiment(SampleRequest request)
                                                           throws InvalidICATRequestException,
                                                                  ICATServiceException
Add sample to experiment.

Specified by:
addSampleToExperiment in interface ICATService
Parameters:
request - SampleRequest request.
Returns:
Sample sample object.
Throws:
InvalidICATRequestException - if the request is invalid.
ICATServiceException - if an error occurs while processing icat request.

updateSampleParameters

public void updateSampleParameters(SampleRequest request)
                            throws InvalidICATRequestException,
                                   ICATServiceException
Add sample parameteres. Also referred as sample variable metadata.

Specified by:
updateSampleParameters in interface ICATService
Parameters:
request - SampleRequest object.
Throws:
InvalidICATRequestException - if invalid request received for processing.
ICATServiceException - if an error occurs while processing icat request.

deleteSample

public void deleteSample(SampleRequest request)
                  throws InvalidICATRequestException,
                         ICATServiceException
Delete sample.

Specified by:
deleteSample in interface ICATService
Parameters:
request - SampleRequest request object.
Throws:
InvalidICATRequestException - if the request is invalid.
ICATServiceException - if an error occurs while processing icat request.

updateSample

public au.edu.archer.domain.icat.api.Sample updateSample(SampleRequest request)
                                                  throws InvalidICATRequestException,
                                                         ICATServiceException
Update sample.

Specified by:
updateSample in interface ICATService
Parameters:
request - SampleRequest request object.
Returns:
Sample sample object.
Throws:
InvalidICATRequestException - if the request is invalid.
ICATServiceException - if an error occurs while processing icat request.

getSampleById

public au.edu.archer.domain.icat.api.Sample getSampleById(SampleRequest request)
                                                   throws InvalidICATRequestException
Get sample by sample id.

Specified by:
getSampleById in interface ICATService
Parameters:
request - SampleRequest request object.
Returns:
Sample sample object.
Throws:
InvalidICATRequestException - if the request is invalid.

getAllSamplesByExpName

public java.util.List<au.edu.archer.domain.icat.api.Sample> getAllSamplesByExpName(SampleRequest request)
Get all samples by experiment name.

Specified by:
getAllSamplesByExpName in interface ICATService
Parameters:
request - SampleRequest request object.
Returns:
List<Sample> set of samples that belongs to the experiment.

getSampleParametersById

public java.util.List<au.edu.archer.domain.icat.api.SampleParameter> getSampleParametersById(SampleRequest request)
Retrieve sample parameters. Also referred as sample variable metadata.

Specified by:
getSampleParametersById in interface ICATService
Parameters:
request - SampleRequest object.
Returns:
List of SampleParameter object.

moveDataset

public au.edu.archer.domain.icat.api.DataSet moveDataset(int datasetId,
                                                         int experimentId)
Move DataSet to another experiment.

Specified by:
moveDataset in interface ICATService
Parameters:
datasetId - int id of the dataset to be moved.
experimentId - int id of the experiment that will hold the dataset.
Returns:
DataSet new DataSet object.

copyDataset

public au.edu.archer.domain.icat.api.DataSet copyDataset(int datasetId,
                                                         int experimentId,
                                                         java.lang.String handle)
Copy DataSet to another experiment.

Specified by:
copyDataset in interface ICATService
Parameters:
datasetId - int id of the dataset to be copied.
experimentId - int id of the experiment that will hold the dataset.
handle - handle
Returns:
DataSet new DataSet object.

getAllProjects

public java.util.List<au.edu.archer.domain.icat.api.Study> getAllProjects()
Get all projects.

Specified by:
getAllProjects in interface ICATService
Returns:
List<Study> list of projects.

getDataFile

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

Specified by:
getDataFile in interface ICATService
Parameters:
dfId - int DataFile id.
Returns:
DataFile DataFile object to be returned.

getDataFile

public 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 by name.

Specified by:
getDataFile in interface ICATService
Parameters:
projectName - String project name.
experimentName - String experiment name.
datasetName - String dataset name.
datafileName - String datafile name.
Returns:
DataFile DataFile object to be returned.

deleteDataFile

public void deleteDataFile(int id)
Delete DataFile by id.

Specified by:
deleteDataFile in interface ICATService
Parameters:
id - int DataFile id.

updateDatafileParameteres

public void updateDatafileParameteres(DatafileRequest request)
                               throws InvalidICATRequestException,
                                      ICATServiceException
Add datafile parameteres. Also referred as datafile variable metadata.

Specified by:
updateDatafileParameteres in interface ICATService
Parameters:
request - DatafileRequest object.
Throws:
InvalidICATRequestException - if invalid request received for processing.
ICATServiceException - if an error occurs while processing icat request.

getDataFileParametersById

public java.util.List<au.edu.archer.domain.icat.api.DataFileParameter> getDataFileParametersById(DatafileRequest request)
Retrieve datafile parameters. Also referred as datafile variable metadata.

Specified by:
getDataFileParametersById in interface ICATService
Parameters:
request - DatafileRequest object.
Returns:
List of DataFileParameter object.

setSampleDao

public void setSampleDao(au.edu.archer.dao.icat.api.SampleDao sampleDao)
Set sample dao.

Parameters:
sampleDao - to set.

updateDataFile

public au.edu.archer.domain.icat.impl.DataFileImpl updateDataFile(au.edu.archer.domain.icat.api.DataFile df)
Update Datafile object.

Specified by:
updateDataFile in interface ICATService
Parameters:
df - DataFile datafile to be updated.
Returns:
DataFileImpl updated datafile object.

getAllDataFileFormat

public java.util.List<au.edu.archer.domain.icat.api.DataFileFormat> getAllDataFileFormat()
Get all existing DataFileFormats.

Specified by:
getAllDataFileFormat in interface ICATService
Returns:
List<DataFileFormat> list of DataFileFormats.

getDatafileSliceByDatasetId

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

Specified by:
getDatafileSliceByDatasetId in interface ICATService
Parameters:
datasetId - The dataset id.
Returns:
A Collection of DatafileSliceResponse.

getAllKeywordsByExperimentId

public java.util.List<au.edu.archer.domain.icat.api.Keyword> getAllKeywordsByExperimentId(int expId)
Get all keywords by the experiment id.

Specified by:
getAllKeywordsByExperimentId in interface ICATService
Parameters:
expId - The experiment id.
Returns:
A list of Keywords.

listAllInvestigatorsByExperimentId

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

Specified by:
listAllInvestigatorsByExperimentId in interface ICATService
Parameters:
expid - The experiment Id.
Returns:
A list of investigators.

listAllTopicListsByExperimentId

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

Specified by:
listAllTopicListsByExperimentId in interface ICATService
Parameters:
expid - The experiment Id.
Returns:
A list of TopicList of the this experiment.

listAllTopics

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

Specified by:
listAllTopics in interface ICATService
Returns:
A list of all Topics.
Throws:
ICATServiceException - if any errors occur.

getTopicById

public au.edu.archer.domain.icat.api.Topic getTopicById(int id)
Get the Topic by Topic Id.

Specified by:
getTopicById in interface ICATService
Parameters:
id - The Topic Id.
Returns:
A Topic.


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