Git Product home page Git Product logo

nanopub-java's Introduction

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:

nanopub-java's People

Contributors

tkuhn avatar dependabot[bot] avatar eelkevanderhorst avatar rajaram5 avatar raar1 avatar vemonet avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.