Package ome.model.units
Class Temperature
- java.lang.Object
-
- ome.model.units.Temperature
-
- All Implemented Interfaces:
java.io.Serializable
,Primitive
,Unit
,Filterable
@Embeddable public class Temperature extends java.lang.Object implements java.io.Serializable, Filterable, Unit
class storing both a Temperature and a unit for that Temperature (e.g. m, in, ly, etc.) encapsulated in aUnitsTemperature
instance. As also described in the remoting definition (.ice) for Temperature, this is an embedded class meaning that the columns here do not appear in their own table but exist directly on the containing object. Like Details and Permissions, instances do not contain long identifiers and cannot be persisted on their own.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description Temperature()
Deprecated.Temperature(double d, java.lang.String u)
Temperature(double d, UnitsTemperature u)
Temperature(double d, ome.units.unit.Unit<ome.units.quantity.Temperature> unit)
Temperature(ome.units.quantity.Temperature value)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
acceptFilter(Filter filter)
static ome.units.quantity.Temperature
convertTemperature(Temperature t)
FIXME: this should likely take a default so that locations which don't want an exception can have log.warn("Using new PositiveFloat(1.0)!", e); return new PositiveFloat(1.0); or similar.static Temperature
convertTemperature(Temperature value, java.lang.String target)
static Temperature
convertTemperature(Temperature value, ome.units.unit.Unit<ome.units.quantity.Temperature> ul)
boolean
equals(java.lang.Object obj)
UnitsTemperature
getUnit()
Many-to-one field ome.model.units.Temperature.unit (ome.model.enums.UnitsTemperature).double
getValue()
value of this unit-field.int
hashCode()
static ome.xml.model.enums.UnitsTemperature
makeTemperatureUnitXML(java.lang.String unit)
static ome.units.quantity.Temperature
makeTemperatureXML(double d, java.lang.String unit)
void
setUnit(UnitsTemperature unit)
void
setValue(double value)
java.lang.String
toString()
-
-
-
Field Detail
-
VALUE
public static final java.lang.String VALUE
- See Also:
- Constant Field Values
-
UNIT
public static final java.lang.String UNIT
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
Temperature
@Deprecated public Temperature()
Deprecated.no-arg constructor to keep Hibernate happy.
-
Temperature
public Temperature(double d, java.lang.String u)
-
Temperature
public Temperature(double d, UnitsTemperature u)
-
Temperature
public Temperature(double d, ome.units.unit.Unit<ome.units.quantity.Temperature> unit)
-
Temperature
public Temperature(ome.units.quantity.Temperature value)
-
-
Method Detail
-
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)
-
convertTemperature
public static ome.units.quantity.Temperature convertTemperature(Temperature t)
FIXME: this should likely take a default so that locations which don't want an exception can have log.warn("Using new PositiveFloat(1.0)!", e); return new PositiveFloat(1.0); or similar.
-
convertTemperature
public static Temperature convertTemperature(Temperature value, ome.units.unit.Unit<ome.units.quantity.Temperature> ul)
-
convertTemperature
public static Temperature convertTemperature(Temperature value, java.lang.String target)
-
getValue
public double getValue()
value of this unit-field. It will be persisted to a column with the same name as the containing field. For example, imagingEnvironment.getTemperature() which is of typeTemperature
will be stored in a column "imagingEnvironmenttemperature".
-
getUnit
public UnitsTemperature getUnit()
Many-to-one field ome.model.units.Temperature.unit (ome.model.enums.UnitsTemperature). These values are stored in a column suffixed by "Unit". Whereasvalue
for physicalSizeX will be stored as "imagingEnvironment.temperature", the unit enum will be stored as "imagingEnvironment.temperatureUnit".
-
setUnit
public void setUnit(UnitsTemperature unit)
-
acceptFilter
public boolean acceptFilter(Filter filter)
- Specified by:
acceptFilter
in interfaceFilterable
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
-