For those dealing with UOM conversion, this can be useful:
http://www.tripcom.org/ontologies/EDI/EDIFACT/CodeSets/UnitOfMeasureCodes.wsml
length:
"CMT" Centimeter
"KMT" Kilometer (EDIFICE code)
"MMT" Millimeter
"MTR" Meter
"FOT" Foot-UnitOfMeasure
"INH" inch
"YRD" Yard-UnitOfDistance
volume
"001" Barrel (205 litres, 45 gallons) (EAN Code)
"CLT" Centiliter
"CMQ" CubicCentimeter
"DMQ" Cubic decimetre
"FTQ" CubicFoot
"GLI" Gallon-Imperial
"INQ" CubicInch
"MLT" Millilitre
"MMQ" Cubic millimetre
"LTR" Liter
"MTQ" CubicMeter
Surface
"MTK" SquareMeter
weight
"GRM" Gram
"KGM" Kilogram
"LBR" Pound-UnitOfForce
"MGM" Milligram
"PND" Pound-UnitOfForce (EAN Code)
Showing posts with label UOM. Show all posts
Showing posts with label UOM. Show all posts
Monday, March 21, 2011
Wednesday, March 9, 2011
UOM Units Of Measure and Conversions in Java
some interesting facts on MAJOR disasters happened because of UOM / Conversion issues:
http://www.slideshare.net/keilw/eclipse-uomo
Here the Project's homepage
Here http://jscience.org/api/index.html?javax/measure/units/package-summary.html the javax.measure.units package
In doubt, I think I will implement a poor man's version of the framework:
Some cases which don't fit:
Size is composed by 3 values (len, wid, hei), which have the same UOM.
http://www.slideshare.net/keilw/eclipse-uomo
Here the Project's homepage
Here http://jscience.org/api/index.html?javax/measure/units/package-summary.html the javax.measure.units package
In doubt, I think I will implement a poor man's version of the framework:
enum UOM { KGM, CMT };
UOMValue {
UOM uom;
BigDecimal value;
UOMValue convertTo(UOM targetUOM);
}
and do a switch with hardcoded conversion values.Some cases which don't fit:
Size is composed by 3 values (len, wid, hei), which have the same UOM.
Labels:
UOM
Subscribe to:
Posts (Atom)