{"action":"created","comment":{"url":"https://api.github.com/repos/ebi-uniprot/QuickGOBE/pulls/comments/64879354","id":64879354,"diff_hunk":"@@ -12,7 +17,46 @@\n  */\n @Component\n public class FilterConverterFactoryImpl implements FilterConverterFactory {\n+    private final FilterExecutionConfig globalFilterExecutionConfig;\n+\n+    @Autowired\n+    public FilterConverterFactoryImpl(FilterExecutionConfig globalFilterExecutionConfig) {\n+        this.globalFilterExecutionConfig = globalFilterExecutionConfig;\n+    }\n+\n     @Override public FilterConverter createConverter(RequestFilter requestFilter) {\n-        return new SimpleFilterConverter(requestFilter);\n+        Preconditions.checkArgument(requestFilter != null, \"RequestFilter can not be null\");\n+\n+        Optional<FieldExecutionConfig> fieldOpt = globalFilterExecutionConfig.getField(requestFilter.getField());\n+\n+        return fieldOpt.map(field -> createConverter(requestFilter, field))\n+                .orElseThrow(() -> new IllegalArgumentException(\"Unable to process request filter: \" + requestFilter));\n+    }\n+\n+    /**\n+     * Creates the appropriate {@link FilterConverter} for the given {@link RequestFilter} based on the processing\n+     * information of the provided by the {@link uk.ac.ebi.quickgo.rest.search.filter.FilterExecutionConfig}.\n+     *\n+     * @param field holds details about the search field and how to execute it\n+     * @param filter the filter that will be converted\n+     * @return a {@link FilterConverter} capable of processing the {@param filter}\n+     */\n+    private FilterConverter createConverter(RequestFilter filter, FieldExecutionConfig field) {\n+        FilterConverter filterConverter;\n+\n+        switch (field.getExecution()) {\n+            case SIMPLE:\n+                filterConverter = new SimpleFilterConverter(filter);\n+                break;\n+            case JOIN:\n+                filterConverter = createJoinConverterUsingMap(field.getProperties(),\n+                        new SimpleFilterConverter(filter)); break;\n+            case REST_COMM:\n+                throw new RuntimeException(\"REST_COMM: Functionality not Implemented yet\");","path":"rest-common/src/main/java/uk/ac/ebi/quickgo/rest/search/filter/FilterConverterFactoryImpl.java","position":53,"original_position":53,"commit_id":"a35d6201182803bc8b4038565242dca03da5347b","original_commit_id":"a35d6201182803bc8b4038565242dca03da5347b","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":"can change `\"REST_COMM: ...\"` -> `REST_COMM + \": ...`, to keep message aligned with value (e..g, in case of IDE renaming of REST_COMM failing to change the matching string)","created_at":"2016-05-27T09:24:09Z","updated_at":"2016-05-27T09:24:09Z","html_url":"https://github.com/ebi-uniprot/QuickGOBE/pull/12#discussion_r64879354","pull_request_url":"https://api.github.com/repos/ebi-uniprot/QuickGOBE/pulls/12","_links":{"self":{"href":"https://api.github.com/repos/ebi-uniprot/QuickGOBE/pulls/comments/64879354"},"html":{"href":"https://github.com/ebi-uniprot/QuickGOBE/pull/12#discussion_r64879354"},"pull_request":{"href":"https://api.github.com/repos/ebi-uniprot/QuickGOBE/pulls/12"}}},"pull_request":{"url":"https://api.github.com/repos/ebi-uniprot/QuickGOBE/pulls/12","id":71551358,"html_url":"https://github.com/ebi-uniprot/QuickGOBE/pull/12","diff_url":"https://github.com/ebi-uniprot/QuickGOBE/pull/12.diff","patch_url":"https://github.com/ebi-uniprot/QuickGOBE/pull/12.patch","issue_url":"https://api.github.com/repos/ebi-uniprot/QuickGOBE/issues/12","number":12,"state":"open","locked":false,"title":"Goa 2106 support cross core joins","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":"Holds the code to support cross-core joins.","created_at":"2016-05-26T13:01:06Z","updated_at":"2016-05-27T09:24:09Z","closed_at":null,"merged_at":null,"merge_commit_sha":"74bdd7d1b65949bc1e6aefb188303d3d14eebf35","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/12/commits","review_comments_url":"https://api.github.com/repos/ebi-uniprot/QuickGOBE/pulls/12/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/12/comments","statuses_url":"https://api.github.com/repos/ebi-uniprot/QuickGOBE/statuses/a35d6201182803bc8b4038565242dca03da5347b","head":{"label":"ebi-uniprot:GOA-2106_support_cross_core_joins","ref":"GOA-2106_support_cross_core_joins","sha":"a35d6201182803bc8b4038565242dca03da5347b","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-27T09:20:58Z","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":7598,"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":6,"forks":0,"open_issues":6,"watchers":0,"default_branch":"master"}},"base":{"label":"ebi-uniprot:master","ref":"master","sha":"809a3d037e58be742710fd30a8c95ab6fbea00e6","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-27T09:20:58Z","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":7598,"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":6,"forks":0,"open_issues":6,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ebi-uniprot/QuickGOBE/pulls/12"},"html":{"href":"https://github.com/ebi-uniprot/QuickGOBE/pull/12"},"issue":{"href":"https://api.github.com/repos/ebi-uniprot/QuickGOBE/issues/12"},"comments":{"href":"https://api.github.com/repos/ebi-uniprot/QuickGOBE/issues/12/comments"},"review_comments":{"href":"https://api.github.com/repos/ebi-uniprot/QuickGOBE/pulls/12/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/12/commits"},"statuses":{"href":"https://api.github.com/repos/ebi-uniprot/QuickGOBE/statuses/a35d6201182803bc8b4038565242dca03da5347b"}}}}
{"actor":{"display_login":"eddturner"}}