diff --git a/annotation/src/main/java/lcsb/mapviewer/annotation/services/annotators/BiocompendiumAnnotator.java b/annotation/src/main/java/lcsb/mapviewer/annotation/services/annotators/BiocompendiumAnnotator.java index de59bb3bcf6876d82dc9165e801f8319cc342696..dddfce69fadb128914c23b94a85dc416f91090ea 100644 --- a/annotation/src/main/java/lcsb/mapviewer/annotation/services/annotators/BiocompendiumAnnotator.java +++ b/annotation/src/main/java/lcsb/mapviewer/annotation/services/annotators/BiocompendiumAnnotator.java @@ -32,7 +32,9 @@ import lcsb.mapviewer.converter.model.celldesigner.annotation.RestAnnotationPars import lcsb.mapviewer.model.map.BioEntity; import lcsb.mapviewer.model.map.MiriamData; import lcsb.mapviewer.model.map.MiriamType; +import lcsb.mapviewer.model.map.species.Gene; import lcsb.mapviewer.model.map.species.Protein; +import lcsb.mapviewer.model.map.species.Rna; /** * This class is responsible for connection to Vencata annotation service. The @@ -72,7 +74,7 @@ public class BiocompendiumAnnotator extends ElementAnnotator implements IExterna * Default constructor. */ public BiocompendiumAnnotator() { - super(BiocompendiumAnnotator.class, new Class[] { Protein.class, Protein.class, Protein.class }, true); + super(BiocompendiumAnnotator.class, new Class[] { Protein.class, Gene.class, Rna.class }, true); } @Override diff --git a/frontend-js/.idea/inspectionProfiles/Project_Default.xml b/frontend-js/.idea/inspectionProfiles/Project_Default.xml deleted file mode 100644 index eff7139dc94035d3c213c5275bbe9433ac0d8567..0000000000000000000000000000000000000000 --- a/frontend-js/.idea/inspectionProfiles/Project_Default.xml +++ /dev/null @@ -1,6 +0,0 @@ -<component name="InspectionProjectProfileManager"> - <profile version="1.0"> - <option name="myName" value="Project Default" /> - <inspection_tool class="JSHint" enabled="true" level="ERROR" enabled_by_default="true" /> - </profile> -</component> \ No newline at end of file diff --git a/frontend-js/package.json b/frontend-js/package.json index 20e07bc3e4eae1e6b17b3059a293513ac3ac6001..895669e72cd1297136db9bf75d0898333ba7b263 100644 --- a/frontend-js/package.json +++ b/frontend-js/package.json @@ -41,6 +41,7 @@ "file-saver": "^1.3.3", "http-status-codes": "^1.3.0", "js-cookie": "^2.1.3", + "jstree": "^3.3.4", "log4js": "0.6.38", "mkdirp": "^0.5.1", "pileup": "^0.6.8", diff --git a/frontend-js/src/main/js/Configuration.js b/frontend-js/src/main/js/Configuration.js index 549b444600c192ca59ed1402cdef2c34be59ac36..783461f2e2ad801170605d03e97b85ff01e92428 100644 --- a/frontend-js/src/main/js/Configuration.js +++ b/frontend-js/src/main/js/Configuration.js @@ -4,6 +4,7 @@ var logger = require('./logger'); +var Annotator = require('./map/data/Annotator'); var ConfigurationType = require('./ConfigurationType'); var MiriamType = require('./map/data/MiriamType'); var PrivilegeType = require('./map/data/PrivilegeType'); @@ -50,6 +51,7 @@ function Configuration(json) { self.setMiriamTypes(json.miriamTypes); self.setModificationStateTypes(json.modificationStateTypes); self.setPrivilegeTypes(json.privilegeTypes); + self.setAnnotators(json.annotators); } Configuration.prototype.setOption = function (type, value) { @@ -94,6 +96,37 @@ Configuration.prototype.getElementTypeNames = function () { return result; }; +Configuration.prototype.getParentType = function (elementType) { + var i; + for (var i = 0; i < this._elementTypes.length; i++) { + if (this._elementTypes[i].className === elementType.parentClass) { + return this._elementTypes[i]; + } + } + for (var i = 0; i < this._reactionTypes.length; i++) { + if (this._reactionTypes[i].className === elementType.parentClass) { + return this._reactionTypes[i]; + } + } + return null; +}; + +Configuration.prototype.getSimpleElementTypeNames = function () { + var classesToBeExcluded = {}; + var i; + for (i = 0; i < this._elementTypes.length; i++) { + classesToBeExcluded[this._elementTypes[i].parentClass] = true; + } + var result = []; + for (i = 0; i < this._elementTypes.length; i++) { + if (classesToBeExcluded[this._elementTypes[i].className] === undefined) { + result.push(this._elementTypes[i].name); + } + } + return result; +}; + + Configuration.prototype.setReactionTypes = function (reactionTypes) { this._reactionTypes = reactionTypes; }; @@ -156,4 +189,42 @@ Configuration.prototype.getModificationStateTypeByName = function (name) { return null; }; +Configuration.prototype.setAnnotators = function (annotators) { + this._annotators = []; + for (var key in annotators) { + if (annotators.hasOwnProperty(key)) { + var annotator = annotators[key]; + this._annotators.push(new Annotator(annotators[key], this)); + } + } +}; + +Configuration.prototype.getElementAnnotators = function (type) { + if (type === undefined) { + return this._annotators; + } + var result = []; + for (var i = 0; i < this._annotators.length; i++) { + var annotator = this._annotators[i]; + var ok = false; + var elementTypes = annotator.getElementTypes(); + for (var j = 0; j < elementTypes.length; j++) { + var elementType = elementTypes[j]; + var checkedType = type; + while (checkedType !== null) { + if (elementType.className === checkedType.className) { + ok = true; + checkedType = null; + } else { + checkedType = this.getParentType(checkedType); + } + } + } + if (ok) { + result.push(annotator); + } + } + return result; +}; + module.exports = Configuration; diff --git a/frontend-js/src/main/js/Functions.js b/frontend-js/src/main/js/Functions.js index f26951632afd9d41d7930395ad729bfd16c242f3..e360437d6e07926d9f4457dccfd9bdaec32bab44 100644 --- a/frontend-js/src/main/js/Functions.js +++ b/frontend-js/src/main/js/Functions.js @@ -12,7 +12,7 @@ var Functions = {}; * Bounds value between opt_min and opt_max (result will be not smaller than * opt_min and not bigger than opt_max). */ -Functions.bound = function(value, minVal, maxVal) { +Functions.bound = function (value, minVal, maxVal) { if (minVal !== null && minVal !== undefined) { value = Math.max(value, minVal); } @@ -22,15 +22,15 @@ Functions.bound = function(value, minVal, maxVal) { return value; }; -Functions.degreesToRadians = function(deg) { +Functions.degreesToRadians = function (deg) { return deg * (Math.PI / 180); }; -Functions.radiansToDegrees = function(rad) { +Functions.radiansToDegrees = function (rad) { return rad / (Math.PI / 180); }; -Functions.intToColorString = function(value) { +Functions.intToColorString = function (value) { /* jslint bitwise: true */ var trimmedValue = (value & 0xFFFFFF); var colorStr = trimmedValue.toString(16); @@ -42,24 +42,24 @@ Functions.intToColorString = function(value) { /** * Returns stack trace. - * + * * @returns stack trace */ -Functions.stackTrace = function() { +Functions.stackTrace = function () { var err = new Error(); return err.stack; }; /** * Returns the position of the element on html page. - * + * * @param element * element for which we want to get the position (top left corner) - * + * * @return coordinates of the element - * + * */ -Functions.getPosition = function(element) { +Functions.getPosition = function (element) { var xPosition = 0; var yPosition = 0; @@ -69,8 +69,8 @@ Functions.getPosition = function(element) { element = element.offsetParent; } return { - x : xPosition, - y : yPosition + x: xPosition, + y: yPosition }; }; @@ -78,15 +78,15 @@ Functions.getPosition = function(element) { * Checks if the point given as a first argument belongs to a polygon defined as * a second parameter. Both: point and polygon should use google.map.point * class. - * + * * @param point * point which we want to check - * + * * @param polygon * polygon where we check the point */ -Functions.pointInsidePolygon = function(point, polygon) { +Functions.pointInsidePolygon = function (point, polygon) { var x = point.x; var y = point.y; @@ -107,7 +107,7 @@ Functions.pointInsidePolygon = function(point, polygon) { * using. Right now only IE is supported. */ Functions.browser = { - init : function() { + init: function () { this.name = "Unknown"; this.version = "Unknown"; @@ -142,29 +142,29 @@ Functions.browser.init(); /** * Returns true if parameter is integer, false otherwise. - * + * * @param n * object to check */ -Functions.isInt = function(n) { +Functions.isInt = function (n) { return Number(n) === n && n % 1 === 0; }; /** * Returns true if parameter is a DOM element, false otherwise. - * + * * @param o * object to check */ -Functions.isDomElement = function(o) { +Functions.isDomElement = function (o) { if (!o) { return false; } return (typeof HTMLElement === "object" ? o instanceof HTMLElement : // DOM2 - o && typeof o === "object" && o !== null && o.nodeType === 1 && typeof o.nodeName === "string"); + o && typeof o === "object" && o !== null && o.nodeType === 1 && typeof o.nodeName === "string"); }; -Functions.overlayToColor = function(elementOverlay) { +Functions.overlayToColor = function (elementOverlay) { var self = this; /* jslint bitwise: true */ if (elementOverlay === null || elementOverlay === undefined) { @@ -187,7 +187,7 @@ Functions.overlayToColor = function(elementOverlay) { promiseColor = ServerConnector.getSimpleOverlayColorInt(); } - return promiseColor.then(function(color) { + return promiseColor.then(function (color) { ratio = 1 - ratio; var MAX_RED = 0xFF0000; @@ -216,7 +216,7 @@ Functions.overlayToColor = function(elementOverlay) { } }; -Functions.getElementByName = function(element, name) { +Functions.getElementByName = function (element, name) { if (element !== undefined) { if (element.getAttribute("name") === name) { return element; @@ -233,7 +233,7 @@ Functions.getElementByName = function(element, name) { return undefined; }; -Functions.createElement = function(params) { +Functions.createElement = function (params) { var result = document.createElement(params.type); if (params.id !== null && params.id !== undefined) { result.id = params.id; @@ -291,7 +291,8 @@ function distToSegmentSquared(p, v, w) { return dist2(p, new google.maps.Point(v.x + t * (w.x - v.x), v.y + t * (w.y - v.y))); } -Functions.distance = function(p1, el2) { + +Functions.distance = function (p1, el2) { if (el2 instanceof google.maps.Point) { var p2 = el2; return Math.sqrt((Math.pow(p1.x - p2.x, 2)) + (Math.pow(p1.y - p2.y, 2))); @@ -299,4 +300,11 @@ Functions.distance = function(p1, el2) { return Math.sqrt(distToSegmentSquared(p1, el2.start, el2.end)); } }; + +Functions.removeChildren = function (element) { + while (element.firstChild) { + element.removeChild(element.firstChild); + } +}; + module.exports = Functions; diff --git a/frontend-js/src/main/js/gui/admin/AddProjectDialog.js b/frontend-js/src/main/js/gui/admin/AddProjectDialog.js index 3580685aac7811383b5ce8a5b915b1ba6198fb24..d23cd45b6c34637ced50372a302dcf9ceaeecdcb 100644 --- a/frontend-js/src/main/js/gui/admin/AddProjectDialog.js +++ b/frontend-js/src/main/js/gui/admin/AddProjectDialog.js @@ -4,7 +4,9 @@ var Promise = require("bluebird"); var AbstractGuiElement = require('../AbstractGuiElement'); +var ChooseAnnotatorsDialog = require('./ChooseAnnotatorsDialog'); var GuiConnector = require('../../GuiConnector'); +var UserPreferences = require("../../map/data/UserPreferences"); var Functions = require('../../Functions'); var logger = require('../../logger'); @@ -88,6 +90,22 @@ AddProjectDialog.prototype.addTab = function (params) { params.tabContentDiv.appendChild(contentDiv); }; +AddProjectDialog.prototype.showAnnotatorsDialog = function () { + var self = this; + var promise; + if (self._annotatorsDialog === undefined) { + self._annotatorsDialog = new ChooseAnnotatorsDialog({ + element: Functions.createElement({type: "div"}), + customMap: null + }); + promise = self._annotatorsDialog.init(); + } else { + promise = Promise.resolve(); + } + return promise.then(function () { + return self._annotatorsDialog.open(); + }); +}; AddProjectDialog.prototype.createGeneralTabContent = function () { var self = this; @@ -125,14 +143,14 @@ AddProjectDialog.prototype.createGeneralTabContent = function () { var file = e.arg; return self.setFileParserForFilename(file.name); }); - table.appendChild(self.createRow(guiUtils.createLabel("Upload file: "), fileInput)); + table.appendChild(self.createRow([guiUtils.createLabel("Upload file: "), fileInput])); var fileFormatSelect = Functions.createElement({ type: "select", name: "project-format" }); - table.appendChild(self.createRow(guiUtils.createLabel("File format: "), fileFormatSelect)); + table.appendChild(self.createRow([guiUtils.createLabel("File format: "), fileFormatSelect])); table.appendChild(self.createInputRow("ProjectId:", "id", "project-id")); table.appendChild(self.createInputRow("Project name:", "UNKNOWN DISEASE MAP", "project-name")); @@ -141,7 +159,16 @@ AddProjectDialog.prototype.createGeneralTabContent = function () { table.appendChild(self.createInputRow("Version:", "", "project-version")); table.appendChild(self.createInputRow("Notify email:", "", "project-notify-email")); - table.appendChild(self.createCheckboxRow("Annotate model automatically:", false, "project-annotate-automatically")); + var showAnnotatorsButton = Functions.createElement({ + type: "button", + name: "project-show-annotators", + content: "Advanced", + onclick: function () { + return self.showAnnotatorsDialog().then(null, GuiConnector.alert); + } + }); + + table.appendChild(self.createCheckboxRow("Annotate model automatically:", false, "project-annotate-automatically", [showAnnotatorsButton])); table.appendChild(self.createCheckboxRow("Verify manual annotations:", false, "project-verify-annotations")); table.appendChild(self.createCheckboxRow("Cache data:", false, "project-cache-data")); table.appendChild(self.createCheckboxRow("Auto margin:", true, "project-auto-margin")); @@ -188,10 +215,10 @@ AddProjectDialog.prototype.createInputRow = function (labelName, defaultValue, i style: "display:table-cell", content: "<input name='" + inputName + "' value='" + defaultValue + "'/>" }); - return this.createRow(label, input); + return this.createRow([label, input]); }; -AddProjectDialog.prototype.createCheckboxRow = function (labelName, defaultValue, inputName) { +AddProjectDialog.prototype.createCheckboxRow = function (labelName, defaultValue, inputName, elements) { var label = new Functions.createElement({ type: "div", style: "display:table-cell", @@ -206,32 +233,32 @@ AddProjectDialog.prototype.createCheckboxRow = function (labelName, defaultValue style: "display:table-cell", content: "<input type='checkbox' name='" + inputName + "' " + checked + "/>" }); - return this.createRow(label, checkbox); + var rowElements = [label, checkbox]; + if (elements !== undefined) { + for (var i = 0; i < elements.length; i++) { + rowElements.push(elements[i]); + } + } + return this.createRow(rowElements); }; -AddProjectDialog.prototype.createRow = function (label, value) { +AddProjectDialog.prototype.createRow = function (elements) { var result = new Functions.createElement({ type: "div", style: "display:table-row" }); - if (label.tagName.toLowerCase() !== 'div') { - var labelContainer = new Functions.createElement({ - type: "div", - style: "display:table-cell" - }); - labelContainer.appendChild(label); - label = labelContainer; - } - result.appendChild(label); - if (value.tagName.toLowerCase() !== 'div') { - var valueContainer = new Functions.createElement({ - type: "div", - style: "display:table-cell" - }); - valueContainer.appendChild(value); - value = valueContainer; + for (var i = 0; i < elements.length; i++) { + var element = elements[i]; + if (element.tagName.toLowerCase() !== 'div') { + var labelContainer = new Functions.createElement({ + type: "div", + style: "display:table-cell" + }); + labelContainer.appendChild(element); + element = labelContainer; + } + result.appendChild(element); } - result.appendChild(value); return result; }; @@ -349,7 +376,14 @@ AddProjectDialog.prototype.bindProjectUploadPreferences = function (user, type, }; AddProjectDialog.prototype.destroy = function () { - $(this.getElement()).dialog("destroy"); + var self = this; + var div = self.getElement(); + if ($(div).hasClass("ui-dialog-content")) { + $(div).dialog("destroy"); + } + if (self._annotatorsDialog !== undefined) { + self._annotatorsDialog.destroy(); + } }; AddProjectDialog.prototype.open = function () { diff --git a/frontend-js/src/main/js/gui/admin/ChooseAnnotatorsDialog.js b/frontend-js/src/main/js/gui/admin/ChooseAnnotatorsDialog.js new file mode 100644 index 0000000000000000000000000000000000000000..4ee69243ec9084ac1a95e97c668829c12b432e6d --- /dev/null +++ b/frontend-js/src/main/js/gui/admin/ChooseAnnotatorsDialog.js @@ -0,0 +1,220 @@ +"use strict"; + +/* exported logger */ + +var AbstractGuiElement = require('../AbstractGuiElement'); +var DualListbox = require('dual-listbox').DualListbox; +var GuiConnector = require("../../GuiConnector"); +var UserPreferences = require("../../map/data/UserPreferences"); + +var Functions = require('../../functions'); +var logger = require('../../logger'); + +var Promise = require("bluebird"); + +function ChooseAnnotatorsDialog(params) { + AbstractGuiElement.call(this, params); + var self = this; + self.createGui(); +} + +ChooseAnnotatorsDialog.prototype = Object.create(AbstractGuiElement.prototype); +ChooseAnnotatorsDialog.prototype.constructor = ChooseAnnotatorsDialog; + +ChooseAnnotatorsDialog.prototype.createGui = function () { + var self = this; + var content = Functions.createElement({ + type: "div", + style: "display:table" + }); + content.appendChild(Functions.createElement({ + type: "div", + style: "display:table-cell", + content: "<div name='elementTree'/>" + })); + + content.appendChild(Functions.createElement({ + type: "div", + style: "display:table-cell", + content: "<div name='annotatorListBox'/>" + })); + + self.getElement().appendChild(content); +}; + +ChooseAnnotatorsDialog.prototype.setElementType = function (elementType) { + var self = this; + + var configuration; + + return ServerConnector.getConfiguration().then(function (result) { + configuration = result; + return ServerConnector.getLoggedUser(); + }).then(function (user) { + var element = $("[name='annotatorListBox']", self.getElement())[0]; + Functions.removeChildren(element); + + var selectElement = Functions.createElement({ + type: "select", + className: "minerva-multi-select" + }); + + var annotators = configuration.getElementAnnotators(elementType); + + var selectedAnnotators = user.getPreferences().getElementAnnotators(elementType.className); + + for (var i = 0; i < annotators.length; i++) { + var annotator = annotators[i]; + var selected = false; + for (var j = 0; j < selectedAnnotators.length; j++) { + if (annotator.getName() === selectedAnnotators[j]) { + selected = true; + } + } + var option = new Option(); + option.value = annotator.getClassName(); + option.attributes.selected = selected; + option.innerHTML = "<div>" + annotator.getName() + "</div>"; + selectElement.appendChild(option); + } + + element.appendChild(selectElement); + new DualListbox(selectElement, { + addEvent: function (value) { + var annotators = configuration.getElementAnnotators(); + var annotator; + for (var i = 0; i < annotators.length; i++) { + if (value === annotators[i].getClassName()) { + annotator = annotators[i]; + } + } + selectedAnnotators.push(annotator.getName()); + + var data = new UserPreferences(); + + var elementAnnotators = {}; + elementAnnotators[elementType.className] = selectedAnnotators; + data.setElementAnnotators(elementAnnotators); + return ServerConnector.updateUserPreferences({user: user, preferences: data}).then(null, GuiConnector.alert); + }, + removeEvent: function (value) { + var annotators = configuration.getElementAnnotators(); + var annotator; + for (var i = 0; i < annotators.length; i++) { + if (value === annotators[i].getClassName()) { + annotator = annotators[i]; + } + } + var index = selectedAnnotators.indexOf(annotator.getName()); + if (index > -1) { + selectedAnnotators.splice(index, 1); + } + + var data = new UserPreferences(); + + var elementAnnotators = {}; + elementAnnotators[elementType.className] = selectedAnnotators; + data.setElementAnnotators(elementAnnotators); + return ServerConnector.updateUserPreferences({user: user, preferences: data}).then(null, GuiConnector.alert); + }, + availableTitle: 'Available', + selectedTitle: 'Used', + addButtonText: '>', + removeButtonText: '<', + addAllButtonText: '>>', + removeAllButtonText: '<<' + }); + }); + +}; + +ChooseAnnotatorsDialog.prototype.init = function () { + var self = this; + return ServerConnector.getConfiguration().then(function (configuration) { + + var treeData = self.createElementTree(configuration); + + var element = $('[name="elementTree"]', self.getElement()); + element.jstree({ + core: { + data: treeData + } + }).on('ready.jstree', function () { + element.jstree("open_all"); + }).on("select_node.jstree", + function (evt, data) { + return self.setElementType(data.node.data); + } + ); + }); +}; + +ChooseAnnotatorsDialog.prototype.createElementTree = function (configuration) { + + var elementTypes = configuration.getElementTypes(); + var reactionTypes = configuration.getReactionTypes(); + + var treeNodes = { + "lcsb.mapviewer.model.map.BioEntity": { + text: "BioEntity", + children: [] + } + }; + + var i; + for (i = 0; i < elementTypes.length; i++) { + var type = elementTypes[i]; + var name = type.className; + if (name.indexOf(".") > 0) { + name = name.substr(name.lastIndexOf(".") + 1); + } + treeNodes[type.className] = { + text: name, + data: type, + children: [] + }; + } + + for (i = 0; i < reactionTypes.length; i++) { + var type = reactionTypes[i]; + treeNodes[type.className] = { + text: type.name, + data: type, + children: [] + }; + } + + for (var treeNodeName in treeNodes) { + if (treeNodes.hasOwnProperty(treeNodeName)) { + var treeNode = treeNodes[treeNodeName]; + if (treeNode.data !== undefined) { + var parentNode = treeNodes[treeNode.data.parentClass]; + parentNode.children.push(treeNode); + } + } + } + + return treeNodes["lcsb.mapviewer.model.map.BioEntity"]; +}; + +ChooseAnnotatorsDialog.prototype.destroy = function () { + $(this.getElement()).dialog("destroy"); +}; + +ChooseAnnotatorsDialog.prototype.open = function () { + var self = this; + var div = self.getElement(); + if (!$(div).hasClass("ui-dialog-content")) { + $(div).dialog({ + title: "Select annotators", + modal: true, + width: window.innerWidth / 2, + height: window.innerHeight / 2 + + }); + } + + $(div).dialog("open"); +}; + +module.exports = ChooseAnnotatorsDialog; diff --git a/frontend-js/src/main/js/gui/export/AbstractExportPanel.js b/frontend-js/src/main/js/gui/export/AbstractExportPanel.js index bb1055d37660576e7caa4a26fbec3c4c3598b7d7..f053c242370a12d0cd496aa3b40c9690915021af 100644 --- a/frontend-js/src/main/js/gui/export/AbstractExportPanel.js +++ b/frontend-js/src/main/js/gui/export/AbstractExportPanel.js @@ -105,11 +105,16 @@ AbstractExportPanel.prototype._createSelectTypeDiv = function (elementTypes) { className: "minerva-checkbox-grid" }); typeDiv.appendChild(choicesContainer); + var i; + var toBeExcluded = []; + for (i = 0; i < elementTypes.length; i++) { + toBeExcluded[elementTypes[i].parentClass] = true; + } var processedNames = []; - for (var i = 0; i < elementTypes.length; i++) { + for (i = 0; i < elementTypes.length; i++) { var elementType = elementTypes[i]; var name = elementType.name; - if (processedNames[name] === undefined) { + if (processedNames[name] === undefined && toBeExcluded[elementType.className] === undefined) { processedNames[name] = true; var row = Functions.createElement({ type: "li", @@ -139,7 +144,7 @@ AbstractExportPanel.prototype.getSelectedTypes = function () { }); if (selectedAll) { return ServerConnector.getConfiguration().then(function (configuration) { - return configuration.getElementTypeNames(); + return configuration.getSimpleElementTypeNames(); }); } diff --git a/frontend-js/src/main/js/map/data/Annotator.js b/frontend-js/src/main/js/map/data/Annotator.js new file mode 100644 index 0000000000000000000000000000000000000000..e7cf07f4db736568d2f445918a5643d125d0ccfe --- /dev/null +++ b/frontend-js/src/main/js/map/data/Annotator.js @@ -0,0 +1,71 @@ +"use strict"; + +/* exported logger */ + +var Article = require("./Article"); + +var logger = require('../../logger'); + +function Annotator(javaObject, configuration) { + var self = this; + self.setClassName(javaObject.className); + self.setElementTypes(javaObject.elementClassNames, configuration); + self.setName(javaObject.name); + self.setUrl(javaObject.url); +} + +Annotator.prototype.setClassName = function (className) { + this._className = className; +}; + +Annotator.prototype.getClassName = function () { + return this._className; +}; + +Annotator.prototype.setName = function (name) { + this._name = name; +}; + +Annotator.prototype.getName = function () { + return this._name; +}; + +Annotator.prototype.setUrl = function (url) { + this._url = url; +}; + +Annotator.prototype.getUrl = function () { + return this._url; +}; + +Annotator.prototype.setElementTypes = function (elementTypesClassNames, configuration) { + this._elementTypes = []; + var typeByClassName = {}; + var types = configuration.getElementTypes(); + var i; + for (i = 0; i < types.length; i++) { + var type = types[i]; + typeByClassName[type.className] = type; + } + types = configuration.getReactionTypes(); + for (i = 0; i < types.length; i++) { + var type = types[i]; + typeByClassName[type.className] = type; + } + + for (i = 0; i < elementTypesClassNames.length; i++) { + var type = typeByClassName[elementTypesClassNames[i]]; + if (type !== undefined) { + this._elementTypes.push(type) + } else { + throw new Error("Unknown elementType: " + elementTypesClassNames[i]); + } + } +}; + +Annotator.prototype.getElementTypes = function () { + return this._elementTypes; +}; + + +module.exports = Annotator; diff --git a/frontend-js/src/main/js/map/data/UserPreferences.js b/frontend-js/src/main/js/map/data/UserPreferences.js index ac5cc24f62e986a2ca9bd855a440d6c5d60c3c36..e4b36b9b84320bd7e14b10560f5e8183fffce133 100644 --- a/frontend-js/src/main/js/map/data/UserPreferences.js +++ b/frontend-js/src/main/js/map/data/UserPreferences.js @@ -68,7 +68,8 @@ UserPreferences.prototype.toExport = function () { "cache-data": this._projectUpload.cacheData, "sbgn": this._projectUpload.sbgn, "semantic-zooming": this._projectUpload.semanticZooming - } + }, + "element-annotators": this._elementAnnotators, }; }; diff --git a/frontend-js/src/main/js/minerva.js b/frontend-js/src/main/js/minerva.js index 3e3ece2499c8e66f91f8e960b5f6c66503d1e808..938bb1c8ca1d52b1b37f7ab872539d3cd5ef57f7 100644 --- a/frontend-js/src/main/js/minerva.js +++ b/frontend-js/src/main/js/minerva.js @@ -336,7 +336,7 @@ function createResult(customMap) { var promises = []; for (i = 0; i < models.length; i++) { promises.push(models[i].getAliases({ - type: customMap.getConfiguration().getElementTypeNames(), + type: customMap.getConfiguration().getSimpleElementTypeNames(), complete: true })); } diff --git a/frontend-js/src/test/js/Configuration-test.js b/frontend-js/src/test/js/Configuration-test.js new file mode 100644 index 0000000000000000000000000000000000000000..a4177498e89b5c0c678dcb68de64ec4c7e09dfea --- /dev/null +++ b/frontend-js/src/test/js/Configuration-test.js @@ -0,0 +1,60 @@ +"use strict"; + +/* exported logger */ +/* exported assert */ + +require("./mocha-config"); + +var Configuration = require('../../main/js/Configuration'); +var logger = require('./logger'); + +var assert = require('assert'); + +describe('Configuration', function () { + + describe('getParentType', function () { + it('for element type', function () { + return ServerConnector.getConfiguration().then(function (configuration) { + var elementType = configuration.getElementTypes()[0]; + if (elementType.parentClass.indexOf("BioEntity") > 0) { + elementType = configuration.getElementTypes()[1]; + } + var parent = configuration.getParentType(elementType); + assert.ok(parent); + }); + }); + it('for reaction type', function () { + return ServerConnector.getConfiguration().then(function (configuration) { + var elementType = configuration.getReactionTypes()[0]; + if (elementType.parentClass.indexOf("BioEntity") > 0) { + elementType = configuration.getReactionTypes()[1]; + } + var parent = configuration.getParentType(elementType); + assert.ok(parent); + }); + }); + }); + + describe('getElementAnnotators', function () { + it('get all', function () { + return ServerConnector.getConfiguration().then(function (configuration) { + var annotators = configuration.getElementAnnotators(); + assert.ok(annotators); + assert.ok(annotators.length > 0); + }); + }); + it('get for element', function () { + return ServerConnector.getConfiguration().then(function (configuration) { + var found = false; + var types = configuration.getElementTypes(); + for (var i = 0; i < types.length; i++) { + var annotators = configuration.getElementAnnotators(types[i]); + if (annotators.length > 0) { + found = true; + } + } + assert.ok(found); + }); + }); + }); +}); diff --git a/frontend-js/src/test/js/gui/admin/AddProjectDialog-test.js b/frontend-js/src/test/js/gui/admin/AddProjectDialog-test.js index bfcd3c2913606ad638082d22103786c19fd9bc16..50d53689717e43f64af90a583f190e09f7f2ba0d 100644 --- a/frontend-js/src/test/js/gui/admin/AddProjectDialog-test.js +++ b/frontend-js/src/test/js/gui/admin/AddProjectDialog-test.js @@ -16,7 +16,7 @@ describe('AddProjectDialog', function () { element: testDiv, customMap: null }); - return ServerConnector.login("admin", "admin").then(function(){ + return ServerConnector.login("admin", "admin").then(function () { return dialog.init(); }).then(function () { assert.ok(dialog.getNotifyEmail() !== ""); @@ -28,7 +28,7 @@ describe('AddProjectDialog', function () { element: testDiv, customMap: null }); - return ServerConnector.login("admin", "admin").then(function(){ + return ServerConnector.login("admin", "admin").then(function () { return dialog.init(); }).then(function () { dialog.setCache(false); @@ -59,6 +59,20 @@ describe('AddProjectDialog', function () { }); }); + describe('showAnnotatorsDialog', function () { + it('default', function () { + var dialog = new AddProjectDialog({ + element: testDiv, + customMap: null + }); + + return dialog.showAnnotatorsDialog().then(function () { + dialog.destroy(); + }); + }); + }); + + describe('onSaveClicked', function () { var originalAddProject; beforeEach(function () { diff --git a/frontend-js/src/test/js/gui/admin/ChooseAnnotatorsDialog-test.js b/frontend-js/src/test/js/gui/admin/ChooseAnnotatorsDialog-test.js new file mode 100644 index 0000000000000000000000000000000000000000..e9831410f589583baf9429cb6e02cb3526f43052 --- /dev/null +++ b/frontend-js/src/test/js/gui/admin/ChooseAnnotatorsDialog-test.js @@ -0,0 +1,47 @@ +"use strict"; + +/* exported assert */ +/* exported logger */ +require("../../mocha-config"); + +var ChooseAnnotatorsDialog = require('../../../../main/js/gui/admin/ChooseAnnotatorsDialog'); +var logger = require('../../logger'); + +var chai = require('chai'); +var assert = chai.assert; + +describe('ChooseAnnotatorsDialog', function () { + it('init', function () { + var dialog = new ChooseAnnotatorsDialog({ + element: testDiv, + customMap: null + }); + return dialog.init(); + }); + + it('createElementTree', function () { + var dialog = new ChooseAnnotatorsDialog({ + element: testDiv, + customMap: null + }); + return ServerConnector.getConfiguration().then(function (configuration) { + var treeData = dialog.createElementTree(configuration); + + assert.ok(treeData); + assert.ok(treeData.text); + assert.ok(treeData.children); + assert.equal(2, treeData.children.length); + }) + }); + + it('setElementType', function () { + var dialog = new ChooseAnnotatorsDialog({ + element: testDiv, + customMap: null + }); + return ServerConnector.getConfiguration().then(function (configuration) { + return dialog.setElementType(configuration.getReactionTypes()[0]); + }) + }); + +}); diff --git a/frontend-js/src/test/js/gui/admin/EditProjectDialog-test.js b/frontend-js/src/test/js/gui/admin/EditProjectDialog-test.js index 3dfae65b9143638df48a695f887fe8262a7fd237..6e16c5a8811ec1cca06f7f218153fd2633b108ef 100644 --- a/frontend-js/src/test/js/gui/admin/EditProjectDialog-test.js +++ b/frontend-js/src/test/js/gui/admin/EditProjectDialog-test.js @@ -35,7 +35,7 @@ describe('EditProjectDialog', function () { dialog = new EditProjectDialog({ element: testDiv, project: project, - customMap: null, + customMap: null }); return dialog.init(); }).then(function () { diff --git a/frontend-js/src/test/js/gui/export/ElementExportPanel-test.js b/frontend-js/src/test/js/gui/export/ElementExportPanel-test.js index 53e2c805550d973b9aff79886a1429eef38c3d34..1998c1f27983bd45acf715c65b4040cb0a3b8506 100644 --- a/frontend-js/src/test/js/gui/export/ElementExportPanel-test.js +++ b/frontend-js/src/test/js/gui/export/ElementExportPanel-test.js @@ -23,7 +23,7 @@ describe('ElementExportPanel', function() { exportObject = new ElementExportPanel({ element : testDiv, project : project, - configuration : configuration, + configuration : configuration }); return exportObject.init(); }).then(function() { @@ -44,14 +44,14 @@ describe('ElementExportPanel', function() { return ServerConnector.getConfiguration().then(function(result) { configuration = result; - elementTypes = configuration.getElementTypeNames(); + elementTypes = configuration.getSimpleElementTypeNames(); return ServerConnector.getProject(); }).then(function(result) { project = result; exportObject = new ElementExportPanel({ element : testDiv, project : project, - configuration : configuration, + configuration : configuration }); return exportObject.init(); }).then(function() { @@ -79,7 +79,7 @@ describe('ElementExportPanel', function() { exportObject = new ElementExportPanel({ element : testDiv, project : project, - configuration : configuration, + configuration : configuration }); return exportObject.init(); }).then(function() { @@ -106,7 +106,7 @@ describe('ElementExportPanel', function() { exportObject = new ElementExportPanel({ element : testDiv, project : project, - configuration : configuration, + configuration : configuration }); return exportObject.init(); }).then(function() { @@ -134,7 +134,7 @@ describe('ElementExportPanel', function() { exportObject = new ElementExportPanel({ element : testDiv, project : project, - configuration : configuration, + configuration : configuration }); return exportObject.init(); }).then(function() { @@ -162,7 +162,7 @@ describe('ElementExportPanel', function() { exportObject = new ElementExportPanel({ element : testDiv, project : project, - configuration : configuration, + configuration : configuration }); return exportObject.init(); }).then(function() { @@ -187,7 +187,7 @@ describe('ElementExportPanel', function() { exportObject = new ElementExportPanel({ element : testDiv, project : project, - configuration : configuration, + configuration : configuration }); return exportObject.init(); }).then(function() { @@ -212,7 +212,7 @@ describe('ElementExportPanel', function() { exportObject = new ElementExportPanel({ element : testDiv, project : project, - configuration : configuration, + configuration : configuration }); return exportObject.init(); }).then(function() { @@ -239,7 +239,7 @@ describe('ElementExportPanel', function() { exportObject = new ElementExportPanel({ element : testDiv, project : project, - configuration : configuration, + configuration : configuration }); return exportObject.init(); }).then(function() { @@ -260,7 +260,7 @@ describe('ElementExportPanel', function() { exportObject = new ElementExportPanel({ element : testDiv, project : project, - configuration : configuration, + configuration : configuration }); return exportObject.init(); }).then(function() { @@ -277,7 +277,7 @@ describe('ElementExportPanel', function() { var exportObject = new ElementExportPanel({ element : testDiv, project : helper.createProject(), - configuration : helper.getConfiguration(), + configuration : helper.getConfiguration() }); var alias = helper.createAlias(); var desc = "test\ntest2\n"; diff --git a/frontend-js/src/test/js/mocha-config.js b/frontend-js/src/test/js/mocha-config.js index 37de29a2e5cec71cde026cf317c74fd3c36b5751..aba7cbc2ecd92fb5b92da32e4a14ac830afec538 100644 --- a/frontend-js/src/test/js/mocha-config.js +++ b/frontend-js/src/test/js/mocha-config.js @@ -92,6 +92,7 @@ global.window.$ = $; require("bootstrap"); require('datatables.net')(window, $); + require('jstree'); global.google = require('./google-map-mock'); diff --git a/frontend-js/testFiles/apiCalls/configuration/token=MOCK_TOKEN_ID& b/frontend-js/testFiles/apiCalls/configuration/token=MOCK_TOKEN_ID& index a3468b4c0b9c68bcc391f3f539a876414f2b4f72..87bada811f18fa43905db6a71d4b83047d186854 100644 --- a/frontend-js/testFiles/apiCalls/configuration/token=MOCK_TOKEN_ID& +++ b/frontend-js/testFiles/apiCalls/configuration/token=MOCK_TOKEN_ID& @@ -1 +1 @@ -{"modelFormats":[{"handler":"lcsb.mapviewer.converter.model.celldesigner.CellDesignerXmlParser","extension":"xml","name":"CellDesigner SBML"},{"handler":"lcsb.mapviewer.converter.model.sbgnml.SbgnmlXmlConverter","extension":"sbgn","name":"SBGN-ML"}],"elementTypes":[{"name":"Ion","className":"lcsb.mapviewer.model.map.species.Element"},{"name":"Simple molecule","className":"lcsb.mapviewer.model.map.species.Element"},{"name":"Compartment","className":"lcsb.mapviewer.model.map.species.Element"},{"name":"Degraded","className":"lcsb.mapviewer.model.map.species.Element"},{"name":"Complex","className":"lcsb.mapviewer.model.map.species.Element"},{"name":"Antisense RNA","className":"lcsb.mapviewer.model.map.species.Element"},{"name":"Protein","className":"lcsb.mapviewer.model.map.species.Element"},{"name":"Phenotype","className":"lcsb.mapviewer.model.map.species.Element"},{"name":"Gene","className":"lcsb.mapviewer.model.map.species.Element"},{"name":"RNA","className":"lcsb.mapviewer.model.map.species.Element"},{"name":"Drug","className":"lcsb.mapviewer.model.map.species.Element"},{"name":"Unknown","className":"lcsb.mapviewer.model.map.species.Element"}],"modificationStateTypes":{"PHOSPHORYLATED":{"commonName":"phosphorylated","abbreviation":"P"},"METHYLATED":{"commonName":"methylated","abbreviation":"Me"},"PALMYTOYLATED":{"commonName":"palmytoylated","abbreviation":"Pa"},"ACETYLATED":{"commonName":"acetylated","abbreviation":"Ac"},"SULFATED":{"commonName":"sulfated","abbreviation":"S"},"GLYCOSYLATED":{"commonName":"glycosylated","abbreviation":"G"},"PRENYLATED":{"commonName":"prenylated","abbreviation":"Pr"},"UBIQUITINATED":{"commonName":"ubiquitinated","abbreviation":"Ub"},"PROTONATED":{"commonName":"protonated","abbreviation":"H"},"HYDROXYLATED":{"commonName":"hydroxylated","abbreviation":"OH"},"MYRISTOYLATED":{"commonName":"myristoylated","abbreviation":"My"},"UNKNOWN":{"commonName":"unknown","abbreviation":"?"},"EMPTY":{"commonName":"empty","abbreviation":""},"DONT_CARE":{"commonName":"don't care","abbreviation":"*"}},"miriamTypes":{"CHEMBL_TARGET":{"commonName":"ChEMBL target","uris":["urn:miriam:chembl.target"],"homepage":"https://www.ebi.ac.uk/chembldb/","registryIdentifier":"MIR:00000085"},"UNIPROT":{"commonName":"Uniprot","uris":["urn:miriam:uniprot"],"homepage":"http://www.uniprot.org/","registryIdentifier":"MIR:00000005"},"MI_R_BASE_MATURE_SEQUENCE":{"commonName":"miRBase Mature Sequence Database","uris":["urn:miriam:mirbase.mature"],"homepage":"http://www.mirbase.org/","registryIdentifier":"MIR:00000235"},"PFAM":{"commonName":"Protein Family Database","uris":["urn:miriam:pfam"],"homepage":"http://pfam.xfam.org//","registryIdentifier":"MIR:00000028"},"ENSEMBL_PLANTS":{"commonName":"Ensembl Plants","uris":["urn:miriam:ensembl.plant"],"homepage":"http://plants.ensembl.org/","registryIdentifier":"MIR:00000205"},"WIKIPEDIA":{"commonName":"Wikipedia (English)","uris":["urn:miriam:wikipedia.en"],"homepage":"http://en.wikipedia.org/wiki/Main_Page","registryIdentifier":"MIR:00000384"},"CHEBI":{"commonName":"Chebi","uris":["urn:miriam:obo.chebi","urn:miriam:chebi"],"homepage":"http://www.ebi.ac.uk/chebi/","registryIdentifier":"MIR:00000002"},"WIKIDATA":{"commonName":"Wikidata","uris":["urn:miriam:wikidata"],"homepage":"https://www.wikidata.org/","registryIdentifier":"MIR:00000549"},"REACTOME":{"commonName":"Reactome","uris":["urn:miriam:reactome"],"homepage":"http://www.reactome.org/","registryIdentifier":"MIR:00000018"},"EC":{"commonName":"Enzyme Nomenclature","uris":["urn:miriam:ec-code"],"homepage":"http://www.enzyme-database.org/","registryIdentifier":"MIR:00000004"},"UNIPROT_ISOFORM":{"commonName":"UniProt Isoform","uris":["urn:miriam:uniprot.isoform"],"homepage":"http://www.uniprot.org/","registryIdentifier":"MIR:00000388"},"OMIM":{"commonName":"Online Mendelian Inheritance in Man","uris":["urn:miriam:omim"],"homepage":"http://omim.org/","registryIdentifier":"MIR:00000016"},"DRUGBANK_TARGET_V4":{"commonName":"DrugBank Target v4","uris":["urn:miriam:drugbankv4.target"],"homepage":"http://www.drugbank.ca/targets","registryIdentifier":"MIR:00000528"},"MIR_TAR_BASE_MATURE_SEQUENCE":{"commonName":"miRTarBase Mature Sequence Database","uris":["urn:miriam:mirtarbase"],"homepage":"http://mirtarbase.mbc.nctu.edu.tw/","registryIdentifier":"MIR:00100739"},"CHEMBL_COMPOUND":{"commonName":"ChEMBL","uris":["urn:miriam:chembl.compound"],"homepage":"https://www.ebi.ac.uk/chembldb/","registryIdentifier":"MIR:00000084"},"KEGG_PATHWAY":{"commonName":"Kegg Pathway","uris":["urn:miriam:kegg.pathway"],"homepage":"http://www.genome.jp/kegg/pathway.html","registryIdentifier":"MIR:00000012"},"CAS":{"commonName":"Chemical Abstracts Service","uris":["urn:miriam:cas"],"homepage":"http://commonchemistry.org","registryIdentifier":"MIR:00000237"},"REFSEQ":{"commonName":"RefSeq","uris":["urn:miriam:refseq"],"homepage":"http://www.ncbi.nlm.nih.gov/projects/RefSeq/","registryIdentifier":"MIR:00000039"},"WORM_BASE":{"commonName":"WormBase","uris":["urn:miriam:wormbase"],"homepage":"http://wormbase.bio2rdf.org/fct","registryIdentifier":"MIR:00000027"},"MI_R_BASE_SEQUENCE":{"commonName":"miRBase Sequence Database","uris":["urn:miriam:mirbase"],"homepage":"http://www.mirbase.org/","registryIdentifier":"MIR:00000078"},"TAIR_LOCUS":{"commonName":"TAIR Locus","uris":["urn:miriam:tair.locus"],"homepage":"http://arabidopsis.org/index.jsp","registryIdentifier":"MIR:00000050"},"PHARM":{"commonName":"PharmGKB Pathways","uris":["urn:miriam:pharmgkb.pathways"],"homepage":"http://www.pharmgkb.org/","registryIdentifier":"MIR:00000089"},"PANTHER":{"commonName":"PANTHER Family","uris":["urn:miriam:panther.family","urn:miriam:panther"],"homepage":"http://www.pantherdb.org/","registryIdentifier":"MIR:00000060"},"TAXONOMY":{"commonName":"Taxonomy","uris":["urn:miriam:taxonomy"],"homepage":"http://www.ncbi.nlm.nih.gov/taxonomy/","registryIdentifier":"MIR:00000006"},"UNIGENE":{"commonName":"UniGene","uris":["urn:miriam:unigene"],"homepage":"http://www.ncbi.nlm.nih.gov/unigene","registryIdentifier":"MIR:00000346"},"HGNC":{"commonName":"HGNC","uris":["urn:miriam:hgnc"],"homepage":"http://www.genenames.org","registryIdentifier":"MIR:00000080"},"HGNC_SYMBOL":{"commonName":"HGNC Symbol","uris":["urn:miriam:hgnc.symbol"],"homepage":"http://www.genenames.org","registryIdentifier":"MIR:00000362"},"COG":{"commonName":"Clusters of Orthologous Groups","uris":["urn:miriam:cogs"],"homepage":"https://www.ncbi.nlm.nih.gov/COG/","registryIdentifier":"MIR:00000296"},"WIKIPATHWAYS":{"commonName":"WikiPathways","uris":["urn:miriam:wikipathways"],"homepage":"http://www.wikipathways.org/","registryIdentifier":"MIR:00000076"},"HMDB":{"commonName":"HMDB","uris":["urn:miriam:hmdb"],"homepage":"http://www.hmdb.ca/","registryIdentifier":"MIR:00000051"},"CHEMSPIDER":{"commonName":"ChemSpider","uris":["urn:miriam:chemspider"],"homepage":"http://www.chemspider.com//","registryIdentifier":"MIR:00000138"},"ENSEMBL":{"commonName":"Ensembl","uris":["urn:miriam:ensembl"],"homepage":"www.ensembl.org","registryIdentifier":"MIR:00000003"},"GO":{"commonName":"Gene Ontology","uris":["urn:miriam:obo.go","urn:miriam:go"],"homepage":"http://amigo.geneontology.org/amigo","registryIdentifier":"MIR:00000022"},"KEGG_REACTION":{"commonName":"Kegg Reaction","uris":["urn:miriam:kegg.reaction"],"homepage":"http://www.genome.jp/kegg/reaction/","registryIdentifier":"MIR:00000014"},"KEGG_ORTHOLOGY":{"commonName":"KEGG Orthology","uris":["urn:miriam:kegg.orthology"],"homepage":"http://www.genome.jp/kegg/ko.html","registryIdentifier":"MIR:00000116"},"PUBCHEM":{"commonName":"PubChem-compound","uris":["urn:miriam:pubchem.compound"],"homepage":"http://pubchem.ncbi.nlm.nih.gov/","registryIdentifier":"MIR:00000034"},"MESH_2012":{"commonName":"MeSH 2012","uris":["urn:miriam:mesh.2012","urn:miriam:mesh"],"homepage":"http://www.nlm.nih.gov/mesh/","registryIdentifier":"MIR:00000270"},"MGD":{"commonName":"Mouse Genome Database","uris":["urn:miriam:mgd"],"homepage":"http://www.informatics.jax.org/","registryIdentifier":"MIR:00000037"},"ENTREZ":{"commonName":"Entrez Gene","uris":["urn:miriam:ncbigene","urn:miriam:entrez.gene"],"homepage":"http://www.ncbi.nlm.nih.gov/gene","registryIdentifier":"MIR:00000069"},"PUBCHEM_SUBSTANCE":{"commonName":"PubChem-substance","uris":["urn:miriam:pubchem.substance"],"homepage":"http://pubchem.ncbi.nlm.nih.gov/","registryIdentifier":"MIR:00000033"},"CCDS":{"commonName":"Consensus CDS","uris":["urn:miriam:ccds"],"homepage":"http://www.ncbi.nlm.nih.gov/CCDS/","registryIdentifier":"MIR:00000375"},"KEGG_GENES":{"commonName":"Kegg Genes","uris":["urn:miriam:kegg.genes","urn:miriam:kegg.genes:hsa"],"homepage":"http://www.genome.jp/kegg/genes.html","registryIdentifier":"MIR:00000070"},"TOXICOGENOMIC_CHEMICAL":{"commonName":"Toxicogenomic Chemical","uris":["urn:miriam:ctd.chemical"],"homepage":"http://ctdbase.org/","registryIdentifier":"MIR:00000098"},"SGD":{"commonName":"Saccharomyces Genome Database","uris":["urn:miriam:sgd"],"homepage":"http://www.yeastgenome.org/","registryIdentifier":"MIR:00000023"},"KEGG_COMPOUND":{"commonName":"Kegg Compound","uris":["urn:miriam:kegg.compound"],"homepage":"http://www.genome.jp/kegg/ligand.html","registryIdentifier":"MIR:00000013"},"INTERPRO":{"commonName":"InterPro","uris":["urn:miriam:interpro"],"homepage":"http://www.ebi.ac.uk/interpro/","registryIdentifier":"MIR:00000011"},"UNKNOWN":{"commonName":"Unknown","uris":[],"homepage":null,"registryIdentifier":null},"DRUGBANK":{"commonName":"DrugBank","uris":["urn:miriam:drugbank"],"homepage":"http://www.drugbank.ca/","registryIdentifier":"MIR:00000102"},"PUBMED":{"commonName":"PubMed","uris":["urn:miriam:pubmed"],"homepage":"http://www.ncbi.nlm.nih.gov/PubMed/","registryIdentifier":"MIR:00000015"}},"imageFormats":[{"handler":"lcsb.mapviewer.converter.graphics.PngImageGenerator","extension":"png","name":"PNG image"},{"handler":"lcsb.mapviewer.converter.graphics.PdfImageGenerator","extension":"pdf","name":"PDF"},{"handler":"lcsb.mapviewer.converter.graphics.SvgImageGenerator","extension":"svg","name":"SVG image"}],"annotators":[{"name":"Biocompendium","className":"lcsb.mapviewer.annotation.services.annotators.BiocompendiumAnnotator","elementClassNames":["lcsb.mapviewer.model.map.species.Protein","lcsb.mapviewer.model.map.species.Protein","lcsb.mapviewer.model.map.species.Protein"],"url":"http://biocompendium.embl.de/"},{"name":"Chebi","className":"lcsb.mapviewer.annotation.services.annotators.ChebiAnnotator","elementClassNames":["lcsb.mapviewer.model.map.species.Chemical"],"url":"http://www.ebi.ac.uk/chebi/"},{"name":"Uniprot","className":"lcsb.mapviewer.annotation.services.annotators.UniprotAnnotator","elementClassNames":["lcsb.mapviewer.model.map.species.Protein","lcsb.mapviewer.model.map.species.Gene","lcsb.mapviewer.model.map.species.Rna"],"url":"http://www.uniprot.org/"},{"name":"Gene Ontology","className":"lcsb.mapviewer.annotation.services.annotators.GoAnnotator","elementClassNames":["lcsb.mapviewer.model.map.species.Phenotype","lcsb.mapviewer.model.map.compartment.Compartment","lcsb.mapviewer.model.map.species.Complex"],"url":"http://amigo.geneontology.org/amigo"},{"name":"HGNC","className":"lcsb.mapviewer.annotation.services.annotators.HgncAnnotator","elementClassNames":["lcsb.mapviewer.model.map.species.Protein","lcsb.mapviewer.model.map.species.Rna","lcsb.mapviewer.model.map.species.Gene"],"url":"http://www.genenames.org"},{"name":"Recon annotator","className":"lcsb.mapviewer.annotation.services.annotators.ReconAnnotator","elementClassNames":["lcsb.mapviewer.model.map.species.Chemical","lcsb.mapviewer.model.map.reaction.Reaction"],"url":"http://humanmetabolism.org/"},{"name":"Entrez Gene","className":"lcsb.mapviewer.annotation.services.annotators.EntrezAnnotator","elementClassNames":["lcsb.mapviewer.model.map.species.Protein","lcsb.mapviewer.model.map.species.Rna","lcsb.mapviewer.model.map.species.Gene"],"url":"http://www.ncbi.nlm.nih.gov/gene"},{"name":"Ensembl","className":"lcsb.mapviewer.annotation.services.annotators.EnsemblAnnotator","elementClassNames":["lcsb.mapviewer.model.map.species.Protein","lcsb.mapviewer.model.map.species.Rna","lcsb.mapviewer.model.map.species.Gene"],"url":"www.ensembl.org"}],"options":[{"idObject":9,"type":"EMAIL_ADDRESS","value":"your.account@domain.com"},{"idObject":10,"type":"EMAIL_LOGIN","value":"your@login"},{"idObject":11,"type":"EMAIL_PASSWORD","value":"email.secret.password"},{"idObject":13,"type":"EMAIL_IMAP_SERVER","value":"your.imap.domain.com"},{"idObject":12,"type":"EMAIL_SMTP_SERVER","value":"your.smtp.domain.com"},{"idObject":14,"type":"EMAIL_SMTP_PORT","value":"25"},{"idObject":6,"type":"DEFAULT_MAP","value":"sample"},{"idObject":4,"type":"LOGO_IMG","value":"udl.png"},{"idObject":3,"type":"LOGO_LINK","value":"http://wwwen.uni.lu/"},{"idObject":7,"type":"SEARCH_DISTANCE","value":"10"},{"idObject":1,"type":"REQUEST_ACCOUNT_EMAIL","value":"your.email@domain.com"},{"idObject":8,"type":"SEARCH_RESULT_NUMBER","value":"100"},{"idObject":2,"type":"GOOGLE_ANALYTICS_IDENTIFIER","value":""},{"idObject":5,"type":"LOGO_TEXT","value":"University of Luxembourg"},{"idObject":56,"type":"X_FRAME_DOMAIN","value":"http://localhost:8080/"},{"idObject":131,"type":"BIG_FILE_STORAGE_DIR","value":"minerva-big/"},{"idObject":138,"type":"LEGEND_FILE_1","value":"resources/images/legend_a.png"},{"idObject":139,"type":"LEGEND_FILE_2","value":"resources/images/legend_b.png"},{"idObject":140,"type":"LEGEND_FILE_3","value":"resources/images/legend_c.png"},{"idObject":141,"type":"LEGEND_FILE_4","value":"resources/images/legend_d.png"},{"idObject":142,"type":"USER_MANUAL_FILE","value":"resources/other/user_guide.pdf"},{"idObject":205,"type":"MIN_COLOR_VAL","value":"FF0000"},{"idObject":206,"type":"MAX_COLOR_VAL","value":"fbff00"},{"idObject":218,"type":"SIMPLE_COLOR_VAL","value":"00FF00"}],"privilegeTypes":{"VIEW_PROJECT":{"commonName":"View project","valueType":"boolean","objectType":"Project"},"LAYOUT_MANAGEMENT":{"commonName":"Manage layouts","valueType":"boolean","objectType":"Project"},"PROJECT_MANAGEMENT":{"commonName":"Map management","valueType":"boolean","objectType":null},"CUSTOM_LAYOUTS":{"commonName":"Custom layouts","valueType":"int","objectType":null},"ADD_MAP":{"commonName":"Add project","valueType":"boolean","objectType":null},"LAYOUT_VIEW":{"commonName":"View layout","valueType":"boolean","objectType":"Layout"},"MANAGE_GENOMES":{"commonName":"Manage genomes","valueType":"boolean","objectType":null},"EDIT_COMMENTS_PROJECT":{"commonName":"Manage comments","valueType":"boolean","objectType":"Project"},"CONFIGURATION_MANAGE":{"commonName":"Manage configuration","valueType":"boolean","objectType":null},"USER_MANAGEMENT":{"commonName":"User management","valueType":"boolean","objectType":null}},"overlayTypes":[{"name":"GENERIC"},{"name":"GENETIC_VARIANT"}],"buildDate":"30/08/2017 16:05","reactionTypes":[{"name":"Unknown reduced modulation","className":"lcsb.mapviewer.model.map.reaction.Reaction"},{"name":"Unknown reduced physical stimulation","className":"lcsb.mapviewer.model.map.reaction.Reaction"},{"name":"State transition","className":"lcsb.mapviewer.model.map.reaction.Reaction"},{"name":"Translation","className":"lcsb.mapviewer.model.map.reaction.Reaction"},{"name":"Transport","className":"lcsb.mapviewer.model.map.reaction.Reaction"},{"name":"Heterodimer association","className":"lcsb.mapviewer.model.map.reaction.Reaction"},{"name":"Dissociation","className":"lcsb.mapviewer.model.map.reaction.Reaction"},{"name":"Positive influence","className":"lcsb.mapviewer.model.map.reaction.Reaction"},{"name":"Transcription","className":"lcsb.mapviewer.model.map.reaction.Reaction"},{"name":"Unknown reduced trigger","className":"lcsb.mapviewer.model.map.reaction.Reaction"},{"name":"Reduced physical stimulation","className":"lcsb.mapviewer.model.map.reaction.Reaction"},{"name":"Negative influence","className":"lcsb.mapviewer.model.map.reaction.Reaction"},{"name":"Boolean logic gate","className":"lcsb.mapviewer.model.map.reaction.Reaction"},{"name":"Reduced trigger","className":"lcsb.mapviewer.model.map.reaction.Reaction"},{"name":"Truncation","className":"lcsb.mapviewer.model.map.reaction.Reaction"},{"name":"Unknown transition","className":"lcsb.mapviewer.model.map.reaction.Reaction"},{"name":"Unknown positive influence","className":"lcsb.mapviewer.model.map.reaction.Reaction"},{"name":"Known transition omitted","className":"lcsb.mapviewer.model.map.reaction.Reaction"},{"name":"Generic Reaction","className":"lcsb.mapviewer.model.map.reaction.Reaction"},{"name":"Unknown negative influence","className":"lcsb.mapviewer.model.map.reaction.Reaction"},{"name":"Reduced modulation","className":"lcsb.mapviewer.model.map.reaction.Reaction"}],"version":"11.0.0"} \ No newline at end of file +{"modelFormats":[{"handler":"lcsb.mapviewer.converter.model.celldesigner.CellDesignerXmlParser","extension":"xml","name":"CellDesigner SBML"},{"handler":"lcsb.mapviewer.converter.model.sbgnml.SbgnmlXmlConverter","extension":"sbgn","name":"SBGN-ML"}],"elementTypes":[{"name":"Degraded","className":"lcsb.mapviewer.model.map.species.Degraded","parentClass":"lcsb.mapviewer.model.map.species.Species"},{"name":"Compartment","className":"lcsb.mapviewer.model.map.compartment.LeftSquareCompartment","parentClass":"lcsb.mapviewer.model.map.compartment.Compartment"},{"name":"Protein","className":"lcsb.mapviewer.model.map.species.IonChannelProtein","parentClass":"lcsb.mapviewer.model.map.species.Protein"},{"name":"Compartment","className":"lcsb.mapviewer.model.map.compartment.TopSquareCompartment","parentClass":"lcsb.mapviewer.model.map.compartment.Compartment"},{"name":"Ion","className":"lcsb.mapviewer.model.map.species.Ion","parentClass":"lcsb.mapviewer.model.map.species.Chemical"},{"name":"Species","className":"lcsb.mapviewer.model.map.species.Species","parentClass":"lcsb.mapviewer.model.map.species.Element"},{"name":"Compartment","className":"lcsb.mapviewer.model.map.compartment.RightSquareCompartment","parentClass":"lcsb.mapviewer.model.map.compartment.Compartment"},{"name":"Drug","className":"lcsb.mapviewer.model.map.species.Drug","parentClass":"lcsb.mapviewer.model.map.species.Species"},{"name":"Protein","className":"lcsb.mapviewer.model.map.species.Protein","parentClass":"lcsb.mapviewer.model.map.species.Species"},{"name":"Protein","className":"lcsb.mapviewer.model.map.species.TruncatedProtein","parentClass":"lcsb.mapviewer.model.map.species.Protein"},{"name":"Compartment","className":"lcsb.mapviewer.model.map.compartment.PathwayCompartment","parentClass":"lcsb.mapviewer.model.map.compartment.Compartment"},{"name":"Compartment","className":"lcsb.mapviewer.model.map.compartment.BottomSquareCompartment","parentClass":"lcsb.mapviewer.model.map.compartment.Compartment"},{"name":"RNA","className":"lcsb.mapviewer.model.map.species.Rna","parentClass":"lcsb.mapviewer.model.map.species.Species"},{"name":"Chemical","className":"lcsb.mapviewer.model.map.species.Chemical","parentClass":"lcsb.mapviewer.model.map.species.Species"},{"name":"Compartment","className":"lcsb.mapviewer.model.map.compartment.Compartment","parentClass":"lcsb.mapviewer.model.map.species.Element"},{"name":"Compartment","className":"lcsb.mapviewer.model.map.compartment.OvalCompartment","parentClass":"lcsb.mapviewer.model.map.compartment.Compartment"},{"name":"Compartment","className":"lcsb.mapviewer.model.map.compartment.SquareCompartment","parentClass":"lcsb.mapviewer.model.map.compartment.Compartment"},{"name":"Unknown","className":"lcsb.mapviewer.model.map.species.Unknown","parentClass":"lcsb.mapviewer.model.map.species.Species"},{"name":"Element","className":"lcsb.mapviewer.model.map.species.Element","parentClass":"lcsb.mapviewer.model.map.BioEntity"},{"name":"Phenotype","className":"lcsb.mapviewer.model.map.species.Phenotype","parentClass":"lcsb.mapviewer.model.map.species.Species"},{"name":"Complex","className":"lcsb.mapviewer.model.map.species.Complex","parentClass":"lcsb.mapviewer.model.map.species.Species"},{"name":"Antisense RNA","className":"lcsb.mapviewer.model.map.species.AntisenseRna","parentClass":"lcsb.mapviewer.model.map.species.Species"},{"name":"Protein","className":"lcsb.mapviewer.model.map.species.ReceptorProtein","parentClass":"lcsb.mapviewer.model.map.species.Protein"},{"name":"Simple molecule","className":"lcsb.mapviewer.model.map.species.SimpleMolecule","parentClass":"lcsb.mapviewer.model.map.species.Chemical"},{"name":"Protein","className":"lcsb.mapviewer.model.map.species.GenericProtein","parentClass":"lcsb.mapviewer.model.map.species.Protein"},{"name":"Gene","className":"lcsb.mapviewer.model.map.species.Gene","parentClass":"lcsb.mapviewer.model.map.species.Species"}],"modificationStateTypes":{"PHOSPHORYLATED":{"commonName":"phosphorylated","abbreviation":"P"},"METHYLATED":{"commonName":"methylated","abbreviation":"Me"},"PALMYTOYLATED":{"commonName":"palmytoylated","abbreviation":"Pa"},"ACETYLATED":{"commonName":"acetylated","abbreviation":"Ac"},"SULFATED":{"commonName":"sulfated","abbreviation":"S"},"GLYCOSYLATED":{"commonName":"glycosylated","abbreviation":"G"},"PRENYLATED":{"commonName":"prenylated","abbreviation":"Pr"},"UBIQUITINATED":{"commonName":"ubiquitinated","abbreviation":"Ub"},"PROTONATED":{"commonName":"protonated","abbreviation":"H"},"HYDROXYLATED":{"commonName":"hydroxylated","abbreviation":"OH"},"MYRISTOYLATED":{"commonName":"myristoylated","abbreviation":"My"},"UNKNOWN":{"commonName":"unknown","abbreviation":"?"},"EMPTY":{"commonName":"empty","abbreviation":""},"DONT_CARE":{"commonName":"don't care","abbreviation":"*"}},"miriamTypes":{"CHEMBL_TARGET":{"commonName":"ChEMBL target","uris":["urn:miriam:chembl.target"],"homepage":"https://www.ebi.ac.uk/chembldb/","registryIdentifier":"MIR:00000085"},"UNIPROT":{"commonName":"Uniprot","uris":["urn:miriam:uniprot"],"homepage":"http://www.uniprot.org/","registryIdentifier":"MIR:00000005"},"MI_R_BASE_MATURE_SEQUENCE":{"commonName":"miRBase Mature Sequence Database","uris":["urn:miriam:mirbase.mature"],"homepage":"http://www.mirbase.org/","registryIdentifier":"MIR:00000235"},"PFAM":{"commonName":"Protein Family Database","uris":["urn:miriam:pfam"],"homepage":"http://pfam.xfam.org//","registryIdentifier":"MIR:00000028"},"ENSEMBL_PLANTS":{"commonName":"Ensembl Plants","uris":["urn:miriam:ensembl.plant"],"homepage":"http://plants.ensembl.org/","registryIdentifier":"MIR:00000205"},"WIKIPEDIA":{"commonName":"Wikipedia (English)","uris":["urn:miriam:wikipedia.en"],"homepage":"http://en.wikipedia.org/wiki/Main_Page","registryIdentifier":"MIR:00000384"},"CHEBI":{"commonName":"Chebi","uris":["urn:miriam:obo.chebi","urn:miriam:chebi"],"homepage":"http://www.ebi.ac.uk/chebi/","registryIdentifier":"MIR:00000002"},"WIKIDATA":{"commonName":"Wikidata","uris":["urn:miriam:wikidata"],"homepage":"https://www.wikidata.org/","registryIdentifier":"MIR:00000549"},"REACTOME":{"commonName":"Reactome","uris":["urn:miriam:reactome"],"homepage":"http://www.reactome.org/","registryIdentifier":"MIR:00000018"},"EC":{"commonName":"Enzyme Nomenclature","uris":["urn:miriam:ec-code"],"homepage":"http://www.enzyme-database.org/","registryIdentifier":"MIR:00000004"},"UNIPROT_ISOFORM":{"commonName":"UniProt Isoform","uris":["urn:miriam:uniprot.isoform"],"homepage":"http://www.uniprot.org/","registryIdentifier":"MIR:00000388"},"OMIM":{"commonName":"Online Mendelian Inheritance in Man","uris":["urn:miriam:omim"],"homepage":"http://omim.org/","registryIdentifier":"MIR:00000016"},"DRUGBANK_TARGET_V4":{"commonName":"DrugBank Target v4","uris":["urn:miriam:drugbankv4.target"],"homepage":"http://www.drugbank.ca/targets","registryIdentifier":"MIR:00000528"},"MIR_TAR_BASE_MATURE_SEQUENCE":{"commonName":"miRTarBase Mature Sequence Database","uris":["urn:miriam:mirtarbase"],"homepage":"http://mirtarbase.mbc.nctu.edu.tw/","registryIdentifier":"MIR:00100739"},"CHEMBL_COMPOUND":{"commonName":"ChEMBL","uris":["urn:miriam:chembl.compound"],"homepage":"https://www.ebi.ac.uk/chembldb/","registryIdentifier":"MIR:00000084"},"KEGG_PATHWAY":{"commonName":"Kegg Pathway","uris":["urn:miriam:kegg.pathway"],"homepage":"http://www.genome.jp/kegg/pathway.html","registryIdentifier":"MIR:00000012"},"CAS":{"commonName":"Chemical Abstracts Service","uris":["urn:miriam:cas"],"homepage":"http://commonchemistry.org","registryIdentifier":"MIR:00000237"},"REFSEQ":{"commonName":"RefSeq","uris":["urn:miriam:refseq"],"homepage":"http://www.ncbi.nlm.nih.gov/projects/RefSeq/","registryIdentifier":"MIR:00000039"},"WORM_BASE":{"commonName":"WormBase","uris":["urn:miriam:wormbase"],"homepage":"http://wormbase.bio2rdf.org/fct","registryIdentifier":"MIR:00000027"},"MI_R_BASE_SEQUENCE":{"commonName":"miRBase Sequence Database","uris":["urn:miriam:mirbase"],"homepage":"http://www.mirbase.org/","registryIdentifier":"MIR:00000078"},"TAIR_LOCUS":{"commonName":"TAIR Locus","uris":["urn:miriam:tair.locus"],"homepage":"http://arabidopsis.org/index.jsp","registryIdentifier":"MIR:00000050"},"PHARM":{"commonName":"PharmGKB Pathways","uris":["urn:miriam:pharmgkb.pathways"],"homepage":"http://www.pharmgkb.org/","registryIdentifier":"MIR:00000089"},"PANTHER":{"commonName":"PANTHER Family","uris":["urn:miriam:panther.family","urn:miriam:panther"],"homepage":"http://www.pantherdb.org/","registryIdentifier":"MIR:00000060"},"TAXONOMY":{"commonName":"Taxonomy","uris":["urn:miriam:taxonomy"],"homepage":"http://www.ncbi.nlm.nih.gov/taxonomy/","registryIdentifier":"MIR:00000006"},"UNIGENE":{"commonName":"UniGene","uris":["urn:miriam:unigene"],"homepage":"http://www.ncbi.nlm.nih.gov/unigene","registryIdentifier":"MIR:00000346"},"HGNC":{"commonName":"HGNC","uris":["urn:miriam:hgnc"],"homepage":"http://www.genenames.org","registryIdentifier":"MIR:00000080"},"HGNC_SYMBOL":{"commonName":"HGNC Symbol","uris":["urn:miriam:hgnc.symbol"],"homepage":"http://www.genenames.org","registryIdentifier":"MIR:00000362"},"COG":{"commonName":"Clusters of Orthologous Groups","uris":["urn:miriam:cogs"],"homepage":"https://www.ncbi.nlm.nih.gov/COG/","registryIdentifier":"MIR:00000296"},"WIKIPATHWAYS":{"commonName":"WikiPathways","uris":["urn:miriam:wikipathways"],"homepage":"http://www.wikipathways.org/","registryIdentifier":"MIR:00000076"},"HMDB":{"commonName":"HMDB","uris":["urn:miriam:hmdb"],"homepage":"http://www.hmdb.ca/","registryIdentifier":"MIR:00000051"},"CHEMSPIDER":{"commonName":"ChemSpider","uris":["urn:miriam:chemspider"],"homepage":"http://www.chemspider.com//","registryIdentifier":"MIR:00000138"},"ENSEMBL":{"commonName":"Ensembl","uris":["urn:miriam:ensembl"],"homepage":"www.ensembl.org","registryIdentifier":"MIR:00000003"},"GO":{"commonName":"Gene Ontology","uris":["urn:miriam:obo.go","urn:miriam:go"],"homepage":"http://amigo.geneontology.org/amigo","registryIdentifier":"MIR:00000022"},"KEGG_REACTION":{"commonName":"Kegg Reaction","uris":["urn:miriam:kegg.reaction"],"homepage":"http://www.genome.jp/kegg/reaction/","registryIdentifier":"MIR:00000014"},"KEGG_ORTHOLOGY":{"commonName":"KEGG Orthology","uris":["urn:miriam:kegg.orthology"],"homepage":"http://www.genome.jp/kegg/ko.html","registryIdentifier":"MIR:00000116"},"PUBCHEM":{"commonName":"PubChem-compound","uris":["urn:miriam:pubchem.compound"],"homepage":"http://pubchem.ncbi.nlm.nih.gov/","registryIdentifier":"MIR:00000034"},"MESH_2012":{"commonName":"MeSH 2012","uris":["urn:miriam:mesh.2012","urn:miriam:mesh"],"homepage":"http://www.nlm.nih.gov/mesh/","registryIdentifier":"MIR:00000270"},"MGD":{"commonName":"Mouse Genome Database","uris":["urn:miriam:mgd"],"homepage":"http://www.informatics.jax.org/","registryIdentifier":"MIR:00000037"},"ENTREZ":{"commonName":"Entrez Gene","uris":["urn:miriam:ncbigene","urn:miriam:entrez.gene"],"homepage":"http://www.ncbi.nlm.nih.gov/gene","registryIdentifier":"MIR:00000069"},"PUBCHEM_SUBSTANCE":{"commonName":"PubChem-substance","uris":["urn:miriam:pubchem.substance"],"homepage":"http://pubchem.ncbi.nlm.nih.gov/","registryIdentifier":"MIR:00000033"},"CCDS":{"commonName":"Consensus CDS","uris":["urn:miriam:ccds"],"homepage":"http://www.ncbi.nlm.nih.gov/CCDS/","registryIdentifier":"MIR:00000375"},"KEGG_GENES":{"commonName":"Kegg Genes","uris":["urn:miriam:kegg.genes","urn:miriam:kegg.genes:hsa"],"homepage":"http://www.genome.jp/kegg/genes.html","registryIdentifier":"MIR:00000070"},"TOXICOGENOMIC_CHEMICAL":{"commonName":"Toxicogenomic Chemical","uris":["urn:miriam:ctd.chemical"],"homepage":"http://ctdbase.org/","registryIdentifier":"MIR:00000098"},"SGD":{"commonName":"Saccharomyces Genome Database","uris":["urn:miriam:sgd"],"homepage":"http://www.yeastgenome.org/","registryIdentifier":"MIR:00000023"},"KEGG_COMPOUND":{"commonName":"Kegg Compound","uris":["urn:miriam:kegg.compound"],"homepage":"http://www.genome.jp/kegg/ligand.html","registryIdentifier":"MIR:00000013"},"INTERPRO":{"commonName":"InterPro","uris":["urn:miriam:interpro"],"homepage":"http://www.ebi.ac.uk/interpro/","registryIdentifier":"MIR:00000011"},"UNKNOWN":{"commonName":"Unknown","uris":[],"homepage":null,"registryIdentifier":null},"DRUGBANK":{"commonName":"DrugBank","uris":["urn:miriam:drugbank"],"homepage":"http://www.drugbank.ca/","registryIdentifier":"MIR:00000102"},"PUBMED":{"commonName":"PubMed","uris":["urn:miriam:pubmed"],"homepage":"http://www.ncbi.nlm.nih.gov/PubMed/","registryIdentifier":"MIR:00000015"}},"imageFormats":[{"handler":"lcsb.mapviewer.converter.graphics.PngImageGenerator","extension":"png","name":"PNG image"},{"handler":"lcsb.mapviewer.converter.graphics.PdfImageGenerator","extension":"pdf","name":"PDF"},{"handler":"lcsb.mapviewer.converter.graphics.SvgImageGenerator","extension":"svg","name":"SVG image"}],"annotators":[{"name":"Biocompendium","className":"lcsb.mapviewer.annotation.services.annotators.BiocompendiumAnnotator","elementClassNames":["lcsb.mapviewer.model.map.species.Protein","lcsb.mapviewer.model.map.species.Protein","lcsb.mapviewer.model.map.species.Protein"],"url":"http://biocompendium.embl.de/"},{"name":"Chebi","className":"lcsb.mapviewer.annotation.services.annotators.ChebiAnnotator","elementClassNames":["lcsb.mapviewer.model.map.species.Chemical"],"url":"http://www.ebi.ac.uk/chebi/"},{"name":"Uniprot","className":"lcsb.mapviewer.annotation.services.annotators.UniprotAnnotator","elementClassNames":["lcsb.mapviewer.model.map.species.Protein","lcsb.mapviewer.model.map.species.Gene","lcsb.mapviewer.model.map.species.Rna"],"url":"http://www.uniprot.org/"},{"name":"Gene Ontology","className":"lcsb.mapviewer.annotation.services.annotators.GoAnnotator","elementClassNames":["lcsb.mapviewer.model.map.species.Phenotype","lcsb.mapviewer.model.map.compartment.Compartment","lcsb.mapviewer.model.map.species.Complex"],"url":"http://amigo.geneontology.org/amigo"},{"name":"HGNC","className":"lcsb.mapviewer.annotation.services.annotators.HgncAnnotator","elementClassNames":["lcsb.mapviewer.model.map.species.Protein","lcsb.mapviewer.model.map.species.Rna","lcsb.mapviewer.model.map.species.Gene"],"url":"http://www.genenames.org"},{"name":"Recon annotator","className":"lcsb.mapviewer.annotation.services.annotators.ReconAnnotator","elementClassNames":["lcsb.mapviewer.model.map.species.Chemical","lcsb.mapviewer.model.map.reaction.Reaction"],"url":"http://humanmetabolism.org/"},{"name":"Entrez Gene","className":"lcsb.mapviewer.annotation.services.annotators.EntrezAnnotator","elementClassNames":["lcsb.mapviewer.model.map.species.Protein","lcsb.mapviewer.model.map.species.Rna","lcsb.mapviewer.model.map.species.Gene"],"url":"http://www.ncbi.nlm.nih.gov/gene"},{"name":"Ensembl","className":"lcsb.mapviewer.annotation.services.annotators.EnsemblAnnotator","elementClassNames":["lcsb.mapviewer.model.map.species.Protein","lcsb.mapviewer.model.map.species.Rna","lcsb.mapviewer.model.map.species.Gene"],"url":"www.ensembl.org"}],"options":[{"idObject":9,"type":"EMAIL_ADDRESS","value":"your.account@domain.com"},{"idObject":10,"type":"EMAIL_LOGIN","value":"your@login"},{"idObject":11,"type":"EMAIL_PASSWORD","value":"email.secret.password"},{"idObject":13,"type":"EMAIL_IMAP_SERVER","value":"your.imap.domain.com"},{"idObject":12,"type":"EMAIL_SMTP_SERVER","value":"your.smtp.domain.com"},{"idObject":14,"type":"EMAIL_SMTP_PORT","value":"25"},{"idObject":6,"type":"DEFAULT_MAP","value":"sample"},{"idObject":4,"type":"LOGO_IMG","value":"udl.png"},{"idObject":3,"type":"LOGO_LINK","value":"http://wwwen.uni.lu/"},{"idObject":7,"type":"SEARCH_DISTANCE","value":"10"},{"idObject":1,"type":"REQUEST_ACCOUNT_EMAIL","value":"your.email@domain.com"},{"idObject":8,"type":"SEARCH_RESULT_NUMBER","value":"100"},{"idObject":2,"type":"GOOGLE_ANALYTICS_IDENTIFIER","value":""},{"idObject":5,"type":"LOGO_TEXT","value":"University of Luxembourg"},{"idObject":56,"type":"X_FRAME_DOMAIN","value":"http://localhost:8080/"},{"idObject":131,"type":"BIG_FILE_STORAGE_DIR","value":"minerva-big/"},{"idObject":138,"type":"LEGEND_FILE_1","value":"resources/images/legend_a.png"},{"idObject":139,"type":"LEGEND_FILE_2","value":"resources/images/legend_b.png"},{"idObject":140,"type":"LEGEND_FILE_3","value":"resources/images/legend_c.png"},{"idObject":141,"type":"LEGEND_FILE_4","value":"resources/images/legend_d.png"},{"idObject":142,"type":"USER_MANUAL_FILE","value":"resources/other/user_guide.pdf"},{"idObject":205,"type":"MIN_COLOR_VAL","value":"FF0000"},{"idObject":206,"type":"MAX_COLOR_VAL","value":"fbff00"},{"idObject":218,"type":"SIMPLE_COLOR_VAL","value":"00FF00"}],"privilegeTypes":{"VIEW_PROJECT":{"commonName":"View project","valueType":"boolean","objectType":"Project"},"LAYOUT_MANAGEMENT":{"commonName":"Manage layouts","valueType":"boolean","objectType":"Project"},"PROJECT_MANAGEMENT":{"commonName":"Map management","valueType":"boolean","objectType":null},"CUSTOM_LAYOUTS":{"commonName":"Custom layouts","valueType":"int","objectType":null},"ADD_MAP":{"commonName":"Add project","valueType":"boolean","objectType":null},"LAYOUT_VIEW":{"commonName":"View layout","valueType":"boolean","objectType":"Layout"},"MANAGE_GENOMES":{"commonName":"Manage genomes","valueType":"boolean","objectType":null},"EDIT_COMMENTS_PROJECT":{"commonName":"Manage comments","valueType":"boolean","objectType":"Project"},"CONFIGURATION_MANAGE":{"commonName":"Manage configuration","valueType":"boolean","objectType":null},"USER_MANAGEMENT":{"commonName":"User management","valueType":"boolean","objectType":null}},"overlayTypes":[{"name":"GENERIC"},{"name":"GENETIC_VARIANT"}],"buildDate":"30/08/2017 16:58","reactionTypes":[{"name":"Unknown positive influence","className":"lcsb.mapviewer.model.map.reaction.type.UnknownPositiveInfluenceReaction","parentClass":"lcsb.mapviewer.model.map.reaction.Reaction"},{"name":"Generic Reaction","className":"lcsb.mapviewer.model.map.reaction.Reaction","parentClass":"lcsb.mapviewer.model.map.BioEntity"},{"name":"Reduced physical stimulation","className":"lcsb.mapviewer.model.map.reaction.type.ReducedPhysicalStimulationReaction","parentClass":"lcsb.mapviewer.model.map.reaction.Reaction"},{"name":"Negative influence","className":"lcsb.mapviewer.model.map.reaction.type.NegativeInfluenceReaction","parentClass":"lcsb.mapviewer.model.map.reaction.Reaction"},{"name":"Known transition omitted","className":"lcsb.mapviewer.model.map.reaction.type.KnownTransitionOmittedReaction","parentClass":"lcsb.mapviewer.model.map.reaction.Reaction"},{"name":"Reduced modulation","className":"lcsb.mapviewer.model.map.reaction.type.ReducedModulationReaction","parentClass":"lcsb.mapviewer.model.map.reaction.Reaction"},{"name":"Translation","className":"lcsb.mapviewer.model.map.reaction.type.TranslationReaction","parentClass":"lcsb.mapviewer.model.map.reaction.Reaction"},{"name":"Heterodimer association","className":"lcsb.mapviewer.model.map.reaction.type.HeterodimerAssociationReaction","parentClass":"lcsb.mapviewer.model.map.reaction.Reaction"},{"name":"Transcription","className":"lcsb.mapviewer.model.map.reaction.type.TranscriptionReaction","parentClass":"lcsb.mapviewer.model.map.reaction.Reaction"},{"name":"Unknown reduced trigger","className":"lcsb.mapviewer.model.map.reaction.type.UnknownReducedTriggerReaction","parentClass":"lcsb.mapviewer.model.map.reaction.Reaction"},{"name":"Unknown negative influence","className":"lcsb.mapviewer.model.map.reaction.type.UnknownNegativeInfluenceReaction","parentClass":"lcsb.mapviewer.model.map.reaction.Reaction"},{"name":"Truncation","className":"lcsb.mapviewer.model.map.reaction.type.TruncationReaction","parentClass":"lcsb.mapviewer.model.map.reaction.Reaction"},{"name":"Transport","className":"lcsb.mapviewer.model.map.reaction.type.TransportReaction","parentClass":"lcsb.mapviewer.model.map.reaction.Reaction"},{"name":"Reduced trigger","className":"lcsb.mapviewer.model.map.reaction.type.ReducedTriggerReaction","parentClass":"lcsb.mapviewer.model.map.reaction.Reaction"},{"name":"State transition","className":"lcsb.mapviewer.model.map.reaction.type.StateTransitionReaction","parentClass":"lcsb.mapviewer.model.map.reaction.Reaction"},{"name":"Positive influence","className":"lcsb.mapviewer.model.map.reaction.type.PositiveInfluenceReaction","parentClass":"lcsb.mapviewer.model.map.reaction.Reaction"},{"name":"Unknown reduced physical stimulation","className":"lcsb.mapviewer.model.map.reaction.type.UnknownReducedPhysicalStimulationReaction","parentClass":"lcsb.mapviewer.model.map.reaction.Reaction"},{"name":"Boolean logic gate","className":"lcsb.mapviewer.model.map.reaction.type.BooleanLogicGateReaction","parentClass":"lcsb.mapviewer.model.map.reaction.Reaction"},{"name":"Unknown reduced modulation","className":"lcsb.mapviewer.model.map.reaction.type.UnknownReducedModulationReaction","parentClass":"lcsb.mapviewer.model.map.reaction.Reaction"},{"name":"Unknown transition","className":"lcsb.mapviewer.model.map.reaction.type.UnknownTransitionReaction","parentClass":"lcsb.mapviewer.model.map.reaction.Reaction"},{"name":"Dissociation","className":"lcsb.mapviewer.model.map.reaction.type.DissociationReaction","parentClass":"lcsb.mapviewer.model.map.reaction.Reaction"}],"version":"11.0.0"} \ No newline at end of file diff --git a/frontend-js/testFiles/apiCalls/users/anonymous/token=MOCK_TOKEN_ID& b/frontend-js/testFiles/apiCalls/users/anonymous/token=MOCK_TOKEN_ID& index bad5f9cfa912823f742d22f56ff87d32bca242ae..ee0146adc4cef43f5f11fa07173a5f30de8fc712 100644 --- a/frontend-js/testFiles/apiCalls/users/anonymous/token=MOCK_TOKEN_ID& +++ b/frontend-js/testFiles/apiCalls/users/anonymous/token=MOCK_TOKEN_ID& @@ -1 +1 @@ -{"privileges":[{"type":"EDIT_MISSING_CONNECTIONS_PROJECT","value":0,"objectId":15764},{"type":"VIEW_PROJECT","value":1,"objectId":16755},{"type":"EDIT_MISSING_CONNECTIONS_PROJECT","value":0,"objectId":15763},{"type":"USER_MANAGEMENT","value":0},{"type":"CONFIGURATION_MANAGE","value":0},{"type":"VIEW_PROJECT","value":1,"objectId":10},{"type":"LAYOUT_MANAGEMENT","value":0,"objectId":14897},{"type":"VIEW_PROJECT","value":1,"objectId":7},{"type":"VIEW_PROJECT","value":1,"objectId":6},{"type":"ADD_MAP","value":0},{"type":"DRUG_TARGETING_ADVANCED_VIEW_PROJECT","value":0,"objectId":15764},{"type":"DRUG_TARGETING_ADVANCED_VIEW_PROJECT","value":0,"objectId":15763},{"type":"VIEW_PROJECT","value":1,"objectId":22},{"type":"VIEW_PROJECT","value":1,"objectId":14898},{"type":"MANAGE_GENOMES","value":1},{"type":"EDIT_COMMENTS_PROJECT","value":0,"objectId":15764},{"type":"EDIT_COMMENTS_PROJECT","value":0,"objectId":14898},{"type":"EDIT_MISSING_CONNECTIONS_PROJECT","value":0,"objectId":14897},{"type":"EDIT_COMMENTS_PROJECT","value":0,"objectId":16045},{"type":"VIEW_PROJECT","value":1,"objectId":18},{"type":"VIEW_PROJECT","value":1,"objectId":15763},{"type":"EDIT_MISSING_CONNECTIONS_PROJECT","value":0,"objectId":16045},{"type":"EDIT_MISSING_CONNECTIONS_PROJECT","value":0,"objectId":14898},{"type":"VIEW_PROJECT","value":1,"objectId":11},{"type":"VIEW_PROJECT","value":1,"objectId":20},{"type":"VIEW_PROJECT","value":1,"objectId":17051},{"type":"VIEW_PROJECT","value":1,"objectId":17},{"type":"DRUG_TARGETING_ADVANCED_VIEW_PROJECT","value":0,"objectId":14897},{"type":"LAYOUT_MANAGEMENT","value":0,"objectId":15764},{"type":"VIEW_PROJECT","value":1,"objectId":15764},{"type":"VIEW_PROJECT","value":1,"objectId":21},{"type":"CUSTOM_LAYOUTS","value":0},{"type":"EDIT_COMMENTS_PROJECT","value":0,"objectId":14897},{"type":"VIEW_PROJECT","value":1,"objectId":8},{"type":"VIEW_PROJECT","value":1,"objectId":9},{"type":"DRUG_TARGETING_ADVANCED_VIEW_PROJECT","value":0,"objectId":14898},{"type":"VIEW_PROJECT","value":1,"objectId":17719},{"type":"PROJECT_MANAGEMENT","value":0},{"type":"LAYOUT_MANAGEMENT","value":0,"objectId":14898},{"type":"VIEW_PROJECT","value":1,"objectId":14897},{"type":"LAYOUT_MANAGEMENT","value":0,"objectId":15763},{"type":"VIEW_PROJECT","value":1,"objectId":1},{"type":"EDIT_COMMENTS_PROJECT","value":0,"objectId":15763},{"type":"VIEW_PROJECT","value":1,"objectId":19},{"type":"LAYOUT_MANAGEMENT","value":0,"objectId":16045},{"type":"VIEW_PROJECT","value":1,"objectId":16045},{"type":"DRUG_TARGETING_ADVANCED_VIEW_PROJECT","value":0,"objectId":16045},{"type":"VIEW_PROJECT","value":1,"objectId":16668},{"type":"CUSTOM_LAYOUTS_AVAILABLE","value":0}],"removed":false,"surname":"","name":"","id":3,"login":"anonymous","email":""} \ No newline at end of file +{"simpleColor":null,"privileges":[{"type":"LAYOUT_MANAGEMENT","value":0,"objectId":18039},{"type":"USER_MANAGEMENT","value":0},{"type":"VIEW_PROJECT","value":1,"objectId":10},{"type":"LAYOUT_MANAGEMENT","value":0,"objectId":19186},{"type":"VIEW_PROJECT","value":1,"objectId":21},{"type":"EDIT_COMMENTS_PROJECT","value":0,"objectId":19187},{"type":"VIEW_PROJECT","value":1,"objectId":1},{"type":"EDIT_COMMENTS_PROJECT","value":0,"objectId":19184},{"type":"VIEW_PROJECT","value":1,"objectId":19},{"type":"CUSTOM_LAYOUTS","value":0},{"type":"VIEW_PROJECT","value":1,"objectId":18039},{"type":"VIEW_PROJECT","value":1,"objectId":19102},{"type":"MANAGE_GENOMES","value":1},{"type":"EDIT_COMMENTS_PROJECT","value":0,"objectId":17051},{"type":"VIEW_PROJECT","value":1,"objectId":18305},{"type":"VIEW_PROJECT","value":1,"objectId":17},{"type":"EDIT_COMMENTS_PROJECT","value":0,"objectId":15763},{"type":"VIEW_PROJECT","value":1,"objectId":6},{"type":"VIEW_PROJECT","value":1,"objectId":15764},{"type":"LAYOUT_MANAGEMENT","value":0,"objectId":14898},{"type":"PROJECT_MANAGEMENT","value":0},{"type":"VIEW_PROJECT","value":1,"objectId":17051},{"type":"EDIT_COMMENTS_PROJECT","value":0,"objectId":19102},{"type":"LAYOUT_MANAGEMENT","value":0,"objectId":17051},{"type":"VIEW_PROJECT","value":1,"objectId":18115},{"type":"VIEW_PROJECT","value":1,"objectId":15763},{"type":"VIEW_PROJECT","value":1,"objectId":14898},{"type":"VIEW_PROJECT","value":1,"objectId":22},{"type":"VIEW_PROJECT","value":0,"objectId":19184},{"type":"VIEW_PROJECT","value":1,"objectId":20605},{"type":"LAYOUT_MANAGEMENT","value":0,"objectId":16668},{"type":"LAYOUT_MANAGEMENT","value":0,"objectId":19103},{"type":"EDIT_COMMENTS_PROJECT","value":0,"objectId":14898},{"type":"CONFIGURATION_MANAGE","value":0},{"type":"VIEW_PROJECT","value":1,"objectId":20},{"type":"LAYOUT_MANAGEMENT","value":0,"objectId":18115},{"type":"VIEW_PROJECT","value":1,"objectId":7},{"type":"VIEW_PROJECT","value":1,"objectId":18},{"type":"LAYOUT_MANAGEMENT","value":0,"objectId":15764},{"type":"EDIT_COMMENTS_PROJECT","value":0,"objectId":18115},{"type":"EDIT_COMMENTS_PROJECT","value":0,"objectId":16668},{"type":"VIEW_PROJECT","value":1,"objectId":19186},{"type":"EDIT_COMMENTS_PROJECT","value":0,"objectId":15764},{"type":"VIEW_PROJECT","value":1,"objectId":20603},{"type":"EDIT_COMMENTS_PROJECT","value":0,"objectId":19103},{"type":"VIEW_PROJECT","value":1,"objectId":19187},{"type":"LAYOUT_MANAGEMENT","value":0,"objectId":19184},{"type":"VIEW_PROJECT","value":1,"objectId":11},{"type":"LAYOUT_MANAGEMENT","value":0,"objectId":19187},{"type":"LAYOUT_MANAGEMENT","value":0,"objectId":15763},{"type":"VIEW_PROJECT","value":1,"objectId":20604},{"type":"VIEW_PROJECT","value":1,"objectId":16668},{"type":"EDIT_COMMENTS_PROJECT","value":0,"objectId":18039},{"type":"LAYOUT_MANAGEMENT","value":0,"objectId":19102},{"type":"VIEW_PROJECT","value":1,"objectId":8},{"type":"ADD_MAP","value":0},{"type":"VIEW_PROJECT","value":1,"objectId":9},{"type":"VIEW_PROJECT","value":1,"objectId":19103},{"type":"EDIT_COMMENTS_PROJECT","value":0,"objectId":19186},{"type":"CUSTOM_LAYOUTS_AVAILABLE","value":0}],"preferences":{"element-required-annotations":{"lcsb.mapviewer.model.map.reaction.type.UnknownReducedTriggerReaction":{"require-at-least-one":true,"annotation-list":["PUBMED"]},"lcsb.mapviewer.model.map.compartment.BottomSquareCompartment":{"require-at-least-one":false,"annotation-list":[]},"lcsb.mapviewer.model.map.reaction.type.ReducedPhysicalStimulationReaction":{"require-at-least-one":true,"annotation-list":["PUBMED"]},"lcsb.mapviewer.model.map.species.Chemical":{"require-at-least-one":true,"annotation-list":["PUBCHEM_SUBSTANCE","PUBCHEM","CHEBI"]},"lcsb.mapviewer.model.map.species.Degraded":{"require-at-least-one":false,"annotation-list":[]},"lcsb.mapviewer.model.map.compartment.PathwayCompartment":{"require-at-least-one":false,"annotation-list":[]},"lcsb.mapviewer.model.map.species.SimpleMolecule":{"require-at-least-one":true,"annotation-list":["PUBCHEM_SUBSTANCE","PUBCHEM","CHEBI"]},"lcsb.mapviewer.model.map.reaction.type.BooleanLogicGateReaction":{"require-at-least-one":true,"annotation-list":["PUBMED"]},"lcsb.mapviewer.model.map.species.ReceptorProtein":{"require-at-least-one":true,"annotation-list":["HGNC","HGNC_SYMBOL"]},"lcsb.mapviewer.model.map.reaction.type.UnknownTransitionReaction":{"require-at-least-one":true,"annotation-list":["PUBMED"]},"lcsb.mapviewer.model.map.reaction.type.TranscriptionReaction":{"require-at-least-one":true,"annotation-list":["PUBMED"]},"lcsb.mapviewer.model.map.species.Gene":{"require-at-least-one":true,"annotation-list":["HGNC","HGNC_SYMBOL"]},"lcsb.mapviewer.model.map.compartment.OvalCompartment":{"require-at-least-one":false,"annotation-list":[]},"lcsb.mapviewer.model.map.reaction.type.PositiveInfluenceReaction":{"require-at-least-one":true,"annotation-list":["PUBMED"]},"lcsb.mapviewer.model.map.reaction.type.ReducedTriggerReaction":{"require-at-least-one":true,"annotation-list":["PUBMED"]},"lcsb.mapviewer.model.map.species.Protein":{"require-at-least-one":true,"annotation-list":["HGNC","HGNC_SYMBOL"]},"lcsb.mapviewer.model.map.reaction.type.UnknownReducedPhysicalStimulationReaction":{"require-at-least-one":true,"annotation-list":["PUBMED"]},"lcsb.mapviewer.model.map.BioEntity":{"require-at-least-one":false,"annotation-list":[]},"lcsb.mapviewer.model.map.species.GenericProtein":{"require-at-least-one":true,"annotation-list":["HGNC","HGNC_SYMBOL"]},"lcsb.mapviewer.model.map.reaction.type.TransportReaction":{"require-at-least-one":true,"annotation-list":["PUBMED"]},"lcsb.mapviewer.model.map.species.IonChannelProtein":{"require-at-least-one":true,"annotation-list":["HGNC","HGNC_SYMBOL"]},"lcsb.mapviewer.model.map.reaction.type.UnknownReducedModulationReaction":{"require-at-least-one":true,"annotation-list":["PUBMED"]},"lcsb.mapviewer.model.map.species.Phenotype":{"require-at-least-one":true,"annotation-list":[]},"lcsb.mapviewer.model.map.species.Drug":{"require-at-least-one":true,"annotation-list":[]},"lcsb.mapviewer.model.map.species.Element":{"require-at-least-one":false,"annotation-list":[]},"lcsb.mapviewer.model.map.reaction.type.DissociationReaction":{"require-at-least-one":true,"annotation-list":["PUBMED"]},"lcsb.mapviewer.model.map.compartment.SquareCompartment":{"require-at-least-one":false,"annotation-list":[]},"lcsb.mapviewer.model.map.species.Ion":{"require-at-least-one":true,"annotation-list":["PUBCHEM_SUBSTANCE","PUBCHEM","CHEBI"]},"lcsb.mapviewer.model.map.reaction.Reaction":{"require-at-least-one":true,"annotation-list":["PUBMED"]},"lcsb.mapviewer.model.map.reaction.type.HeterodimerAssociationReaction":{"require-at-least-one":true,"annotation-list":["PUBMED"]},"lcsb.mapviewer.model.map.compartment.RightSquareCompartment":{"require-at-least-one":false,"annotation-list":[]},"lcsb.mapviewer.model.map.reaction.type.TranslationReaction":{"require-at-least-one":true,"annotation-list":["PUBMED"]},"lcsb.mapviewer.model.map.reaction.type.UnknownPositiveInfluenceReaction":{"require-at-least-one":true,"annotation-list":["PUBMED"]},"lcsb.mapviewer.model.map.reaction.type.ReducedModulationReaction":{"require-at-least-one":true,"annotation-list":["PUBMED"]},"lcsb.mapviewer.model.map.species.AntisenseRna":{"require-at-least-one":true,"annotation-list":[]},"lcsb.mapviewer.model.map.species.Complex":{"require-at-least-one":true,"annotation-list":[]},"lcsb.mapviewer.model.map.species.Unknown":{"require-at-least-one":false,"annotation-list":[]},"lcsb.mapviewer.model.map.reaction.type.TruncationReaction":{"require-at-least-one":true,"annotation-list":["PUBMED"]},"lcsb.mapviewer.model.map.compartment.LeftSquareCompartment":{"require-at-least-one":false,"annotation-list":[]},"lcsb.mapviewer.model.map.reaction.type.UnknownNegativeInfluenceReaction":{"require-at-least-one":true,"annotation-list":["PUBMED"]},"lcsb.mapviewer.model.map.reaction.type.NegativeInfluenceReaction":{"require-at-least-one":true,"annotation-list":["PUBMED"]},"lcsb.mapviewer.model.map.species.TruncatedProtein":{"require-at-least-one":true,"annotation-list":["HGNC","HGNC_SYMBOL"]},"lcsb.mapviewer.model.map.compartment.Compartment":{"require-at-least-one":false,"annotation-list":[]},"lcsb.mapviewer.model.map.compartment.TopSquareCompartment":{"require-at-least-one":false,"annotation-list":[]},"lcsb.mapviewer.model.map.species.Species":{"require-at-least-one":false,"annotation-list":[]},"lcsb.mapviewer.model.map.species.Rna":{"require-at-least-one":true,"annotation-list":["HGNC","HGNC_SYMBOL"]},"lcsb.mapviewer.model.map.reaction.type.KnownTransitionOmittedReaction":{"require-at-least-one":true,"annotation-list":["PUBMED"]},"lcsb.mapviewer.model.map.reaction.type.StateTransitionReaction":{"require-at-least-one":true,"annotation-list":["PUBMED"]}},"element-valid-annotations":{"lcsb.mapviewer.model.map.reaction.type.UnknownReducedTriggerReaction":["PUBMED","COG","KEGG_REACTION","REACTOME","KEGG_PATHWAY"],"lcsb.mapviewer.model.map.compartment.BottomSquareCompartment":["PUBMED","GO","MESH_2012"],"lcsb.mapviewer.model.map.reaction.type.ReducedPhysicalStimulationReaction":["PUBMED","COG","KEGG_REACTION","REACTOME","KEGG_PATHWAY"],"lcsb.mapviewer.model.map.species.Chemical":["PUBCHEM_SUBSTANCE","PUBMED","PUBCHEM","HMDB","CHEBI","KEGG_COMPOUND"],"lcsb.mapviewer.model.map.species.Degraded":["PUBMED"],"lcsb.mapviewer.model.map.compartment.PathwayCompartment":["PUBMED","GO","MESH_2012"],"lcsb.mapviewer.model.map.species.SimpleMolecule":["PUBCHEM_SUBSTANCE","PUBMED","PUBCHEM","HMDB","CHEBI","KEGG_COMPOUND"],"lcsb.mapviewer.model.map.reaction.type.BooleanLogicGateReaction":["PUBMED","COG","KEGG_REACTION","REACTOME","KEGG_PATHWAY"],"lcsb.mapviewer.model.map.species.ReceptorProtein":["KEGG_GENES","INTERPRO","HGNC_SYMBOL","UNIPROT","CHEMBL_TARGET","ENSEMBL","PANTHER","EC","REFSEQ","PUBMED","HGNC","ENTREZ","MGD","UNIPROT_ISOFORM"],"lcsb.mapviewer.model.map.reaction.type.UnknownTransitionReaction":["PUBMED","COG","KEGG_REACTION","REACTOME","KEGG_PATHWAY"],"lcsb.mapviewer.model.map.reaction.type.TranscriptionReaction":["PUBMED","COG","KEGG_REACTION","REACTOME","KEGG_PATHWAY"],"lcsb.mapviewer.model.map.species.Gene":["KEGG_GENES","REFSEQ","PUBMED","HGNC","HGNC_SYMBOL","UNIPROT","ENSEMBL","PANTHER","ENTREZ","MGD"],"lcsb.mapviewer.model.map.compartment.OvalCompartment":["PUBMED","GO","MESH_2012"],"lcsb.mapviewer.model.map.reaction.type.PositiveInfluenceReaction":["PUBMED","COG","KEGG_REACTION","REACTOME","KEGG_PATHWAY"],"lcsb.mapviewer.model.map.reaction.type.ReducedTriggerReaction":["PUBMED","COG","KEGG_REACTION","REACTOME","KEGG_PATHWAY"],"lcsb.mapviewer.model.map.species.Protein":["KEGG_GENES","INTERPRO","HGNC_SYMBOL","UNIPROT","CHEMBL_TARGET","ENSEMBL","PANTHER","EC","REFSEQ","PUBMED","HGNC","ENTREZ","MGD","UNIPROT_ISOFORM"],"lcsb.mapviewer.model.map.reaction.type.UnknownReducedPhysicalStimulationReaction":["PUBMED","COG","KEGG_REACTION","REACTOME","KEGG_PATHWAY"],"lcsb.mapviewer.model.map.BioEntity":["PUBMED"],"lcsb.mapviewer.model.map.species.GenericProtein":["KEGG_GENES","INTERPRO","HGNC_SYMBOL","UNIPROT","CHEMBL_TARGET","ENSEMBL","PANTHER","EC","REFSEQ","PUBMED","HGNC","ENTREZ","MGD","UNIPROT_ISOFORM"],"lcsb.mapviewer.model.map.reaction.type.TransportReaction":["PUBMED","COG","KEGG_REACTION","REACTOME","KEGG_PATHWAY"],"lcsb.mapviewer.model.map.species.IonChannelProtein":["KEGG_GENES","INTERPRO","HGNC_SYMBOL","UNIPROT","CHEMBL_TARGET","ENSEMBL","PANTHER","EC","REFSEQ","PUBMED","HGNC","ENTREZ","MGD","UNIPROT_ISOFORM"],"lcsb.mapviewer.model.map.reaction.type.UnknownReducedModulationReaction":["PUBMED","COG","KEGG_REACTION","REACTOME","KEGG_PATHWAY"],"lcsb.mapviewer.model.map.species.Phenotype":["PUBMED","OMIM","GO","MESH_2012"],"lcsb.mapviewer.model.map.species.Drug":["CHEMBL_COMPOUND","DRUGBANK","PUBMED","HMDB","CHEBI"],"lcsb.mapviewer.model.map.species.Element":["PUBMED"],"lcsb.mapviewer.model.map.reaction.type.DissociationReaction":["PUBMED","COG","KEGG_REACTION","REACTOME","KEGG_PATHWAY"],"lcsb.mapviewer.model.map.compartment.SquareCompartment":["PUBMED","GO","MESH_2012"],"lcsb.mapviewer.model.map.species.Ion":["PUBCHEM_SUBSTANCE","PUBMED","PUBCHEM","HMDB","CHEBI","KEGG_COMPOUND"],"lcsb.mapviewer.model.map.reaction.Reaction":["PUBMED","COG","KEGG_REACTION","REACTOME","KEGG_PATHWAY"],"lcsb.mapviewer.model.map.reaction.type.HeterodimerAssociationReaction":["PUBMED","COG","KEGG_REACTION","REACTOME","KEGG_PATHWAY"],"lcsb.mapviewer.model.map.compartment.RightSquareCompartment":["PUBMED","GO","MESH_2012"],"lcsb.mapviewer.model.map.reaction.type.TranslationReaction":["PUBMED","COG","KEGG_REACTION","REACTOME","KEGG_PATHWAY"],"lcsb.mapviewer.model.map.reaction.type.UnknownPositiveInfluenceReaction":["PUBMED","COG","KEGG_REACTION","REACTOME","KEGG_PATHWAY"],"lcsb.mapviewer.model.map.reaction.type.ReducedModulationReaction":["PUBMED","COG","KEGG_REACTION","REACTOME","KEGG_PATHWAY"],"lcsb.mapviewer.model.map.species.AntisenseRna":["PUBMED"],"lcsb.mapviewer.model.map.species.Complex":["EC","PUBMED","INTERPRO","CHEMBL_TARGET","GO","MESH_2012"],"lcsb.mapviewer.model.map.species.Unknown":["PUBMED"],"lcsb.mapviewer.model.map.reaction.type.TruncationReaction":["PUBMED","COG","KEGG_REACTION","REACTOME","KEGG_PATHWAY"],"lcsb.mapviewer.model.map.compartment.LeftSquareCompartment":["PUBMED","GO","MESH_2012"],"lcsb.mapviewer.model.map.reaction.type.UnknownNegativeInfluenceReaction":["PUBMED","COG","KEGG_REACTION","REACTOME","KEGG_PATHWAY"],"lcsb.mapviewer.model.map.reaction.type.NegativeInfluenceReaction":["PUBMED","COG","KEGG_REACTION","REACTOME","KEGG_PATHWAY"],"lcsb.mapviewer.model.map.species.TruncatedProtein":["KEGG_GENES","INTERPRO","HGNC_SYMBOL","UNIPROT","CHEMBL_TARGET","ENSEMBL","PANTHER","EC","REFSEQ","PUBMED","HGNC","ENTREZ","MGD","UNIPROT_ISOFORM"],"lcsb.mapviewer.model.map.compartment.Compartment":["PUBMED","GO","MESH_2012"],"lcsb.mapviewer.model.map.compartment.TopSquareCompartment":["PUBMED","GO","MESH_2012"],"lcsb.mapviewer.model.map.species.Species":["PUBMED"],"lcsb.mapviewer.model.map.species.Rna":["KEGG_GENES","REFSEQ","PUBMED","HGNC","HGNC_SYMBOL","UNIPROT","ENSEMBL","PANTHER","ENTREZ","MGD"],"lcsb.mapviewer.model.map.reaction.type.KnownTransitionOmittedReaction":["PUBMED","COG","KEGG_REACTION","REACTOME","KEGG_PATHWAY"],"lcsb.mapviewer.model.map.reaction.type.StateTransitionReaction":["PUBMED","COG","KEGG_REACTION","REACTOME","KEGG_PATHWAY"]},"element-annotators":{"lcsb.mapviewer.model.map.reaction.type.UnknownReducedTriggerReaction":[],"lcsb.mapviewer.model.map.compartment.BottomSquareCompartment":["Gene Ontology"],"lcsb.mapviewer.model.map.reaction.type.ReducedPhysicalStimulationReaction":[],"lcsb.mapviewer.model.map.species.Chemical":["Chebi"],"lcsb.mapviewer.model.map.species.Degraded":[],"lcsb.mapviewer.model.map.compartment.PathwayCompartment":["Gene Ontology"],"lcsb.mapviewer.model.map.species.SimpleMolecule":["Chebi"],"lcsb.mapviewer.model.map.reaction.type.BooleanLogicGateReaction":[],"lcsb.mapviewer.model.map.species.ReceptorProtein":["Biocompendium","HGNC"],"lcsb.mapviewer.model.map.reaction.type.UnknownTransitionReaction":[],"lcsb.mapviewer.model.map.reaction.type.TranscriptionReaction":[],"lcsb.mapviewer.model.map.species.Gene":["HGNC"],"lcsb.mapviewer.model.map.compartment.OvalCompartment":["Gene Ontology"],"lcsb.mapviewer.model.map.reaction.type.PositiveInfluenceReaction":[],"lcsb.mapviewer.model.map.reaction.type.ReducedTriggerReaction":[],"lcsb.mapviewer.model.map.species.Protein":["Biocompendium","HGNC"],"lcsb.mapviewer.model.map.reaction.type.UnknownReducedPhysicalStimulationReaction":[],"lcsb.mapviewer.model.map.BioEntity":[],"lcsb.mapviewer.model.map.species.GenericProtein":["Biocompendium","HGNC"],"lcsb.mapviewer.model.map.reaction.type.TransportReaction":[],"lcsb.mapviewer.model.map.species.IonChannelProtein":["Biocompendium","HGNC"],"lcsb.mapviewer.model.map.reaction.type.UnknownReducedModulationReaction":[],"lcsb.mapviewer.model.map.species.Phenotype":["Gene Ontology"],"lcsb.mapviewer.model.map.species.Drug":[],"lcsb.mapviewer.model.map.species.Element":[],"lcsb.mapviewer.model.map.reaction.type.DissociationReaction":[],"lcsb.mapviewer.model.map.compartment.SquareCompartment":["Gene Ontology"],"lcsb.mapviewer.model.map.species.Ion":["Chebi"],"lcsb.mapviewer.model.map.reaction.Reaction":[],"lcsb.mapviewer.model.map.reaction.type.HeterodimerAssociationReaction":[],"lcsb.mapviewer.model.map.compartment.RightSquareCompartment":["Gene Ontology"],"lcsb.mapviewer.model.map.reaction.type.TranslationReaction":[],"lcsb.mapviewer.model.map.reaction.type.UnknownPositiveInfluenceReaction":[],"lcsb.mapviewer.model.map.reaction.type.ReducedModulationReaction":[],"lcsb.mapviewer.model.map.species.AntisenseRna":[],"lcsb.mapviewer.model.map.species.Complex":["Gene Ontology"],"lcsb.mapviewer.model.map.species.Unknown":[],"lcsb.mapviewer.model.map.reaction.type.TruncationReaction":[],"lcsb.mapviewer.model.map.compartment.LeftSquareCompartment":["Gene Ontology"],"lcsb.mapviewer.model.map.reaction.type.UnknownNegativeInfluenceReaction":[],"lcsb.mapviewer.model.map.reaction.type.NegativeInfluenceReaction":[],"lcsb.mapviewer.model.map.species.TruncatedProtein":["Biocompendium","HGNC"],"lcsb.mapviewer.model.map.compartment.Compartment":["Gene Ontology"],"lcsb.mapviewer.model.map.compartment.TopSquareCompartment":["Gene Ontology"],"lcsb.mapviewer.model.map.species.Species":[],"lcsb.mapviewer.model.map.species.Rna":["HGNC"],"lcsb.mapviewer.model.map.reaction.type.KnownTransitionOmittedReaction":[],"lcsb.mapviewer.model.map.reaction.type.StateTransitionReaction":[]},"project-upload":{"auto-resize":true,"sbgn":false,"cache-data":false,"semantic-zooming":false,"annotate-model":false,"validate-miriam":false}},"removed":false,"surname":"","minColor":null,"name":"","maxColor":null,"id":3,"login":"anonymous","email":""} \ No newline at end of file diff --git a/model/src/main/java/lcsb/mapviewer/modelutils/map/ClassTreeNode.java b/model/src/main/java/lcsb/mapviewer/modelutils/map/ClassTreeNode.java index d4e1e74c967edc374d636f5cdcdc15b1aec508e2..f8ef4eff9ea07d17b4af0ece2aa832756636ecf3 100644 --- a/model/src/main/java/lcsb/mapviewer/modelutils/map/ClassTreeNode.java +++ b/model/src/main/java/lcsb/mapviewer/modelutils/map/ClassTreeNode.java @@ -1,8 +1,13 @@ package lcsb.mapviewer.modelutils.map; +import java.lang.reflect.InvocationTargetException; import java.util.ArrayList; import java.util.List; +import javassist.Modifier; +import lcsb.mapviewer.model.map.BioEntity; +import lcsb.mapviewer.model.map.reaction.Reaction; + /** * This class is used to represent inheritance hierarchy of classes. * @@ -10,12 +15,12 @@ import java.util.List; * */ public class ClassTreeNode { - + /** * Origial class. */ private Class<?> clazz; - + /** * Children classes. */ @@ -25,7 +30,7 @@ public class ClassTreeNode { * Parent node. */ private ClassTreeNode parent; - + /** * Name used to present this class. */ @@ -44,8 +49,20 @@ public class ClassTreeNode { */ public ClassTreeNode(Class<?> class1) { this.clazz = class1; - this.children = new ArrayList<ClassTreeNode>(); + this.children = new ArrayList<>(); this.commonName = class1.getSimpleName(); + if (!Modifier.isAbstract(clazz.getModifiers())) { + try { + if (Reaction.class.isAssignableFrom(clazz)) { + this.commonName = ((BioEntity) (clazz.getDeclaredConstructor().newInstance())).getStringType(); + } else { + this.commonName = ((BioEntity) (clazz.getDeclaredConstructor(String.class).newInstance("id"))).getStringType(); + } + } catch (InstantiationException | IllegalAccessException | IllegalArgumentException | InvocationTargetException | NoSuchMethodException + | SecurityException e) { + } + } + this.data = null; } diff --git a/rest-api/src/main/java/lcsb/mapviewer/api/configuration/ConfigurationRestImpl.java b/rest-api/src/main/java/lcsb/mapviewer/api/configuration/ConfigurationRestImpl.java index 7e7b45bc08be403c03d2915875128b1b8cde7bbd..6eb4066d9b08d66ee6a655414166bef47565e3bf 100644 --- a/rest-api/src/main/java/lcsb/mapviewer/api/configuration/ConfigurationRestImpl.java +++ b/rest-api/src/main/java/lcsb/mapviewer/api/configuration/ConfigurationRestImpl.java @@ -157,24 +157,15 @@ public class ConfigurationRestImpl { queue.add(child); } if (elementClass.isAssignableFrom(clazz.getClazz())) { - if (!Modifier.isAbstract(clazz.getClazz().getModifiers())) { - Map<String, String> row = new HashMap<>(); - try { - row.put("className", elementClass.getName()); - String name = null; - if (elementClass.isAssignableFrom(Reaction.class)) { - row.put("className", elementClass.getName()); - name = ((BioEntity) (clazz.getClazz().getDeclaredConstructor().newInstance())).getStringType(); - } else { - name = ((BioEntity) (clazz.getClazz().getDeclaredConstructor(String.class).newInstance("id"))).getStringType(); - } - row.put("name", name); - result.add(row); - } catch (InstantiationException | IllegalAccessException | IllegalArgumentException | InvocationTargetException | NoSuchMethodException - | java.lang.SecurityException e) { - throw new RuntimeException(e); - } + Map<String, String> row = new HashMap<>(); + row.put("className", clazz.getClazz().getName()); + row.put("name", clazz.getCommonName()); + if (clazz.getParent() == null) { + row.put("parentClass", null); + } else { + row.put("parentClass", clazz.getParent().getClazz().getName()); } + result.add(row); } } return result;