Socket
Socket
Sign inDemoInstall

@rmlio/rmlmapper-java-wrapper

Package Overview
Dependencies
28
Maintainers
3
Versions
18
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @rmlio/rmlmapper-java-wrapper

A JavaScript wrapper around the Java RMLMapper.


Version published
Weekly downloads
14
increased by16.67%
Maintainers
3
Created
Weekly downloads
 

Changelog

Source

[2.1.1] - 2023-09-18

Fixed

  • Updated dependencies. The update of fs-extra fixes a bug when removing a file or directory with rm(path, options).

Readme

Source

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.

Keywords

FAQs

Last updated on 18 Sep 2023

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc