{"action":"created","comment":{"url":"https://api.github.com/repos/ViDA-NYU/genotet/pulls/comments/52095409","id":52095409,"diff_hunk":"@@ -0,0 +1,119 @@\n+/**\n+ * @fileoverview Link manager for controlling the link query.\n+ */\n+\n+/**\n+ * @typedef {{\n+ *   source: string,\n+ *   action: string,\n+ *   target: string,\n+ *   response: string\n+ * }}\n+ */\n+genotet.LinkSetting;\n+\n+/** @const */\n+genotet.linkManager = {};\n+\n+/**\n+ * Object that stores the link views by their type.\n+ */\n+/** @type {!Object<!Object<!Array<{\n+ *    target: genotet.View,\n+ *    response: string\n+ *  }>>>}\n+ */\n+genotet.linkManager.links = {};\n+\n+/** @const {!Array<string>} */\n+genotet.linkManager.EXPRESSION_ACTIONS = ['addProfile'];\n+\n+/** @const {!Array<string>} */\n+genotet.linkManager.NETWORK_ACTIONS = ['nodeClick', 'edgeClick'];\n+\n+/** @const {!Array<string>} */\n+genotet.linkManager.BINDING_ACTIONS = ['updateTrack', 'locus'];\n+\n+/** @const {string} */\n+genotet.linkManager.DEFAULT_MAPPING = 'Direct Mapping';\n+\n+/**\n+ * Initializes the link manager.\n+ */\n+genotet.linkManager.init = function() {\n+  genotet.linkManager.links = {};\n+  genotet.data.mappingFile['gene-binding'] =\n+    genotet.linkManager.DEFAULT_MAPPING;\n+};\n+\n+/**\n+ * Registers link action and response for all the views.\n+ * @param {!Array<genotet.LinkSetting>} linkSetting Link setting for all the\n+ * views.\n+ */\n+genotet.linkManager.registerAllViews = function(linkSetting) {\n+  linkSetting.forEach(function(object) {\n+    var sourceView = genotet.viewManager.views[object.source];\n+    var targetView = genotet.viewManager.views[object.target];\n+    /*\n+     * TODO(Liana): Next version plans.\n+     * Link settings will be extended to user self-defined in next version.\n+     * We need check whether the view is existed,\n+     * because link settings are defined as constant in this version,\n+     * which cannot be revised corresponding to views.\n+     */\n+    if (!sourceView || !targetView) {","path":"src/link-manager.js","position":65,"original_position":65,"commit_id":"c037aab1fdb8cbda5812e6e2ae0796f9a35f2fad","original_commit_id":"c037aab1fdb8cbda5812e6e2ae0796f9a35f2fad","user":{"login":"Shauro","id":9913788,"avatar_url":"https://avatars.githubusercontent.com/u/9913788?v=3","gravatar_id":"","url":"https://api.github.com/users/Shauro","html_url":"https://github.com/Shauro","followers_url":"https://api.github.com/users/Shauro/followers","following_url":"https://api.github.com/users/Shauro/following{/other_user}","gists_url":"https://api.github.com/users/Shauro/gists{/gist_id}","starred_url":"https://api.github.com/users/Shauro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Shauro/subscriptions","organizations_url":"https://api.github.com/users/Shauro/orgs","repos_url":"https://api.github.com/users/Shauro/repos","events_url":"https://api.github.com/users/Shauro/events{/privacy}","received_events_url":"https://api.github.com/users/Shauro/received_events","type":"User","site_admin":false},"body":"redundant or should error","created_at":"2016-02-06T02:03:51Z","updated_at":"2016-02-06T02:03:51Z","html_url":"https://github.com/ViDA-NYU/genotet/pull/78#discussion_r52095409","pull_request_url":"https://api.github.com/repos/ViDA-NYU/genotet/pulls/78","_links":{"self":{"href":"https://api.github.com/repos/ViDA-NYU/genotet/pulls/comments/52095409"},"html":{"href":"https://github.com/ViDA-NYU/genotet/pull/78#discussion_r52095409"},"pull_request":{"href":"https://api.github.com/repos/ViDA-NYU/genotet/pulls/78"}}},"pull_request":{"url":"https://api.github.com/repos/ViDA-NYU/genotet/pulls/78","id":57005567,"html_url":"https://github.com/ViDA-NYU/genotet/pull/78","diff_url":"https://github.com/ViDA-NYU/genotet/pull/78.diff","patch_url":"https://github.com/ViDA-NYU/genotet/pull/78.patch","issue_url":"https://api.github.com/repos/ViDA-NYU/genotet/issues/78","number":78,"state":"open","locked":false,"title":"Implemented preset layout and link query.","user":{"login":"Shauro","id":9913788,"avatar_url":"https://avatars.githubusercontent.com/u/9913788?v=3","gravatar_id":"","url":"https://api.github.com/users/Shauro","html_url":"https://github.com/Shauro","followers_url":"https://api.github.com/users/Shauro/followers","following_url":"https://api.github.com/users/Shauro/following{/other_user}","gists_url":"https://api.github.com/users/Shauro/gists{/gist_id}","starred_url":"https://api.github.com/users/Shauro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Shauro/subscriptions","organizations_url":"https://api.github.com/users/Shauro/orgs","repos_url":"https://api.github.com/users/Shauro/repos","events_url":"https://api.github.com/users/Shauro/events{/privacy}","received_events_url":"https://api.github.com/users/Shauro/received_events","type":"User","site_admin":false},"body":"Implemented #70.\r\nImplemented link query. (Front end part.)\r\n@djasmine will complete the rest part of link query. I leave the query part with fake data temporarily and assigned a to do list to him.","created_at":"2016-01-24T15:24:15Z","updated_at":"2016-02-06T02:03:51Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8ba10276f9883dd2d4f8233b520522e873b2ff14","assignee":null,"milestone":{"url":"https://api.github.com/repos/ViDA-NYU/genotet/milestones/6","html_url":"https://github.com/ViDA-NYU/genotet/milestones/Release%20Feb%201,%20Trial%20version","labels_url":"https://api.github.com/repos/ViDA-NYU/genotet/milestones/6/labels","id":1405638,"number":6,"title":"Release Feb 1, Trial version","description":"All components functional and can be sent to biologists for try-outs, testing and comments.","creator":{"login":"yubowenok","id":1314429,"avatar_url":"https://avatars.githubusercontent.com/u/1314429?v=3","gravatar_id":"","url":"https://api.github.com/users/yubowenok","html_url":"https://github.com/yubowenok","followers_url":"https://api.github.com/users/yubowenok/followers","following_url":"https://api.github.com/users/yubowenok/following{/other_user}","gists_url":"https://api.github.com/users/yubowenok/gists{/gist_id}","starred_url":"https://api.github.com/users/yubowenok/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yubowenok/subscriptions","organizations_url":"https://api.github.com/users/yubowenok/orgs","repos_url":"https://api.github.com/users/yubowenok/repos","events_url":"https://api.github.com/users/yubowenok/events{/privacy}","received_events_url":"https://api.github.com/users/yubowenok/received_events","type":"User","site_admin":false},"open_issues":13,"closed_issues":44,"state":"open","created_at":"2015-11-10T23:56:00Z","updated_at":"2016-02-05T08:19:59Z","due_on":"2016-01-31T16:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/ViDA-NYU/genotet/pulls/78/commits","review_comments_url":"https://api.github.com/repos/ViDA-NYU/genotet/pulls/78/comments","review_comment_url":"https://api.github.com/repos/ViDA-NYU/genotet/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ViDA-NYU/genotet/issues/78/comments","statuses_url":"https://api.github.com/repos/ViDA-NYU/genotet/statuses/c037aab1fdb8cbda5812e6e2ae0796f9a35f2fad","head":{"label":"ViDA-NYU:liana/preset","ref":"liana/preset","sha":"c037aab1fdb8cbda5812e6e2ae0796f9a35f2fad","user":{"login":"ViDA-NYU","id":8114708,"avatar_url":"https://avatars.githubusercontent.com/u/8114708?v=3","gravatar_id":"","url":"https://api.github.com/users/ViDA-NYU","html_url":"https://github.com/ViDA-NYU","followers_url":"https://api.github.com/users/ViDA-NYU/followers","following_url":"https://api.github.com/users/ViDA-NYU/following{/other_user}","gists_url":"https://api.github.com/users/ViDA-NYU/gists{/gist_id}","starred_url":"https://api.github.com/users/ViDA-NYU/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ViDA-NYU/subscriptions","organizations_url":"https://api.github.com/users/ViDA-NYU/orgs","repos_url":"https://api.github.com/users/ViDA-NYU/repos","events_url":"https://api.github.com/users/ViDA-NYU/events{/privacy}","received_events_url":"https://api.github.com/users/ViDA-NYU/received_events","type":"Organization","site_admin":false},"repo":{"id":24764416,"name":"genotet","full_name":"ViDA-NYU/genotet","owner":{"login":"ViDA-NYU","id":8114708,"avatar_url":"https://avatars.githubusercontent.com/u/8114708?v=3","gravatar_id":"","url":"https://api.github.com/users/ViDA-NYU","html_url":"https://github.com/ViDA-NYU","followers_url":"https://api.github.com/users/ViDA-NYU/followers","following_url":"https://api.github.com/users/ViDA-NYU/following{/other_user}","gists_url":"https://api.github.com/users/ViDA-NYU/gists{/gist_id}","starred_url":"https://api.github.com/users/ViDA-NYU/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ViDA-NYU/subscriptions","organizations_url":"https://api.github.com/users/ViDA-NYU/orgs","repos_url":"https://api.github.com/users/ViDA-NYU/repos","events_url":"https://api.github.com/users/ViDA-NYU/events{/privacy}","received_events_url":"https://api.github.com/users/ViDA-NYU/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ViDA-NYU/genotet","description":"Genotet: An Interactive Web-based Visual Exploration Framework to Support Validation of Gene Regulatory Networks","fork":false,"url":"https://api.github.com/repos/ViDA-NYU/genotet","forks_url":"https://api.github.com/repos/ViDA-NYU/genotet/forks","keys_url":"https://api.github.com/repos/ViDA-NYU/genotet/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ViDA-NYU/genotet/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ViDA-NYU/genotet/teams","hooks_url":"https://api.github.com/repos/ViDA-NYU/genotet/hooks","issue_events_url":"https://api.github.com/repos/ViDA-NYU/genotet/issues/events{/number}","events_url":"https://api.github.com/repos/ViDA-NYU/genotet/events","assignees_url":"https://api.github.com/repos/ViDA-NYU/genotet/assignees{/user}","branches_url":"https://api.github.com/repos/ViDA-NYU/genotet/branches{/branch}","tags_url":"https://api.github.com/repos/ViDA-NYU/genotet/tags","blobs_url":"https://api.github.com/repos/ViDA-NYU/genotet/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ViDA-NYU/genotet/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ViDA-NYU/genotet/git/refs{/sha}","trees_url":"https://api.github.com/repos/ViDA-NYU/genotet/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ViDA-NYU/genotet/statuses/{sha}","languages_url":"https://api.github.com/repos/ViDA-NYU/genotet/languages","stargazers_url":"https://api.github.com/repos/ViDA-NYU/genotet/stargazers","contributors_url":"https://api.github.com/repos/ViDA-NYU/genotet/contributors","subscribers_url":"https://api.github.com/repos/ViDA-NYU/genotet/subscribers","subscription_url":"https://api.github.com/repos/ViDA-NYU/genotet/subscription","commits_url":"https://api.github.com/repos/ViDA-NYU/genotet/commits{/sha}","git_commits_url":"https://api.github.com/repos/ViDA-NYU/genotet/git/commits{/sha}","comments_url":"https://api.github.com/repos/ViDA-NYU/genotet/comments{/number}","issue_comment_url":"https://api.github.com/repos/ViDA-NYU/genotet/issues/comments{/number}","contents_url":"https://api.github.com/repos/ViDA-NYU/genotet/contents/{+path}","compare_url":"https://api.github.com/repos/ViDA-NYU/genotet/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ViDA-NYU/genotet/merges","archive_url":"https://api.github.com/repos/ViDA-NYU/genotet/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ViDA-NYU/genotet/downloads","issues_url":"https://api.github.com/repos/ViDA-NYU/genotet/issues{/number}","pulls_url":"https://api.github.com/repos/ViDA-NYU/genotet/pulls{/number}","milestones_url":"https://api.github.com/repos/ViDA-NYU/genotet/milestones{/number}","notifications_url":"https://api.github.com/repos/ViDA-NYU/genotet/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ViDA-NYU/genotet/labels{/name}","releases_url":"https://api.github.com/repos/ViDA-NYU/genotet/releases{/id}","deployments_url":"https://api.github.com/repos/ViDA-NYU/genotet/deployments","created_at":"2014-10-03T15:55:16Z","updated_at":"2016-01-11T19:18:29Z","pushed_at":"2016-02-06T01:18:10Z","git_url":"git://github.com/ViDA-NYU/genotet.git","ssh_url":"git@github.com:ViDA-NYU/genotet.git","clone_url":"https://github.com/ViDA-NYU/genotet.git","svn_url":"https://github.com/ViDA-NYU/genotet","homepage":null,"size":1735,"stargazers_count":4,"watchers_count":4,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":15,"forks":2,"open_issues":15,"watchers":4,"default_branch":"refactor"}},"base":{"label":"ViDA-NYU:refactor","ref":"refactor","sha":"319da6896f5eaca1f61fd45c2367fa0bc01995ee","user":{"login":"ViDA-NYU","id":8114708,"avatar_url":"https://avatars.githubusercontent.com/u/8114708?v=3","gravatar_id":"","url":"https://api.github.com/users/ViDA-NYU","html_url":"https://github.com/ViDA-NYU","followers_url":"https://api.github.com/users/ViDA-NYU/followers","following_url":"https://api.github.com/users/ViDA-NYU/following{/other_user}","gists_url":"https://api.github.com/users/ViDA-NYU/gists{/gist_id}","starred_url":"https://api.github.com/users/ViDA-NYU/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ViDA-NYU/subscriptions","organizations_url":"https://api.github.com/users/ViDA-NYU/orgs","repos_url":"https://api.github.com/users/ViDA-NYU/repos","events_url":"https://api.github.com/users/ViDA-NYU/events{/privacy}","received_events_url":"https://api.github.com/users/ViDA-NYU/received_events","type":"Organization","site_admin":false},"repo":{"id":24764416,"name":"genotet","full_name":"ViDA-NYU/genotet","owner":{"login":"ViDA-NYU","id":8114708,"avatar_url":"https://avatars.githubusercontent.com/u/8114708?v=3","gravatar_id":"","url":"https://api.github.com/users/ViDA-NYU","html_url":"https://github.com/ViDA-NYU","followers_url":"https://api.github.com/users/ViDA-NYU/followers","following_url":"https://api.github.com/users/ViDA-NYU/following{/other_user}","gists_url":"https://api.github.com/users/ViDA-NYU/gists{/gist_id}","starred_url":"https://api.github.com/users/ViDA-NYU/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ViDA-NYU/subscriptions","organizations_url":"https://api.github.com/users/ViDA-NYU/orgs","repos_url":"https://api.github.com/users/ViDA-NYU/repos","events_url":"https://api.github.com/users/ViDA-NYU/events{/privacy}","received_events_url":"https://api.github.com/users/ViDA-NYU/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ViDA-NYU/genotet","description":"Genotet: An Interactive Web-based Visual Exploration Framework to Support Validation of Gene Regulatory Networks","fork":false,"url":"https://api.github.com/repos/ViDA-NYU/genotet","forks_url":"https://api.github.com/repos/ViDA-NYU/genotet/forks","keys_url":"https://api.github.com/repos/ViDA-NYU/genotet/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ViDA-NYU/genotet/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ViDA-NYU/genotet/teams","hooks_url":"https://api.github.com/repos/ViDA-NYU/genotet/hooks","issue_events_url":"https://api.github.com/repos/ViDA-NYU/genotet/issues/events{/number}","events_url":"https://api.github.com/repos/ViDA-NYU/genotet/events","assignees_url":"https://api.github.com/repos/ViDA-NYU/genotet/assignees{/user}","branches_url":"https://api.github.com/repos/ViDA-NYU/genotet/branches{/branch}","tags_url":"https://api.github.com/repos/ViDA-NYU/genotet/tags","blobs_url":"https://api.github.com/repos/ViDA-NYU/genotet/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ViDA-NYU/genotet/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ViDA-NYU/genotet/git/refs{/sha}","trees_url":"https://api.github.com/repos/ViDA-NYU/genotet/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ViDA-NYU/genotet/statuses/{sha}","languages_url":"https://api.github.com/repos/ViDA-NYU/genotet/languages","stargazers_url":"https://api.github.com/repos/ViDA-NYU/genotet/stargazers","contributors_url":"https://api.github.com/repos/ViDA-NYU/genotet/contributors","subscribers_url":"https://api.github.com/repos/ViDA-NYU/genotet/subscribers","subscription_url":"https://api.github.com/repos/ViDA-NYU/genotet/subscription","commits_url":"https://api.github.com/repos/ViDA-NYU/genotet/commits{/sha}","git_commits_url":"https://api.github.com/repos/ViDA-NYU/genotet/git/commits{/sha}","comments_url":"https://api.github.com/repos/ViDA-NYU/genotet/comments{/number}","issue_comment_url":"https://api.github.com/repos/ViDA-NYU/genotet/issues/comments{/number}","contents_url":"https://api.github.com/repos/ViDA-NYU/genotet/contents/{+path}","compare_url":"https://api.github.com/repos/ViDA-NYU/genotet/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ViDA-NYU/genotet/merges","archive_url":"https://api.github.com/repos/ViDA-NYU/genotet/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ViDA-NYU/genotet/downloads","issues_url":"https://api.github.com/repos/ViDA-NYU/genotet/issues{/number}","pulls_url":"https://api.github.com/repos/ViDA-NYU/genotet/pulls{/number}","milestones_url":"https://api.github.com/repos/ViDA-NYU/genotet/milestones{/number}","notifications_url":"https://api.github.com/repos/ViDA-NYU/genotet/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ViDA-NYU/genotet/labels{/name}","releases_url":"https://api.github.com/repos/ViDA-NYU/genotet/releases{/id}","deployments_url":"https://api.github.com/repos/ViDA-NYU/genotet/deployments","created_at":"2014-10-03T15:55:16Z","updated_at":"2016-01-11T19:18:29Z","pushed_at":"2016-02-06T01:18:10Z","git_url":"git://github.com/ViDA-NYU/genotet.git","ssh_url":"git@github.com:ViDA-NYU/genotet.git","clone_url":"https://github.com/ViDA-NYU/genotet.git","svn_url":"https://github.com/ViDA-NYU/genotet","homepage":null,"size":1735,"stargazers_count":4,"watchers_count":4,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":15,"forks":2,"open_issues":15,"watchers":4,"default_branch":"refactor"}},"_links":{"self":{"href":"https://api.github.com/repos/ViDA-NYU/genotet/pulls/78"},"html":{"href":"https://github.com/ViDA-NYU/genotet/pull/78"},"issue":{"href":"https://api.github.com/repos/ViDA-NYU/genotet/issues/78"},"comments":{"href":"https://api.github.com/repos/ViDA-NYU/genotet/issues/78/comments"},"review_comments":{"href":"https://api.github.com/repos/ViDA-NYU/genotet/pulls/78/comments"},"review_comment":{"href":"https://api.github.com/repos/ViDA-NYU/genotet/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ViDA-NYU/genotet/pulls/78/commits"},"statuses":{"href":"https://api.github.com/repos/ViDA-NYU/genotet/statuses/c037aab1fdb8cbda5812e6e2ae0796f9a35f2fad"}}}}