Apache Jena with support for UCUM datatype
Clone or download
Pull request Compare This branch is 12 commits ahead, 748 commits behind apache:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
apache-jena-libs
apache-jena-osgi
apache-jena
jena-arq
jena-base
jena-cmds
jena-core
jena-csv
jena-db
jena-elephas
jena-examples
jena-extras
jena-fuseki1
jena-fuseki2
jena-integration-tests
jena-iri
jena-jdbc
jena-maven-tools
jena-permissions
jena-rdfconnection
jena-sdb
jena-shaded-guava
jena-spatial
jena-tdb
jena-text-es
jena-text
.gitattributes
.gitignore
.travis.yml
BUILD.md
CONTRIBUTING.md
LICENSE
NOTICE
README.md
pom.xml

README.md

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: <http://w3id.org/lindt/custom_datatypes#>. 

"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!