Comments (11)
It depends: what is the purpose of annotate
?
from unit-api.
To create an "annotated unit", but unlike alternate
, compound
(aka mix
) or transform
, annotate
wasn't in JSR 275 either: https://www.jscience.org/api/javax/measure/unit/Unit.html
Seems it is for http://ceur-ws.org/Vol-432/owled2008eu_submission_21.pdf or the "curly braces" in UCUM: http://unitsofmeasure.org/ucum.html It seems more specific than the others.
from unit-api.
Okay, I have read ยง6 curly braces section on UCUM page. Now how do we translate that in Java API? Can you post a javadoc describing the contract of such annotate
method? Is the only effect of that method is to modify the String
representation of the unit? Do we provide a method for fetching the annotation set by annotate
? What happen to the annotation in arithmetic expression? For example if A were annotated, is the annotation gone after A.multiply(B)
?
from unit-api.
@dautelle It seems annotate()
is very specific to the UCUM catalog, or did it have any more general purpose?
from unit-api.
Annotations can be used to be more specific about the unit, for exemple 15.0 Gal [Petroleum], mile[standard] different from a mile[US_survey], etc.
See Mapplesoft examples
from unit-api.
@dautelle Could you please raise your thumb here, as nobody really seems to care about it in the API?
The point about all these decision tickets is to determine if enough people think they are important enough to provide API methods. At the moment this one would fail, given the Apache inspired voting criteria this one fails to be relevant or "interesting" enough. #185 gained 4 +1 votes, so it'll pass. #103 has 2, so one is missing. All others failed meaning there's no action on them.
from unit-api.
Having read the discussion and related links, I believe annotations should better be provided in our API. That way, we will ease our users' way of working, in case they need more explanatory units. That said, +1 from my side.
from unit-api.
Great, thanks a lot. @unitsofmeasurement/experts, @unitsofmeasurement/contributors, please also chip in if you agree. While discussions about implementation details of a particular implementation (resulting of either annotate()
or mix()
, etc.) are certainly welcome, because we also have to finish the RI soon, they are not really subject of these questions which are simply "is it important and useful enough to be in the API?".
from unit-api.
Maybe we need to close this one as well, given that we closed most of the related ones today?
from unit-api.
I think it's to rarely used for the API.
from unit-api.
Cool! That drops the overall amount of open issues to an one-digit number again :-)
from unit-api.
Related Issues (20)
- Improve code coverage of ServiceProvider HOT 3
- Fix problem with maven-javadoc-plugin
- MR 1 Spec Review
- Could Quantity use a symbol, too? HOT 1
- Upgrade JDK to Java 11 or higher
- Replace Bintray/JCenter in API build settings
- Enable discovery of prefix classes via SPI HOT 1
- Improve the JavaDoc of UnitFormat
- Remove unnecessary OSGI imports
- Convert Quantity to most fitting Prefix HOT 7
- improve interoperability of Quantity with Hibernate JPA HOT 7
- Should not cache the ServiceProvider implementation HOT 8
- Incorporate the new SI Prefixes
- Upgrade CI JDK to Java 17 or higher
- Update module-info
- Replace tabulations by 4 spaces HOT 2
- Should we deprecate MetricPrefix.DEKA()? HOT 4
- Update Spec Document for MR2 HOT 5
- enum missing in javax.measure.MetricPrefix HOT 2
- Units can have non-integer Dimension HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from unit-api.