lib/normalize-rml.js
function writeNormalizeRml(store, writer) {
  normalizeRml(store, function () {
    let parsedBlankSubjects = {};
    writeBlanks(store, parsedBlankSubjects);
    let quads = store.getQuads();
    quads.forEach(function (quad) {
      if (parsedBlankSubjects[quad.subject]) {
        return;
      }
      if (parsedBlankSubjects[quad.object]) {
        writer.addQuad(quad.subject, quad.predicate, writer.blank(parsedBlankSubjects[quad.object]));
        return;
      }
      writer.addTriple(quad);
    });
  });
}
function writeNormalizeRml(store, writer) {
  normalizeRml(store, function () {
    let parsedBlankSubjects = {};
    writeBlanks(store, parsedBlankSubjects);
    let quads = store.getQuads();
    quads.forEach(function (quad) {
      if (parsedBlankSubjects[quad.subject]) {
        return;
      }
      if (parsedBlankSubjects[quad.object]) {
        writer.addQuad(quad.subject, quad.predicate, writer.blank(parsedBlankSubjects[quad.object]));
        return;
      }
      writer.addTriple(quad);
    });
  });
}
function writeNormalizeRml ( store , writer ) { normalizeRml ( store , function ( ) { let parsedBlankSubjects = { } ; writeBlanks ( store , parsedBlankSubjects ) ; let quads = store . getQuads ( ) ; quads . forEach ( function ( quad ) { if ( parsedBlankSubjects [ quad . subject ] ) { return ; } if ( parsedBlankSubjects [ quad . object ] ) { writer . addQuad ( quad . subject , quad . predicate , writer . blank ( parsedBlankSubjects [ quad . object ] ) ) ; return ; } writer . addTriple ( quad ) ; } ) ; } ) ; }
normalize RML quads in the store, by modifying the existing store, and then write them semi-pretty using the writer.
@param store N3.Store
@param writer N3.Writer
normalize RML quads in the store by modifying the existing store and then write them semi - pretty using the writer .