Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

RMLio/rmlmapper-java-wrapper-js

Open more actions menu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

82 Commits
82 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

JavaScript wrapper for Java RMLMapper

This is a JavaScript library offering a wrapper around the Java RMLMapper.

Requirements

  • Node.js
  • Java VM
  • Jar of the RMLMapper, which you can download via npm run download:rmlmapper.

Usage

const RMLMapperWrapper = require('@rmlio/rmlmapper-java-wrapper');
const fs = require('fs');

const rmlmapperPath = './rmlmapper.jar';
const tempFolderPath = './tmp';

const wrapper = new RMLMapperWrapper(rmlmapperPath, tempFolderPath, true);
const rml = fs.readFileSync('./test/tc01/mapping.ttl', 'utf-8');
const sources = {
  'student.csv': fs.readFileSync('./test/tc01/student.csv', 'utf-8')
};

const result = await wrapper.execute(rml, {sources, generateMetadata: false, serialization: 'turtle'});

Note that you can also provide an array of quads to execute instead of a string with RDF. An example can be found in the tests.

License

This code is copyrighted by Ghent University – imec and released under the MIT license.

About

A JavaScript wrapper for the Java RMLMapper.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Morty Proxy This is a proxified and sanitized view of the page, visit original site.