This is a Java library for nanopublications (see http://nanopub.net) based on RDF4J.
It implements the formal structure defined in the official nanopublication guidelines.
- Tobias Kuhn. nanopub-java: A Java Library for Nanopublications. In Proceedings of the 5th Workshop on Linked Science (LISC 2015). 2015.
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.46</version>
</dependency>
Alternatively, you might want to use one of the pre-built jar files.
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.
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 .
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).
- Tobias Kuhn (http://www.tkuhn.org)
nanopub-java is free software under the MIT License. See LICENSE.txt.
This is an incomplete (and outdated) list of software projects using this library:
- https://github.com/Nanopublication/nanopub-store-api
- https://github.com/Nanopublication/landmark-publication-tool
- https://github.com/ISA-tools/NanoMaton
- https://github.com/tkuhn/bel2nanopub
- https://github.com/tkuhn/nanobrowser
- https://github.com/tkuhn/nanolytics
- https://github.com/tkuhn/nanopub-validator
- https://github.com/tkuhn/nanopub-server
- https://github.com/tkuhn/bio2rdf2nanopub
- https://github.com/tkuhn/nanopub-monitor
- https://github.com/tkuhn/npop
- https://github.com/rajaram5/NanopublicationVisualization
- https://github.com/rajaram5/Nanopubviz
- https://github.com/wikipathways/nanopublications
- https://github.com/globalbioticinteractions/elton