{"action":"created","comment":{"url":"https://api.github.com/repos/ebi-uniprot/QuickGOBE/pulls/comments/85097444","pull_request_review_id":5831861,"id":85097444,"diff_hunk":"@@ -28,31 +30,45 @@\n     public static final int DEFAULT_PAGE_NUMBER = 1;\n     private static final boolean NO_HIGHLIGHTING = false;\n \n-    private final String highlightStartDelim;\n-    private final String highlightEndDelim;\n-    private final Iterable<String> returnedFields;\n-    private final Iterable<String> highlightedFields;\n-    private final StringToQuickGOQueryConverter converter;\n     private final SearchableField fieldSpec;\n \n-    public DefaultSearchQueryTemplate(\n-            StringToQuickGOQueryConverter converter,\n-            SearchableField fieldSpec,\n-            Iterable<String> returnedFields,\n-            Iterable<String> highlightedFields,\n-            String highlightStartDelim,\n-            String highlightEndDelim) {\n-        this.converter = converter;\n-        this.highlightedFields = highlightedFields;\n-        this.highlightStartDelim = highlightStartDelim;\n-        this.highlightEndDelim = highlightEndDelim;\n-        this.returnedFields = returnedFields;\n+    private String highlightStartDelim;\n+    private String highlightEndDelim;\n+    private Iterable<String> returnedFields;\n+    private Iterable<String> highlightedFields;\n+\n+    public DefaultSearchQueryTemplate(SearchableField fieldSpec) {\n+        Preconditions.checkArgument(fieldSpec != null, \"Search fields cannot be null\");\n         this.fieldSpec = fieldSpec;\n+        this.returnedFields = Collections.emptyList();\n+        this.highlightedFields = Collections.emptyList();\n+        this.highlightStartDelim = \"\";\n+        this.highlightEndDelim = \"\";\n+    }\n+\n+    public void setHighlighting(Collection<String> highlightedFields, String highlightStartDelim,\n+            String highlightEndDelim) {\n+        if (highlightedFields != null) {\n+            this.highlightedFields = highlightedFields;\n+\n+            if (highlightStartDelim != null) {\n+                this.highlightStartDelim = highlightStartDelim;\n+            }\n+\n+            if (highlightEndDelim != null) {\n+                this.highlightEndDelim = highlightEndDelim;\n+            }\n+        }\n+    }\n+\n+    public void setReturnedFields(Collection<String> returnedFields) {\n+        if (returnedFields != null) {\n+            this.returnedFields = returnedFields;\n+        }\n     }","path":"rest-common/src/main/java/uk/ac/ebi/quickgo/rest/search/DefaultSearchQueryTemplate.java","position":70,"original_position":70,"commit_id":"93e36786f1960fac88cfe6c8018f444d6df2822f","original_commit_id":"6cd5872cbc3dbde3fa3927020d79a7fbc4e59423","user":{"login":"rantunesboreas","id":15346245,"avatar_url":"https://avatars.githubusercontent.com/u/15346245?v=3","gravatar_id":"","url":"https://api.github.com/users/rantunesboreas","html_url":"https://github.com/rantunesboreas","followers_url":"https://api.github.com/users/rantunesboreas/followers","following_url":"https://api.github.com/users/rantunesboreas/following{/other_user}","gists_url":"https://api.github.com/users/rantunesboreas/gists{/gist_id}","starred_url":"https://api.github.com/users/rantunesboreas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rantunesboreas/subscriptions","organizations_url":"https://api.github.com/users/rantunesboreas/orgs","repos_url":"https://api.github.com/users/rantunesboreas/repos","events_url":"https://api.github.com/users/rantunesboreas/events{/privacy}","received_events_url":"https://api.github.com/users/rantunesboreas/received_events","type":"User","site_admin":false},"body":"returnedFields is being used by the builder, so it is better to check for null in this instance, because if we don't the builder could explode when calling build method.","created_at":"2016-10-26T10:57:10Z","updated_at":"2016-10-26T10:57:10Z","html_url":"https://github.com/ebi-uniprot/QuickGOBE/pull/86#discussion_r85097444","pull_request_url":"https://api.github.com/repos/ebi-uniprot/QuickGOBE/pulls/86","_links":{"self":{"href":"https://api.github.com/repos/ebi-uniprot/QuickGOBE/pulls/comments/85097444"},"html":{"href":"https://github.com/ebi-uniprot/QuickGOBE/pull/86#discussion_r85097444"},"pull_request":{"href":"https://api.github.com/repos/ebi-uniprot/QuickGOBE/pulls/86"}}},"pull_request":{"url":"https://api.github.com/repos/ebi-uniprot/QuickGOBE/pulls/86","id":88809958,"html_url":"https://github.com/ebi-uniprot/QuickGOBE/pull/86","diff_url":"https://github.com/ebi-uniprot/QuickGOBE/pull/86.diff","patch_url":"https://github.com/ebi-uniprot/QuickGOBE/pull/86.patch","issue_url":"https://api.github.com/repos/ebi-uniprot/QuickGOBE/issues/86","number":86,"state":"open","locked":false,"title":"GOA-2314_refactor_client_to_use_new_search_templates","user":{"login":"rantunesboreas","id":15346245,"avatar_url":"https://avatars.githubusercontent.com/u/15346245?v=3","gravatar_id":"","url":"https://api.github.com/users/rantunesboreas","html_url":"https://github.com/rantunesboreas","followers_url":"https://api.github.com/users/rantunesboreas/followers","following_url":"https://api.github.com/users/rantunesboreas/following{/other_user}","gists_url":"https://api.github.com/users/rantunesboreas/gists{/gist_id}","starred_url":"https://api.github.com/users/rantunesboreas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rantunesboreas/subscriptions","organizations_url":"https://api.github.com/users/rantunesboreas/orgs","repos_url":"https://api.github.com/users/rantunesboreas/repos","events_url":"https://api.github.com/users/rantunesboreas/events{/privacy}","received_events_url":"https://api.github.com/users/rantunesboreas/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-10-11T10:44:34Z","updated_at":"2016-10-26T10:57:10Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9f9b002d584d91e4d3b38018d2ba20b140f0055b","assignee":{"login":"rantunesboreas","id":15346245,"avatar_url":"https://avatars.githubusercontent.com/u/15346245?v=3","gravatar_id":"","url":"https://api.github.com/users/rantunesboreas","html_url":"https://github.com/rantunesboreas","followers_url":"https://api.github.com/users/rantunesboreas/followers","following_url":"https://api.github.com/users/rantunesboreas/following{/other_user}","gists_url":"https://api.github.com/users/rantunesboreas/gists{/gist_id}","starred_url":"https://api.github.com/users/rantunesboreas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rantunesboreas/subscriptions","organizations_url":"https://api.github.com/users/rantunesboreas/orgs","repos_url":"https://api.github.com/users/rantunesboreas/repos","events_url":"https://api.github.com/users/rantunesboreas/events{/privacy}","received_events_url":"https://api.github.com/users/rantunesboreas/received_events","type":"User","site_admin":false},"assignees":[{"login":"rantunesboreas","id":15346245,"avatar_url":"https://avatars.githubusercontent.com/u/15346245?v=3","gravatar_id":"","url":"https://api.github.com/users/rantunesboreas","html_url":"https://github.com/rantunesboreas","followers_url":"https://api.github.com/users/rantunesboreas/followers","following_url":"https://api.github.com/users/rantunesboreas/following{/other_user}","gists_url":"https://api.github.com/users/rantunesboreas/gists{/gist_id}","starred_url":"https://api.github.com/users/rantunesboreas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rantunesboreas/subscriptions","organizations_url":"https://api.github.com/users/rantunesboreas/orgs","repos_url":"https://api.github.com/users/rantunesboreas/repos","events_url":"https://api.github.com/users/rantunesboreas/events{/privacy}","received_events_url":"https://api.github.com/users/rantunesboreas/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/ebi-uniprot/QuickGOBE/pulls/86/commits","review_comments_url":"https://api.github.com/repos/ebi-uniprot/QuickGOBE/pulls/86/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/86/comments","statuses_url":"https://api.github.com/repos/ebi-uniprot/QuickGOBE/statuses/93e36786f1960fac88cfe6c8018f444d6df2822f","head":{"label":"ebi-uniprot:GOA-2314_refactor_client_to_use_new_saerch_templates","ref":"GOA-2314_refactor_client_to_use_new_saerch_templates","sha":"93e36786f1960fac88cfe6c8018f444d6df2822f","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-10-26T10:50:48Z","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":10892,"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":9,"forks":0,"open_issues":9,"watchers":0,"default_branch":"master"}},"base":{"label":"ebi-uniprot:master","ref":"master","sha":"523e2c7bb5f3be97513b6b397827c5becf7c81de","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-10-26T10:50:48Z","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":10892,"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":9,"forks":0,"open_issues":9,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ebi-uniprot/QuickGOBE/pulls/86"},"html":{"href":"https://github.com/ebi-uniprot/QuickGOBE/pull/86"},"issue":{"href":"https://api.github.com/repos/ebi-uniprot/QuickGOBE/issues/86"},"comments":{"href":"https://api.github.com/repos/ebi-uniprot/QuickGOBE/issues/86/comments"},"review_comments":{"href":"https://api.github.com/repos/ebi-uniprot/QuickGOBE/pulls/86/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/86/commits"},"statuses":{"href":"https://api.github.com/repos/ebi-uniprot/QuickGOBE/statuses/93e36786f1960fac88cfe6c8018f444d6df2822f"}}}}
{"actor":{"display_login":"rantunesboreas"}}