{"action":"created","comment":{"url":"https://api.github.com/repos/ebi-uniprot/QuickGOBE/pulls/comments/63332569","id":63332569,"diff_hunk":"@@ -0,0 +1,89 @@\n+package uk.ac.ebi.quickgo.index.annotation;\n+\n+import uk.ac.ebi.quickgo.annotation.common.document.AnnotationDocument;\n+import uk.ac.ebi.quickgo.index.common.DocumentReaderException;\n+\n+import com.google.common.base.Strings;\n+import java.util.Arrays;\n+import java.util.List;\n+import java.util.Map;\n+import java.util.regex.Matcher;\n+import org.springframework.batch.item.ItemProcessor;\n+\n+import static uk.ac.ebi.quickgo.index.annotation.AnnotationParsingHelper.*;\n+import static uk.ac.ebi.quickgo.index.common.datafile.GOADataFileParsingHelper.COLON;\n+import static uk.ac.ebi.quickgo.index.common.datafile.GOADataFileParsingHelper.EQUALS;\n+import static uk.ac.ebi.quickgo.index.common.datafile.GOADataFileParsingHelper.PIPE;\n+import static uk.ac.ebi.quickgo.index.common.datafile.GOADataFileParsingHelper.convertLinePropertiesToMap;\n+\n+/**\n+ * Converts an {@link Annotation} object into an {@link AnnotationDocument} object.\n+ *\n+ * Created 19/04/16\n+ * @author Edd\n+ */\n+public class AnnotationDocumentConverter implements ItemProcessor<Annotation, AnnotationDocument> {\n+    static final int DEFAULT_TAXON = 0;\n+\n+    @Override public AnnotationDocument process(Annotation annotation) throws Exception {\n+        if (annotation == null) {\n+            throw new DocumentReaderException(\"Annotation object is null\");\n+        }\n+\n+        Map<String, String> propertiesMap = convertLinePropertiesToMap(annotation.annotationProperties, PIPE, EQUALS);","path":"indexing/src/main/java/uk/ac/ebi/quickgo/index/annotation/AnnotationDocumentConverter.java","position":33,"original_position":33,"commit_id":"0ae88b36711fcc40726db18d850aaba7387991f2","original_commit_id":"0ae88b36711fcc40726db18d850aaba7387991f2","user":{"login":"eddturner","id":7251381,"avatar_url":"https://avatars.githubusercontent.com/u/7251381?v=3","gravatar_id":"","url":"https://api.github.com/users/eddturner","html_url":"https://github.com/eddturner","followers_url":"https://api.github.com/users/eddturner/followers","following_url":"https://api.github.com/users/eddturner/following{/other_user}","gists_url":"https://api.github.com/users/eddturner/gists{/gist_id}","starred_url":"https://api.github.com/users/eddturner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eddturner/subscriptions","organizations_url":"https://api.github.com/users/eddturner/orgs","repos_url":"https://api.github.com/users/eddturner/repos","events_url":"https://api.github.com/users/eddturner/events{/privacy}","received_events_url":"https://api.github.com/users/eddturner/received_events","type":"User","site_admin":false},"body":"empty/null annotationProperties values are tested in GOADataFileParsingHelperTest (as you mention), but the validation of the values takes place in AnnotationValidator (and has accompanying unit tests).","created_at":"2016-05-16T10:02:28Z","updated_at":"2016-05-16T10:02:28Z","html_url":"https://github.com/ebi-uniprot/QuickGOBE/pull/4#discussion_r63332569","pull_request_url":"https://api.github.com/repos/ebi-uniprot/QuickGOBE/pulls/4","_links":{"self":{"href":"https://api.github.com/repos/ebi-uniprot/QuickGOBE/pulls/comments/63332569"},"html":{"href":"https://github.com/ebi-uniprot/QuickGOBE/pull/4#discussion_r63332569"},"pull_request":{"href":"https://api.github.com/repos/ebi-uniprot/QuickGOBE/pulls/4"}}},"pull_request":{"url":"https://api.github.com/repos/ebi-uniprot/QuickGOBE/pulls/4","id":68198283,"html_url":"https://github.com/ebi-uniprot/QuickGOBE/pull/4","diff_url":"https://github.com/ebi-uniprot/QuickGOBE/pull/4.diff","patch_url":"https://github.com/ebi-uniprot/QuickGOBE/pull/4.patch","issue_url":"https://api.github.com/repos/ebi-uniprot/QuickGOBE/issues/4","number":4,"state":"open","locked":false,"title":"Goa 1993 index annotation data","user":{"login":"eddturner","id":7251381,"avatar_url":"https://avatars.githubusercontent.com/u/7251381?v=3","gravatar_id":"","url":"https://api.github.com/users/eddturner","html_url":"https://github.com/eddturner","followers_url":"https://api.github.com/users/eddturner/followers","following_url":"https://api.github.com/users/eddturner/following{/other_user}","gists_url":"https://api.github.com/users/eddturner/gists{/gist_id}","starred_url":"https://api.github.com/users/eddturner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eddturner/subscriptions","organizations_url":"https://api.github.com/users/eddturner/orgs","repos_url":"https://api.github.com/users/eddturner/repos","events_url":"https://api.github.com/users/eddturner/events{/privacy}","received_events_url":"https://api.github.com/users/eddturner/received_events","type":"User","site_admin":false},"body":"Could someone review this please? It's for annotation indexing. Thanks!","created_at":"2016-04-28T10:33:10Z","updated_at":"2016-05-16T10:02:28Z","closed_at":null,"merged_at":null,"merge_commit_sha":"100fa7c1a6bb8393655205dea69c4a67211946c3","assignee":{"login":"eddturner","id":7251381,"avatar_url":"https://avatars.githubusercontent.com/u/7251381?v=3","gravatar_id":"","url":"https://api.github.com/users/eddturner","html_url":"https://github.com/eddturner","followers_url":"https://api.github.com/users/eddturner/followers","following_url":"https://api.github.com/users/eddturner/following{/other_user}","gists_url":"https://api.github.com/users/eddturner/gists{/gist_id}","starred_url":"https://api.github.com/users/eddturner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eddturner/subscriptions","organizations_url":"https://api.github.com/users/eddturner/orgs","repos_url":"https://api.github.com/users/eddturner/repos","events_url":"https://api.github.com/users/eddturner/events{/privacy}","received_events_url":"https://api.github.com/users/eddturner/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/ebi-uniprot/QuickGOBE/pulls/4/commits","review_comments_url":"https://api.github.com/repos/ebi-uniprot/QuickGOBE/pulls/4/comments","review_comment_url":"https://api.github.com/repos/ebi-uniprot/QuickGOBE/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ebi-uniprot/QuickGOBE/issues/4/comments","statuses_url":"https://api.github.com/repos/ebi-uniprot/QuickGOBE/statuses/0ae88b36711fcc40726db18d850aaba7387991f2","head":{"label":"ebi-uniprot:GOA-1993_index_annotation_data","ref":"GOA-1993_index_annotation_data","sha":"0ae88b36711fcc40726db18d850aaba7387991f2","user":{"login":"ebi-uniprot","id":9991058,"avatar_url":"https://avatars.githubusercontent.com/u/9991058?v=3","gravatar_id":"","url":"https://api.github.com/users/ebi-uniprot","html_url":"https://github.com/ebi-uniprot","followers_url":"https://api.github.com/users/ebi-uniprot/followers","following_url":"https://api.github.com/users/ebi-uniprot/following{/other_user}","gists_url":"https://api.github.com/users/ebi-uniprot/gists{/gist_id}","starred_url":"https://api.github.com/users/ebi-uniprot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ebi-uniprot/subscriptions","organizations_url":"https://api.github.com/users/ebi-uniprot/orgs","repos_url":"https://api.github.com/users/ebi-uniprot/repos","events_url":"https://api.github.com/users/ebi-uniprot/events{/privacy}","received_events_url":"https://api.github.com/users/ebi-uniprot/received_events","type":"Organization","site_admin":false},"repo":{"id":55400531,"name":"QuickGOBE","full_name":"ebi-uniprot/QuickGOBE","owner":{"login":"ebi-uniprot","id":9991058,"avatar_url":"https://avatars.githubusercontent.com/u/9991058?v=3","gravatar_id":"","url":"https://api.github.com/users/ebi-uniprot","html_url":"https://github.com/ebi-uniprot","followers_url":"https://api.github.com/users/ebi-uniprot/followers","following_url":"https://api.github.com/users/ebi-uniprot/following{/other_user}","gists_url":"https://api.github.com/users/ebi-uniprot/gists{/gist_id}","starred_url":"https://api.github.com/users/ebi-uniprot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ebi-uniprot/subscriptions","organizations_url":"https://api.github.com/users/ebi-uniprot/orgs","repos_url":"https://api.github.com/users/ebi-uniprot/repos","events_url":"https://api.github.com/users/ebi-uniprot/events{/privacy}","received_events_url":"https://api.github.com/users/ebi-uniprot/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ebi-uniprot/QuickGOBE","description":"Repository containing the back-end logic for QuickGO","fork":false,"url":"https://api.github.com/repos/ebi-uniprot/QuickGOBE","forks_url":"https://api.github.com/repos/ebi-uniprot/QuickGOBE/forks","keys_url":"https://api.github.com/repos/ebi-uniprot/QuickGOBE/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ebi-uniprot/QuickGOBE/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ebi-uniprot/QuickGOBE/teams","hooks_url":"https://api.github.com/repos/ebi-uniprot/QuickGOBE/hooks","issue_events_url":"https://api.github.com/repos/ebi-uniprot/QuickGOBE/issues/events{/number}","events_url":"https://api.github.com/repos/ebi-uniprot/QuickGOBE/events","assignees_url":"https://api.github.com/repos/ebi-uniprot/QuickGOBE/assignees{/user}","branches_url":"https://api.github.com/repos/ebi-uniprot/QuickGOBE/branches{/branch}","tags_url":"https://api.github.com/repos/ebi-uniprot/QuickGOBE/tags","blobs_url":"https://api.github.com/repos/ebi-uniprot/QuickGOBE/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ebi-uniprot/QuickGOBE/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ebi-uniprot/QuickGOBE/git/refs{/sha}","trees_url":"https://api.github.com/repos/ebi-uniprot/QuickGOBE/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ebi-uniprot/QuickGOBE/statuses/{sha}","languages_url":"https://api.github.com/repos/ebi-uniprot/QuickGOBE/languages","stargazers_url":"https://api.github.com/repos/ebi-uniprot/QuickGOBE/stargazers","contributors_url":"https://api.github.com/repos/ebi-uniprot/QuickGOBE/contributors","subscribers_url":"https://api.github.com/repos/ebi-uniprot/QuickGOBE/subscribers","subscription_url":"https://api.github.com/repos/ebi-uniprot/QuickGOBE/subscription","commits_url":"https://api.github.com/repos/ebi-uniprot/QuickGOBE/commits{/sha}","git_commits_url":"https://api.github.com/repos/ebi-uniprot/QuickGOBE/git/commits{/sha}","comments_url":"https://api.github.com/repos/ebi-uniprot/QuickGOBE/comments{/number}","issue_comment_url":"https://api.github.com/repos/ebi-uniprot/QuickGOBE/issues/comments{/number}","contents_url":"https://api.github.com/repos/ebi-uniprot/QuickGOBE/contents/{+path}","compare_url":"https://api.github.com/repos/ebi-uniprot/QuickGOBE/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ebi-uniprot/QuickGOBE/merges","archive_url":"https://api.github.com/repos/ebi-uniprot/QuickGOBE/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ebi-uniprot/QuickGOBE/downloads","issues_url":"https://api.github.com/repos/ebi-uniprot/QuickGOBE/issues{/number}","pulls_url":"https://api.github.com/repos/ebi-uniprot/QuickGOBE/pulls{/number}","milestones_url":"https://api.github.com/repos/ebi-uniprot/QuickGOBE/milestones{/number}","notifications_url":"https://api.github.com/repos/ebi-uniprot/QuickGOBE/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ebi-uniprot/QuickGOBE/labels{/name}","releases_url":"https://api.github.com/repos/ebi-uniprot/QuickGOBE/releases{/id}","deployments_url":"https://api.github.com/repos/ebi-uniprot/QuickGOBE/deployments","created_at":"2016-04-04T09:51:06Z","updated_at":"2016-04-15T17:33:42Z","pushed_at":"2016-05-16T09:54:44Z","git_url":"git://github.com/ebi-uniprot/QuickGOBE.git","ssh_url":"git@github.com:ebi-uniprot/QuickGOBE.git","clone_url":"https://github.com/ebi-uniprot/QuickGOBE.git","svn_url":"https://github.com/ebi-uniprot/QuickGOBE","homepage":null,"size":7221,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":4,"forks":0,"open_issues":4,"watchers":0,"default_branch":"master"}},"base":{"label":"ebi-uniprot:master","ref":"master","sha":"00e5fa4a47b877ef1c2ad8329cfded2ded4fbab4","user":{"login":"ebi-uniprot","id":9991058,"avatar_url":"https://avatars.githubusercontent.com/u/9991058?v=3","gravatar_id":"","url":"https://api.github.com/users/ebi-uniprot","html_url":"https://github.com/ebi-uniprot","followers_url":"https://api.github.com/users/ebi-uniprot/followers","following_url":"https://api.github.com/users/ebi-uniprot/following{/other_user}","gists_url":"https://api.github.com/users/ebi-uniprot/gists{/gist_id}","starred_url":"https://api.github.com/users/ebi-uniprot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ebi-uniprot/subscriptions","organizations_url":"https://api.github.com/users/ebi-uniprot/orgs","repos_url":"https://api.github.com/users/ebi-uniprot/repos","events_url":"https://api.github.com/users/ebi-uniprot/events{/privacy}","received_events_url":"https://api.github.com/users/ebi-uniprot/received_events","type":"Organization","site_admin":false},"repo":{"id":55400531,"name":"QuickGOBE","full_name":"ebi-uniprot/QuickGOBE","owner":{"login":"ebi-uniprot","id":9991058,"avatar_url":"https://avatars.githubusercontent.com/u/9991058?v=3","gravatar_id":"","url":"https://api.github.com/users/ebi-uniprot","html_url":"https://github.com/ebi-uniprot","followers_url":"https://api.github.com/users/ebi-uniprot/followers","following_url":"https://api.github.com/users/ebi-uniprot/following{/other_user}","gists_url":"https://api.github.com/users/ebi-uniprot/gists{/gist_id}","starred_url":"https://api.github.com/users/ebi-uniprot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ebi-uniprot/subscriptions","organizations_url":"https://api.github.com/users/ebi-uniprot/orgs","repos_url":"https://api.github.com/users/ebi-uniprot/repos","events_url":"https://api.github.com/users/ebi-uniprot/events{/privacy}","received_events_url":"https://api.github.com/users/ebi-uniprot/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ebi-uniprot/QuickGOBE","description":"Repository containing the back-end logic for QuickGO","fork":false,"url":"https://api.github.com/repos/ebi-uniprot/QuickGOBE","forks_url":"https://api.github.com/repos/ebi-uniprot/QuickGOBE/forks","keys_url":"https://api.github.com/repos/ebi-uniprot/QuickGOBE/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ebi-uniprot/QuickGOBE/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ebi-uniprot/QuickGOBE/teams","hooks_url":"https://api.github.com/repos/ebi-uniprot/QuickGOBE/hooks","issue_events_url":"https://api.github.com/repos/ebi-uniprot/QuickGOBE/issues/events{/number}","events_url":"https://api.github.com/repos/ebi-uniprot/QuickGOBE/events","assignees_url":"https://api.github.com/repos/ebi-uniprot/QuickGOBE/assignees{/user}","branches_url":"https://api.github.com/repos/ebi-uniprot/QuickGOBE/branches{/branch}","tags_url":"https://api.github.com/repos/ebi-uniprot/QuickGOBE/tags","blobs_url":"https://api.github.com/repos/ebi-uniprot/QuickGOBE/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ebi-uniprot/QuickGOBE/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ebi-uniprot/QuickGOBE/git/refs{/sha}","trees_url":"https://api.github.com/repos/ebi-uniprot/QuickGOBE/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ebi-uniprot/QuickGOBE/statuses/{sha}","languages_url":"https://api.github.com/repos/ebi-uniprot/QuickGOBE/languages","stargazers_url":"https://api.github.com/repos/ebi-uniprot/QuickGOBE/stargazers","contributors_url":"https://api.github.com/repos/ebi-uniprot/QuickGOBE/contributors","subscribers_url":"https://api.github.com/repos/ebi-uniprot/QuickGOBE/subscribers","subscription_url":"https://api.github.com/repos/ebi-uniprot/QuickGOBE/subscription","commits_url":"https://api.github.com/repos/ebi-uniprot/QuickGOBE/commits{/sha}","git_commits_url":"https://api.github.com/repos/ebi-uniprot/QuickGOBE/git/commits{/sha}","comments_url":"https://api.github.com/repos/ebi-uniprot/QuickGOBE/comments{/number}","issue_comment_url":"https://api.github.com/repos/ebi-uniprot/QuickGOBE/issues/comments{/number}","contents_url":"https://api.github.com/repos/ebi-uniprot/QuickGOBE/contents/{+path}","compare_url":"https://api.github.com/repos/ebi-uniprot/QuickGOBE/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ebi-uniprot/QuickGOBE/merges","archive_url":"https://api.github.com/repos/ebi-uniprot/QuickGOBE/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ebi-uniprot/QuickGOBE/downloads","issues_url":"https://api.github.com/repos/ebi-uniprot/QuickGOBE/issues{/number}","pulls_url":"https://api.github.com/repos/ebi-uniprot/QuickGOBE/pulls{/number}","milestones_url":"https://api.github.com/repos/ebi-uniprot/QuickGOBE/milestones{/number}","notifications_url":"https://api.github.com/repos/ebi-uniprot/QuickGOBE/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ebi-uniprot/QuickGOBE/labels{/name}","releases_url":"https://api.github.com/repos/ebi-uniprot/QuickGOBE/releases{/id}","deployments_url":"https://api.github.com/repos/ebi-uniprot/QuickGOBE/deployments","created_at":"2016-04-04T09:51:06Z","updated_at":"2016-04-15T17:33:42Z","pushed_at":"2016-05-16T09:54:44Z","git_url":"git://github.com/ebi-uniprot/QuickGOBE.git","ssh_url":"git@github.com:ebi-uniprot/QuickGOBE.git","clone_url":"https://github.com/ebi-uniprot/QuickGOBE.git","svn_url":"https://github.com/ebi-uniprot/QuickGOBE","homepage":null,"size":7221,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":4,"forks":0,"open_issues":4,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ebi-uniprot/QuickGOBE/pulls/4"},"html":{"href":"https://github.com/ebi-uniprot/QuickGOBE/pull/4"},"issue":{"href":"https://api.github.com/repos/ebi-uniprot/QuickGOBE/issues/4"},"comments":{"href":"https://api.github.com/repos/ebi-uniprot/QuickGOBE/issues/4/comments"},"review_comments":{"href":"https://api.github.com/repos/ebi-uniprot/QuickGOBE/pulls/4/comments"},"review_comment":{"href":"https://api.github.com/repos/ebi-uniprot/QuickGOBE/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ebi-uniprot/QuickGOBE/pulls/4/commits"},"statuses":{"href":"https://api.github.com/repos/ebi-uniprot/QuickGOBE/statuses/0ae88b36711fcc40726db18d850aaba7387991f2"}}}}