(yet simple) Text based editor to map JSON data with YARRRML (a human-readible form of RDF Mapping Language [RML]) to RDF. Demo available here.
The RML to YARRRML is based on YARRRML-Parser.
To apply the mappings on the data an RML Mapper service is required. We use the Node JavaScript library RocketRML for this.
docker-compose up install
Run installation first, then:
docker-compose up dev
Access app at http://localhost:1234
and RML mapping server at http://localhost:3000
To change default ports edit file .env
Run installation first, then
docker-compose up build
Will create files in ./dist/
The productive requires one server to deliver the HTML/Javascript app and a Node server for the RML mapper.
- Create build
- App: make content of
./dist/
public available - Server: start mapping server with Docker
docker-compose up server
or directly with Nodenode src/server.js
. To change default port (3000) edit file.env
.
See ./src/app.html
for usage example.
Usage as library:
new MadamsEditor({
// JSON DATA: url to a json ressource or JSON object as value
'data': {
'type': 'url' , // url|json
'value': './dist/example-data.json', // string|json
'name': '' // string (required for json)
},
// MAPPING: url to yaml (yarrrml) ressource, or yaml (yarrrml) as string
'mapping': {
'type': 'url' , // url|yaml
'value': './dist/example-mapping.yml', // string
'name': '' // string (required for yaml)
},
// url to RML mapper service
'rmlMapperUrl': 'http://localhost:3000/rmlmapper',
// callback method after run
run: function(mapping, result) { }
});