https://github.com/egonw/jqudt
Java library for working with the QUDT ontology and data using it.
https://github.com/egonw/jqudt
Last synced: 8 months ago
JSON representation
Java library for working with the QUDT ontology and data using it.
- Host: GitHub
- URL: https://github.com/egonw/jqudt
- Owner: egonw
- License: other
- Created: 2012-05-16T18:51:31.000Z (over 13 years ago)
- Default Branch: master
- Last Pushed: 2023-12-02T16:05:03.000Z (almost 2 years ago)
- Last Synced: 2025-03-24T12:56:18.050Z (8 months ago)
- Language: Java
- Size: 1.95 MB
- Stars: 14
- Watchers: 5
- Forks: 8
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- Authors: AUTHORS
Awesome Lists containing this project
- awesome-semantic-web - jqudt - Java library for working with the QUDT ontology and data using it. (Programming / Java)
- awesome-semantic-web - jqudt - Java library for working with the QUDT ontology and data using it. (Misc / BBedit)
README
[](https://doi.org/10.5281/zenodo.3883588)
[](https://travis-ci.org/egonw/jqudt)
[](https://search.maven.org/search?q=g:%22com.github.egonw%22%20AND%20a:%22jqudt%22)
Introduction
============
Java Library to deal with QUDT units and conversions between them.
QUDT is "Quantities, Units, Dimensions and Data Types in OWL and XML"
http://www.qudt.org/
QUDT is a CC-SA-BY project by NASA Ames Research Center and TopQuadrant, Inc.
License of this Java library: new BSD
Installation
============
Maven:
```xml
com.github.egonw
jqudt
1.4.0
```
Groovy:
```groovy
@Grab(group='com.github.egonw', module='jqudt', version='1.4.0')
```
Quick demo
==========
Keep in mind, that the below conversions are purely derived from the information
defined in the QUDT ontology, taking advantage from the fact that the have the
same unit type, qudt:MolarConcentrationUnit and qudt:TemperatureUnit respectively.
Source:
```java
Quantity obs = new Quantity(0.1, ConcentrationUnit.MICROMOLAR);
System.out.println(obs + " = " + obs.convertTo(ConcentrationUnit.NANOMOLAR));
Quantity temp = new Quantity(20, TemperatureUnit.CELSIUS);
System.out.println(temp + " = " + temp.convertTo(TemperatureUnit.KELVIN));
```
Output
```
0.1 μM = 100.00000000000001 nM
20.0 C = 293.0 K
```