Class 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 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_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
      • LightSource_Power

        public static UnitsPower LightSource_Power
      • 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
    • Constructor Detail

      • UnitsFactory

        public UnitsFactory()
    • 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)
      • convertElectricPotential

        public static ElectricPotential convertElectricPotential​(ome.units.quantity.ElectricPotential value)
        Convert a Bio-Formats ElectricPotential 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)
      • convertFrequency

        public static Frequency convertFrequency​(ome.units.quantity.Frequency value)
        Convert a Bio-Formats Frequency 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)
      • convertLength

        public static Length convertLength​(ome.units.quantity.Length value)
        Convert a Bio-Formats Length 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-Formats Power 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)
      • convertPressure

        public static Pressure convertPressure​(ome.units.quantity.Pressure value)
        Convert a Bio-Formats Pressure 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)
      • convertTemperature

        public static Temperature convertTemperature​(ome.units.quantity.Temperature value)
        Convert a Bio-Formats Temperature 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)
      • makeTime

        public static Time makeTime​(double d,
                                    UnitsTime unit)
      • convertTime

        public static Time convertTime​(ome.units.quantity.Time value)
        Convert a Bio-Formats Time 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)