{"action":"created","comment":{"url":"https://api.github.com/repos/geotools/geotools/pulls/comments/74050474","id":74050474,"diff_hunk":"@@ -0,0 +1,69 @@\n+/*\n+ * GeoTools - The Open Source Java GIS Toolkit\n+ * http://geotools.org\n+ *\n+ * (C) 2016, Open Source Geospatial Foundation (OSGeo)\n+ *\n+ * This library is free software; you can redistribute it and/or\n+ * modify it under the terms of the GNU Lesser General Public\n+ * License as published by the Free Software Foundation;\n+ * version 2.1 of the License.\n+ *\n+ * This library is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n+ * Lesser General Public License for more details.\n+ */\n+package org.geotools.gce.imagemosaic.namehandler;\n+\n+import java.util.Map;\n+\n+import javax.imageio.ImageReader;\n+\n+import org.geotools.coverage.grid.io.GridCoverage2DReader;\n+\n+/**\n+ * CoverageNameHandler SPI interface. Allows to instantiate {@link CoverageNameHandler}s\n+ * based on optional input source object and customization properties.\n+ * \n+ * Implementations are pluggable. \n+ * In addition to implementing this interface, this service file should be defined:\n+ * </p>\n+ *\n+ * <p>\n+ * <code>META-INF/services/org.geotools.gce.imagemosaic.namehandler.CoverageNameHandlerSPI</code>\n+ * </p>\n+ *\n+ * <p>\n+ * The file should contain a single line which gives the full name of the implementing class.\n+ * </p>\n+ *\n+ * <p>\n+ * example:<br/>\n+ * <code>e.g.\n+ * org.geotools.gce.imagemosaic.namehandler.DefaultCoverageNameHandlerSPI</code>\n+ * </p>\n+ *\n+ * \n+ */\n+public interface CoverageNameHandlerSPI {","path":"modules/plugin/imagemosaic/src/main/java/org/geotools/gce/imagemosaic/namehandler/CoverageNameHandlerSPI.java","position":49,"original_position":49,"commit_id":"09a3b43ed891c8d56d415314822ff32f02b73ab4","original_commit_id":"09a3b43ed891c8d56d415314822ff32f02b73ab4","user":{"login":"aaime","id":325433,"avatar_url":"https://avatars.githubusercontent.com/u/325433?v=3","gravatar_id":"","url":"https://api.github.com/users/aaime","html_url":"https://github.com/aaime","followers_url":"https://api.github.com/users/aaime/followers","following_url":"https://api.github.com/users/aaime/following{/other_user}","gists_url":"https://api.github.com/users/aaime/gists{/gist_id}","starred_url":"https://api.github.com/users/aaime/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aaime/subscriptions","organizations_url":"https://api.github.com/users/aaime/orgs","repos_url":"https://api.github.com/users/aaime/repos","events_url":"https://api.github.com/users/aaime/events{/privacy}","received_events_url":"https://api.github.com/users/aaime/received_events","type":"User","site_admin":false},"body":"Given the only usage point of this interface is:\r\n\r\n````\r\n        CoverageNameHandlerSPI.CoverageNameHandler handler = spi.create(inputCoverageReader, properties);\r\n        handler.handle(map);\r\n        handler.handle(inputCoverageReader);\r\n        return handler.getCoverageName();\r\n````\r\n\r\nWould it make sense to simplify it and just have a handler.getName(reader, map), or two methods handler.getName(reader), handler.getName(map), why do force the implementation to store the results internally to return it later?","created_at":"2016-08-09T12:47:11Z","updated_at":"2016-08-09T12:47:11Z","html_url":"https://github.com/geotools/geotools/pull/1271#discussion_r74050474","pull_request_url":"https://api.github.com/repos/geotools/geotools/pulls/1271","_links":{"self":{"href":"https://api.github.com/repos/geotools/geotools/pulls/comments/74050474"},"html":{"href":"https://github.com/geotools/geotools/pull/1271#discussion_r74050474"},"pull_request":{"href":"https://api.github.com/repos/geotools/geotools/pulls/1271"}}},"pull_request":{"url":"https://api.github.com/repos/geotools/geotools/pulls/1271","id":80262049,"html_url":"https://github.com/geotools/geotools/pull/1271","diff_url":"https://github.com/geotools/geotools/pull/1271.diff","patch_url":"https://github.com/geotools/geotools/pull/1271.patch","issue_url":"https://api.github.com/repos/geotools/geotools/issues/1271","number":1271,"state":"open","locked":false,"title":"[GEOT-5481]: Add support for coverageName Handlers","user":{"login":"dromagnoli","id":1278116,"avatar_url":"https://avatars.githubusercontent.com/u/1278116?v=3","gravatar_id":"","url":"https://api.github.com/users/dromagnoli","html_url":"https://github.com/dromagnoli","followers_url":"https://api.github.com/users/dromagnoli/followers","following_url":"https://api.github.com/users/dromagnoli/following{/other_user}","gists_url":"https://api.github.com/users/dromagnoli/gists{/gist_id}","starred_url":"https://api.github.com/users/dromagnoli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dromagnoli/subscriptions","organizations_url":"https://api.github.com/users/dromagnoli/orgs","repos_url":"https://api.github.com/users/dromagnoli/repos","events_url":"https://api.github.com/users/dromagnoli/events{/privacy}","received_events_url":"https://api.github.com/users/dromagnoli/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-08-05T15:28:50Z","updated_at":"2016-08-09T12:47:11Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b2ec94e2a09d532124f79249194981f055519ba3","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/geotools/geotools/pulls/1271/commits","review_comments_url":"https://api.github.com/repos/geotools/geotools/pulls/1271/comments","review_comment_url":"https://api.github.com/repos/geotools/geotools/pulls/comments{/number}","comments_url":"https://api.github.com/repos/geotools/geotools/issues/1271/comments","statuses_url":"https://api.github.com/repos/geotools/geotools/statuses/09a3b43ed891c8d56d415314822ff32f02b73ab4","head":{"label":"dromagnoli:GEOT-5481","ref":"GEOT-5481","sha":"09a3b43ed891c8d56d415314822ff32f02b73ab4","user":{"login":"dromagnoli","id":1278116,"avatar_url":"https://avatars.githubusercontent.com/u/1278116?v=3","gravatar_id":"","url":"https://api.github.com/users/dromagnoli","html_url":"https://github.com/dromagnoli","followers_url":"https://api.github.com/users/dromagnoli/followers","following_url":"https://api.github.com/users/dromagnoli/following{/other_user}","gists_url":"https://api.github.com/users/dromagnoli/gists{/gist_id}","starred_url":"https://api.github.com/users/dromagnoli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dromagnoli/subscriptions","organizations_url":"https://api.github.com/users/dromagnoli/orgs","repos_url":"https://api.github.com/users/dromagnoli/repos","events_url":"https://api.github.com/users/dromagnoli/events{/privacy}","received_events_url":"https://api.github.com/users/dromagnoli/received_events","type":"User","site_admin":false},"repo":{"id":7167177,"name":"geotools","full_name":"dromagnoli/geotools","owner":{"login":"dromagnoli","id":1278116,"avatar_url":"https://avatars.githubusercontent.com/u/1278116?v=3","gravatar_id":"","url":"https://api.github.com/users/dromagnoli","html_url":"https://github.com/dromagnoli","followers_url":"https://api.github.com/users/dromagnoli/followers","following_url":"https://api.github.com/users/dromagnoli/following{/other_user}","gists_url":"https://api.github.com/users/dromagnoli/gists{/gist_id}","starred_url":"https://api.github.com/users/dromagnoli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dromagnoli/subscriptions","organizations_url":"https://api.github.com/users/dromagnoli/orgs","repos_url":"https://api.github.com/users/dromagnoli/repos","events_url":"https://api.github.com/users/dromagnoli/events{/privacy}","received_events_url":"https://api.github.com/users/dromagnoli/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/dromagnoli/geotools","description":"Official GeoTools repository","fork":true,"url":"https://api.github.com/repos/dromagnoli/geotools","forks_url":"https://api.github.com/repos/dromagnoli/geotools/forks","keys_url":"https://api.github.com/repos/dromagnoli/geotools/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dromagnoli/geotools/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dromagnoli/geotools/teams","hooks_url":"https://api.github.com/repos/dromagnoli/geotools/hooks","issue_events_url":"https://api.github.com/repos/dromagnoli/geotools/issues/events{/number}","events_url":"https://api.github.com/repos/dromagnoli/geotools/events","assignees_url":"https://api.github.com/repos/dromagnoli/geotools/assignees{/user}","branches_url":"https://api.github.com/repos/dromagnoli/geotools/branches{/branch}","tags_url":"https://api.github.com/repos/dromagnoli/geotools/tags","blobs_url":"https://api.github.com/repos/dromagnoli/geotools/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dromagnoli/geotools/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dromagnoli/geotools/git/refs{/sha}","trees_url":"https://api.github.com/repos/dromagnoli/geotools/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dromagnoli/geotools/statuses/{sha}","languages_url":"https://api.github.com/repos/dromagnoli/geotools/languages","stargazers_url":"https://api.github.com/repos/dromagnoli/geotools/stargazers","contributors_url":"https://api.github.com/repos/dromagnoli/geotools/contributors","subscribers_url":"https://api.github.com/repos/dromagnoli/geotools/subscribers","subscription_url":"https://api.github.com/repos/dromagnoli/geotools/subscription","commits_url":"https://api.github.com/repos/dromagnoli/geotools/commits{/sha}","git_commits_url":"https://api.github.com/repos/dromagnoli/geotools/git/commits{/sha}","comments_url":"https://api.github.com/repos/dromagnoli/geotools/comments{/number}","issue_comment_url":"https://api.github.com/repos/dromagnoli/geotools/issues/comments{/number}","contents_url":"https://api.github.com/repos/dromagnoli/geotools/contents/{+path}","compare_url":"https://api.github.com/repos/dromagnoli/geotools/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dromagnoli/geotools/merges","archive_url":"https://api.github.com/repos/dromagnoli/geotools/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dromagnoli/geotools/downloads","issues_url":"https://api.github.com/repos/dromagnoli/geotools/issues{/number}","pulls_url":"https://api.github.com/repos/dromagnoli/geotools/pulls{/number}","milestones_url":"https://api.github.com/repos/dromagnoli/geotools/milestones{/number}","notifications_url":"https://api.github.com/repos/dromagnoli/geotools/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dromagnoli/geotools/labels{/name}","releases_url":"https://api.github.com/repos/dromagnoli/geotools/releases{/id}","deployments_url":"https://api.github.com/repos/dromagnoli/geotools/deployments","created_at":"2012-12-14T15:10:14Z","updated_at":"2014-06-13T14:06:38Z","pushed_at":"2016-08-08T08:08:55Z","git_url":"git://github.com/dromagnoli/geotools.git","ssh_url":"git@github.com:dromagnoli/geotools.git","clone_url":"https://github.com/dromagnoli/geotools.git","svn_url":"https://github.com/dromagnoli/geotools","homepage":"http://geotools.org","size":115086,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"geotools:master","ref":"master","sha":"f2be74d53a946f54aff5b776eed47384ea0507bd","user":{"login":"geotools","id":1187031,"avatar_url":"https://avatars.githubusercontent.com/u/1187031?v=3","gravatar_id":"","url":"https://api.github.com/users/geotools","html_url":"https://github.com/geotools","followers_url":"https://api.github.com/users/geotools/followers","following_url":"https://api.github.com/users/geotools/following{/other_user}","gists_url":"https://api.github.com/users/geotools/gists{/gist_id}","starred_url":"https://api.github.com/users/geotools/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/geotools/subscriptions","organizations_url":"https://api.github.com/users/geotools/orgs","repos_url":"https://api.github.com/users/geotools/repos","events_url":"https://api.github.com/users/geotools/events{/privacy}","received_events_url":"https://api.github.com/users/geotools/received_events","type":"Organization","site_admin":false},"repo":{"id":2752522,"name":"geotools","full_name":"geotools/geotools","owner":{"login":"geotools","id":1187031,"avatar_url":"https://avatars.githubusercontent.com/u/1187031?v=3","gravatar_id":"","url":"https://api.github.com/users/geotools","html_url":"https://github.com/geotools","followers_url":"https://api.github.com/users/geotools/followers","following_url":"https://api.github.com/users/geotools/following{/other_user}","gists_url":"https://api.github.com/users/geotools/gists{/gist_id}","starred_url":"https://api.github.com/users/geotools/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/geotools/subscriptions","organizations_url":"https://api.github.com/users/geotools/orgs","repos_url":"https://api.github.com/users/geotools/repos","events_url":"https://api.github.com/users/geotools/events{/privacy}","received_events_url":"https://api.github.com/users/geotools/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/geotools/geotools","description":"Official GeoTools repository","fork":false,"url":"https://api.github.com/repos/geotools/geotools","forks_url":"https://api.github.com/repos/geotools/geotools/forks","keys_url":"https://api.github.com/repos/geotools/geotools/keys{/key_id}","collaborators_url":"https://api.github.com/repos/geotools/geotools/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/geotools/geotools/teams","hooks_url":"https://api.github.com/repos/geotools/geotools/hooks","issue_events_url":"https://api.github.com/repos/geotools/geotools/issues/events{/number}","events_url":"https://api.github.com/repos/geotools/geotools/events","assignees_url":"https://api.github.com/repos/geotools/geotools/assignees{/user}","branches_url":"https://api.github.com/repos/geotools/geotools/branches{/branch}","tags_url":"https://api.github.com/repos/geotools/geotools/tags","blobs_url":"https://api.github.com/repos/geotools/geotools/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/geotools/geotools/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/geotools/geotools/git/refs{/sha}","trees_url":"https://api.github.com/repos/geotools/geotools/git/trees{/sha}","statuses_url":"https://api.github.com/repos/geotools/geotools/statuses/{sha}","languages_url":"https://api.github.com/repos/geotools/geotools/languages","stargazers_url":"https://api.github.com/repos/geotools/geotools/stargazers","contributors_url":"https://api.github.com/repos/geotools/geotools/contributors","subscribers_url":"https://api.github.com/repos/geotools/geotools/subscribers","subscription_url":"https://api.github.com/repos/geotools/geotools/subscription","commits_url":"https://api.github.com/repos/geotools/geotools/commits{/sha}","git_commits_url":"https://api.github.com/repos/geotools/geotools/git/commits{/sha}","comments_url":"https://api.github.com/repos/geotools/geotools/comments{/number}","issue_comment_url":"https://api.github.com/repos/geotools/geotools/issues/comments{/number}","contents_url":"https://api.github.com/repos/geotools/geotools/contents/{+path}","compare_url":"https://api.github.com/repos/geotools/geotools/compare/{base}...{head}","merges_url":"https://api.github.com/repos/geotools/geotools/merges","archive_url":"https://api.github.com/repos/geotools/geotools/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/geotools/geotools/downloads","issues_url":"https://api.github.com/repos/geotools/geotools/issues{/number}","pulls_url":"https://api.github.com/repos/geotools/geotools/pulls{/number}","milestones_url":"https://api.github.com/repos/geotools/geotools/milestones{/number}","notifications_url":"https://api.github.com/repos/geotools/geotools/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/geotools/geotools/labels{/name}","releases_url":"https://api.github.com/repos/geotools/geotools/releases{/id}","deployments_url":"https://api.github.com/repos/geotools/geotools/deployments","created_at":"2011-11-10T23:22:12Z","updated_at":"2016-08-08T03:02:24Z","pushed_at":"2016-08-09T00:08:11Z","git_url":"git://github.com/geotools/geotools.git","ssh_url":"git@github.com:geotools/geotools.git","clone_url":"https://github.com/geotools/geotools.git","svn_url":"https://github.com/geotools/geotools","homepage":"http://geotools.org","size":129692,"stargazers_count":308,"watchers_count":308,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":452,"mirror_url":null,"open_issues_count":16,"forks":452,"open_issues":16,"watchers":308,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/geotools/geotools/pulls/1271"},"html":{"href":"https://github.com/geotools/geotools/pull/1271"},"issue":{"href":"https://api.github.com/repos/geotools/geotools/issues/1271"},"comments":{"href":"https://api.github.com/repos/geotools/geotools/issues/1271/comments"},"review_comments":{"href":"https://api.github.com/repos/geotools/geotools/pulls/1271/comments"},"review_comment":{"href":"https://api.github.com/repos/geotools/geotools/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/geotools/geotools/pulls/1271/commits"},"statuses":{"href":"https://api.github.com/repos/geotools/geotools/statuses/09a3b43ed891c8d56d415314822ff32f02b73ab4"}}}}
{"actor":{"display_login":"aaime"}}