JavaScript wrapper for Java RMLMapper
This is a JavaScript library offering a wrapper around the Java RMLMapper.
Requirements
- Node.js
- Java, used to run the RMLMapper
- Jar of the RMLMapper
Usage
const RMLMapperWrapper = require('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, false, true);
License
This code is copyrighted by Ghent University – imec and released under the MIT license.