forked from UTS-eResearch/ro-crate-excel
-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
We'll need to work out how to add an extra part to parseContextSheet() in workbook.js so that an additional context can be specified in a spreadsheet with the name * and @id https://w3id.org/ldac/terms#. PT and I created a partially working test with test data below:
it("Can add add a complete vocabulary to the context with no prefix", async function () {
this.timeout(5000);
const excelFilePath = "test_data/ldac-context-workbook.xlsx";
// New empty crate
var c = new ROCrate({array: true, link: true});
const workbook2 = new Workbook({crate: c});
await workbook2.loadExcel(excelFilePath, true); // true here means add to crate not
//console.log(JSON.stringify(workbook2.crate.toJSON(), null, 2));
await workbook2.crate.resolveContext();
const langURI = workbook2.crate.resolveTerm("subjectLanguage");
assert.equal(langURI, "https://w3id.org/ldac/terms#subjectLanguage", "Resolved context term")
//finish later: check correct context entry, check it has the right key
});
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
Status
No status