Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

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

README.md

nanopub-java

This is a Java library for nanopublications (see http://nanopub.org) based on RDF4J.

It implements the formal structure defined in the official nanopublication guidelines.

Publication

Usage as Java Library

The easiest way to use this library in your project is to let Maven download it from The Central Repository. Just include the following lines in your pom.xml file:

<dependency>
  <groupId>org.nanopub</groupId>
  <artifactId>nanopub</artifactId>
  <version>1.30</version>
</dependency>

Alternatively, you might want to use one of the pre-built jar files.

Usage on Unix Command-Line

To use this library on the command line, just download the np script. Make sure it is executable and then you can invoke it with ./np, for example:

./np check nanopubfile.trig

This automatically downloads the latest release as a jar file on the first run. You can also directly use the prebuilt jar files:

java -jar nanopub-1.30-jar-with-dependencies.jar check nanopubfile.trig

Note: For Mac users, before running np ensure that the GNU version of curl is installed (not the default BSD versions), and are the ones being used when the curl command is invoked.

Usage with Docker

You can use this image from DockerHub.

Sign a nanopublication (nanopub.trig file in current dir here):

docker run -it --rm -v ~/.nanopub:/root/.nanopub -v $(pwd):/data umids/nanopub-java sign /data/nanopub.trig

Publish a signed nanopublication:

docker run -it --rm -v ~/.nanopub:/root/.nanopub -v $(pwd):/data umids/nanopub-java publish /data/signed.nanopub.trig

Build the Docker image:

docker build -t umids/nanopub-java .

Compilation

Maven has to be installed to compile the library:

mvn clean package

The library features can then be accessed by calling scripts/run.sh (with the same commands as for the np script above, but using the locally compiled code and not the jar file).

Developers

License

nanopub-java is free software under the MIT License. See LICENSE.txt.

Usage Tracking

This is an incomplete (and outdated) list of software projects using this library:

About

Java library for nanopublications based on RDF4J

Resources

License

Languages

You can’t perform that action at this time.