Class SESSettings
java.lang.Object
gda.factory.FindableBase
org.opengda.detector.electronanalyser.api.SESSettings
- All Implemented Interfaces:
Findable,SESSettingsService
@OsgiService(SESSettingsService.class)
@ServiceInterface(SESSettingsService.class)
public class SESSettings
extends FindableBase
implements SESSettingsService
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionconvertLegacyExcitationEnergyToExcitationEnergySourceName(double excitationEnergy) Helper function that will map an excitationEnergy value to a corresponding excitationEnergySourceName.Used when opening a file that is in legacy xml format andSESSettingsService.isLegacyFileFormatOverwrittenForSESSequenceJSONHanlder()is set to false.booleanbooleanvoidsetDefaultExcitationEnergySourceForSESRegion(String defaultExcitationEnergySourceForSESRegion) voidsetDefaultLensModeForSESRegion(String defaultLensModeForSESRegion) voidsetLegacyConversionExcitationEnergyForSESRegion(Map<String, List<Number>> legacyConversionExcitationEnergySourceForSESRegion) Set the legacy conversion of excitationEnergy to a excitationEnergySourceSESRegion.voidsetLegacyFileExtensionForSESSequenceJSONHanlder(String legacyFileExtensionForSESSequenceJSONHanlder) Used when opening a file that is in legacy xml format andSESSettingsService.isLegacyFileFormatOverwrittenForSESSequenceJSONHanlder()is set to false.voidsetLegacyFileFormatOverwrittenForSESSequenceJSONHanlder(boolean legacyFileFormatOverwrittenForSESSequenceJSONHanlder) voidsetSESConfigExcitationEnergySourceList(List<SESConfigExcitationEnergySource> excitationEnergyConfigList) Methods inherited from class gda.factory.FindableBase
equals, getName, hashCode, setName
-
Constructor Details
-
SESSettings
public SESSettings() -
SESSettings
-
-
Method Details
-
getDefaultExcitationEnergySourceForSESRegion
- Specified by:
getDefaultExcitationEnergySourceForSESRegionin interfaceSESSettingsService- Returns:
- String defining the defaultExcitationEnergySourceForSESRegion value for a
SESRegion.
-
setDefaultExcitationEnergySourceForSESRegion
public void setDefaultExcitationEnergySourceForSESRegion(String defaultExcitationEnergySourceForSESRegion) - Specified by:
setDefaultExcitationEnergySourceForSESRegionin interfaceSESSettingsService
-
getDefaultLensModeForSESRegion
- Specified by:
getDefaultLensModeForSESRegionin interfaceSESSettingsService- Returns:
- the default lens mode for
SESRegion.
-
setDefaultLensModeForSESRegion
- Specified by:
setDefaultLensModeForSESRegionin interfaceSESSettingsService- Parameters:
defaultLensModeForSESRegion- Set the default lens mode when a newSESRegionis created.
-
getLegacyConversionExcitationEnergyForSESRegion
- Specified by:
getLegacyConversionExcitationEnergyForSESRegionin interfaceSESSettingsService- Returns:
- Mapinvalid input: '<'String, String> excitationEnergySourceToLimits where limits is two numbers joined by "-" e.g "0-2100".
-
setLegacyConversionExcitationEnergyForSESRegion
public void setLegacyConversionExcitationEnergyForSESRegion(Map<String, List<Number>> legacyConversionExcitationEnergySourceForSESRegion) Description copied from interface:SESSettingsServiceSet the legacy conversion of excitationEnergy to a excitationEnergySourceSESRegion. The first String value of the map is the excitationEnergySource name, the second is a list of two values containing the excitationEnergy range it is valid at. Example configuration:<bean id="sessettings" class="org.opengda.detector.electronanalyser.api.SESSettings"> <property name="legacyConversionExcitationEnergyForSESRegion"> <map> <!-- convert excitation energies in this range to source1--> <entry key="source1"> <list value-type="java.lang.Double"> <bean id="source1LowLimt" class="java.lang.Double"> <constructor-arg value="2100"/> </bean> <bean id="source1HighLimt" class="java.lang.Double"> <constructor-arg> <util:constant static-field="java.lang.Double.MAX_VALUE"/> </constructor-arg> </bean> </list> </entry> </map> </property> </bean>- Specified by:
setLegacyConversionExcitationEnergyForSESRegionin interfaceSESSettingsService
-
getLegacyFileExtensionForSESSequenceJSONHanlder
Description copied from interface:SESSettingsServiceUsed when opening a file that is in legacy xml format andSESSettingsService.isLegacyFileFormatOverwrittenForSESSequenceJSONHanlder()is set to false.- Specified by:
getLegacyFileExtensionForSESSequenceJSONHanlderin interfaceSESSettingsService- Returns:
- the file extensions that this file is renamed to by adding this value at the end.
-
setLegacyFileExtensionForSESSequenceJSONHanlder
public void setLegacyFileExtensionForSESSequenceJSONHanlder(String legacyFileExtensionForSESSequenceJSONHanlder) Description copied from interface:SESSettingsServiceUsed when opening a file that is in legacy xml format andSESSettingsService.isLegacyFileFormatOverwrittenForSESSequenceJSONHanlder()is set to false.- Specified by:
setLegacyFileExtensionForSESSequenceJSONHanlderin interfaceSESSettingsService- Parameters:
legacyFileExtensionForSESSequenceJSONHanlder- To preserve the legacy file, rename the file by adding this extension at the end.
-
isLegacyFileFormatOverwrittenForSESSequenceJSONHanlder
public boolean isLegacyFileFormatOverwrittenForSESSequenceJSONHanlder()- Specified by:
isLegacyFileFormatOverwrittenForSESSequenceJSONHanlderin interfaceSESSettingsService- Returns:
- boolean determining when opening a legacy file, if it is overwritten when converted.
-
setLegacyFileFormatOverwrittenForSESSequenceJSONHanlder
public void setLegacyFileFormatOverwrittenForSESSequenceJSONHanlder(boolean legacyFileFormatOverwrittenForSESSequenceJSONHanlder) - Specified by:
setLegacyFileFormatOverwrittenForSESSequenceJSONHanlderin interfaceSESSettingsService
-
getSESConfigExcitationEnergySourceList
- Specified by:
getSESConfigExcitationEnergySourceListin interfaceSESSettingsService- Returns:
- List which defines the the default
SESExcitationEnergySourceand how client displays it.
-
setSESConfigExcitationEnergySourceList
public void setSESConfigExcitationEnergySourceList(List<SESConfigExcitationEnergySource> excitationEnergyConfigList) - Specified by:
setSESConfigExcitationEnergySourceListin interfaceSESSettingsService
-
getSESExcitationEnergySourceList
- Specified by:
getSESExcitationEnergySourceListin interfaceSESSettingsService- Returns:
- List of the default
SESExcitationEnergySourcewhich is used when creating new sequence files. Defined byinvalid reference
#setSESConfigExcitationEnergySourceList()
-
isExcitationEnergySourceSelectable
public boolean isExcitationEnergySourceSelectable()- Specified by:
isExcitationEnergySourceSelectablein interfaceSESSettingsService- Returns:
- true if size of
SESSettingsService.getSESExcitationEnergySourceList()is greater than 1, else false.
-
convertLegacyExcitationEnergyToExcitationEnergySourceName
Description copied from interface:SESSettingsServiceHelper function that will map an excitationEnergy value to a corresponding excitationEnergySourceName. Uses the configuration supplied bySESSettingsService.getSESConfigExcitationEnergySourceList().- Specified by:
convertLegacyExcitationEnergyToExcitationEnergySourceNamein interfaceSESSettingsService- Parameters:
excitationEnergy-- Returns:
-