Skip to content

OpenSensingCity/jena-ucum

jena-3.6.0-ucum
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code
This branch is 14 commits ahead, 3904 commits behind apache:main.

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Jena with support for UCUM README

This project adds a UCUM Datatype in Apache Jena, along with different utility SPARQL functions.

A valid UCUM literal consists of the concatenation of:

Any unit that is valid for UCUM is valid for Jena-UCUM!

Examples of valid UCUM literals:

@Prefix cdt: <https://w3id.org/cdt/>. 

"1 [ft_i]"^^cdt:ucum -- foot, International customary units

"1.0 [ft_br]"^^cdt:ucum -- foot, British Imperial lengths 

"10e-1 um"^^cdt:ucum -- micrometer

"-2.47e-4 L/(min.m2)"^^cdt:ucum -- liter per minute and square meter

"0.7 km/s"^^cdt:ucum --> kilometer per second

"10.54 %"^^cdt:ucum --> percents

"37.5 Cel"^^cdt:ucum --> degree Celsius

"2.45e-1 [in_i'Hg]"^^cdt:ucum , or equivalently, "2.45e-1 m[Hg].[in_i]/m"^^cdt:ucum --> inch of mercury column   

"1.5647e6 {rbc} "^^cdt:ucum -- red blood cell count

For the compete specification of UCUM code system:

http://unitsofmeasure.org/ucum.html

Available RDF Datatype

Available SPARQL function

Overloading native SPARQL operators in Apache Jena

You can use native SPARQL operators (=, <, etc.) to compare UCUM literals.

Instructions to use with Apache Jena

To use, follow these steps:

First, clone the repository and install project locally (requires Git and Maven)

git clone git@github.com:OpenSensingCity/jena-ucum.git
cd jena-ucum
mvn install

Then, add the following to your Maven project's pom.xml:

   <properties>
        <!-- the version of jena you are using (mini 3.x) -->
        <jena.version>3.6.0-ucum</jena.version> 
    </properties>

    <dependencies>
        <dependency>
            <groupId>org.apache.jena</groupId>
            <artifactId>jena-arq</artifactId>
            <version>3.6.0-ucum</version>
        </dependency>
    </dependencies>

Thanks!

About

Apache Jena with support for UCUM datatype

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Java 93.6%
  • JavaScript 2.9%
  • Ruby 1.2%
  • Shell 0.8%
  • HTML 0.4%
  • XSLT 0.4%
  • Other 0.7%