ATLAS-4610: ATLAS-4655: Classification/ Term: Add parent name for classification & name
Signed-off-by: Pinal Shah <pinal.shah@freestoneinfotech.com>
This commit is contained in:
parent
b3ebdd5021
commit
f2293acf0d
|
|
@ -81,6 +81,27 @@
|
|||
}
|
||||
|
||||
.detail-page {
|
||||
|
||||
.entityDetail {
|
||||
|
||||
.tagBox,
|
||||
.termBox,
|
||||
.propagatedTagBox {
|
||||
span {
|
||||
>span {
|
||||
@include ellipsis();
|
||||
float: left;
|
||||
max-width: 200px;
|
||||
}
|
||||
}
|
||||
|
||||
i {
|
||||
float: right;
|
||||
line-height: 21px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.details-backbutton {
|
||||
display: table-cell !important;
|
||||
}
|
||||
|
|
@ -350,4 +371,12 @@ pre {
|
|||
overflow-wrap: break-word;
|
||||
cursor: default !important;
|
||||
background-color: transparent !important;
|
||||
}
|
||||
|
||||
.tagBox {
|
||||
z-index: 2;
|
||||
}
|
||||
|
||||
.termBox {
|
||||
z-index: 1;
|
||||
}
|
||||
|
|
@ -25,7 +25,7 @@
|
|||
</h1> {{#if entityUpdate}}
|
||||
<!-- <div data-id="editButtonContainer" class="pull-right"></div> -->
|
||||
{{/if}}
|
||||
<div class="form-group col-md-12">
|
||||
<div class="form-group tagBox col-md-12">
|
||||
<span class="control-label-sm-pr pull-left">Classifications:</span>
|
||||
<div class="pull-left" data-id="tagList">
|
||||
<button class="btn btn-action btn-sm" title="Add Classification" data-id="addTag">
|
||||
|
|
@ -41,7 +41,7 @@
|
|||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group col-md-12" style="display: none;" data-id="propagatedTagDiv">
|
||||
<div class="form-group propagatedTagBox col-md-12" style="display: none;" data-id="propagatedTagDiv">
|
||||
<span class="control-label-sm-pr pull-left">Propagated Classifications:</span>
|
||||
<div class="pull-left" data-id="propagatedTagList">
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -347,7 +347,7 @@ define(['require', 'utils/Utils', 'modules/Modal', 'utils/Messages', 'utils/Enum
|
|||
});
|
||||
return table && table.length > 0 ? table : '<tr class="empty"><td colspan="22"><span>No Record found!</span></td></tr>';
|
||||
}
|
||||
CommonViewFunction.tagForTable = function(obj) {
|
||||
CommonViewFunction.tagForTable = function(obj, classificationDefCollection) {
|
||||
var traits = obj.classifications,
|
||||
tagHtml = "",
|
||||
addTag = "",
|
||||
|
|
@ -365,7 +365,13 @@ define(['require', 'utils/Utils', 'modules/Modal', 'utils/Messages', 'utils/Enum
|
|||
} else {
|
||||
className += " propagte-classification";
|
||||
}
|
||||
var tagString = '<a class="' + className + '" data-id="tagClick"><span title="' + tag.typeName + '">' + tag.typeName + '</span>' + deleteIcon + '</a>';
|
||||
var tagObj = classificationDefCollection.fullCollection.find({ "name": tag.typeName }),
|
||||
tagParents = tagObj ? tagObj.get('superTypes') : null,
|
||||
parentName = tag.typeName;
|
||||
if (tagParents && tagParents.length) {
|
||||
parentName += (tagParents.length > 1) ? ("@(" + tagParents.join() + ")") : ("@" + tagParents.join());
|
||||
}
|
||||
var tagString = '<a class="' + className + '" data-id="tagClick"><span title="' + parentName + '">' + parentName + '</span>' + deleteIcon + '</a>';
|
||||
if (count >= 1) {
|
||||
popTag += tagString;
|
||||
} else {
|
||||
|
|
@ -395,10 +401,11 @@ define(['require', 'utils/Utils', 'modules/Modal', 'utils/Messages', 'utils/Enum
|
|||
entityName = Utils.getName(obj);
|
||||
if (terms) {
|
||||
terms.map(function(term) {
|
||||
var displayText = _.escape(term.displayText);
|
||||
var className = "btn btn-action btn-sm btn-blue btn-icon",
|
||||
var displayText = _.escape(term.displayText),
|
||||
gloassaryName = _.escape(term.qualifiedName) || displayText,
|
||||
className = "btn btn-action btn-sm btn-blue btn-icon",
|
||||
deleteIcon = '<i class="fa fa-times" data-id="delete" data-assetname="' + entityName + '" data-name="' + displayText + '" data-type="term" data-guid="' + obj.guid + '" data-termGuid="' + term.termGuid + '" ></i>',
|
||||
termString = '<a class="' + className + '" data-id="termClick"><span title="' + displayText + '">' + displayText + '</span>' + deleteIcon + '</a>';
|
||||
termString = '<a class="' + className + '" data-id="termClick"><span title="' + gloassaryName + '">' + gloassaryName + '</span>' + deleteIcon + '</a>';
|
||||
if (count >= 1) {
|
||||
popTerm += termString;
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -68,7 +68,9 @@ define(['require',
|
|||
termList: '[data-id="termList"]',
|
||||
propagatedTagList: '[data-id="propagatedTagList"]',
|
||||
tablist: '[data-id="tab-list"] li',
|
||||
entityIcon: '[data-id="entityIcon"]'
|
||||
entityIcon: '[data-id="entityIcon"]',
|
||||
tagParent: '[data-id="tagParent"]',
|
||||
termGlossary: '[data-id="termGlossary"]'
|
||||
},
|
||||
templateHelpers: function() {
|
||||
return {
|
||||
|
|
@ -80,9 +82,9 @@ define(['require',
|
|||
events: function() {
|
||||
var events = {};
|
||||
events["click " + this.ui.tagClick] = function(e) {
|
||||
if (e.target.nodeName.toLocaleLowerCase() != "i") {
|
||||
if ((e.target.nodeName.toLocaleLowerCase() != "i") && (!$(e.target).hasClass("parent-list-btn")) && (!$(e.target).hasClass("fa"))) {
|
||||
Utils.setUrl({
|
||||
url: '#!/tag/tagAttribute/' + e.currentTarget.textContent,
|
||||
url: '#!/tag/tagAttribute/' + e.target.textContent.split('@')[0],
|
||||
mergeBrowserUrl: false,
|
||||
trigger: true
|
||||
});
|
||||
|
|
@ -97,11 +99,13 @@ define(['require',
|
|||
});
|
||||
};
|
||||
events["click " + this.ui.termClick] = function(e) {
|
||||
if (e.target.nodeName.toLocaleLowerCase() != "i") {
|
||||
if ((e.target.nodeName.toLocaleLowerCase() != "i") && (!$(e.target).hasClass("parent-list-btn")) && (!$(e.target).hasClass("fa"))) {
|
||||
var guid = $(e.currentTarget).find('.fa-close').data('guid'),
|
||||
gType = "term";
|
||||
Utils.setUrl({
|
||||
url: '#!/glossary/' + $(e.currentTarget).find('i').data('guid'),
|
||||
url: '#!/glossary/' + guid,
|
||||
mergeBrowserUrl: false,
|
||||
urlParams: { gType: "term", viewType: "term", fromView: "entity" },
|
||||
urlParams: { gType: gType, viewType: "term", fromView: "entity" },
|
||||
trigger: true
|
||||
});
|
||||
}
|
||||
|
|
@ -121,7 +125,6 @@ define(['require',
|
|||
});
|
||||
|
||||
};
|
||||
|
||||
return events;
|
||||
},
|
||||
/**
|
||||
|
|
@ -465,7 +468,7 @@ define(['require',
|
|||
},
|
||||
onClickTagCross: function(e) {
|
||||
var that = this,
|
||||
tagName = $(e.currentTarget).parent().text(),
|
||||
tagName = $(e.currentTarget).parent().text().split('@')[0],
|
||||
entityGuid = $(e.currentTarget).data("entityguid");
|
||||
CommonViewFunction.deleteTag(_.extend({}, {
|
||||
guid: that.id,
|
||||
|
|
@ -510,10 +513,12 @@ define(['require',
|
|||
tagData = "",
|
||||
propagatedTagListData = "";
|
||||
_.each(tagObject.self, function(val) {
|
||||
tagData += '<span class="btn btn-action btn-sm btn-icon btn-blue" data-id="tagClick"><span>' + val.typeName + '</span><i class="fa fa-close" data-id="deleteTag" data-type="tag" title="Remove Classification"></i></span>';
|
||||
var parentName = that.getTagParentList(val.typeName);
|
||||
tagData += '<span class="btn btn-action btn-sm btn-icon btn-blue" data-id="tagClick"><span title="' + parentName + '">' + _.escape(parentName) + '</span><i class="fa fa-close" data-id="deleteTag" data-type="tag" title="Remove Classification"></i></span>';
|
||||
});
|
||||
_.each(tagObject.propagatedMap, function(val, key) {
|
||||
propagatedTagListData += '<span class="btn btn-action btn-sm btn-icon btn-blue"><span data-id="tagClick">' + val.typeName + '</span>' + (val.count > 1 ? '<span class="active" data-id="pTagCountClick">(' + val.count + ')</span>' : "") + '</span>';
|
||||
var parentName = that.getTagParentList(val.typeName);
|
||||
propagatedTagListData += '<span class="btn btn-action btn-sm btn-icon btn-blue"><span data-id="tagClick" title="' + parentName + '">' + parentName + '</span>' + (val.count > 1 ? '<span class="active" data-id="pTagCountClick">(' + val.count + ')</span>' : "") + '</span>';
|
||||
});
|
||||
propagatedTagListData !== "" ? this.ui.propagatedTagDiv.show() : this.ui.propagatedTagDiv.hide();
|
||||
this.ui.tagList.find("span.btn").remove();
|
||||
|
|
@ -525,11 +530,21 @@ define(['require',
|
|||
var that = this,
|
||||
termData = "";
|
||||
_.each(data, function(val) {
|
||||
termData += '<span class="btn btn-action btn-sm btn-icon btn-blue" data-id="termClick"><span>' + _.escape(val.displayText) + '</span><i class="' + (val.relationshipStatus == "ACTIVE" ? 'fa fa-close' : "") + '" data-id="deleteTerm" data-guid="' + val.guid + '" data-type="term" title="Remove Term"></i></span>';
|
||||
var glossaryName = val.qualifiedName ? val.qualifiedName : val.displayText;
|
||||
termData += '<span class="btn btn-action btn-sm btn-icon btn-blue" data-id="termClick" title= "' + glossaryName + '"><span>' + _.escape(glossaryName) + '</span><i class="' + (val.relationshipStatus == "ACTIVE" ? 'fa fa-close' : "") + '" data-id="deleteTerm" data-guid="' + val.guid + '" data-type="term" title="Remove Term"></i></span>';
|
||||
});
|
||||
this.ui.termList.find("span.btn").remove();
|
||||
this.ui.termList.prepend(termData);
|
||||
},
|
||||
getTagParentList: function(name) {
|
||||
var tagObj = this.classificationDefCollection.fullCollection.find({ "name": name }),
|
||||
tagParents = tagObj ? tagObj.get('superTypes') : null,
|
||||
parentName = name;
|
||||
if (tagParents && tagParents.length) {
|
||||
parentName += (tagParents.length > 1) ? ("@(" + tagParents.join() + ")") : ("@" + tagParents.join());
|
||||
}
|
||||
return parentName;
|
||||
},
|
||||
hideLoader: function() {
|
||||
Utils.hideTitleLoader(this.$('.page-title .fontLoader'), this.$('.entityDetail'));
|
||||
},
|
||||
|
|
|
|||
|
|
@ -114,7 +114,7 @@ define(['require',
|
|||
this.onClickTagCross(e);
|
||||
} else {
|
||||
Utils.setUrl({
|
||||
url: '#!/tag/tagAttribute/' + e.currentTarget.textContent,
|
||||
url: '#!/tag/tagAttribute/' + e.currentTarget.textContent.split('@')[0],
|
||||
mergeBrowserUrl: false,
|
||||
trigger: true
|
||||
});
|
||||
|
|
@ -345,9 +345,11 @@ define(['require',
|
|||
},
|
||||
generateTag: function(tagObject) {
|
||||
var that = this,
|
||||
tagData = "";
|
||||
tagData = "",
|
||||
propagatedTagListData = "";
|
||||
_.each(tagObject, function(val) {
|
||||
tagData += '<span class="btn btn-action btn-sm btn-icon btn-blue" data-id="tagClickTerm"><span>' + val.typeName + '</span><i class="fa fa-close" data-id="removeTagTerm" data-type="tag" title="Remove Classification"></i></span>';
|
||||
var parentName = that.getTagParentList(val.typeName);
|
||||
tagData += '<span class="btn btn-action btn-sm btn-icon btn-blue" data-id="tagClickTerm"><span title="' + parentName + '">' + _.escape(parentName) + '</span><i class="fa fa-close" data-id="removeTagTerm" data-type="tag" title="Remove Classification"></i></span>';
|
||||
});
|
||||
this.ui.tagList.find("span.btn").remove();
|
||||
this.ui.tagList.prepend(tagData);
|
||||
|
|
@ -361,6 +363,15 @@ define(['require',
|
|||
});
|
||||
return terms;
|
||||
},
|
||||
getTagParentList: function(name) {
|
||||
var tagObj = this.classificationDefCollection.fullCollection.find({ "name": name }),
|
||||
tagParents = tagObj ? tagObj.get('superTypes') : null,
|
||||
parentName = name;
|
||||
if (tagParents && tagParents.length) {
|
||||
parentName += (tagParents.length > 1) ? ("@(" + tagParents.join() + ")") : ("@" + tagParents.join());
|
||||
}
|
||||
return parentName;
|
||||
},
|
||||
onClickAddTermBtn: function(e) {
|
||||
var that = this,
|
||||
glossary = this.glossaryCollection;
|
||||
|
|
@ -439,7 +450,7 @@ define(['require',
|
|||
},
|
||||
onClickTagCross: function(e) {
|
||||
var that = this,
|
||||
tagName = $(e.currentTarget).text(),
|
||||
tagName = $(e.currentTarget).text().split('@')[0],
|
||||
termName = this.data.name;
|
||||
CommonViewFunction.deleteTag(_.extend({}, {
|
||||
msg: "<div class='ellipsis-with-margin'>Remove: " + "<b>" + _.escape(tagName) + "</b> assignment from <b>" + _.escape(termName) + "?</b></div>",
|
||||
|
|
|
|||
|
|
@ -62,7 +62,7 @@ define(['require',
|
|||
this.modal = new Modal({
|
||||
"title": ((this.editMode ? "Edit attributes" : "Attributes") + " of " + this.selectedTermAttribute),
|
||||
"content": this,
|
||||
"okText": (this.editMode ? "Update" : "ok"),
|
||||
"okText": (this.editMode ? "Update" : "Close"),
|
||||
"allowCancel": (this.editMode ? true : false),
|
||||
"okCloses": true,
|
||||
"width": "80%",
|
||||
|
|
@ -197,6 +197,7 @@ define(['require',
|
|||
notifyObj = {
|
||||
modal: true,
|
||||
text: "Are you sure you want to remove term association",
|
||||
okText:"Remove",
|
||||
ok: function(argument) {
|
||||
var model = new that.glossaryCollection.model(),
|
||||
selectedGuid = $(e.currentTarget).data('termguid'),
|
||||
|
|
@ -230,8 +231,8 @@ define(['require',
|
|||
relationTypeTable: true,
|
||||
getTerms: function(key) {
|
||||
var terms = _.map(that.data[key], function(obj) {
|
||||
var name = _.escape(obj.displayText);
|
||||
return '<span data-guid="' + obj.termGuid + '" class="btn btn-action btn-sm btn-icon btn-blue" data-id="termClick"><span>' + name + '</span><i class="fa fa-close" data-id="deleteAttribute" data-attributename="' + key + '" data-termguid="' + obj.termGuid + '" data-type="term" title="Remove Term"></i></span>';
|
||||
var name = _.escape(obj.qualifiedName) || _.escape(obj.displayText);
|
||||
return '<span data-guid="' + obj.termGuid + '" class="btn btn-action btn-sm btn-icon btn-blue" data-id="termClick"><span title="' + name + '">' + name + '</span><i class="fa fa-close" data-id="deleteAttribute" data-attributename="' + key + '" data-termguid="' + obj.termGuid + '" data-type="term" title="Remove Term"></i></span>';
|
||||
}).join(""),
|
||||
attributeButtons = "";
|
||||
if (terms.length) {
|
||||
|
|
|
|||
|
|
@ -234,9 +234,9 @@ define(['require',
|
|||
fromRaw: function(rawValue, model) {
|
||||
var obj = model.toJSON();
|
||||
if (obj.status && Enums.entityStateReadOnly[obj.status]) {
|
||||
return '<div class="readOnly">' + CommonViewFunction.tagForTable(obj); + '</div>';
|
||||
return '<div class="readOnly">' + CommonViewFunction.tagForTable(obj, that.classificationDefCollection); + '</div>';
|
||||
} else {
|
||||
return CommonViewFunction.tagForTable(obj);
|
||||
return CommonViewFunction.tagForTable(obj, that.classificationDefCollection);
|
||||
}
|
||||
}
|
||||
})
|
||||
|
|
|
|||
|
|
@ -91,7 +91,7 @@ define(['require',
|
|||
this.onClickTagCross(e);
|
||||
} else {
|
||||
this.triggerUrl({
|
||||
url: '#!/tag/tagAttribute/' + scope.text(),
|
||||
url: '#!/tag/tagAttribute/' + scope.text().split('@')[0],
|
||||
urlParams: null,
|
||||
mergeBrowserUrl: false,
|
||||
trigger: true,
|
||||
|
|
@ -1029,9 +1029,9 @@ define(['require',
|
|||
return
|
||||
}
|
||||
if (obj.status && Enums.entityStateReadOnly[obj.status]) {
|
||||
return '<div class="readOnly">' + CommonViewFunction.tagForTable(obj); + '</div>';
|
||||
return '<div class="readOnly">' + CommonViewFunction.tagForTable(obj, that.classificationDefCollection); + '</div>';
|
||||
} else {
|
||||
return CommonViewFunction.tagForTable(obj);
|
||||
return CommonViewFunction.tagForTable(obj, that.classificationDefCollection);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -403,7 +403,7 @@ define(['require',
|
|||
}).open();
|
||||
modal.$el.find('button.ok').attr("disabled", "true");
|
||||
view.ui.tagName.on('keyup input', function(e) {
|
||||
$(view.ui.description).trumbowyg('html', $(this).val().replace(/\s+/g, ' '));
|
||||
$(view.ui.description).trumbowyg('html', _.escape($(this).val()).replace(/\s+/g, ' '));
|
||||
});
|
||||
view.ui.description.on('input keydown', function(e) {
|
||||
$(this).val($(this).val().replace(/\s+/g, ' '));
|
||||
|
|
@ -651,7 +651,7 @@ define(['require',
|
|||
},
|
||||
cust_error: function() {},
|
||||
complete: function() {
|
||||
if(that.collection.fullCollection.length === 0){
|
||||
if (that.collection.fullCollection.length === 0) {
|
||||
that.setUrl('#!/tag', true);
|
||||
}
|
||||
that.notificationModal.hideButtonLoader();
|
||||
|
|
|
|||
|
|
@ -81,6 +81,27 @@
|
|||
}
|
||||
|
||||
.detail-page {
|
||||
|
||||
.entityDetail {
|
||||
|
||||
.tagBox,
|
||||
.termBox,
|
||||
.propagatedTagBox {
|
||||
span {
|
||||
>span {
|
||||
@include ellipsis();
|
||||
float: left;
|
||||
max-width: 200px;
|
||||
}
|
||||
}
|
||||
|
||||
i {
|
||||
float: right;
|
||||
line-height: 21px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.details-backbutton {
|
||||
display: table-cell !important;
|
||||
}
|
||||
|
|
@ -349,4 +370,12 @@ pre {
|
|||
overflow-wrap: break-word;
|
||||
cursor: default !important;
|
||||
background-color: transparent !important;
|
||||
}
|
||||
|
||||
.tagBox {
|
||||
z-index: 2;
|
||||
}
|
||||
|
||||
.termBox {
|
||||
z-index: 1;
|
||||
}
|
||||
|
|
@ -252,7 +252,7 @@ define([
|
|||
require(["views/site/Header", "views/tag/TagContainerLayoutView", "views/site/SideNavLayoutView"], function(Header, TagContainerLayoutView, SideNavLayoutView) {
|
||||
var paramObj = Utils.getUrlState.getQueryParams();
|
||||
//Below if condition is added to handle "when Classification tab does not have any classification and selected in Old UI and switched to New UI is show continous loading
|
||||
if (paramObj === undefined || tagName === "viewType=tree" || tagName === "viewType=flat") {
|
||||
if ((paramObj === undefined && !tagName) || tagName === "viewType=tree" || tagName === "viewType=flat") {
|
||||
that.defaultAction();
|
||||
return;
|
||||
}
|
||||
|
|
@ -282,7 +282,7 @@ define([
|
|||
require(["views/site/Header", "views/glossary/GlossaryContainerLayoutView", "views/search/SearchDefaultLayoutView", "views/site/SideNavLayoutView"], function(Header, GlossaryContainerLayoutView, SearchDefaultLayoutView, SideNavLayoutView) {
|
||||
var paramObj = Utils.getUrlState.getQueryParams();
|
||||
//Below if condition is added to handle "when Glossary tab does not have any glossary and selected in Old UI and switched to New UI is show continous loading
|
||||
if (paramObj === undefined || id === "viewType=category" || id === "viewType=term") {
|
||||
if ((paramObj === undefined && !id) || id === "viewType=category" || id === "viewType=term") {
|
||||
that.defaultAction();
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@
|
|||
</h1> {{#if entityUpdate}}
|
||||
<!-- <div data-id="editButtonContainer" class="pull-right"></div> -->
|
||||
{{/if}}
|
||||
<div class="form-group col-md-12">
|
||||
<div class="form-group tagBox col-md-12">
|
||||
<span class="control-label-sm-pr pull-left">Classifications:</span>
|
||||
<div class="pull-left" data-id="tagList">
|
||||
<button class="btn btn-action btn-sm" title="Add Classification" data-id="addTag">
|
||||
|
|
@ -44,7 +44,7 @@
|
|||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group col-md-12" style="display: none;" data-id="propagatedTagDiv">
|
||||
<div class="form-group propagatedTagBox col-md-12" style="display: none;" data-id="propagatedTagDiv">
|
||||
<span class="control-label-sm-pr pull-left">Propagated Classifications:</span>
|
||||
<div class="pull-left" data-id="propagatedTagList">
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -364,7 +364,13 @@ define(['require', 'utils/Utils', 'modules/Modal', 'utils/Messages', 'utils/Enum
|
|||
} else {
|
||||
className += " propagte-classification";
|
||||
}
|
||||
var tagString = '<a class="' + className + '" data-id="tagClick"><span title="' + tag.typeName + '">' + tag.typeName + '</span>' + deleteIcon + '</a>';
|
||||
var tagObj = classificationDefCollection.fullCollection.find({ "name": tag.typeName }),
|
||||
tagParents = tagObj ? tagObj.get('superTypes') : null,
|
||||
parentName = tag.typeName;
|
||||
if (tagParents && tagParents.length) {
|
||||
parentName += (tagParents.length > 1) ? ("@(" + tagParents.join() + ")") : ("@" + tagParents.join());
|
||||
}
|
||||
var tagString = '<a class="' + className + '" data-id="tagClick"><span title="' + parentName + '">' + parentName + '</span>' + deleteIcon + '</a>';
|
||||
if (count >= 1) {
|
||||
popTag += tagString;
|
||||
} else {
|
||||
|
|
@ -394,10 +400,11 @@ define(['require', 'utils/Utils', 'modules/Modal', 'utils/Messages', 'utils/Enum
|
|||
entityName = Utils.getName(obj);
|
||||
if (terms) {
|
||||
terms.map(function(term) {
|
||||
var displayText = _.escape(term.displayText);
|
||||
var className = "btn btn-action btn-sm btn-blue btn-icon",
|
||||
var displayText = _.escape(term.displayText),
|
||||
gloassaryName = _.escape(term.qualifiedName) || displayText,
|
||||
className = "btn btn-action btn-sm btn-blue btn-icon",
|
||||
deleteIcon = '<i class="fa fa-times" data-id="delete" data-assetname="' + entityName + '" data-name="' + displayText + '" data-type="term" data-guid="' + obj.guid + '" data-termGuid="' + term.termGuid + '" ></i>',
|
||||
termString = '<a class="' + className + '" data-id="termClick"><span title="' + displayText + '">' + displayText + '</span>' + deleteIcon + '</a>';
|
||||
termString = '<a class="' + className + '" data-id="termClick"><span title="' + gloassaryName + '">' + gloassaryName + '</span>' + deleteIcon + '</a>';
|
||||
if (count >= 1) {
|
||||
popTerm += termString;
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -69,7 +69,9 @@ define(['require',
|
|||
propagatedTagList: '[data-id="propagatedTagList"]',
|
||||
tablist: '[data-id="tab-list"] li',
|
||||
entityIcon: '[data-id="entityIcon"]',
|
||||
backButton: '[data-id="backButton"]'
|
||||
backButton: '[data-id="backButton"]',
|
||||
tagParent: '[data-id="tagParent"]',
|
||||
termGlossary: '[data-id="termGlossary"]'
|
||||
},
|
||||
templateHelpers: function() {
|
||||
return {
|
||||
|
|
@ -81,9 +83,9 @@ define(['require',
|
|||
events: function() {
|
||||
var events = {};
|
||||
events["click " + this.ui.tagClick] = function(e) {
|
||||
if (e.target.nodeName.toLocaleLowerCase() != "i") {
|
||||
if ((e.target.nodeName.toLocaleLowerCase() != "i") && (!$(e.target).hasClass("parent-list-btn")) && (!$(e.target).hasClass("fa"))) {
|
||||
Utils.setUrl({
|
||||
url: '#!/tag/tagAttribute/' + e.currentTarget.textContent,
|
||||
url: '#!/tag/tagAttribute/' + e.target.textContent.split('@')[0],
|
||||
mergeBrowserUrl: false,
|
||||
trigger: true
|
||||
});
|
||||
|
|
@ -98,11 +100,13 @@ define(['require',
|
|||
});
|
||||
};
|
||||
events["click " + this.ui.termClick] = function(e) {
|
||||
if (e.target.nodeName.toLocaleLowerCase() != "i") {
|
||||
if ((e.target.nodeName.toLocaleLowerCase() != "i") && (!$(e.target).hasClass("parent-list-btn")) && (!$(e.target).hasClass("fa"))) {
|
||||
var guid = $(e.currentTarget).find('.fa-close').data('guid'),
|
||||
gType = "term";
|
||||
Utils.setUrl({
|
||||
url: '#!/glossary/' + $(e.currentTarget).find('i').data('guid'),
|
||||
url: '#!/glossary/' + guid,
|
||||
mergeBrowserUrl: false,
|
||||
urlParams: { gType: "term", viewType: "term", fromView: "entity" },
|
||||
urlParams: { gType: gType, viewType: "term", fromView: "entity" },
|
||||
trigger: true
|
||||
});
|
||||
}
|
||||
|
|
@ -466,7 +470,7 @@ define(['require',
|
|||
},
|
||||
onClickTagCross: function(e) {
|
||||
var that = this,
|
||||
tagName = $(e.currentTarget).parent().text(),
|
||||
tagName = $(e.currentTarget).parent().text().split('@')[0],
|
||||
entityGuid = $(e.currentTarget).data("entityguid");
|
||||
CommonViewFunction.deleteTag(_.extend({}, {
|
||||
guid: that.id,
|
||||
|
|
@ -514,10 +518,12 @@ define(['require',
|
|||
tagData = "",
|
||||
propagatedTagListData = "";
|
||||
_.each(tagObject.self, function(val) {
|
||||
tagData += '<span class="btn btn-action btn-sm btn-icon btn-blue" data-id="tagClick"><span>' + val.typeName + '</span><i class="fa fa-close" data-id="deleteTag" data-type="tag" title="Remove Classification"></i></span>';
|
||||
var parentName = that.getTagParentList(val.typeName);
|
||||
tagData += '<span class="btn btn-action btn-sm btn-icon btn-blue" data-id="tagClick"><span title="' + parentName + '">' + _.escape(parentName) + '</span><i class="fa fa-close" data-id="deleteTag" data-type="tag" title="Remove Classification"></i></span>';
|
||||
});
|
||||
_.each(tagObject.propagatedMap, function(val, key) {
|
||||
propagatedTagListData += '<span class="btn btn-action btn-sm btn-icon btn-blue"><span data-id="tagClick">' + val.typeName + '</span>' + (val.count > 1 ? '<span class="active" data-id="pTagCountClick">(' + val.count + ')</span>' : "") + '</span>';
|
||||
var parentName = that.getTagParentList(val.typeName);
|
||||
propagatedTagListData += '<span class="btn btn-action btn-sm btn-icon btn-blue"><span data-id="tagClick" title="' + parentName + '">' + parentName + '</span>' + (val.count > 1 ? '<span class="active" data-id="pTagCountClick">(' + val.count + ')</span>' : "") + '</span>';
|
||||
});
|
||||
propagatedTagListData !== "" ? this.ui.propagatedTagDiv.show() : this.ui.propagatedTagDiv.hide();
|
||||
this.ui.tagList.find("span.btn").remove();
|
||||
|
|
@ -529,11 +535,21 @@ define(['require',
|
|||
var that = this,
|
||||
termData = "";
|
||||
_.each(data, function(val) {
|
||||
termData += '<span class="btn btn-action btn-sm btn-icon btn-blue" data-id="termClick"><span>' + _.escape(val.displayText) + '</span><i class="' + (val.relationshipStatus == "ACTIVE" ? 'fa fa-close' : "") + '" data-id="deleteTerm" data-guid="' + val.guid + '" data-type="term" title="Remove Term"></i></span>';
|
||||
var glossaryName = val.qualifiedName ? val.qualifiedName : val.displayText;
|
||||
termData += '<span class="btn btn-action btn-sm btn-icon btn-blue" data-id="termClick" title= "' + glossaryName + '"><span>' + _.escape(glossaryName) + '</span><i class="' + (val.relationshipStatus == "ACTIVE" ? 'fa fa-close' : "") + '" data-id="deleteTerm" data-guid="' + val.guid + '" data-type="term" title="Remove Term"></i></span>';
|
||||
});
|
||||
this.ui.termList.find("span.btn").remove();
|
||||
this.ui.termList.prepend(termData);
|
||||
},
|
||||
getTagParentList: function(name) {
|
||||
var tagObj = this.classificationDefCollection.fullCollection.find({ "name": name }),
|
||||
tagParents = tagObj ? tagObj.get('superTypes') : null,
|
||||
parentName = name;
|
||||
if (tagParents && tagParents.length) {
|
||||
parentName += (tagParents.length > 1) ? ("@(" + tagParents.join() + ")") : ("@" + tagParents.join());
|
||||
}
|
||||
return parentName;
|
||||
},
|
||||
hideLoader: function() {
|
||||
Utils.hideTitleLoader(this.$('.page-title .fontLoader'), this.$('.entityDetail'));
|
||||
},
|
||||
|
|
|
|||
|
|
@ -115,7 +115,7 @@ define(['require',
|
|||
this.onClickTagCross(e);
|
||||
} else {
|
||||
Utils.setUrl({
|
||||
url: '#!/tag/tagAttribute/' + e.currentTarget.textContent,
|
||||
url: '#!/tag/tagAttribute/' + e.currentTarget.textContent.split('@')[0],
|
||||
mergeBrowserUrl: false,
|
||||
trigger: true
|
||||
});
|
||||
|
|
@ -359,9 +359,11 @@ define(['require',
|
|||
},
|
||||
generateTag: function(tagObject) {
|
||||
var that = this,
|
||||
tagData = "";
|
||||
tagData = "",
|
||||
propagatedTagListData = "";
|
||||
_.each(tagObject, function(val) {
|
||||
tagData += '<span class="btn btn-action btn-sm btn-icon btn-blue" data-id="tagClickTerm"><span>' + val.typeName + '</span><i class="fa fa-close" data-id="removeTagTerm" data-type="tag" title="Remove Classification"></i></span>';
|
||||
var parentName = that.getTagParentList(val.typeName);
|
||||
tagData += '<span class="btn btn-action btn-sm btn-icon btn-blue" data-id="tagClickTerm"><span title="' + parentName + '">' + _.escape(parentName) + '</span><i class="fa fa-close" data-id="removeTagTerm" data-type="tag" title="Remove Classification"></i></span>';
|
||||
});
|
||||
this.ui.tagList.find("span.btn").remove();
|
||||
this.ui.tagList.prepend(tagData);
|
||||
|
|
@ -375,6 +377,15 @@ define(['require',
|
|||
});
|
||||
return terms;
|
||||
},
|
||||
getTagParentList: function(name) {
|
||||
var tagObj = this.classificationDefCollection.fullCollection.find({ "name": name }),
|
||||
tagParents = tagObj ? tagObj.get('superTypes') : null,
|
||||
parentName = name;
|
||||
if (tagParents && tagParents.length) {
|
||||
parentName += (tagParents.length > 1) ? ("@(" + tagParents.join() + ")") : ("@" + tagParents.join());
|
||||
}
|
||||
return parentName;
|
||||
},
|
||||
onClickAddTermBtn: function(e) {
|
||||
var that = this,
|
||||
glossary = this.glossaryCollection;
|
||||
|
|
@ -453,7 +464,7 @@ define(['require',
|
|||
},
|
||||
onClickTagCross: function(e) {
|
||||
var that = this,
|
||||
tagName = $(e.currentTarget).text(),
|
||||
tagName = $(e.currentTarget).text().split('@')[0],
|
||||
termName = this.data.name;
|
||||
CommonViewFunction.deleteTag(_.extend({}, {
|
||||
msg: "<div class='ellipsis-with-margin'>Remove: " + "<b>" + _.escape(tagName) + "</b> assignment from <b>" + _.escape(termName) + "?</b></div>",
|
||||
|
|
|
|||
|
|
@ -62,7 +62,7 @@ define(['require',
|
|||
this.modal = new Modal({
|
||||
"title": ((this.editMode ? "Edit attributes" : "Attributes") + " of " + this.selectedTermAttribute),
|
||||
"content": this,
|
||||
"okText": (this.editMode ? "Update" : "ok"),
|
||||
"okText": (this.editMode ? "Update" : "Close"),
|
||||
"allowCancel": (this.editMode ? true : false),
|
||||
"okCloses": true,
|
||||
"width": "80%",
|
||||
|
|
@ -197,6 +197,7 @@ define(['require',
|
|||
notifyObj = {
|
||||
modal: true,
|
||||
text: "Are you sure you want to remove term association",
|
||||
okText:"Remove",
|
||||
ok: function(argument) {
|
||||
var model = new that.glossaryCollection.model(),
|
||||
selectedGuid = $(e.currentTarget).data('termguid'),
|
||||
|
|
@ -230,8 +231,8 @@ define(['require',
|
|||
relationTypeTable: true,
|
||||
getTerms: function(key) {
|
||||
var terms = _.map(that.data[key], function(obj) {
|
||||
var name = _.escape(obj.displayText);
|
||||
return '<span data-guid="' + obj.termGuid + '" class="btn btn-action btn-sm btn-icon btn-blue" data-id="termClick"><span>' + name + '</span><i class="fa fa-close" data-id="deleteAttribute" data-attributename="' + key + '" data-termguid="' + obj.termGuid + '" data-type="term" title="Remove Term"></i></span>';
|
||||
var name = _.escape(obj.qualifiedName) || _.escape(obj.displayText);
|
||||
return '<span data-guid="' + obj.termGuid + '" class="btn btn-action btn-sm btn-icon btn-blue" data-id="termClick"><span title="' + name + '">' + name + '</span><i class="fa fa-close" data-id="deleteAttribute" data-attributename="' + key + '" data-termguid="' + obj.termGuid + '" data-type="term" title="Remove Term"></i></span>';
|
||||
}).join(""),
|
||||
attributeButtons = "";
|
||||
if (terms.length) {
|
||||
|
|
|
|||
|
|
@ -234,9 +234,9 @@ define(['require',
|
|||
fromRaw: function(rawValue, model) {
|
||||
var obj = model.toJSON();
|
||||
if (obj.status && Enums.entityStateReadOnly[obj.status]) {
|
||||
return '<div class="readOnly">' + CommonViewFunction.tagForTable(obj); + '</div>';
|
||||
return '<div class="readOnly">' + CommonViewFunction.tagForTable(objthat.classificationDefCollection); + '</div>';
|
||||
} else {
|
||||
return CommonViewFunction.tagForTable(obj);
|
||||
return CommonViewFunction.tagForTable(objthat.classificationDefCollection);
|
||||
}
|
||||
}
|
||||
})
|
||||
|
|
|
|||
|
|
@ -92,7 +92,7 @@ define(['require',
|
|||
this.onClickTagCross(e);
|
||||
} else {
|
||||
this.triggerUrl({
|
||||
url: '#!/tag/tagAttribute/' + scope.text(),
|
||||
url: '#!/tag/tagAttribute/' + scope.text().split('@')[0],
|
||||
urlParams: null,
|
||||
mergeBrowserUrl: false,
|
||||
trigger: true,
|
||||
|
|
@ -1043,9 +1043,9 @@ define(['require',
|
|||
return
|
||||
}
|
||||
if (obj.status && Enums.entityStateReadOnly[obj.status]) {
|
||||
return '<div class="readOnly">' + CommonViewFunction.tagForTable(obj); + '</div>';
|
||||
return '<div class="readOnly">' + CommonViewFunction.tagForTable(obj, that.classificationDefCollection); + '</div>';
|
||||
} else {
|
||||
return CommonViewFunction.tagForTable(obj);
|
||||
return CommonViewFunction.tagForTable(obj, that.classificationDefCollection);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -688,7 +688,7 @@ define([
|
|||
}).open();
|
||||
modal.$el.find("button.ok").attr("disabled", "true");
|
||||
view.ui.tagName.on('keyup input', function(e) {
|
||||
$(view.ui.description).trumbowyg('html', $(this).val().replace(/\s+/g, ' '));
|
||||
$(view.ui.description).trumbowyg('html', _.escape($(this).val()).replace(/\s+/g, ' '));
|
||||
});
|
||||
view.ui.description.on('input keydown', function(e) {
|
||||
$(this).val($(this).val().replace(/\s+/g, ' '));
|
||||
|
|
|
|||
|
|
@ -33,6 +33,7 @@ public class AtlasRelatedTermHeader {
|
|||
private String source;
|
||||
|
||||
private AtlasTermRelationshipStatus status;
|
||||
private String qualifiedName;
|
||||
|
||||
public AtlasRelatedTermHeader() {
|
||||
}
|
||||
|
|
@ -112,6 +113,7 @@ public class AtlasRelatedTermHeader {
|
|||
sb.append(", relationGuid='").append(relationGuid).append('\'');
|
||||
sb.append(", description='").append(description).append('\'');
|
||||
sb.append(", displayText='").append(displayText).append('\'');
|
||||
sb.append(", qualifiedName='").append(qualifiedName).append('\'');
|
||||
sb.append(", expression='").append(expression).append('\'');
|
||||
sb.append(", steward='").append(steward).append('\'');
|
||||
sb.append(", source='").append(source).append('\'');
|
||||
|
|
@ -135,4 +137,7 @@ public class AtlasRelatedTermHeader {
|
|||
public void setRelationGuid(final String relationGuid) {
|
||||
this.relationGuid = relationGuid;
|
||||
}
|
||||
public String getQualifiedName() { return qualifiedName; }
|
||||
public void setQualifiedName(String qualifiedName) { this.qualifiedName = qualifiedName; }
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -33,8 +33,8 @@ public class AtlasTermAssignmentHeader {
|
|||
private String steward;
|
||||
private String source;
|
||||
private int confidence;
|
||||
|
||||
private AtlasTermAssignmentStatus status;
|
||||
private String qualifiedName;
|
||||
|
||||
public AtlasTermAssignmentHeader() {
|
||||
}
|
||||
|
|
@ -111,6 +111,10 @@ public class AtlasTermAssignmentHeader {
|
|||
this.displayText = displayText;
|
||||
}
|
||||
|
||||
public String getQualifiedName() { return qualifiedName; }
|
||||
|
||||
public void setQualifiedName(String qualifiedName) { this.qualifiedName = qualifiedName; }
|
||||
|
||||
@Override
|
||||
public boolean equals(final Object o) {
|
||||
if (this == o) return true;
|
||||
|
|
@ -140,11 +144,12 @@ public class AtlasTermAssignmentHeader {
|
|||
sb.append(", relationGuid='").append(relationGuid).append('\'');
|
||||
sb.append(", description='").append(description).append('\'');
|
||||
sb.append(", displayText='").append(displayText).append('\'');
|
||||
sb.append(", qualifiedName='").append(qualifiedName).append('\'');
|
||||
sb.append(", expression='").append(expression).append('\'');
|
||||
sb.append(", createdBy='").append(createdBy).append('\'');
|
||||
sb.append(", steward='").append(steward).append('\'');
|
||||
sb.append(", source='").append(source).append('\'');
|
||||
sb.append(", confidence=").append(confidence);
|
||||
sb.append(", confidence=").append(confidence).append('\'');;
|
||||
sb.append(", status=").append(status);
|
||||
sb.append('}');
|
||||
return sb.toString();
|
||||
|
|
|
|||
|
|
@ -54,6 +54,7 @@ public class AtlasRelatedObjectId extends AtlasObjectId implements Serializable
|
|||
private String relationshipGuid = null;
|
||||
private AtlasRelationship.Status relationshipStatus = null;
|
||||
private AtlasStruct relationshipAttributes = null;
|
||||
private String qualifiedName = null;
|
||||
|
||||
public AtlasRelatedObjectId() { }
|
||||
|
||||
|
|
@ -155,6 +156,13 @@ public class AtlasRelatedObjectId extends AtlasObjectId implements Serializable
|
|||
setRelationshipType(relationshipAttributes.getTypeName());
|
||||
}
|
||||
}
|
||||
public String getQualifiedName() {
|
||||
return qualifiedName;
|
||||
}
|
||||
|
||||
public void setQualifiedName(String qualifiedName) {
|
||||
this.qualifiedName = qualifiedName;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
|
|
@ -190,6 +198,7 @@ public class AtlasRelatedObjectId extends AtlasObjectId implements Serializable
|
|||
super.toString(sb);
|
||||
sb.append("entityStatus='").append(entityStatus).append('\'');
|
||||
sb.append(", displayText='").append(displayText).append('\'');
|
||||
sb.append(", qualifiedName='").append(qualifiedName).append('\'');
|
||||
sb.append(", relationshipType='").append(relationshipType).append('\'');
|
||||
sb.append(", relationshipGuid='").append(relationshipGuid).append('\'');
|
||||
sb.append(", relationshipStatus='").append(relationshipStatus).append('\'');
|
||||
|
|
|
|||
|
|
@ -77,6 +77,7 @@ public class GlossaryService {
|
|||
private static final String GLOSSARY_QUALIFIED_NAME_PROPERTY = "AtlasGlossary." + QUALIFIED_NAME_ATTR;
|
||||
private static final String GLOSSARY_CATEGORY_NAME_PROPERTY = "AtlasGlossaryCategory.name";
|
||||
private static final String GLOSSARY_TERM_NAME_PROPERTY = ATLAS_GLOSSARY_TERM + "." + NAME_ATTR;
|
||||
private static final String GLOSSARY_TERM_QUALIFIED_NAME_PROPERTY = ATLAS_GLOSSARY_TERM + "." + QUALIFIED_NAME_ATTR;
|
||||
private static final String TERM_UNIQUE_QUALIFIED_NAME_PROPERTY = ATLAS_GLOSSARY_TERM + ".__u_" + QUALIFIED_NAME_ATTR;
|
||||
private static final String GLOSSARY_TERM_ANCHOR_EDGE_LABEL = "r:AtlasGlossaryTermAnchor";
|
||||
|
||||
|
|
@ -1072,6 +1073,7 @@ public class GlossaryService {
|
|||
if (Objects.nonNull(glossaryTerm.getRelatedTerms())) {
|
||||
for (Map.Entry<AtlasGlossaryTerm.Relation, Set<AtlasRelatedTermHeader>> entry : glossaryTerm.getRelatedTerms().entrySet()) {
|
||||
setDisplayNameForTerms(entry.getValue());
|
||||
setQualifiedNameForTerms(entry.getValue());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1122,13 +1124,24 @@ public class GlossaryService {
|
|||
String termGuid = termHeader.getTermGuid();
|
||||
AtlasVertex termVertex = AtlasGraphUtilsV2.findByGuid(termGuid);
|
||||
String termDisplayText = termVertex.getProperty(GLOSSARY_TERM_NAME_PROPERTY, String.class);
|
||||
|
||||
if (StringUtils.isNotEmpty(termDisplayText)) {
|
||||
termHeader.setDisplayText(termDisplayText);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void setQualifiedNameForTerms(final Collection<AtlasRelatedTermHeader> termHeaders) throws AtlasBaseException {
|
||||
|
||||
for (AtlasRelatedTermHeader termHeader : termHeaders) {
|
||||
String termGuid = termHeader.getTermGuid();
|
||||
AtlasVertex termVertex = AtlasGraphUtilsV2.findByGuid(termGuid);
|
||||
String termQualifiedName = termVertex.getProperty(GLOSSARY_TERM_QUALIFIED_NAME_PROPERTY, String.class);
|
||||
if (StringUtils.isNotEmpty(termQualifiedName)) {
|
||||
termHeader.setQualifiedName(termQualifiedName);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static boolean isNameInvalid(String name) {
|
||||
return StringUtils.containsAny(name, invalidNameChars);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -127,6 +127,7 @@ public class EntityGraphRetriever {
|
|||
private static final Logger LOG = LoggerFactory.getLogger(EntityGraphRetriever.class);
|
||||
|
||||
private static final String GLOSSARY_TERM_DISPLAY_NAME_ATTR = "AtlasGlossaryTerm.name";
|
||||
private static final String GLOSSARY_TERM_QUALIFIED_NAME_ATTR = "AtlasGlossaryTerm.qualifiedName";
|
||||
public static final String TERM_RELATION_NAME = "AtlasGlossarySemanticAssignment";
|
||||
|
||||
public static final String NAME = "name";
|
||||
|
|
@ -929,6 +930,11 @@ public class EntityGraphRetriever {
|
|||
ret.setDisplayText((String) displayName);
|
||||
}
|
||||
|
||||
Object qualifiedName = AtlasGraphUtilsV2.getEncodedProperty(termVertex, GLOSSARY_TERM_QUALIFIED_NAME_ATTR, Object.class);
|
||||
if (qualifiedName instanceof String) {
|
||||
ret.setQualifiedName((String) qualifiedName);
|
||||
}
|
||||
|
||||
String description = edge.getProperty(TERM_ASSIGNMENT_ATTR_DESCRIPTION, String.class);
|
||||
if (description != null) {
|
||||
ret.setDescription(description);
|
||||
|
|
@ -1549,6 +1555,11 @@ public class EntityGraphRetriever {
|
|||
ret.setDisplayText(displayText.toString());
|
||||
}
|
||||
|
||||
Object qualifiedName = getQualifiedName(referenceVertex, entityTypeName);
|
||||
if (qualifiedName != null) {
|
||||
ret.setQualifiedName(qualifiedName.toString());
|
||||
}
|
||||
|
||||
if (isOwnedRef && entityExtInfo != null) {
|
||||
if (isMinExtInfo) {
|
||||
mapVertexToAtlasEntityMin(referenceVertex, entityExtInfo);
|
||||
|
|
@ -1607,6 +1618,18 @@ public class EntityGraphRetriever {
|
|||
return ret;
|
||||
}
|
||||
|
||||
private Object getQualifiedName(AtlasVertex entityVertex, String entityTypeName) throws AtlasBaseException {
|
||||
return getQualifiedName(entityVertex, typeRegistry.getEntityTypeByName(entityTypeName));
|
||||
}
|
||||
|
||||
private Object getQualifiedName(AtlasVertex entityVertex, AtlasEntityType entityType) throws AtlasBaseException {
|
||||
Object ret = null;
|
||||
if (entityType != null) {
|
||||
ret = getVertexAttribute(entityVertex, entityType.getAttribute(QUALIFIED_NAME));
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
public AtlasRelationship mapEdgeToAtlasRelationship(AtlasEdge edge) throws AtlasBaseException {
|
||||
return mapEdgeToAtlasRelationship(edge, false).getRelationship();
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue