Skip to content

Commit

Permalink
Merge branch 'develop' into feature-#1720-cesium-data-catalog
Browse files Browse the repository at this point in the history
  • Loading branch information
robyngit committed Jan 31, 2022
2 parents 2e4bdf2 + 2a9868d commit eef0f7d
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 15 deletions.
28 changes: 15 additions & 13 deletions src/js/models/metadata/eml211/EML211.js
Original file line number Diff line number Diff line change
Expand Up @@ -483,7 +483,7 @@ define(['jquery', 'underscore', 'backbone', 'uuid',

var emlParties = ["metadataprovider", "associatedparty", "creator", "contact", "publisher"],
emlDistribution = ["distribution"],
emlEntities = ["datatable", "otherentity", "spatialvector"],
emlEntities = ["datatable", "otherentity", "spatialvector", "spatialraster", "storedprocedure", "view"],
emlText = ["abstract", "additionalinfo"],
emlMethods = ["methods"];

Expand Down Expand Up @@ -630,18 +630,20 @@ define(['jquery', 'underscore', 'backbone', 'uuid',
}, {
parse: true
});
} else if ( thisNode.localName == "datatable") {
entityModel = new EMLDataTable({
objectDOM: thisNode,
parentModel: model
}, {
parse: true
});
} else {
entityModel = new EMLOtherEntity({
} else if ( thisNode.localName == "datatable") {
entityModel = new EMLDataTable({
objectDOM: thisNode,
parentModel: model
}, {
parse: true
});
}
else {
entityModel = new EMLEntity({
objectDOM: thisNode,
parentModel: model,
entityType: "application/octet-stream"
entityType: "application/octet-stream",
type: thisNode.localName
}, {
parse: true
});
Expand Down Expand Up @@ -1034,7 +1036,7 @@ define(['jquery', 'underscore', 'backbone', 'uuid',
}

//Get the existing taxon coverage nodes from the EML
var existingEntities = datasetNode.find("otherEntity, dataTable");
var existingEntities = datasetNode.find("otherEntity, dataTable, spatialRaster, spatialVector, storedProcedure, view");

//Serialize the entities
_.each(this.get("entities"), function(entity, position) {
Expand Down Expand Up @@ -1665,7 +1667,7 @@ define(['jquery', 'underscore', 'backbone', 'uuid',
// Go through each node in the node list and find the position where this
// node will be inserted after
for (var i = position - 1; i >= 0; i--) {
if ($(eml).find("dataset").find(nodeOrder[i]).length) {
if ($(eml).find("dataset").children(nodeOrder[i]).length) {
return $(eml).find("dataset").children(nodeOrder[i]).last();
}
}
Expand Down
3 changes: 2 additions & 1 deletion src/js/models/metadata/eml211/EMLEntity.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@ define(["jquery", "underscore", "backbone", "uuid", "models/DataONEObject",
parentModel: null, // The parent model this entity belongs to
dataONEObject: null, //Reference to the DataONEObject this EMLEntity describes
objectXML: null, // The serialized XML of this EML entity
objectDOM: null // The DOM of this EML entity
objectDOM: null, // The DOM of this EML entity
type: "otherentity"
}
},

Expand Down
2 changes: 1 addition & 1 deletion src/js/models/metadata/eml211/EMLOtherEntity.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ define(["jquery", "underscore", "backbone", "models/metadata/eml211/EMLEntity"],
return _.extend({

/* Attributes from EML */
entityType: "otherEntity", // The type of the entity
entityType: "data entity",

/* Attributes not from EML */
nodeOrder: [ // The order of the top level XML element nodes
Expand Down

0 comments on commit eef0f7d

Please sign in to comment.