Package ome.formats.model
Class UnitsFactory
- java.lang.Object
-
- ome.formats.model.UnitsFactory
-
public class UnitsFactory extends java.lang.Object
Utility class to generate and convert unit objects. Be especially careful when using methods which take a string since there are 2 types of enumerations, CODE-based and SYMBOL-based.
-
-
Field Summary
-
Constructor Summary
Constructors Constructor Description UnitsFactory()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ElectricPotential
convertElectricPotential(ome.units.quantity.ElectricPotential value)
Convert a Bio-FormatsElectricPotential
to an OMERO ElectricPotential.static ome.units.quantity.ElectricPotential
convertElectricPotential(ElectricPotential t)
static ElectricPotential
convertElectricPotential(ElectricPotential value, ome.units.unit.Unit<ome.units.quantity.ElectricPotential> ul)
static ElectricPotential
convertElectricPotentialXML(ElectricPotential value, java.lang.String xml)
static Frequency
convertFrequency(ome.units.quantity.Frequency value)
Convert a Bio-FormatsFrequency
to an OMERO Frequency.static ome.units.quantity.Frequency
convertFrequency(Frequency t)
static Frequency
convertFrequency(Frequency value, ome.units.unit.Unit<ome.units.quantity.Frequency> ul)
static Frequency
convertFrequencyXML(Frequency value, java.lang.String xml)
static Length
convertLength(ome.units.quantity.Length value)
Convert a Bio-FormatsLength
to an OMERO Length.static ome.units.quantity.Length
convertLength(Length t)
static Length
convertLength(Length value, ome.units.unit.Unit<ome.units.quantity.Length> ul)
static Length
convertLengthXML(Length value, java.lang.String xml)
static Power
convertPower(ome.units.quantity.Power value)
Convert a Bio-FormatsPower
to an OMERO Power.static ome.units.quantity.Power
convertPower(Power t)
static Power
convertPower(Power value, ome.units.unit.Unit<ome.units.quantity.Power> ul)
static Power
convertPowerXML(Power value, java.lang.String xml)
static Pressure
convertPressure(ome.units.quantity.Pressure value)
Convert a Bio-FormatsPressure
to an OMERO Pressure.static ome.units.quantity.Pressure
convertPressure(Pressure t)
static Pressure
convertPressure(Pressure value, ome.units.unit.Unit<ome.units.quantity.Pressure> ul)
static Pressure
convertPressureXML(Pressure value, java.lang.String xml)
static Temperature
convertTemperature(ome.units.quantity.Temperature value)
Convert a Bio-FormatsTemperature
to an OMERO Temperature.static ome.units.quantity.Temperature
convertTemperature(Temperature t)
static Temperature
convertTemperature(Temperature value, ome.units.unit.Unit<ome.units.quantity.Temperature> ul)
static Temperature
convertTemperatureXML(Temperature value, java.lang.String xml)
static Time
convertTime(ome.units.quantity.Time value)
Convert a Bio-FormatsTime
to an OMERO Time.static ome.units.quantity.Time
convertTime(Time t)
static Time
convertTime(Time value, ome.units.unit.Unit<ome.units.quantity.Time> ul)
static Time
convertTimeXML(Time value, java.lang.String xml)
static ElectricPotential
makeElectricPotential(double d, ome.units.unit.Unit<ome.units.quantity.ElectricPotential> unit)
static ElectricPotential
makeElectricPotential(double d, UnitsElectricPotential unit)
static ome.xml.model.enums.UnitsElectricPotential
makeElectricPotentialUnitXML(java.lang.String unit)
static ome.units.quantity.ElectricPotential
makeElectricPotentialXML(double d, java.lang.String unit)
static Frequency
makeFrequency(double d, ome.units.unit.Unit<ome.units.quantity.Frequency> unit)
static Frequency
makeFrequency(double d, UnitsFrequency unit)
static ome.xml.model.enums.UnitsFrequency
makeFrequencyUnitXML(java.lang.String unit)
static ome.units.quantity.Frequency
makeFrequencyXML(double d, java.lang.String unit)
static Length
makeLength(double d, ome.units.unit.Unit<ome.units.quantity.Length> unit)
static Length
makeLength(double d, UnitsLength unit)
static ome.xml.model.enums.UnitsLength
makeLengthUnitXML(java.lang.String unit)
static ome.units.quantity.Length
makeLengthXML(double d, java.lang.String unit)
static Power
makePower(double d, ome.units.unit.Unit<ome.units.quantity.Power> unit)
static Power
makePower(double d, UnitsPower unit)
static ome.xml.model.enums.UnitsPower
makePowerUnitXML(java.lang.String unit)
static ome.units.quantity.Power
makePowerXML(double d, java.lang.String unit)
static Pressure
makePressure(double d, ome.units.unit.Unit<ome.units.quantity.Pressure> unit)
static Pressure
makePressure(double d, UnitsPressure unit)
static ome.xml.model.enums.UnitsPressure
makePressureUnitXML(java.lang.String unit)
static ome.units.quantity.Pressure
makePressureXML(double d, java.lang.String unit)
static Temperature
makeTemperature(double d, ome.units.unit.Unit<ome.units.quantity.Temperature> unit)
static Temperature
makeTemperature(double d, UnitsTemperature unit)
static ome.xml.model.enums.UnitsTemperature
makeTemperatureUnitXML(java.lang.String unit)
static ome.units.quantity.Temperature
makeTemperatureXML(double d, java.lang.String unit)
static Time
makeTime(double d, ome.units.unit.Unit<ome.units.quantity.Time> unit)
static Time
makeTime(double d, UnitsTime unit)
static ome.xml.model.enums.UnitsTime
makeTimeUnitXML(java.lang.String unit)
static ome.units.quantity.Time
makeTimeXML(double d, java.lang.String unit)
static java.lang.String
xmlElectricPotentialEnumToOMERO(java.lang.String xml)
static java.lang.String
xmlElectricPotentialEnumToOMERO(ome.units.unit.Unit<ome.units.quantity.ElectricPotential> xml)
static java.lang.String
xmlFrequencyEnumToOMERO(java.lang.String xml)
static java.lang.String
xmlFrequencyEnumToOMERO(ome.units.unit.Unit<ome.units.quantity.Frequency> xml)
static java.lang.String
xmlLengthEnumToOMERO(java.lang.String xml)
static java.lang.String
xmlLengthEnumToOMERO(ome.units.unit.Unit<ome.units.quantity.Length> xml)
static java.lang.String
xmlPowerEnumToOMERO(java.lang.String xml)
static java.lang.String
xmlPowerEnumToOMERO(ome.units.unit.Unit<ome.units.quantity.Power> xml)
static java.lang.String
xmlPressureEnumToOMERO(java.lang.String xml)
static java.lang.String
xmlPressureEnumToOMERO(ome.units.unit.Unit<ome.units.quantity.Pressure> xml)
static java.lang.String
xmlTemperatureEnumToOMERO(java.lang.String xml)
static java.lang.String
xmlTemperatureEnumToOMERO(ome.units.unit.Unit<ome.units.quantity.Temperature> xml)
static java.lang.String
xmlTimeEnumToOMERO(java.lang.String xml)
static java.lang.String
xmlTimeEnumToOMERO(ome.units.unit.Unit<ome.units.quantity.Time> xml)
-
-
-
Field Detail
-
Plane_PositionX
public static UnitsLength Plane_PositionX
-
Plane_PositionZ
public static UnitsLength Plane_PositionZ
-
Plane_PositionY
public static UnitsLength Plane_PositionY
-
Plane_DeltaT
public static UnitsTime Plane_DeltaT
-
Plane_ExposureTime
public static UnitsTime Plane_ExposureTime
-
Shape_StrokeWidth
public static UnitsLength Shape_StrokeWidth
-
Shape_FontSize
public static UnitsLength Shape_FontSize
-
DetectorSettings_Voltage
public static UnitsElectricPotential DetectorSettings_Voltage
-
DetectorSettings_ReadOutRate
public static UnitsFrequency DetectorSettings_ReadOutRate
-
ImagingEnvironment_Temperature
public static UnitsTemperature ImagingEnvironment_Temperature
-
ImagingEnvironment_AirPressure
public static UnitsPressure ImagingEnvironment_AirPressure
-
LightSourceSettings_Wavelength
public static UnitsLength LightSourceSettings_Wavelength
-
Plate_WellOriginX
public static UnitsLength Plate_WellOriginX
-
Plate_WellOriginY
public static UnitsLength Plate_WellOriginY
-
Objective_WorkingDistance
public static UnitsLength Objective_WorkingDistance
-
Pixels_PhysicalSizeX
public static UnitsLength Pixels_PhysicalSizeX
-
Pixels_PhysicalSizeZ
public static UnitsLength Pixels_PhysicalSizeZ
-
Pixels_PhysicalSizeY
public static UnitsLength Pixels_PhysicalSizeY
-
Pixels_TimeIncrement
public static UnitsTime Pixels_TimeIncrement
-
StageLabel_Z
public static UnitsLength StageLabel_Z
-
StageLabel_Y
public static UnitsLength StageLabel_Y
-
StageLabel_X
public static UnitsLength StageLabel_X
-
LightSource_Power
public static UnitsPower LightSource_Power
-
Detector_Voltage
public static UnitsElectricPotential Detector_Voltage
-
WellSample_PositionX
public static UnitsLength WellSample_PositionX
-
WellSample_PositionY
public static UnitsLength WellSample_PositionY
-
Channel_EmissionWavelength
public static UnitsLength Channel_EmissionWavelength
-
Channel_PinholeSize
public static UnitsLength Channel_PinholeSize
-
Channel_ExcitationWavelength
public static UnitsLength Channel_ExcitationWavelength
-
TransmittanceRange_CutOutTolerance
public static UnitsLength TransmittanceRange_CutOutTolerance
-
TransmittanceRange_CutInTolerance
public static UnitsLength TransmittanceRange_CutInTolerance
-
TransmittanceRange_CutOut
public static UnitsLength TransmittanceRange_CutOut
-
TransmittanceRange_CutIn
public static UnitsLength TransmittanceRange_CutIn
-
Laser_RepetitionRate
public static UnitsFrequency Laser_RepetitionRate
-
Laser_Wavelength
public static UnitsLength Laser_Wavelength
-
-
Method Detail
-
makeElectricPotentialUnitXML
public static ome.xml.model.enums.UnitsElectricPotential makeElectricPotentialUnitXML(java.lang.String unit)
-
makeElectricPotentialXML
public static ome.units.quantity.ElectricPotential makeElectricPotentialXML(double d, java.lang.String unit)
-
makeElectricPotential
public static ElectricPotential makeElectricPotential(double d, ome.units.unit.Unit<ome.units.quantity.ElectricPotential> unit)
-
makeElectricPotential
public static ElectricPotential makeElectricPotential(double d, UnitsElectricPotential unit)
-
convertElectricPotential
public static ElectricPotential convertElectricPotential(ome.units.quantity.ElectricPotential value)
Convert a Bio-FormatsElectricPotential
to an OMERO ElectricPotential. A null will be returned if the input is null.
-
convertElectricPotential
public static ome.units.quantity.ElectricPotential convertElectricPotential(ElectricPotential t)
-
convertElectricPotential
public static ElectricPotential convertElectricPotential(ElectricPotential value, ome.units.unit.Unit<ome.units.quantity.ElectricPotential> ul) throws ome.model.units.BigResult
- Throws:
ome.model.units.BigResult
-
convertElectricPotentialXML
public static ElectricPotential convertElectricPotentialXML(ElectricPotential value, java.lang.String xml) throws ome.model.units.BigResult
- Throws:
ome.model.units.BigResult
-
xmlElectricPotentialEnumToOMERO
public static java.lang.String xmlElectricPotentialEnumToOMERO(ome.units.unit.Unit<ome.units.quantity.ElectricPotential> xml)
-
xmlElectricPotentialEnumToOMERO
public static java.lang.String xmlElectricPotentialEnumToOMERO(java.lang.String xml)
-
makeFrequencyUnitXML
public static ome.xml.model.enums.UnitsFrequency makeFrequencyUnitXML(java.lang.String unit)
-
makeFrequencyXML
public static ome.units.quantity.Frequency makeFrequencyXML(double d, java.lang.String unit)
-
makeFrequency
public static Frequency makeFrequency(double d, ome.units.unit.Unit<ome.units.quantity.Frequency> unit)
-
makeFrequency
public static Frequency makeFrequency(double d, UnitsFrequency unit)
-
convertFrequency
public static Frequency convertFrequency(ome.units.quantity.Frequency value)
Convert a Bio-FormatsFrequency
to an OMERO Frequency. A null will be returned if the input is null.
-
convertFrequency
public static ome.units.quantity.Frequency convertFrequency(Frequency t)
-
convertFrequency
public static Frequency convertFrequency(Frequency value, ome.units.unit.Unit<ome.units.quantity.Frequency> ul) throws ome.model.units.BigResult
- Throws:
ome.model.units.BigResult
-
convertFrequencyXML
public static Frequency convertFrequencyXML(Frequency value, java.lang.String xml) throws ome.model.units.BigResult
- Throws:
ome.model.units.BigResult
-
xmlFrequencyEnumToOMERO
public static java.lang.String xmlFrequencyEnumToOMERO(ome.units.unit.Unit<ome.units.quantity.Frequency> xml)
-
xmlFrequencyEnumToOMERO
public static java.lang.String xmlFrequencyEnumToOMERO(java.lang.String xml)
-
makeLengthUnitXML
public static ome.xml.model.enums.UnitsLength makeLengthUnitXML(java.lang.String unit)
-
makeLengthXML
public static ome.units.quantity.Length makeLengthXML(double d, java.lang.String unit)
-
makeLength
public static Length makeLength(double d, ome.units.unit.Unit<ome.units.quantity.Length> unit)
-
makeLength
public static Length makeLength(double d, UnitsLength unit)
-
convertLength
public static Length convertLength(ome.units.quantity.Length value)
Convert a Bio-FormatsLength
to an OMERO Length. A null will be returned if the input is null.
-
convertLength
public static ome.units.quantity.Length convertLength(Length t)
-
convertLength
public static Length convertLength(Length value, ome.units.unit.Unit<ome.units.quantity.Length> ul) throws ome.model.units.BigResult
- Throws:
ome.model.units.BigResult
-
convertLengthXML
public static Length convertLengthXML(Length value, java.lang.String xml) throws ome.model.units.BigResult
- Throws:
ome.model.units.BigResult
-
xmlLengthEnumToOMERO
public static java.lang.String xmlLengthEnumToOMERO(ome.units.unit.Unit<ome.units.quantity.Length> xml)
-
xmlLengthEnumToOMERO
public static java.lang.String xmlLengthEnumToOMERO(java.lang.String xml)
-
makePowerUnitXML
public static ome.xml.model.enums.UnitsPower makePowerUnitXML(java.lang.String unit)
-
makePowerXML
public static ome.units.quantity.Power makePowerXML(double d, java.lang.String unit)
-
makePower
public static Power makePower(double d, ome.units.unit.Unit<ome.units.quantity.Power> unit)
-
makePower
public static Power makePower(double d, UnitsPower unit)
-
convertPower
public static Power convertPower(ome.units.quantity.Power value)
Convert a Bio-FormatsPower
to an OMERO Power. A null will be returned if the input is null.
-
convertPower
public static ome.units.quantity.Power convertPower(Power t)
-
convertPower
public static Power convertPower(Power value, ome.units.unit.Unit<ome.units.quantity.Power> ul) throws ome.model.units.BigResult
- Throws:
ome.model.units.BigResult
-
convertPowerXML
public static Power convertPowerXML(Power value, java.lang.String xml) throws ome.model.units.BigResult
- Throws:
ome.model.units.BigResult
-
xmlPowerEnumToOMERO
public static java.lang.String xmlPowerEnumToOMERO(ome.units.unit.Unit<ome.units.quantity.Power> xml)
-
xmlPowerEnumToOMERO
public static java.lang.String xmlPowerEnumToOMERO(java.lang.String xml)
-
makePressureUnitXML
public static ome.xml.model.enums.UnitsPressure makePressureUnitXML(java.lang.String unit)
-
makePressureXML
public static ome.units.quantity.Pressure makePressureXML(double d, java.lang.String unit)
-
makePressure
public static Pressure makePressure(double d, ome.units.unit.Unit<ome.units.quantity.Pressure> unit)
-
makePressure
public static Pressure makePressure(double d, UnitsPressure unit)
-
convertPressure
public static Pressure convertPressure(ome.units.quantity.Pressure value)
Convert a Bio-FormatsPressure
to an OMERO Pressure. A null will be returned if the input is null.
-
convertPressure
public static ome.units.quantity.Pressure convertPressure(Pressure t)
-
convertPressure
public static Pressure convertPressure(Pressure value, ome.units.unit.Unit<ome.units.quantity.Pressure> ul) throws ome.model.units.BigResult
- Throws:
ome.model.units.BigResult
-
convertPressureXML
public static Pressure convertPressureXML(Pressure value, java.lang.String xml) throws ome.model.units.BigResult
- Throws:
ome.model.units.BigResult
-
xmlPressureEnumToOMERO
public static java.lang.String xmlPressureEnumToOMERO(ome.units.unit.Unit<ome.units.quantity.Pressure> xml)
-
xmlPressureEnumToOMERO
public static java.lang.String xmlPressureEnumToOMERO(java.lang.String xml)
-
makeTemperatureUnitXML
public static ome.xml.model.enums.UnitsTemperature makeTemperatureUnitXML(java.lang.String unit)
-
makeTemperatureXML
public static ome.units.quantity.Temperature makeTemperatureXML(double d, java.lang.String unit)
-
makeTemperature
public static Temperature makeTemperature(double d, ome.units.unit.Unit<ome.units.quantity.Temperature> unit)
-
makeTemperature
public static Temperature makeTemperature(double d, UnitsTemperature unit)
-
convertTemperature
public static Temperature convertTemperature(ome.units.quantity.Temperature value)
Convert a Bio-FormatsTemperature
to an OMERO Temperature. A null will be returned if the input is null.
-
convertTemperature
public static ome.units.quantity.Temperature convertTemperature(Temperature t)
-
convertTemperature
public static Temperature convertTemperature(Temperature value, ome.units.unit.Unit<ome.units.quantity.Temperature> ul) throws ome.model.units.BigResult
- Throws:
ome.model.units.BigResult
-
convertTemperatureXML
public static Temperature convertTemperatureXML(Temperature value, java.lang.String xml) throws ome.model.units.BigResult
- Throws:
ome.model.units.BigResult
-
xmlTemperatureEnumToOMERO
public static java.lang.String xmlTemperatureEnumToOMERO(ome.units.unit.Unit<ome.units.quantity.Temperature> xml)
-
xmlTemperatureEnumToOMERO
public static java.lang.String xmlTemperatureEnumToOMERO(java.lang.String xml)
-
makeTimeUnitXML
public static ome.xml.model.enums.UnitsTime makeTimeUnitXML(java.lang.String unit)
-
makeTimeXML
public static ome.units.quantity.Time makeTimeXML(double d, java.lang.String unit)
-
makeTime
public static Time makeTime(double d, ome.units.unit.Unit<ome.units.quantity.Time> unit)
-
convertTime
public static Time convertTime(ome.units.quantity.Time value)
Convert a Bio-FormatsTime
to an OMERO Time. A null will be returned if the input is null.
-
convertTime
public static ome.units.quantity.Time convertTime(Time t)
-
convertTime
public static Time convertTime(Time value, ome.units.unit.Unit<ome.units.quantity.Time> ul) throws ome.model.units.BigResult
- Throws:
ome.model.units.BigResult
-
convertTimeXML
public static Time convertTimeXML(Time value, java.lang.String xml) throws ome.model.units.BigResult
- Throws:
ome.model.units.BigResult
-
xmlTimeEnumToOMERO
public static java.lang.String xmlTimeEnumToOMERO(ome.units.unit.Unit<ome.units.quantity.Time> xml)
-
xmlTimeEnumToOMERO
public static java.lang.String xmlTimeEnumToOMERO(java.lang.String xml)
-
-