Skip to content

A simple web server enabling resolving RDF URIs based on data in a RDF HDT file, or a SPARQL endpoint

License

Notifications You must be signed in to change notification settings

pharmbio/urisolve

Repository files navigation

urisolve

A simple web server that resolves RDF URIs and returns RDF with any triples connected to the URI in question.

Screenshot

Picture above: A screenshot showing urisolve in action, running on MiniShift.

Installation

Using Docker

(Assumes that you have installed docker and the docker service is running).

  • Pull the docker image
    docker pull farmbio/urisolve
  • Start the example service, based on the example dataset with data about 10 compounds
    docker run -p 8080:8080 -it --rm farmbio/urisolve
  • Access the service with the example data in your browser at http://localhost:8080/cplogd/Compound1

Build from source

For now, building from source is the only available option.

  1. Install Go

  2. Then run this command:

    go get github.com/pharmbio/urisolve

Usage

The below examples assume, for demonstratory purposes, that you are running urisolve on a host that has the domain example.org pointing to it, and you want to resolve URI:s starting with example.org, which are available in your data source (be that a SPARQL endpoint or an HDT file).

With SPARQL endpoint as data source

Given that your preferred data source is a SPARQL endpoint with URL endpoint-example.org, you could run it like this (sudo might be needed in to bind to port 80, but typically not required if you use a port above 1024):

urisolve \
    -srctype sparql \
    -endpoint http://endpoint-example.org \
    -urihost http://example.org \
    -host example.org \
    -port 8080

With HDT file as data source

If, instead of a SPARQL endpoint, you want to use an (RDF) HDT file as a data source (this ia an increasingly interesting option, as the tooling around HDT matures), you can do it like this (note that this requires the C++ version of HDT tools installed):

urisolve \
    -srctype hdt \
    -hdtfile example_dataset.hdt \
    -urihost http://example.org \
    -host example.org \
    -port 8080

More options

To view the options available, run:

urisolve -h

Acknowledgements

This tool makes use of (either directly or indirectly) the following dependencies:

About

A simple web server enabling resolving RDF URIs based on data in a RDF HDT file, or a SPARQL endpoint

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published