Skip to content

Commit

Permalink
GDB-10369 JSONLD and NDJSONLD export improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
sava-savov-ontotext committed Jun 18, 2024
1 parent a2a2620 commit 061469c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -353,8 +353,9 @@ function yasguiComponentDirective(
});

modalInstance.result.then(function (data) {
const relValue = data.currentMode.name === 'framed' ? 'frame' : 'context';
const acceptHeader = accept + ';profile=' + data.currentMode.link;
const linkHeader = data.link ? '<' + data.link + '>' : '';
const linkHeader = data.link ? `<${data.link}>; rel=http://www.w3.org/ns/json-ld#${relValue}` : '';
downloadAs(query, infer, sameAs, authToken, acceptHeader, linkHeader);
});
} else {
Expand Down
3 changes: 2 additions & 1 deletion src/js/angular/export/controllers.js
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,8 @@ exportCtrl.controller('ExportCtrl',
});

modalInstance.result.then(function (data) {
const linkHeader = data.link ? '<' + data.link + '>' : '';
const relValue = data.currentMode.name === 'framed' ? 'frame' : 'context';
const linkHeader = data.link ? `<${data.link}>; rel=http://www.w3.org/ns/json-ld#${relValue}` : '';
downloadJSONLDExport(format, context, linkHeader, $repositories.getActiveRepositoryObject(), $scope.graphsByValue, data.currentMode);
});
};
Expand Down

0 comments on commit 061469c

Please sign in to comment.