Commit 35a8f617 authored by PTSEFTON's avatar PTSEFTON
Browse files

Update context

parent d5761a89
......@@ -38,7 +38,7 @@ const ROCrate_profile_file = "defaults/profile-datacrate-v" + ROCrate_version +
const path = require("path")
const DEFAULTS = path.join(__dirname, '../defaults');
const defaults_dir = DEFAULTS;
const context = "https://raw.githubusercontent.com/ResearchObject/ro-crate/master/docs/0.3-DRAFT/context.json";
const context = "https://researchobject.github.io/ro-crate/1.0/context.jsonld";
const default_context = context;
const metadata_template = path.join(DEFAULTS, 'metadata_template.html');
const render_script = "https://code.research.uts.edu.au/eresearch/CalcyteJS/raw/feature/or-crate/lib/render.js";
......
......@@ -135,6 +135,9 @@ module.exports = function() {
if (Array.isArray(value)) {
value = value[0];
}
if (!value) {
value = uuidv4();
}
if (value.endsWith("/" ) || value.startsWith(".") || value.match(/^(https?:\/\/|mailto:.*@|_b:)/i)) {
this.id = value;
}
......
......@@ -31,7 +31,7 @@
"json": "^9.0.6",
"jsonld": "^1.6.2",
"node-json2html": "^1.1.1",
"ro-crate": "^1.2.12",
"ro-crate": "^1.2.14",
"sha1": "^1.1.1",
"shelljs": "^0.8.1",
"tmp": "0.0.33",
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment