Package gda.px.util
Class GDAISpyB
java.lang.Object
gda.factory.FindableBase
gda.px.util.GDAISpyB
ISpyB singleton with visit set automatically to the value from the metadata
Synchronization of applications is achieved by the object using the Event mechanism to publish and receive
events containing the name of the table changed and the id of the record effected.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionList<dna.xml.ScreeningStrategySubWedge> allChildSubWedgesFromScreeningId(int screeningId) List<dna.xml.ScreeningStrategySubWedge> allChildSubWedgesFromWedges(List<dna.xml.ScreeningStrategyWedge> screeningStrategyWedges) List<dna.xml.ScreeningStrategyWedge> allChildWedgesFromScreeningId(int screeningId) static StringSets the start time for this data collection to the current timestatic ISpyBdna.xml.Aperture[]retrieveAperturesUsingSize(double apertureSize) dna.xml.Container[]retrieveContainer(int containerId) dna.xml.DataCollectionretrieveDataCollection(int dataCollectionId) dna.xml.DataCollection[]retrieveDataCollectionsForSample(int sampleId) int[]retrieveFluorescenceSpectrumIdsForSample(int sampleId) dna.xml.DbobjectretrieveImageQualityIndicators(int dataCollectionId, int imageNumber) dna.xml.BLSample[]retrieveSamples(int blSampleId) dna.xml.Screening[]retrieveScreeningsForSample(int sampleId) voidsetCurrentVisit(String visit) voidvoidSet or change the name of the object (as defined in XML).voidsetUseCurrentUserVisit(boolean useCurrentUserVisit) To ensure the user only accesses those records in the database that are appropriate for his visit GDAISpyB needs to set the currentVsiit to either the users visit or the batonholder's visit.intstoreAperture(dna.xml.Aperture aperture) intstoreBLSample(dna.xml.BLSample blSample) intstoreContainer(dna.xml.Container container) intstoreCrystal(dna.xml.Crystal crystal) intstoreDataCollection(dna.xml.DataCollection dc) Deprecated.intstoreDataCollection(dna.xml.DataCollection dc, String visit) Requests the ISPyB server to store a data collectionintstoreDataCollectionGroup(dna.xml.DataCollectionGroup dcg) Deprecated.intstoreDataCollectionGroup(dna.xml.DataCollectionGroup dcg, String visit) Requests the ISPyB server to store a data collection groupintstoreDiffractionPlan(dna.xml.DiffractionPlan diffractionPlan) intstoreEnergyScan(dna.xml.EnergyScan energyScan) Requests the ISPyB server to store an energy scanintstoreFluorescenceSpectrum(dna.xml.XFEFluorescenceSpectrum fluoSpectrum) intstoreGridInfo(dna.xml.GridInfo gridInfo) intstorePosition(dna.xml.Position position) intstoreProtein(dna.xml.Protein protein) voidupdateBLSample(dna.xml.BLSample blSample) voidupdateDataCollection(dna.xml.DataCollection dc) Requests the ISPyB server to update a data collection.Methods inherited from class gda.factory.FindableBase
equals, getName, hashCode
-
Constructor Details
-
GDAISpyB
public GDAISpyB()
-
-
Method Details
-
setUseCurrentUserVisit
public void setUseCurrentUserVisit(boolean useCurrentUserVisit) To ensure the user only accesses those records in the database that are appropriate for his visit GDAISpyB needs to set the currentVsiit to either the users visit or the batonholder's visit. On the client the visit should be that of the local user.- Parameters:
useCurrentUserVisit- - whentrue, visit of the current user is used during database access. Iffalse(default) visit of the baton holder is used. When GDAISpyB is in the client application this parameter should be set true
-
setIspyB
- Parameters:
ispyB-
-
getCurrentVisit
- Specified by:
getCurrentVisitin interfaceISpyB- Returns:
- The visit set in setCurrentVisit e.g. nt20-14
-
retrieveContainer
- Specified by:
retrieveContainerin interfaceISpyB- Parameters:
containerId-- Returns:
- Container[]
- Throws:
ISPyBToolsException
-
retrieveDataCollection
public dna.xml.DataCollection retrieveDataCollection(int dataCollectionId) throws ISPyBToolsException - Specified by:
retrieveDataCollectionin interfaceISpyB- Parameters:
dataCollectionId-- Returns:
- The dataCollections for the current Visit(session)
- Throws:
ISPyBToolsException
-
retrieveSamples
- Specified by:
retrieveSamplesin interfaceISpyB- Parameters:
blSampleId-- Returns:
- BLSample
- Throws:
ISPyBToolsException
-
setCurrentVisit
- Specified by:
setCurrentVisitin interfaceISpyB- Parameters:
visit-- Throws:
ISPyBToolsException
-
storeDataCollectionGroup
public int storeDataCollectionGroup(dna.xml.DataCollectionGroup dcg, String visit) throws ISPyBToolsException Description copied from interface:ISpyBRequests the ISPyB server to store a data collection group- Specified by:
storeDataCollectionGroupin interfaceISpyB- Parameters:
dcg- the DataCollectionGroup objectvisit- string representing the visit with which to register dcg- Returns:
- ID of inserted data collection group if the method terminates successfully, else -1
- Throws:
ISPyBToolsException
-
storeDataCollectionGroup
@Deprecated(since="GDA 9.14") public int storeDataCollectionGroup(dna.xml.DataCollectionGroup dcg) throws ISPyBToolsException Deprecated.- Specified by:
storeDataCollectionGroupin interfaceISpyB- Throws:
ISPyBToolsException
-
storeDataCollection
Description copied from interface:ISpyBRequests the ISPyB server to store a data collection- Specified by:
storeDataCollectionin interfaceISpyB- Parameters:
dc- the DataCollection objectvisit- string representing the visit with which to register dc- Returns:
- ID of inserted data collection if the method terminates successfully, else -1
- Throws:
ISPyBToolsException
-
storeDataCollection
@Deprecated(since="GDA 9.14") public int storeDataCollection(dna.xml.DataCollection dc) throws ISPyBToolsException Deprecated.- Specified by:
storeDataCollectionin interfaceISpyB- Throws:
ISPyBToolsException
-
storeFluorescenceSpectrum
public int storeFluorescenceSpectrum(dna.xml.XFEFluorescenceSpectrum fluoSpectrum) throws ISPyBToolsException - Specified by:
storeFluorescenceSpectrumin interfaceISpyB- Throws:
ISPyBToolsException
-
updateDataCollection
Description copied from interface:ISpyBRequests the ISPyB server to update a data collection. Note that the dataCollectionId attribute has to be set correctly before running this method.- Specified by:
updateDataCollectionin interfaceISpyB- Parameters:
dc- the DataCollection object- Throws:
ISPyBToolsException
-
storeEnergyScan
Description copied from interface:ISpyBRequests the ISPyB server to store an energy scan- Specified by:
storeEnergyScanin interfaceISpyB- Parameters:
energyScan-- Returns:
- ID of inserted energy scan if the method terminates successfully, else -1
- Throws:
ISPyBToolsException
-
storeBLSample
- Specified by:
storeBLSamplein interfaceISpyB- Throws:
ISPyBToolsException
-
storeContainer
- Specified by:
storeContainerin interfaceISpyB- Throws:
ISPyBToolsException
-
storeCrystal
- Specified by:
storeCrystalin interfaceISpyB- Throws:
ISPyBToolsException
-
storeProtein
- Specified by:
storeProteinin interfaceISpyB- Throws:
ISPyBToolsException
-
updateBLSample
- Specified by:
updateBLSamplein interfaceISpyB- Throws:
ISPyBToolsException
-
storeDiffractionPlan
- Specified by:
storeDiffractionPlanin interfaceISpyB- Throws:
ISPyBToolsException
-
setName
Description copied from interface:FindableSet or change the name of the object (as defined in XML).- Specified by:
setNamein interfaceFindable- Overrides:
setNamein classFindableBase- Parameters:
name- the object name
-
storeAperture
- Specified by:
storeAperturein interfaceISpyB- Throws:
ISPyBToolsException
-
retrieveAperturesUsingSize
public dna.xml.Aperture[] retrieveAperturesUsingSize(double apertureSize) throws ISPyBToolsException - Specified by:
retrieveAperturesUsingSizein interfaceISpyB- Throws:
ISPyBToolsException
-
storePosition
- Specified by:
storePositionin interfaceISpyB- Throws:
ISPyBToolsException
-
retrieveScreeningsForSample
- Specified by:
retrieveScreeningsForSamplein interfaceISpyB- Throws:
ISPyBToolsException
-
allChildSubWedgesFromScreeningId
public List<dna.xml.ScreeningStrategySubWedge> allChildSubWedgesFromScreeningId(int screeningId) throws ISPyBToolsException - Specified by:
allChildSubWedgesFromScreeningIdin interfaceISpyB- Throws:
ISPyBToolsException
-
allChildWedgesFromScreeningId
public List<dna.xml.ScreeningStrategyWedge> allChildWedgesFromScreeningId(int screeningId) throws ISPyBToolsException - Specified by:
allChildWedgesFromScreeningIdin interfaceISpyB- Throws:
ISPyBToolsException
-
allChildSubWedgesFromWedges
public List<dna.xml.ScreeningStrategySubWedge> allChildSubWedgesFromWedges(List<dna.xml.ScreeningStrategyWedge> screeningStrategyWedges) throws ISPyBToolsException - Specified by:
allChildSubWedgesFromWedgesin interfaceISpyB- Throws:
ISPyBToolsException
-
retrieveDataCollectionsForSample
public dna.xml.DataCollection[] retrieveDataCollectionsForSample(int sampleId) throws ISPyBToolsException - Specified by:
retrieveDataCollectionsForSamplein interfaceISpyB- Throws:
ISPyBToolsException
-
retrieveFluorescenceSpectrumIdsForSample
- Specified by:
retrieveFluorescenceSpectrumIdsForSamplein interfaceISpyB- Throws:
ISPyBToolsException
-
storeGridInfo
- Specified by:
storeGridInfoin interfaceISpyB- Throws:
ISPyBToolsException
-
retrieveImageQualityIndicators
public dna.xml.Dbobject retrieveImageQualityIndicators(int dataCollectionId, int imageNumber) throws ISPyBToolsException - Specified by:
retrieveImageQualityIndicatorsin interfaceISpyB- Throws:
ISPyBToolsException
-
getInstance
- Returns:
- ISpyB singleton with visit set automatically to the value from the metadata
-
getCurrentTimeString
Sets the start time for this data collection to the current time- Returns:
- the current (Java VM) time as a string on a format acceptable by the ISPyB server
-