Skip to content

Commit

Permalink
bug fix to sub-type ingestion found in "CWE" nodegroups
Browse files Browse the repository at this point in the history
  • Loading branch information
Paul Cuddihy committed Oct 26, 2022
1 parent eb9a1ec commit c00a2b7
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions sparqlGraphWeb/sparqlGraph/js/importspec.js
Original file line number Diff line number Diff line change
Expand Up @@ -290,9 +290,12 @@ define([// properly require.config'ed
var n = this.getMapping(jObj.nodes[i].sparqlID, null);
n.fromJsonNode(jObj.nodes[i], idHash, this.nodegroup);

var nt = this.getMapping(jObj.nodes[i].sparqlID, ImportMapping.TYPE_URI);
if (jObj.nodes[i].hasOwnProperty("type_restriction")) {
nt.fromJsonNode(jObj.nodes[i].type_restriction, idHash, this.nodegroup, n.getNode());
// if node type has subclasses, then there is a sub-type row
if (gOInfo.getSubclassNames(n.getNode().getURI()).length > 0) {
var nt = this.getMapping(jObj.nodes[i].sparqlID, ImportMapping.TYPE_URI);
if (jObj.nodes[i].hasOwnProperty("type_restriction")) {
nt.fromJsonNode(jObj.nodes[i].type_restriction, idHash, this.nodegroup, n.getNode());
}
}

for (var j=0; j < jObj.nodes[i].props.length; j++) {
Expand Down

0 comments on commit c00a2b7

Please sign in to comment.