volt

0.2.0 • Public • Published

VOLT

This node.js module is an implementation of the Volt Ontoloy and Linked-data Technology.

What this module is

This module is for the low-level processing of SPARQL queries, compiling procedures to javascript, evaluating procedures in memory, etc. and compiling .volt source files to their serialized .ttl form.

Demo

If you simply want to connect VOLT to your local triple store and execute SPARQL queries over HTTP, go check out volt-demo.js which launches an HTTP proxy (via express) to interact with VOLT. The demo also ships as a webapp that includes a SPARQL interface for submitting queries directly to the VOLT proxy. Go check it out if you are interested in using VOLT as a proxy.

Install

$ npm install volt

Usage

const volt = require('volt');
const postgis = require('volt-plugin-postgis');
 
// create volt instance
let volt_query = volt({
    plugins: {
        // load the postgis plugin, passing it a postgres connection string to a db
        [postgis.namespace]: postgis.create({
            connection: 'postgres://blake@localhost/volt',
        }),
    },
});
 
// issue sparql query
volt_query('ask {:A :b :C}', (h_sparql_results) => {
    // ...
});
 
// use the library to compile .volt => .ttl
let h_compiled_procedures = volt.compile({
    code: fs.readFileSync('source.volt'),
});

Development

$ gulp develop

Package Sidebar

Install

npm i volt

Weekly Downloads

0

Version

0.2.0

License

ISC

Last publish

Collaborators

  • blake.regalia