diff --git a/src/js/models/AppModel.js b/src/js/models/AppModel.js index c8d6c914e..bac2ef566 100644 --- a/src/js/models/AppModel.js +++ b/src/js/models/AppModel.js @@ -421,6 +421,21 @@ define(['jquery', 'underscore', 'backbone'], * @since 2.13.0 */ editorSchemaLocation: "https://eml.ecoinformatics.org/eml-2.2.0 https://eml.ecoinformatics.org/eml-2.2.0/eml.xsd", + + /** + * The text to use for the eml system attribute. The system attribute + * indicates the data management system within which an identifier is in + * scope and therefore unique. This is typically a URL (Uniform Resource + * Locator) that indicates a data management system. All identifiers that + * share a system must be unique. In other words, if the same identifier + * is used in two locations with identical systems, then by definition the + * objects at which they point are in fact the same object. + * @type {string} + * @since x.x.x + * @link https://eml.ecoinformatics.org/schema/eml-resource_xsd#SystemType + * @link https://eml.ecoinformatics.org/schema/eml_xsd + */ + emlSystem: "knb", /** * This error message is displayed when the Editor encounters an error saving diff --git a/src/js/models/metadata/eml211/EML211.js b/src/js/models/metadata/eml211/EML211.js index 8d5eb77f0..13af57d23 100644 --- a/src/js/models/metadata/eml211/EML211.js +++ b/src/js/models/metadata/eml211/EML211.js @@ -2095,6 +2095,10 @@ define(['jquery', 'underscore', 'backbone', 'uuid', /* Initialize the object XML for brand spankin' new EML objects */ createXML: function() { + + let emlSystem = MetacatUI.appModel.get("emlSystem"); + emlSystem = (!emlSystem || typeof emlSystem != "string") ? "knb" : emlSystem; + var xml = "", eml = $($.parseHTML(xml)); @@ -2103,7 +2107,7 @@ define(['jquery', 'underscore', 'backbone', 'uuid', eml.attr("xmlns:stmml", "http://www.xml-cml.org/schema/stmml-1.1"); eml.attr("xsi:schemaLocation", "https://eml.ecoinformatics.org/eml-2.2.0 https://eml.ecoinformatics.org/eml-2.2.0/eml.xsd"); eml.attr("packageId", this.get("id")); - eml.attr("system", "knb"); // We could make this configurable at some point + eml.attr("system", emlSystem); // Add the dataset eml.append(document.createElement("dataset"));