Use Advanced Search to search the entire archive.
[jsr363-experts] Pluggable (Modular) Unit Systems
- From: Werner Keil <
>
- To: "
" <
>
- Subject: [jsr363-experts] Pluggable (Modular) Unit Systems
- Date: Tue, 9 Jun 2015 12:37:14 +0200
Dear Experts,
While trying to reduce and align the number of quantities in the API with
established definitions, those we used to carry in the "quantity" package
need to go to another place(s)
Please have a look at this JIRA task
https://java.net/jira/browse/UNITSOFMEASUREMENT-121
Since SI and other systems or catalogues like oBIX, UCUM, etc. need more
quantities, at least where compile-time type-safety is required (especially
UCUM or others may also retrieve units and quantities from files like
ucum-essence.xml, there validation only happens at runtime) they shall be
defined in additional "quantity" modules for either SI or other systems.
Major challenges are
- Trying to get implementation independent (see
https://java.net/jira/browse/UNITSOFMEASUREMENT-98 the idea of having
an "SI" class in the API may not be a perfect solution any more, since
"Full SI" will require additional quantities, but trying to use the SPI
similar to say JSR 354 is a proper goal if the SI class and module should
be independent of the underlying implementation
- Formatting
- For RI/Java ME there are some issues to solve especially few
Reflection pieces left related to SymbolMap and accurate
formatting/parsing
- For SE all formatting is so far based on Java ResourceBundles, even
if locale should not matter (e.g. for UCUM) The problem is, traditional
Resource Bundles backed by Properties files can only handle a single
properties file each. As soon as you try say adding "message.properties"
with new definitions for a unit system like SI, UCUM or others, this
overwrites the old formats. We also require some SPI that allows adding
formats for a new unit system / source.
Please have a look if you're able to help with some of that. Not everything
is in scope of the actual JSR, that sort of makes it easier, because non EG
members could help with modules like "si-units" or "uom-systems". We'll try
to advertise this at upcoming Hackathons or -garten events between next
week and JavaOne, too.
Regards,
Werner