seralf / jQuery-Widget.js

A jQuery widget to query Triple Pattern Fragments interfaces

Home Page:http://client.linkeddatafragments.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Linked Data Fragments jQuery Widget

Try the Linked Data Fragments jQuery Widget online.

This jQuery widget is a browser-based user interface to the Linked Data Fragments client. It allows users to execute SPARQL queries over one or multiple datasets exposed through a Triple Pattern Fragments interface.

Using the code

  • Run npm install to fetch dependencies and build the browser version of the client code.
  • Place the files from this repository on a local Web server (for instance, by starting a tool such as https://github.com/ddfreyne/adsf in the root folder).
  • Open index.html in the browser through your Web server (typically http://localhost:3000/).
  • Edit datasources in settings.json and queries in the queries folder, and run queries-to-json to compile both of them in a single JSON file.
  • Run ./build-minified to generate a production version in the build folder.

How the browser client works

The original ldf-client library is written for the Node.js environment. The browserify library makes it compatible with browsers.

The file browser.js makes the Node.js library ldf-client available in global scope as ldf.
This script is compiled with its dependencies to deps/ldf-client-browser.js via npm run postinstall.

You can use the resulting ldf-client-browser.js in your browser applications; it is independent of the jQuery UI widget.

(Optional) Running in a Docker container

If you want to rapidly deploy this widget as a microservice, you can build a Docker container as follows:

$ docker build -t ldf-client-widget .

Next, configure your widget by creating a settings.json file in your working directory based on the example. Next, create a queries directory in which you should insert the queries that will be present by default in the widget, as is done here.

After that, you can run your newly created container in which settings.json and queries is mounted to the Docker container:

$ docker run -p 8080:8080 -it --rm -v $(pwd)/settings.json:/tmp/settings.json -v $(pwd)/queries:/tmp/queries ldf-client-widget

License

The Linked Data Fragments jQuery Widget is written by Ruben Verborgh.

This code is copyrighted by Multimedia Lab – iMinds – Ghent University and released under the MIT license.

About

A jQuery widget to query Triple Pattern Fragments interfaces

http://client.linkeddatafragments.org/

License:MIT License


Languages

Language:JavaScript 62.6%Language:CSS 29.1%Language:HTML 8.3%