Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@rmlio/yarrrml-parser

Package Overview
Dependencies
Maintainers
3
Versions
49
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@rmlio/yarrrml-parser - npm Package Compare versions

Comparing version 1.6.0 to 1.6.1

test/multiple-sources-with-linked-mappings/mapping.rml.ttl

0

.github/ISSUE_TEMPLATE/bug_report.md

@@ -0,0 +0,0 @@ ---

@@ -0,0 +0,0 @@ #!/usr/bin/env node

@@ -0,0 +0,0 @@ #!/usr/bin/env node

@@ -10,2 +10,9 @@ # Changelog

## [1.6.1] - 2023-09-18
### Fixed
- Mapping with multiple sources linked to another mapping with multiple sources only resulted in half of
Referencing Objects Maps.
- Override `rmlt` and `comp` namespaces.
## [1.6.0] - 2023-08-22

@@ -328,2 +335,3 @@

[1.6.1]: https://github.com/RMLio/yarrrml-parser/compare/v1.6.0...v1.6.1
[1.6.0]: https://github.com/RMLio/yarrrml-parser/compare/v1.5.4...v1.6.0

@@ -330,0 +338,0 @@ [1.5.4]: https://github.com/RMLio/yarrrml-parser/compare/v1.5.3...v1.5.4

145

lib/abstract-generator.js

@@ -139,2 +139,3 @@ /**

generateMapping(tmSubject, mapping, mappingName, sourceSubject, targetsIRIMap) {
this.targetsIRIMap = targetsIRIMap;
this.quads.push(quad(

@@ -191,3 +192,3 @@ tmSubject,

mapping.graphs.forEach(graph => {
this.generateGraphMap(smSubject, graph, sourceSubject, targetsIRIMap);
this.generateGraphMap(smSubject, graph, sourceSubject);
});

@@ -201,3 +202,3 @@ }

namedNode(namespaces.rml + 'logicalTarget'),
targetsIRIMap[target]
this.targetsIRIMap[target]
));

@@ -290,3 +291,3 @@ });

namedNode(namespaces.rml + 'logicalTarget'),
targetsIRIMap[target]
this.targetsIRIMap[target]
));

@@ -298,32 +299,34 @@ });

po.objects.forEach(o => {
const omSubject = namedNode(this.baseIRI + this.getUniqueID('om'));
if (o.mapping) {
// We are dealing with a Parent Triples Map.
this.saveReferencingObjectMapDetails(mappingName, pomSubject, o);
} else {
const omSubject = namedNode(this.baseIRI + this.getUniqueID('om'));
this.quads.push(quad(
pomSubject,
namedNode(namespaces.rr + 'objectMap'),
omSubject
));
this.quads.push(quad(
pomSubject,
namedNode(namespaces.rr + 'objectMap'),
omSubject
));
if (o.function) {
if (isPredicateRDFTYPE) {
o.type = 'iri';
if (o.function) {
if (isPredicateRDFTYPE) {
o.type = 'iri';
}
this.generateFunctionTermMap(omSubject, o, sourceSubject, 'Literal');
} else {
this.generateNormalObjectMap(omSubject, o);
}
this.generateFunctionTermMap(omSubject, o, sourceSubject, 'Literal');
} else if (o.mapping) {
//we are dealing with a parenttriplesmap
this.saveReferencingObjectMapDetails(mappingName, omSubject, o);
} else {
this.generateNormalObjectMap(omSubject, o, targetsIRIMap);
if (o.targets) {
o.targets.forEach(target => {
this.quads.push(quad(
omSubject,
namedNode(namespaces.rml + 'logicalTarget'),
this.targetsIRIMap[target]
));
});
}
}
if (o.targets) {
o.targets.forEach(target => {
this.quads.push(quad(
omSubject,
namedNode(namespaces.rml + 'logicalTarget'),
targetsIRIMap[target]
));
});
}
});

@@ -333,3 +336,3 @@

po.graphs.forEach(graph => {
this.generateGraphMap(pomSubject, graph, sourceSubject, targetsIRIMap);
this.generateGraphMap(pomSubject, graph, sourceSubject);
});

@@ -341,3 +344,3 @@ }

generateNormalObjectMap(omSubject, o, targetsIRIMap) {
generateNormalObjectMap(omSubject, o) {
let isIRI = false;

@@ -380,3 +383,3 @@ this.quads.push(quad(

this.processDatatypeAndLanguageOfObject(o, omSubject, targetsIRIMap);
this.processDatatypeAndLanguageOfObject(o, omSubject);
}

@@ -389,3 +392,3 @@

allDetails.forEach(details => {
this.generateReferencingObjectMap(details.om, details.o);
this.generateReferencingObjectMap(details.pom, details.o);
});

@@ -395,20 +398,42 @@ });

generateReferencingObjectMap(omSubject, o) {
this.quads.push(quad(
omSubject,
namedNode(namespaces.rdf + 'type'),
namedNode(namespaces.rr + 'ObjectMap')
));
generateReferencingObjectMap(pomSubject, o) {
const objectMappings = this.mappingsAndIRIs[o.mapping];
this.quads.push(quad(
omSubject,
namedNode(namespaces.rr + 'parentTriplesMap'),
this.mappingsAndIRIs[o.mapping][0]
));
objectMappings.forEach(objectMappingIri => {
const omSubject = namedNode(this.baseIRI + this.getUniqueID('om'));
if (o.conditions) {
o.conditions.forEach(condition => {
this.generateCondition(condition, omSubject);
});
}
this.quads.push(quad(
pomSubject,
namedNode(namespaces.rr + 'objectMap'),
omSubject
));
this.quads.push(quad(
omSubject,
namedNode(namespaces.rdf + 'type'),
namedNode(namespaces.rr + 'ObjectMap')
));
this.quads.push(quad(
omSubject,
namedNode(namespaces.rr + 'parentTriplesMap'),
objectMappingIri
));
if (o.conditions) {
o.conditions.forEach(condition => {
this.generateCondition(condition, omSubject);
});
}
if (o.targets) {
o.targets.forEach(target => {
this.quads.push(quad(
omSubject,
namedNode(namespaces.rml + 'logicalTarget'),
this.targetsIRIMap[target]
));
});
}
});
}

@@ -442,3 +467,9 @@

saveReferencingObjectMapDetails(mappingName, om, o) {
/**
* Save the details of referencing object map to generate later.
* @param mappingName - The mapping that is the subject of the referencing object map.
* @param pom - The IRI of the predicate object map.
* @param o - The YARRRML object of the referencing object map.
*/
saveReferencingObjectMapDetails(mappingName, pom, o) {
if (!this.referencingObjectMapDetails[mappingName]) {

@@ -449,7 +480,7 @@ this.referencingObjectMapDetails[mappingName] = [];

this.referencingObjectMapDetails[mappingName].push({
om, o
pom, o
});
}
generateFunctionTermMap(omSubject, o, sourceSubject, termType, targetsIRIMap) {
generateFunctionTermMap(omSubject, o, sourceSubject, termType) {
if (o.function === 'equal') {

@@ -479,3 +510,3 @@ this.convertEqualToIDLabEqual(o);

this.processDatatypeAndLanguageOfObject(o, omSubject, targetsIRIMap);
this.processDatatypeAndLanguageOfObject(o, omSubject);

@@ -611,3 +642,3 @@ const fnSubject = namedNode(this.baseIRI + this.getUniqueID('fn'));

} else if (pm.from === 'function') {
this.generateFunctionTermMap(omSubject, pm.value, sourceSubject, targetsIRIMap);
this.generateFunctionTermMap(omSubject, pm.value, sourceSubject);
} else {

@@ -634,3 +665,3 @@ const parentTermMapSubject = namedNode(this.baseIRI + this.getUniqueID('ptm'));

generateGraphMap(subject, graph, sourceSubject, targetsIRIMap) {
generateGraphMap(subject, graph, sourceSubject) {
const graphMapSubject = namedNode(this.baseIRI + this.getUniqueID('gm'));

@@ -676,3 +707,3 @@

namedNode(namespaces.rml + 'logicalTarget'),
targetsIRIMap[target]
this.targetsIRIMap[target]
));

@@ -953,3 +984,3 @@ });

processDatatypeAndLanguageOfObject(o, omSubject, targetsIRIMap) {
processDatatypeAndLanguageOfObject(o, omSubject) {
this.removeUnusedDatatypes(o);

@@ -976,3 +1007,3 @@

namedNode(namespaces.rml + 'logicalTarget'),
targetsIRIMap[target]
this.targetsIRIMap[target]
));

@@ -979,0 +1010,0 @@ });

@@ -0,0 +0,0 @@ /**

@@ -0,0 +0,0 @@ /**

@@ -0,0 +0,0 @@ {

@@ -0,0 +0,0 @@ {

@@ -0,0 +0,0 @@ const JSLogger = require('js-logger');

@@ -5,4 +5,6 @@ // initialize (common) prefixes and namespaces from prefix.cc

const _namespaces = require('prefix-ns').asMap();
_namespaces['comp'] = 'http://semweb.mmlab.be/ns/rml-compression#';
_namespaces['idlab-fn'] = 'http://example.com/idlab/function/';
_namespaces['rml'] = 'http://semweb.mmlab.be/ns/rml#'; // this one is the only official one for now, but prefix.cc returns the wrong one.
_namespaces['rmlt'] = 'http://semweb.mmlab.be/ns/rml-target#';
_namespaces['dc'] = 'http://purl.org/dc/terms/';

@@ -9,0 +11,0 @@ _namespaces['ql'] = 'http://semweb.mmlab.be/ns/ql#';

@@ -0,0 +0,0 @@ const prefixes = {

@@ -0,0 +0,0 @@ /**

@@ -0,0 +0,0 @@ /**

@@ -0,0 +0,0 @@ {

@@ -0,0 +0,0 @@ /**

@@ -0,0 +0,0 @@ /**

@@ -21,3 +21,3 @@ /**

doTestCase('spec/graphs-all-triples', options);
});

@@ -345,2 +345,6 @@

it('multiple sources with linked mappings', function (done) {
work('multiple-sources-with-linked-mappings/mapping.yarrrml', 'multiple-sources-with-linked-mappings/mapping.rml.ttl', done, {includeMetadata: false});
});
it('works when generating a constant iri', function (done) {

@@ -347,0 +351,0 @@ work('namednode/mapping.yarrrml.yml', 'namednode/mapping.rml.ttl', done, {includeMetadata: false});

@@ -0,0 +0,0 @@ const assert = require('assert');

@@ -0,0 +0,0 @@ const { canonicalize } = require("./tools");

@@ -0,0 +0,0 @@ /**

@@ -0,0 +0,0 @@ /**

@@ -0,0 +0,0 @@ /**

{
"name": "@rmlio/yarrrml-parser",
"version": "1.6.0",
"version": "1.6.1",
"description": "Parse YARRRML descriptions into RML RDF statements",

@@ -17,3 +17,3 @@ "main": "lib/yarrrml2rml.js",

"contributors": [
"Pieter Heyvaert <pheyvaer.heyvaert@ugent.be>"
"Pieter Heyvaert (https://pieterheyvaert.com/)"
],

@@ -20,0 +20,0 @@ "license": "MIT",

@@ -0,0 +0,0 @@ # YARRRML Parser

@@ -0,0 +0,0 @@ # Releases

@@ -0,0 +0,0 @@ const glob = require('glob');

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc