Hi there! First off, let me say I very much appreciate all the hard work that has gone into the JSR as well as the wonderful RI and SE codebases.
TL;DR is there a good guide on how to extend existing or define a new
SOU via the SPI? I haven't had a lot of luck finding one and was hoping
maybe it's just tucked back somewhere I haven't managed to uncover yet.
I am trying to leverage the SE codebase in a modeling+simulation application where I am standardizing a simulation on SI base units, yet want to allow users to enter simulation parameters in dimension-compatible units (e.g. filling in the blanks for Time, Mass, Length, Energy based on concepts from
http://www.ontobee.org/ontology/UO).
My first attempt was to extend the Units class, but that didn't appear to work as an empty Set<> came back from getUnits() and any calls to ServiceProvider.current().getSystemOfUnitsService().getAvailableSystemsOfUnits() doesn't show my new SOU as being available.
I've read the RI user guide, but it skims over the SPI layer and really doesn't have a lot of detail re how to define/extend a custom SOU beyond digging through the RI of UCUM codebase, which I can't make heads or tails out of how the custom SOU is getting registered (and looking at SE it also looks like several quantity factory and format classes are also defined and somehow hooked in).
Any help/links/guidance would be greatly appreciated!
-R