{"action":"created","comment":{"url":"https://api.github.com/repos/molgenis/molgenis/pulls/comments/38618928","id":38618928,"diff_hunk":"@@ -0,0 +1,45 @@\n+package org.molgenis.data.importer;\n+\n+import org.molgenis.data.DataService;\n+import org.molgenis.data.EntityMetaData;\n+import org.molgenis.data.MolgenisDataException;\n+import org.springframework.beans.factory.annotation.Autowired;\n+\n+import com.google.common.collect.ImmutableCollection;\n+\n+/**\n+ * This class serves as an early validator. It can check if an entity is valid before we process parsed data into\n+ * repositories.\n+ *\n+ */\n+public class ImportedDataToBackendCompatibilityValidator\n+{\n+\t@Autowired\n+\tDataService dataService;\n+\n+\tpublic ImportedDataToBackendCompatibilityValidator(DataService dataService)\n+\t{\n+\t\tthis.dataService = dataService;\n+\t}\n+\n+\tpublic void validate(ImmutableCollection<EntityMetaData> immutableCollection)","path":"molgenis-data-import/src/main/java/org/molgenis/data/importer/ImportedDataToBackendCompatibilityValidator.java","position":25,"original_position":25,"commit_id":"0ab99abf8d99957a272d0301252c06195a2a437c","original_commit_id":"5b08e8d2cb2b5098e80f042e6f46ed844264ffe5","user":{"login":"fdlk","id":1523838,"avatar_url":"https://avatars.githubusercontent.com/u/1523838?v=3","gravatar_id":"","url":"https://api.github.com/users/fdlk","html_url":"https://github.com/fdlk","followers_url":"https://api.github.com/users/fdlk/followers","following_url":"https://api.github.com/users/fdlk/following{/other_user}","gists_url":"https://api.github.com/users/fdlk/gists{/gist_id}","starred_url":"https://api.github.com/users/fdlk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fdlk/subscriptions","organizations_url":"https://api.github.com/users/fdlk/orgs","repos_url":"https://api.github.com/users/fdlk/repos","events_url":"https://api.github.com/users/fdlk/events{/privacy}","received_events_url":"https://api.github.com/users/fdlk/received_events","type":"User","site_admin":false},"body":"can relax the interface a bit here, to for instance Iterable<EntityMetaData>, I think?","created_at":"2015-09-03T07:21:27Z","updated_at":"2015-09-03T07:21:27Z","html_url":"https://github.com/molgenis/molgenis/pull/3555#discussion_r38618928","pull_request_url":"https://api.github.com/repos/molgenis/molgenis/pulls/3555","_links":{"self":{"href":"https://api.github.com/repos/molgenis/molgenis/pulls/comments/38618928"},"html":{"href":"https://github.com/molgenis/molgenis/pull/3555#discussion_r38618928"},"pull_request":{"href":"https://api.github.com/repos/molgenis/molgenis/pulls/3555"}}},"pull_request":{"url":"https://api.github.com/repos/molgenis/molgenis/pulls/3555","id":44075865,"html_url":"https://github.com/molgenis/molgenis/pull/3555","diff_url":"https://github.com/molgenis/molgenis/pull/3555.diff","patch_url":"https://github.com/molgenis/molgenis/pull/3555.patch","issue_url":"https://api.github.com/repos/molgenis/molgenis/issues/3555","number":3555,"state":"open","locked":false,"title":"Fix #3368 Importing an entity with the same name but different casing will result in a locked importer","user":{"login":"Mark-de-Haan","id":3625016,"avatar_url":"https://avatars.githubusercontent.com/u/3625016?v=3","gravatar_id":"","url":"https://api.github.com/users/Mark-de-Haan","html_url":"https://github.com/Mark-de-Haan","followers_url":"https://api.github.com/users/Mark-de-Haan/followers","following_url":"https://api.github.com/users/Mark-de-Haan/following{/other_user}","gists_url":"https://api.github.com/users/Mark-de-Haan/gists{/gist_id}","starred_url":"https://api.github.com/users/Mark-de-Haan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Mark-de-Haan/subscriptions","organizations_url":"https://api.github.com/users/Mark-de-Haan/orgs","repos_url":"https://api.github.com/users/Mark-de-Haan/repos","events_url":"https://api.github.com/users/Mark-de-Haan/events{/privacy}","received_events_url":"https://api.github.com/users/Mark-de-Haan/received_events","type":"User","site_admin":false},"body":"I fixed it through a validation check before we insert parsed data into repositories. This prevents the casing collision from ever happening, preventing roll backs and such.\r\n\r\nNote: The casing issue needs to be fixed but its a story on its own and too big for just a bug fix.","created_at":"2015-09-03T07:19:21Z","updated_at":"2015-09-03T07:21:27Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d7265e353fa18e1d2e79ab84884687baacfa7d2d","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/molgenis/molgenis/pulls/3555/commits","review_comments_url":"https://api.github.com/repos/molgenis/molgenis/pulls/3555/comments","review_comment_url":"https://api.github.com/repos/molgenis/molgenis/pulls/comments{/number}","comments_url":"https://api.github.com/repos/molgenis/molgenis/issues/3555/comments","statuses_url":"https://api.github.com/repos/molgenis/molgenis/statuses/0ab99abf8d99957a272d0301252c06195a2a437c","head":{"label":"Mark-de-Haan:fix/3368","ref":"fix/3368","sha":"0ab99abf8d99957a272d0301252c06195a2a437c","user":{"login":"Mark-de-Haan","id":3625016,"avatar_url":"https://avatars.githubusercontent.com/u/3625016?v=3","gravatar_id":"","url":"https://api.github.com/users/Mark-de-Haan","html_url":"https://github.com/Mark-de-Haan","followers_url":"https://api.github.com/users/Mark-de-Haan/followers","following_url":"https://api.github.com/users/Mark-de-Haan/following{/other_user}","gists_url":"https://api.github.com/users/Mark-de-Haan/gists{/gist_id}","starred_url":"https://api.github.com/users/Mark-de-Haan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Mark-de-Haan/subscriptions","organizations_url":"https://api.github.com/users/Mark-de-Haan/orgs","repos_url":"https://api.github.com/users/Mark-de-Haan/repos","events_url":"https://api.github.com/users/Mark-de-Haan/events{/privacy}","received_events_url":"https://api.github.com/users/Mark-de-Haan/received_events","type":"User","site_admin":false},"repo":{"id":27178136,"name":"molgenis","full_name":"Mark-de-Haan/molgenis","owner":{"login":"Mark-de-Haan","id":3625016,"avatar_url":"https://avatars.githubusercontent.com/u/3625016?v=3","gravatar_id":"","url":"https://api.github.com/users/Mark-de-Haan","html_url":"https://github.com/Mark-de-Haan","followers_url":"https://api.github.com/users/Mark-de-Haan/followers","following_url":"https://api.github.com/users/Mark-de-Haan/following{/other_user}","gists_url":"https://api.github.com/users/Mark-de-Haan/gists{/gist_id}","starred_url":"https://api.github.com/users/Mark-de-Haan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Mark-de-Haan/subscriptions","organizations_url":"https://api.github.com/users/Mark-de-Haan/orgs","repos_url":"https://api.github.com/users/Mark-de-Haan/repos","events_url":"https://api.github.com/users/Mark-de-Haan/events{/privacy}","received_events_url":"https://api.github.com/users/Mark-de-Haan/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Mark-de-Haan/molgenis","description":"MOLGENIS is an collaborative open source project on a mission to generate great software infrastructure for life science research. ","fork":true,"url":"https://api.github.com/repos/Mark-de-Haan/molgenis","forks_url":"https://api.github.com/repos/Mark-de-Haan/molgenis/forks","keys_url":"https://api.github.com/repos/Mark-de-Haan/molgenis/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Mark-de-Haan/molgenis/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Mark-de-Haan/molgenis/teams","hooks_url":"https://api.github.com/repos/Mark-de-Haan/molgenis/hooks","issue_events_url":"https://api.github.com/repos/Mark-de-Haan/molgenis/issues/events{/number}","events_url":"https://api.github.com/repos/Mark-de-Haan/molgenis/events","assignees_url":"https://api.github.com/repos/Mark-de-Haan/molgenis/assignees{/user}","branches_url":"https://api.github.com/repos/Mark-de-Haan/molgenis/branches{/branch}","tags_url":"https://api.github.com/repos/Mark-de-Haan/molgenis/tags","blobs_url":"https://api.github.com/repos/Mark-de-Haan/molgenis/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Mark-de-Haan/molgenis/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Mark-de-Haan/molgenis/git/refs{/sha}","trees_url":"https://api.github.com/repos/Mark-de-Haan/molgenis/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Mark-de-Haan/molgenis/statuses/{sha}","languages_url":"https://api.github.com/repos/Mark-de-Haan/molgenis/languages","stargazers_url":"https://api.github.com/repos/Mark-de-Haan/molgenis/stargazers","contributors_url":"https://api.github.com/repos/Mark-de-Haan/molgenis/contributors","subscribers_url":"https://api.github.com/repos/Mark-de-Haan/molgenis/subscribers","subscription_url":"https://api.github.com/repos/Mark-de-Haan/molgenis/subscription","commits_url":"https://api.github.com/repos/Mark-de-Haan/molgenis/commits{/sha}","git_commits_url":"https://api.github.com/repos/Mark-de-Haan/molgenis/git/commits{/sha}","comments_url":"https://api.github.com/repos/Mark-de-Haan/molgenis/comments{/number}","issue_comment_url":"https://api.github.com/repos/Mark-de-Haan/molgenis/issues/comments{/number}","contents_url":"https://api.github.com/repos/Mark-de-Haan/molgenis/contents/{+path}","compare_url":"https://api.github.com/repos/Mark-de-Haan/molgenis/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Mark-de-Haan/molgenis/merges","archive_url":"https://api.github.com/repos/Mark-de-Haan/molgenis/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Mark-de-Haan/molgenis/downloads","issues_url":"https://api.github.com/repos/Mark-de-Haan/molgenis/issues{/number}","pulls_url":"https://api.github.com/repos/Mark-de-Haan/molgenis/pulls{/number}","milestones_url":"https://api.github.com/repos/Mark-de-Haan/molgenis/milestones{/number}","notifications_url":"https://api.github.com/repos/Mark-de-Haan/molgenis/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Mark-de-Haan/molgenis/labels{/name}","releases_url":"https://api.github.com/repos/Mark-de-Haan/molgenis/releases{/id}","created_at":"2014-11-26T13:31:44Z","updated_at":"2015-06-04T14:14:50Z","pushed_at":"2015-09-03T07:19:44Z","git_url":"git://github.com/Mark-de-Haan/molgenis.git","ssh_url":"git@github.com:Mark-de-Haan/molgenis.git","clone_url":"https://github.com/Mark-de-Haan/molgenis.git","svn_url":"https://github.com/Mark-de-Haan/molgenis","homepage":"","size":77680,"stargazers_count":1,"watchers_count":1,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":1,"default_branch":"master"}},"base":{"label":"molgenis:master","ref":"master","sha":"2d20edce1570d32e79dc40da1601c5162768ec24","user":{"login":"molgenis","id":1688158,"avatar_url":"https://avatars.githubusercontent.com/u/1688158?v=3","gravatar_id":"","url":"https://api.github.com/users/molgenis","html_url":"https://github.com/molgenis","followers_url":"https://api.github.com/users/molgenis/followers","following_url":"https://api.github.com/users/molgenis/following{/other_user}","gists_url":"https://api.github.com/users/molgenis/gists{/gist_id}","starred_url":"https://api.github.com/users/molgenis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/molgenis/subscriptions","organizations_url":"https://api.github.com/users/molgenis/orgs","repos_url":"https://api.github.com/users/molgenis/repos","events_url":"https://api.github.com/users/molgenis/events{/privacy}","received_events_url":"https://api.github.com/users/molgenis/received_events","type":"Organization","site_admin":false},"repo":{"id":8010626,"name":"molgenis","full_name":"molgenis/molgenis","owner":{"login":"molgenis","id":1688158,"avatar_url":"https://avatars.githubusercontent.com/u/1688158?v=3","gravatar_id":"","url":"https://api.github.com/users/molgenis","html_url":"https://github.com/molgenis","followers_url":"https://api.github.com/users/molgenis/followers","following_url":"https://api.github.com/users/molgenis/following{/other_user}","gists_url":"https://api.github.com/users/molgenis/gists{/gist_id}","starred_url":"https://api.github.com/users/molgenis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/molgenis/subscriptions","organizations_url":"https://api.github.com/users/molgenis/orgs","repos_url":"https://api.github.com/users/molgenis/repos","events_url":"https://api.github.com/users/molgenis/events{/privacy}","received_events_url":"https://api.github.com/users/molgenis/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/molgenis/molgenis","description":"MOLGENIS - for scientific data: management, exploration, integration and analysis","fork":false,"url":"https://api.github.com/repos/molgenis/molgenis","forks_url":"https://api.github.com/repos/molgenis/molgenis/forks","keys_url":"https://api.github.com/repos/molgenis/molgenis/keys{/key_id}","collaborators_url":"https://api.github.com/repos/molgenis/molgenis/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/molgenis/molgenis/teams","hooks_url":"https://api.github.com/repos/molgenis/molgenis/hooks","issue_events_url":"https://api.github.com/repos/molgenis/molgenis/issues/events{/number}","events_url":"https://api.github.com/repos/molgenis/molgenis/events","assignees_url":"https://api.github.com/repos/molgenis/molgenis/assignees{/user}","branches_url":"https://api.github.com/repos/molgenis/molgenis/branches{/branch}","tags_url":"https://api.github.com/repos/molgenis/molgenis/tags","blobs_url":"https://api.github.com/repos/molgenis/molgenis/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/molgenis/molgenis/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/molgenis/molgenis/git/refs{/sha}","trees_url":"https://api.github.com/repos/molgenis/molgenis/git/trees{/sha}","statuses_url":"https://api.github.com/repos/molgenis/molgenis/statuses/{sha}","languages_url":"https://api.github.com/repos/molgenis/molgenis/languages","stargazers_url":"https://api.github.com/repos/molgenis/molgenis/stargazers","contributors_url":"https://api.github.com/repos/molgenis/molgenis/contributors","subscribers_url":"https://api.github.com/repos/molgenis/molgenis/subscribers","subscription_url":"https://api.github.com/repos/molgenis/molgenis/subscription","commits_url":"https://api.github.com/repos/molgenis/molgenis/commits{/sha}","git_commits_url":"https://api.github.com/repos/molgenis/molgenis/git/commits{/sha}","comments_url":"https://api.github.com/repos/molgenis/molgenis/comments{/number}","issue_comment_url":"https://api.github.com/repos/molgenis/molgenis/issues/comments{/number}","contents_url":"https://api.github.com/repos/molgenis/molgenis/contents/{+path}","compare_url":"https://api.github.com/repos/molgenis/molgenis/compare/{base}...{head}","merges_url":"https://api.github.com/repos/molgenis/molgenis/merges","archive_url":"https://api.github.com/repos/molgenis/molgenis/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/molgenis/molgenis/downloads","issues_url":"https://api.github.com/repos/molgenis/molgenis/issues{/number}","pulls_url":"https://api.github.com/repos/molgenis/molgenis/pulls{/number}","milestones_url":"https://api.github.com/repos/molgenis/molgenis/milestones{/number}","notifications_url":"https://api.github.com/repos/molgenis/molgenis/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/molgenis/molgenis/labels{/name}","releases_url":"https://api.github.com/repos/molgenis/molgenis/releases{/id}","created_at":"2013-02-04T16:02:36Z","updated_at":"2015-07-31T07:54:35Z","pushed_at":"2015-09-03T07:19:44Z","git_url":"git://github.com/molgenis/molgenis.git","ssh_url":"git@github.com:molgenis/molgenis.git","clone_url":"https://github.com/molgenis/molgenis.git","svn_url":"https://github.com/molgenis/molgenis","homepage":"","size":107509,"stargazers_count":16,"watchers_count":16,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":48,"mirror_url":null,"open_issues_count":166,"forks":48,"open_issues":166,"watchers":16,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/molgenis/molgenis/pulls/3555"},"html":{"href":"https://github.com/molgenis/molgenis/pull/3555"},"issue":{"href":"https://api.github.com/repos/molgenis/molgenis/issues/3555"},"comments":{"href":"https://api.github.com/repos/molgenis/molgenis/issues/3555/comments"},"review_comments":{"href":"https://api.github.com/repos/molgenis/molgenis/pulls/3555/comments"},"review_comment":{"href":"https://api.github.com/repos/molgenis/molgenis/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/molgenis/molgenis/pulls/3555/commits"},"statuses":{"href":"https://api.github.com/repos/molgenis/molgenis/statuses/0ab99abf8d99957a272d0301252c06195a2a437c"}}}}