au.edu.archer.services.icat.impl
Class ICATWsClientImpl

java.lang.Object
  extended by au.edu.archer.services.icat.AbstractICATClient
      extended by au.edu.archer.services.icat.impl.ICATWsClientImpl
All Implemented Interfaces:
ICAT, ICATHelpers, ICATTraversal, SearchService

public class ICATWsClientImpl
extends AbstractICATClient


Field Summary
protected  org.apache.log4j.Logger logger
           
 
Constructor Summary
ICATWsClientImpl(java.lang.String address)
           
ICATWsClientImpl(java.lang.String address, org.globus.gsi.GlobusCredential cred)
           
 
Method Summary
 void deleteDataFile(DataFile in)
          
 void deleteDataFileFormat(DataFileFormat in)
          
 void deleteDataFileParameter(DataFileParameter in)
          
 void deleteDataSet(DataSet in)
          
 void deleteDataSetParameter(DataSetParameter in)
          
 void deleteDataSetStatus(DataSetStatus in)
          
 void deleteDataSetType(DataSetType in)
          
 void deleteFacilityCycle(FacilityCycle in)
          
 void deleteFacilityUser(FacilityUser in)
          
 void deleteInstrument(Instrument in)
          
 void deleteInvestigation(Investigation in)
          
 void deleteInvestigationType(InvestigationType in)
          
 void deleteParameter(Parameter in)
          
 void deleteSample(Sample in)
          
 void deleteSampleParameter(SampleParameter in)
          
 void deleteStudy(Study in)
          
 void deleteStudyStatus(StudyStatus in)
          
 java.util.List<DataFileFormat> getAllDataFileFormats()
          
 java.util.List<DataFileParameter> getAllDataFileParameters(java.lang.Integer dataFileID)
          
 java.util.List<DataFile> getAllDataFilesByDataSetId(java.lang.Integer dataSetID)
          
 java.util.List<DataSetParameter> getAllDataSetParameters(java.lang.Integer in)
          
 java.util.List<DataSet> getAllDataSetsByInvestigationId(java.lang.Integer investigationID)
          
 java.util.List<DataSetStatus> getAllDataSetStatus()
          
 java.util.List<DataSetType> getAllDataSetTypes()
          
 java.util.List<FacilityCycle> getAllFacilityCycles()
          
 java.util.List<FacilityUser> getAllFacilityUsers()
          
 java.util.List<Instrument> getAllInstruments()
          
 java.util.List<Investigation> getAllInvestigationsByStudyId(java.lang.Integer in)
          
 java.util.List<InvestigationType> getAllInvestigationTypes()
          
 java.util.List<Parameter> getAllParameters()
          
 java.util.List<Parameter> getAllParametersByType(boolean isSampleParameter, boolean isDataSetParameter, boolean isDataFileParameter)
          Returns the parameters for which the boolean parameters are true.
 java.util.List<SampleParameter> getAllSampleParameters(java.lang.Integer in)
          
 java.util.List<Sample> getAllSamplesByInvestigationId(java.lang.Integer in)
          
 java.util.List<Sample> getAllSamplesByInvestigationName(java.lang.String studyName, java.lang.String investigationName)
          
 java.util.List<Study> getAllStudies()
          
 java.util.List<StudyStatus> getAllStudyStatus()
          
 DataFile getDataFileById(java.lang.Integer in)
          
 DataFile getDataFileByLocation(java.lang.String location)
          Get the Data file object associated with the given location URI.
 DataFile getDataFileByName(java.lang.String studyName, java.lang.String investigationName, java.lang.String datasetName, java.lang.String datafileName)
          Get the data file based on the names of it's path components in the icat structure.
 DataFileFormat getDataFileFormatById(java.lang.String name, java.lang.String version)
          
 java.util.List<DataFileFormat> getDataFileFormatByName(java.lang.String in)
          
 DataFileParameter getDataFileParameterById(java.lang.String name, java.lang.String units, java.lang.Integer dataFileID)
          
 DataSet getDataSetById(java.lang.Integer in)
          
 DataSet getDataSetByLocation(java.lang.String location)
          
 DataSet getDataSetByName(java.lang.String studyName, java.lang.String investigationName, java.lang.String datasetName)
          Lookup the dataset based on the path name components made up of study, investigation and dataset names.
 java.lang.Integer getDataSetIdByHandle(java.lang.String in)
          
 DataSetParameter getDataSetParameterById(java.lang.String name, java.lang.String units, java.lang.Integer dataSetID)
          
 DataSetStatus getDataSetStatusByName(java.lang.String in)
          
 DataSetType getDataSetTypeByName(java.lang.String in)
          
 FacilityCycle getFacilityCycleByName(java.lang.String in)
          
 FacilityUser getFacilityUserById(java.lang.String in)
          
 Instrument getInstrumentByName(java.lang.String in)
          
 Investigation getInvestigationById(java.lang.Integer in)
          
 Investigation getInvestigationByLocation(java.lang.String location)
          
 Investigation getInvestigationByName(java.lang.String studyName, java.lang.String investigationName)
          Lookup the Investigation based on the path components of study name and investigation name.
 InvestigationType getInvestigationTypeByName(java.lang.String in)
          
 ICATObjectFactory getObjectFactory()
          
 Parameter getParameterById(java.lang.Integer in)
          
 Parameter getParameterByName(java.lang.String name, java.lang.String units)
          Gets the parameter with this name-unit key
 java.util.List<java.lang.String> getResourceUrlPrefixes()
          
 Sample getSampleById(java.lang.Integer in)
          
 Sample getSampleByName(java.lang.String studyName, java.lang.String investigationName, java.lang.String sampleName)
          
 SampleParameter getSampleParameterById(java.lang.String name, java.lang.String units, java.lang.Integer sampleID)
          
 Study getStudyById(java.lang.Integer in)
          
 Study getStudyByLocation(java.lang.String location)
          
 Study getStudyByName(java.lang.String in)
          
 StudyStatus getStudyStatusByName(java.lang.String in)
          
 java.util.List<DataFile> searchDataFile(SearchRequestType search)
          Search datafiles.
 java.util.List<DataSet> searchDataSet(SearchRequestType search)
          Search datasets.
 java.util.List<Investigation> searchExperiment(SearchRequestType search)
          Search experiments.
 java.util.List<Study> searchProject(SearchRequestType search)
          Search project.
 java.util.List<Sample> searchSample(SearchRequestType search)
          Search samples.
 java.lang.String testCall(java.lang.String str1, java.lang.String str2)
           
 void triggerNotifications()
          
 DataFile updateDataFile(DataFile in)
          Save the datafile object.
 DataFileFormat updateDataFileFormat(DataFileFormat in)
          Save the datafile format object.
 DataFileParameter updateDataFileParameter(DataFileParameter in)
          Save the datafile parameter object.
 DataSet updateDataSet(DataSet in)
          Save the dataset object.
 DataSetParameter updateDataSetParameter(DataSetParameter in)
          Save the dataset parameter object.
 DataSetStatus updateDataSetStatus(DataSetStatus in)
          Save the dataset status object.
 DataSetType updateDataSetType(DataSetType in)
          Save the dataset type object.
 FacilityCycle updateFacilityCycle(FacilityCycle in)
          Save the facility cycle object.
 FacilityUser updateFacilityUser(FacilityUser in)
          Save the facility user object.
 Instrument updateInstrument(Instrument in)
          Save the instrument object.
 Investigation updateInvestigation(Investigation in)
          Save the investigation object.
 InvestigationType updateInvestigationType(InvestigationType in)
          Save the investigation type object.
 Parameter updateParameter(Parameter in)
          Save the parameter, updating or creating if id is null or 0.
 Sample updateSample(Sample in)
          Save the study object.
 SampleParameter updateSampleParameter(SampleParameter in)
          Save the sample parameter object.
 Study updateStudy(Study in)
          Save the study object.
 StudyStatus updateStudyStatus(StudyStatus in)
          Save the study status object.
 
Methods inherited from class au.edu.archer.services.icat.AbstractICATClient
getDataFileFormatById, getDataFileParameterById, getDataFilesFor, getDataSetFor, getDataSetParameterById, getDataSetsFor, getDataSetsFor, getInvestigationFor, getInvestigationFor, getInvestigationsFor, getSamplesFor, getStudyFor, normaliseLocation
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

protected org.apache.log4j.Logger logger
Constructor Detail

ICATWsClientImpl

public ICATWsClientImpl(java.lang.String address)

ICATWsClientImpl

public ICATWsClientImpl(java.lang.String address,
                        org.globus.gsi.GlobusCredential cred)
                 throws java.lang.Exception
Throws:
java.lang.Exception
Method Detail

testCall

public java.lang.String testCall(java.lang.String str1,
                                 java.lang.String str2)
                          throws ICATServiceException
Throws:
ICATServiceException

updateStudy

public Study updateStudy(Study in)
                  throws ICATServiceException
Save the study object. First unflatten, then persist, then flatten and return.

Returns:
Throws:
ICATServiceException

updateStudyStatus

public StudyStatus updateStudyStatus(StudyStatus in)
                              throws ICATServiceException
Save the study status object. First unflatten, then persist, then flatten and return.

Returns:
Throws:
ICATServiceException

updateInvestigation

public Investigation updateInvestigation(Investigation in)
                                  throws ICATServiceException
Save the investigation object. First unflatten, then persist, then flatten and return.

Returns:
Throws:
ICATServiceException

updateInvestigationType

public InvestigationType updateInvestigationType(InvestigationType in)
                                          throws ICATServiceException
Save the investigation type object. First unflatten, then persist, then flatten and return.

Returns:
Throws:
ICATServiceException

updateSample

public Sample updateSample(Sample in)
                    throws ICATServiceException
Save the study object. First unflatten, then persist, then flatten and return.

Returns:
Throws:
ICATServiceException

updateDataSet

public DataSet updateDataSet(DataSet in)
                      throws ICATServiceException
Save the dataset object. First unflatten, then persist, then flatten and return.

Returns:
Throws:
ICATServiceException

updateDataSetType

public DataSetType updateDataSetType(DataSetType in)
                              throws ICATServiceException
Save the dataset type object. First unflatten, then persist, then flatten and return.

Returns:
Throws:
ICATServiceException

updateDataSetStatus

public DataSetStatus updateDataSetStatus(DataSetStatus in)
                                  throws ICATServiceException
Save the dataset status object. First unflatten, then persist, then flatten and return.

Returns:
Throws:
ICATServiceException

updateDataFile

public DataFile updateDataFile(DataFile in)
                        throws ICATServiceException
Save the datafile object. First unflatten, then persist, then flatten and return.

Returns:
Throws:
ICATServiceException

updateDataFileFormat

public DataFileFormat updateDataFileFormat(DataFileFormat in)
                                    throws ICATServiceException
Save the datafile format object. First unflatten, then persist, then flatten and return.

Returns:
Throws:
ICATServiceException

updateDataFileParameter

public DataFileParameter updateDataFileParameter(DataFileParameter in)
                                          throws ICATServiceException
Save the datafile parameter object. First unflatten, then persist, then flatten and return.

Returns:
Throws:
ICATServiceException

updateInstrument

public Instrument updateInstrument(Instrument in)
                            throws ICATServiceException
Save the instrument object. First unflatten, then persist, then flatten and return.

Returns:
Throws:
ICATServiceException

updateFacilityCycle

public FacilityCycle updateFacilityCycle(FacilityCycle in)
                                  throws ICATServiceException
Save the facility cycle object. First unflatten, then persist, then flatten and return.

Returns:
Throws:
ICATServiceException

updateFacilityUser

public FacilityUser updateFacilityUser(FacilityUser in)
                                throws ICATServiceException
Save the facility user object. First unflatten, then persist, then flatten and return.

Returns:
Throws:
ICATServiceException

deleteStudy

public void deleteStudy(Study in)
                 throws ICATServiceException

Throws:
ICATServiceException

deleteStudyStatus

public void deleteStudyStatus(StudyStatus in)
                       throws ICATServiceException

Throws:
ICATServiceException

deleteInvestigation

public void deleteInvestigation(Investigation in)
                         throws ICATServiceException

Throws:
ICATServiceException

deleteInvestigationType

public void deleteInvestigationType(InvestigationType in)
                             throws ICATServiceException

Throws:
ICATServiceException

deleteSample

public void deleteSample(Sample in)
                  throws ICATServiceException

Throws:
ICATServiceException

deleteDataSet

public void deleteDataSet(DataSet in)
                   throws ICATServiceException

Throws:
ICATServiceException

deleteDataSetType

public void deleteDataSetType(DataSetType in)
                       throws ICATServiceException

Throws:
ICATServiceException

deleteDataSetStatus

public void deleteDataSetStatus(DataSetStatus in)
                         throws ICATServiceException

Throws:
ICATServiceException

deleteDataFile

public void deleteDataFile(DataFile in)
                    throws ICATServiceException

Throws:
ICATServiceException

deleteDataFileFormat

public void deleteDataFileFormat(DataFileFormat in)
                          throws ICATServiceException

Throws:
ICATServiceException

deleteDataFileParameter

public void deleteDataFileParameter(DataFileParameter in)
                             throws ICATServiceException

Throws:
ICATServiceException

deleteInstrument

public void deleteInstrument(Instrument in)
                      throws ICATServiceException

Throws:
ICATServiceException

deleteFacilityCycle

public void deleteFacilityCycle(FacilityCycle in)
                         throws ICATServiceException

Throws:
ICATServiceException

deleteFacilityUser

public void deleteFacilityUser(FacilityUser in)
                        throws ICATServiceException

Throws:
ICATServiceException

getAllStudies

public java.util.List<Study> getAllStudies()
                                    throws ICATServiceException

Throws:
ICATServiceException

getAllStudyStatus

public java.util.List<StudyStatus> getAllStudyStatus()
                                              throws ICATServiceException

Throws:
ICATServiceException

getAllInvestigationsByStudyId

public java.util.List<Investigation> getAllInvestigationsByStudyId(java.lang.Integer in)
                                                            throws ICATServiceException

Throws:
ICATServiceException

getAllInvestigationTypes

public java.util.List<InvestigationType> getAllInvestigationTypes()
                                                           throws ICATServiceException

Throws:
ICATServiceException

getAllSamplesByInvestigationId

public java.util.List<Sample> getAllSamplesByInvestigationId(java.lang.Integer in)
                                                      throws ICATServiceException

Throws:
ICATServiceException

getAllSamplesByInvestigationName

public java.util.List<Sample> getAllSamplesByInvestigationName(java.lang.String studyName,
                                                               java.lang.String investigationName)
                                                        throws ICATServiceException

Throws:
ICATServiceException

getAllDataSetsByInvestigationId

public java.util.List<DataSet> getAllDataSetsByInvestigationId(java.lang.Integer investigationID)
                                                        throws ICATServiceException

Throws:
ICATServiceException

getAllDataSetTypes

public java.util.List<DataSetType> getAllDataSetTypes()
                                               throws ICATServiceException

Throws:
ICATServiceException

getAllDataSetStatus

public java.util.List<DataSetStatus> getAllDataSetStatus()
                                                  throws ICATServiceException

Throws:
ICATServiceException

getAllDataFilesByDataSetId

public java.util.List<DataFile> getAllDataFilesByDataSetId(java.lang.Integer dataSetID)
                                                    throws ICATServiceException

Throws:
ICATServiceException

getAllDataFileFormats

public java.util.List<DataFileFormat> getAllDataFileFormats()
                                                     throws ICATServiceException

Throws:
ICATServiceException

getAllDataFileParameters

public java.util.List<DataFileParameter> getAllDataFileParameters(java.lang.Integer dataFileID)
                                                           throws ICATServiceException

Throws:
ICATServiceException

getAllInstruments

public java.util.List<Instrument> getAllInstruments()
                                             throws ICATServiceException

Throws:
ICATServiceException

getAllFacilityCycles

public java.util.List<FacilityCycle> getAllFacilityCycles()
                                                   throws ICATServiceException

Throws:
ICATServiceException

getAllFacilityUsers

public java.util.List<FacilityUser> getAllFacilityUsers()
                                                 throws ICATServiceException

Throws:
ICATServiceException

getStudyById

public Study getStudyById(java.lang.Integer in)
                   throws ICATServiceException

Throws:
ICATServiceException

getStudyByName

public Study getStudyByName(java.lang.String in)
                     throws ICATServiceException

Throws:
ICATServiceException

getStudyStatusByName

public StudyStatus getStudyStatusByName(java.lang.String in)
                                 throws ICATServiceException

Throws:
ICATServiceException

getInvestigationById

public Investigation getInvestigationById(java.lang.Integer in)
                                   throws ICATServiceException

Throws:
ICATServiceException

getInvestigationByName

public Investigation getInvestigationByName(java.lang.String studyName,
                                            java.lang.String investigationName)
                                     throws ICATServiceException
Lookup the Investigation based on the path components of study name and investigation name.

Returns:
Throws:
ICATServiceException

getInvestigationTypeByName

public InvestigationType getInvestigationTypeByName(java.lang.String in)
                                             throws ICATServiceException

Throws:
ICATServiceException

getSampleById

public Sample getSampleById(java.lang.Integer in)
                     throws ICATServiceException

Throws:
ICATServiceException

getSampleByName

public Sample getSampleByName(java.lang.String studyName,
                              java.lang.String investigationName,
                              java.lang.String sampleName)
                       throws ICATServiceException

Throws:
ICATServiceException

getDataSetById

public DataSet getDataSetById(java.lang.Integer in)
                       throws ICATServiceException

Throws:
ICATServiceException

getDataSetByName

public DataSet getDataSetByName(java.lang.String studyName,
                                java.lang.String investigationName,
                                java.lang.String datasetName)
                         throws ICATServiceException
Lookup the dataset based on the path name components made up of study, investigation and dataset names.

Returns:
Throws:
ICATServiceException

getDataSetIdByHandle

public java.lang.Integer getDataSetIdByHandle(java.lang.String in)
                                       throws ICATServiceException

Throws:
ICATServiceException

getDataSetStatusByName

public DataSetStatus getDataSetStatusByName(java.lang.String in)
                                     throws ICATServiceException

Throws:
ICATServiceException

getDataSetTypeByName

public DataSetType getDataSetTypeByName(java.lang.String in)
                                 throws ICATServiceException

Throws:
ICATServiceException

getDataFileById

public DataFile getDataFileById(java.lang.Integer in)
                         throws ICATServiceException

Throws:
ICATServiceException

getDataFileFormatById

public DataFileFormat getDataFileFormatById(java.lang.String name,
                                            java.lang.String version)
                                     throws ICATServiceException

Throws:
ICATServiceException

getDataFileFormatByName

public java.util.List<DataFileFormat> getDataFileFormatByName(java.lang.String in)
                                                       throws ICATServiceException

Throws:
ICATServiceException

getDataFileParameterById

public DataFileParameter getDataFileParameterById(java.lang.String name,
                                                  java.lang.String units,
                                                  java.lang.Integer dataFileID)
                                           throws ICATServiceException

Throws:
ICATServiceException

getInstrumentByName

public Instrument getInstrumentByName(java.lang.String in)
                               throws ICATServiceException

Throws:
ICATServiceException

getFacilityCycleByName

public FacilityCycle getFacilityCycleByName(java.lang.String in)
                                     throws ICATServiceException

Throws:
ICATServiceException

getFacilityUserById

public FacilityUser getFacilityUserById(java.lang.String in)
                                 throws ICATServiceException

Throws:
ICATServiceException

getObjectFactory

public ICATObjectFactory getObjectFactory()


getDataFileByName

public DataFile getDataFileByName(java.lang.String studyName,
                                  java.lang.String investigationName,
                                  java.lang.String datasetName,
                                  java.lang.String datafileName)
                           throws ICATServiceException
Get the data file based on the names of it's path components in the icat structure.

Returns:
Throws:
ICATServiceException

deleteDataSetParameter

public void deleteDataSetParameter(DataSetParameter in)
                            throws ICATServiceException

Throws:
ICATServiceException

deleteParameter

public void deleteParameter(Parameter in)
                     throws ICATServiceException

Throws:
ICATServiceException

deleteSampleParameter

public void deleteSampleParameter(SampleParameter in)
                           throws ICATServiceException

Throws:
ICATServiceException

getAllDataSetParameters

public java.util.List<DataSetParameter> getAllDataSetParameters(java.lang.Integer in)
                                                         throws ICATServiceException

Throws:
ICATServiceException

getAllParameters

public java.util.List<Parameter> getAllParameters()
                                           throws ICATServiceException

Throws:
ICATServiceException

getAllParametersByType

public java.util.List<Parameter> getAllParametersByType(boolean isSampleParameter,
                                                        boolean isDataSetParameter,
                                                        boolean isDataFileParameter)
                                                 throws ICATServiceException
Returns the parameters for which the boolean parameters are true. The parameters are ored together so getAllParametersByType(true, true, true) will return all the parameters

Returns:
Throws:
ICATServiceException

getAllSampleParameters

public java.util.List<SampleParameter> getAllSampleParameters(java.lang.Integer in)
                                                       throws ICATServiceException

Throws:
ICATServiceException

getDataSetParameterById

public DataSetParameter getDataSetParameterById(java.lang.String name,
                                                java.lang.String units,
                                                java.lang.Integer dataSetID)
                                         throws ICATServiceException

Throws:
ICATServiceException

getParameterById

public Parameter getParameterById(java.lang.Integer in)
                           throws ICATServiceException

Throws:
ICATServiceException

getParameterByName

public Parameter getParameterByName(java.lang.String name,
                                    java.lang.String units)
                             throws ICATServiceException
Gets the parameter with this name-unit key

Returns:
Throws:
ICATServiceException

getSampleParameterById

public SampleParameter getSampleParameterById(java.lang.String name,
                                              java.lang.String units,
                                              java.lang.Integer sampleID)
                                       throws ICATServiceException

Throws:
ICATServiceException

updateDataSetParameter

public DataSetParameter updateDataSetParameter(DataSetParameter in)
                                        throws ICATServiceException
Save the dataset parameter object. First unflatten, then persist, then flatten and return.

Returns:
Throws:
ICATServiceException

updateParameter

public Parameter updateParameter(Parameter in)
                          throws ICATServiceException
Save the parameter, updating or creating if id is null or 0.

Returns:
Throws:
ICATServiceException

updateSampleParameter

public SampleParameter updateSampleParameter(SampleParameter in)
                                      throws ICATServiceException
Save the sample parameter object. First unflatten, then persist, then flatten and return.

Returns:
Throws:
ICATServiceException

getDataFileByLocation

public DataFile getDataFileByLocation(java.lang.String location)
                               throws ICATServiceException
Get the Data file object associated with the given location URI.

Returns:
Throws:
ICATServiceException

getDataSetByLocation

public DataSet getDataSetByLocation(java.lang.String location)
                             throws ICATServiceException

Throws:
ICATServiceException

getInvestigationByLocation

public Investigation getInvestigationByLocation(java.lang.String location)
                                         throws ICATServiceException

Throws:
ICATServiceException

getStudyByLocation

public Study getStudyByLocation(java.lang.String location)
                         throws ICATServiceException

Throws:
ICATServiceException

getResourceUrlPrefixes

public java.util.List<java.lang.String> getResourceUrlPrefixes()
                                                        throws ICATServiceException

Throws:
ICATServiceException

triggerNotifications

public void triggerNotifications()
                          throws ICATServiceException

Throws:
ICATServiceException

searchDataFile

public java.util.List<DataFile> searchDataFile(SearchRequestType search)
                                        throws ICATServiceException
Search datafiles.

Parameters:
search - SearchRequest search request.
Returns:
List<DataFile> list of data files.
Throws:
ICATServiceException

searchDataSet

public java.util.List<DataSet> searchDataSet(SearchRequestType search)
                                      throws ICATServiceException
Search datasets.

Parameters:
search - SearchRequest search request.
Returns:
List<DataSet> list of data sets.
Throws:
ICATServiceException

searchExperiment

public java.util.List<Investigation> searchExperiment(SearchRequestType search)
                                               throws ICATServiceException
Search experiments.

Parameters:
search - SearchRequest search request.
Returns:
List<Investigation> list of investigations.
Throws:
ICATServiceException

searchProject

public java.util.List<Study> searchProject(SearchRequestType search)
                                    throws ICATServiceException
Search project.

Parameters:
search - SearchRequest search request.
Returns:
List<Study> list of studies.
Throws:
ICATServiceException

searchSample

public java.util.List<Sample> searchSample(SearchRequestType search)
                                    throws ICATServiceException
Search samples.

Parameters:
search - SearchRequest search request.
Returns:
List<Sample> list of samples.
Throws:
ICATServiceException


Copyright © 2008 ARCHER - James Cook University. All Rights Reserved.