{"action":"created","comment":{"url":"https://api.github.com/repos/opencadc/caom2db/pulls/comments/201457890","pull_request_review_id":135964720,"id":201457890,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwMTQ1Nzg5MA==","diff_hunk":"@@ -129,11 +149,24 @@ public HarvestResource(URI resourceID, String collection) {\n         this.resourceID = resourceID;\n         this.collection = collection;\n         this.harvestAC = true; // no API for this\n+        this.resourceType = SOURCE_URI;\n+    }\n+\n+    public HarvestResource(URL resourceCapabilitiesURL, String collection) {\n+        if (resourceCapabilitiesURL == null || collection == null) {\n+            throw new IllegalArgumentException(\"resourceCapabilitiesURL and collection args cannot be null\");\n+        }\n+        this.capabilitiesURL = resourceCapabilitiesURL;\n+        this.collection = collection;\n+        this.harvestAC = true; // no API for this\n+        this.resourceType = SOURCE_CAP_URL;\n     }\n \n     public String getIdentifier() {\n         if (resourceID != null) {\n             return resourceID.toASCIIString() + \"?\" + collection;\n+        } else if (capabilitiesURL != null) {\n+            return capabilitiesURL.toString() + \"#\" + collection;","path":"caom2harvester/src/main/java/ca/nrc/cadc/caom2/harvester/HarvestResource.java","position":96,"original_position":96,"commit_id":"6af79d755aa13ea3d863f6ed9a9e615968e9be4c","original_commit_id":"6af79d755aa13ea3d863f6ed9a9e615968e9be4c","user":{"login":"pdowler","id":13649534,"node_id":"MDQ6VXNlcjEzNjQ5NTM0","avatar_url":"https://avatars3.githubusercontent.com/u/13649534?v=4","gravatar_id":"","url":"https://api.github.com/users/pdowler","html_url":"https://github.com/pdowler","followers_url":"https://api.github.com/users/pdowler/followers","following_url":"https://api.github.com/users/pdowler/following{/other_user}","gists_url":"https://api.github.com/users/pdowler/gists{/gist_id}","starred_url":"https://api.github.com/users/pdowler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pdowler/subscriptions","organizations_url":"https://api.github.com/users/pdowler/orgs","repos_url":"https://api.github.com/users/pdowler/repos","events_url":"https://api.github.com/users/pdowler/events{/privacy}","received_events_url":"https://api.github.com/users/pdowler/received_events","type":"User","site_admin":false},"body":"Is there a good reason to use fragment (#) instead of query string (?) here? The general meaning of fragment is that the client gets the (whole) resource and finds the fragment inside it. It is true that the client gets the whole capabilities document and finds things inside it to use to get the collection, but it doesn't find the collection in there.\r\n\r\nLogically, the client never retrieves arbitrary content and then finds the collection in it. In the case of a resourceID, the meaning of query string is that the URI lets you find a service and then you use the service API to access the collection. Admittedly, using query string would mean that the capabilities doc has to be a normal restful resource with no qeury string itself, but that is pretty much mandated by VO standards anyway (certainly DALI mandates that).\r\n\r\nSo I would prefer ? instead of # here for consistency. In various VO meetings where the use of fragment was discussed the consensus was to only use them if they were an exact fit.","created_at":"2018-07-10T18:58:47Z","updated_at":"2018-07-10T18:58:47Z","html_url":"https://github.com/opencadc/caom2db/pull/110#discussion_r201457890","pull_request_url":"https://api.github.com/repos/opencadc/caom2db/pulls/110","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/opencadc/caom2db/pulls/comments/201457890"},"html":{"href":"https://github.com/opencadc/caom2db/pull/110#discussion_r201457890"},"pull_request":{"href":"https://api.github.com/repos/opencadc/caom2db/pulls/110"}}},"pull_request":{"url":"https://api.github.com/repos/opencadc/caom2db/pulls/110","id":191179047,"node_id":"MDExOlB1bGxSZXF1ZXN0MTkxMTc5MDQ3","html_url":"https://github.com/opencadc/caom2db/pull/110","diff_url":"https://github.com/opencadc/caom2db/pull/110.diff","patch_url":"https://github.com/opencadc/caom2db/pull/110.patch","issue_url":"https://api.github.com/repos/opencadc/caom2db/issues/110","number":110,"state":"open","locked":false,"title":"Multiple harvest source","user":{"login":"rgutierrezs","id":28726903,"node_id":"MDQ6VXNlcjI4NzI2OTAz","avatar_url":"https://avatars1.githubusercontent.com/u/28726903?v=4","gravatar_id":"","url":"https://api.github.com/users/rgutierrezs","html_url":"https://github.com/rgutierrezs","followers_url":"https://api.github.com/users/rgutierrezs/followers","following_url":"https://api.github.com/users/rgutierrezs/following{/other_user}","gists_url":"https://api.github.com/users/rgutierrezs/gists{/gist_id}","starred_url":"https://api.github.com/users/rgutierrezs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rgutierrezs/subscriptions","organizations_url":"https://api.github.com/users/rgutierrezs/orgs","repos_url":"https://api.github.com/users/rgutierrezs/repos","events_url":"https://api.github.com/users/rgutierrezs/events{/privacy}","received_events_url":"https://api.github.com/users/rgutierrezs/received_events","type":"User","site_admin":false},"body":"Modifications to unify harvesting source in --source command line argument (removing resourceID argument), and to add the possibility of pointing to a capabilities URL for specifying a non-registered repository service.","created_at":"2018-05-29T15:08:32Z","updated_at":"2018-07-10T18:58:47Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ff72af94fb5beca41b5829282e9e4830b552e08b","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/opencadc/caom2db/pulls/110/commits","review_comments_url":"https://api.github.com/repos/opencadc/caom2db/pulls/110/comments","review_comment_url":"https://api.github.com/repos/opencadc/caom2db/pulls/comments{/number}","comments_url":"https://api.github.com/repos/opencadc/caom2db/issues/110/comments","statuses_url":"https://api.github.com/repos/opencadc/caom2db/statuses/6af79d755aa13ea3d863f6ed9a9e615968e9be4c","head":{"label":"esdc-esac-esa-int:MultipleHarvestSource","ref":"MultipleHarvestSource","sha":"6af79d755aa13ea3d863f6ed9a9e615968e9be4c","user":{"login":"esdc-esac-esa-int","id":13047336,"node_id":"MDQ6VXNlcjEzMDQ3MzM2","avatar_url":"https://avatars0.githubusercontent.com/u/13047336?v=4","gravatar_id":"","url":"https://api.github.com/users/esdc-esac-esa-int","html_url":"https://github.com/esdc-esac-esa-int","followers_url":"https://api.github.com/users/esdc-esac-esa-int/followers","following_url":"https://api.github.com/users/esdc-esac-esa-int/following{/other_user}","gists_url":"https://api.github.com/users/esdc-esac-esa-int/gists{/gist_id}","starred_url":"https://api.github.com/users/esdc-esac-esa-int/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/esdc-esac-esa-int/subscriptions","organizations_url":"https://api.github.com/users/esdc-esac-esa-int/orgs","repos_url":"https://api.github.com/users/esdc-esac-esa-int/repos","events_url":"https://api.github.com/users/esdc-esac-esa-int/events{/privacy}","received_events_url":"https://api.github.com/users/esdc-esac-esa-int/received_events","type":"User","site_admin":false},"repo":{"id":95101090,"node_id":"MDEwOlJlcG9zaXRvcnk5NTEwMTA5MA==","name":"caom2db","full_name":"esdc-esac-esa-int/caom2db","owner":{"login":"esdc-esac-esa-int","id":13047336,"node_id":"MDQ6VXNlcjEzMDQ3MzM2","avatar_url":"https://avatars0.githubusercontent.com/u/13047336?v=4","gravatar_id":"","url":"https://api.github.com/users/esdc-esac-esa-int","html_url":"https://github.com/esdc-esac-esa-int","followers_url":"https://api.github.com/users/esdc-esac-esa-int/followers","following_url":"https://api.github.com/users/esdc-esac-esa-int/following{/other_user}","gists_url":"https://api.github.com/users/esdc-esac-esa-int/gists{/gist_id}","starred_url":"https://api.github.com/users/esdc-esac-esa-int/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/esdc-esac-esa-int/subscriptions","organizations_url":"https://api.github.com/users/esdc-esac-esa-int/orgs","repos_url":"https://api.github.com/users/esdc-esac-esa-int/repos","events_url":"https://api.github.com/users/esdc-esac-esa-int/events{/privacy}","received_events_url":"https://api.github.com/users/esdc-esac-esa-int/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/esdc-esac-esa-int/caom2db","description":"Common Archive Observation Model - database implementation","fork":true,"url":"https://api.github.com/repos/esdc-esac-esa-int/caom2db","forks_url":"https://api.github.com/repos/esdc-esac-esa-int/caom2db/forks","keys_url":"https://api.github.com/repos/esdc-esac-esa-int/caom2db/keys{/key_id}","collaborators_url":"https://api.github.com/repos/esdc-esac-esa-int/caom2db/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/esdc-esac-esa-int/caom2db/teams","hooks_url":"https://api.github.com/repos/esdc-esac-esa-int/caom2db/hooks","issue_events_url":"https://api.github.com/repos/esdc-esac-esa-int/caom2db/issues/events{/number}","events_url":"https://api.github.com/repos/esdc-esac-esa-int/caom2db/events","assignees_url":"https://api.github.com/repos/esdc-esac-esa-int/caom2db/assignees{/user}","branches_url":"https://api.github.com/repos/esdc-esac-esa-int/caom2db/branches{/branch}","tags_url":"https://api.github.com/repos/esdc-esac-esa-int/caom2db/tags","blobs_url":"https://api.github.com/repos/esdc-esac-esa-int/caom2db/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/esdc-esac-esa-int/caom2db/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/esdc-esac-esa-int/caom2db/git/refs{/sha}","trees_url":"https://api.github.com/repos/esdc-esac-esa-int/caom2db/git/trees{/sha}","statuses_url":"https://api.github.com/repos/esdc-esac-esa-int/caom2db/statuses/{sha}","languages_url":"https://api.github.com/repos/esdc-esac-esa-int/caom2db/languages","stargazers_url":"https://api.github.com/repos/esdc-esac-esa-int/caom2db/stargazers","contributors_url":"https://api.github.com/repos/esdc-esac-esa-int/caom2db/contributors","subscribers_url":"https://api.github.com/repos/esdc-esac-esa-int/caom2db/subscribers","subscription_url":"https://api.github.com/repos/esdc-esac-esa-int/caom2db/subscription","commits_url":"https://api.github.com/repos/esdc-esac-esa-int/caom2db/commits{/sha}","git_commits_url":"https://api.github.com/repos/esdc-esac-esa-int/caom2db/git/commits{/sha}","comments_url":"https://api.github.com/repos/esdc-esac-esa-int/caom2db/comments{/number}","issue_comment_url":"https://api.github.com/repos/esdc-esac-esa-int/caom2db/issues/comments{/number}","contents_url":"https://api.github.com/repos/esdc-esac-esa-int/caom2db/contents/{+path}","compare_url":"https://api.github.com/repos/esdc-esac-esa-int/caom2db/compare/{base}...{head}","merges_url":"https://api.github.com/repos/esdc-esac-esa-int/caom2db/merges","archive_url":"https://api.github.com/repos/esdc-esac-esa-int/caom2db/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/esdc-esac-esa-int/caom2db/downloads","issues_url":"https://api.github.com/repos/esdc-esac-esa-int/caom2db/issues{/number}","pulls_url":"https://api.github.com/repos/esdc-esac-esa-int/caom2db/pulls{/number}","milestones_url":"https://api.github.com/repos/esdc-esac-esa-int/caom2db/milestones{/number}","notifications_url":"https://api.github.com/repos/esdc-esac-esa-int/caom2db/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/esdc-esac-esa-int/caom2db/labels{/name}","releases_url":"https://api.github.com/repos/esdc-esac-esa-int/caom2db/releases{/id}","deployments_url":"https://api.github.com/repos/esdc-esac-esa-int/caom2db/deployments","created_at":"2017-06-22T09:53:49Z","updated_at":"2018-06-19T11:02:13Z","pushed_at":"2018-06-20T09:28:54Z","git_url":"git://github.com/esdc-esac-esa-int/caom2db.git","ssh_url":"git@github.com:esdc-esac-esa-int/caom2db.git","clone_url":"https://github.com/esdc-esac-esa-int/caom2db.git","svn_url":"https://github.com/esdc-esac-esa-int/caom2db","homepage":null,"size":2104,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"agpl-3.0","name":"GNU Affero General Public License v3.0","spdx_id":"AGPL-3.0","url":"https://api.github.com/licenses/agpl-3.0","node_id":"MDc6TGljZW5zZTE="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"opencadc:master","ref":"master","sha":"076e90d30e1b1f13571fffb9bc16fcec5c467396","user":{"login":"opencadc","id":13909060,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEzOTA5MDYw","avatar_url":"https://avatars2.githubusercontent.com/u/13909060?v=4","gravatar_id":"","url":"https://api.github.com/users/opencadc","html_url":"https://github.com/opencadc","followers_url":"https://api.github.com/users/opencadc/followers","following_url":"https://api.github.com/users/opencadc/following{/other_user}","gists_url":"https://api.github.com/users/opencadc/gists{/gist_id}","starred_url":"https://api.github.com/users/opencadc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/opencadc/subscriptions","organizations_url":"https://api.github.com/users/opencadc/orgs","repos_url":"https://api.github.com/users/opencadc/repos","events_url":"https://api.github.com/users/opencadc/events{/privacy}","received_events_url":"https://api.github.com/users/opencadc/received_events","type":"Organization","site_admin":false},"repo":{"id":65031136,"node_id":"MDEwOlJlcG9zaXRvcnk2NTAzMTEzNg==","name":"caom2db","full_name":"opencadc/caom2db","owner":{"login":"opencadc","id":13909060,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEzOTA5MDYw","avatar_url":"https://avatars2.githubusercontent.com/u/13909060?v=4","gravatar_id":"","url":"https://api.github.com/users/opencadc","html_url":"https://github.com/opencadc","followers_url":"https://api.github.com/users/opencadc/followers","following_url":"https://api.github.com/users/opencadc/following{/other_user}","gists_url":"https://api.github.com/users/opencadc/gists{/gist_id}","starred_url":"https://api.github.com/users/opencadc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/opencadc/subscriptions","organizations_url":"https://api.github.com/users/opencadc/orgs","repos_url":"https://api.github.com/users/opencadc/repos","events_url":"https://api.github.com/users/opencadc/events{/privacy}","received_events_url":"https://api.github.com/users/opencadc/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/opencadc/caom2db","description":"Common Archive Observation Model - database implementation","fork":false,"url":"https://api.github.com/repos/opencadc/caom2db","forks_url":"https://api.github.com/repos/opencadc/caom2db/forks","keys_url":"https://api.github.com/repos/opencadc/caom2db/keys{/key_id}","collaborators_url":"https://api.github.com/repos/opencadc/caom2db/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/opencadc/caom2db/teams","hooks_url":"https://api.github.com/repos/opencadc/caom2db/hooks","issue_events_url":"https://api.github.com/repos/opencadc/caom2db/issues/events{/number}","events_url":"https://api.github.com/repos/opencadc/caom2db/events","assignees_url":"https://api.github.com/repos/opencadc/caom2db/assignees{/user}","branches_url":"https://api.github.com/repos/opencadc/caom2db/branches{/branch}","tags_url":"https://api.github.com/repos/opencadc/caom2db/tags","blobs_url":"https://api.github.com/repos/opencadc/caom2db/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/opencadc/caom2db/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/opencadc/caom2db/git/refs{/sha}","trees_url":"https://api.github.com/repos/opencadc/caom2db/git/trees{/sha}","statuses_url":"https://api.github.com/repos/opencadc/caom2db/statuses/{sha}","languages_url":"https://api.github.com/repos/opencadc/caom2db/languages","stargazers_url":"https://api.github.com/repos/opencadc/caom2db/stargazers","contributors_url":"https://api.github.com/repos/opencadc/caom2db/contributors","subscribers_url":"https://api.github.com/repos/opencadc/caom2db/subscribers","subscription_url":"https://api.github.com/repos/opencadc/caom2db/subscription","commits_url":"https://api.github.com/repos/opencadc/caom2db/commits{/sha}","git_commits_url":"https://api.github.com/repos/opencadc/caom2db/git/commits{/sha}","comments_url":"https://api.github.com/repos/opencadc/caom2db/comments{/number}","issue_comment_url":"https://api.github.com/repos/opencadc/caom2db/issues/comments{/number}","contents_url":"https://api.github.com/repos/opencadc/caom2db/contents/{+path}","compare_url":"https://api.github.com/repos/opencadc/caom2db/compare/{base}...{head}","merges_url":"https://api.github.com/repos/opencadc/caom2db/merges","archive_url":"https://api.github.com/repos/opencadc/caom2db/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/opencadc/caom2db/downloads","issues_url":"https://api.github.com/repos/opencadc/caom2db/issues{/number}","pulls_url":"https://api.github.com/repos/opencadc/caom2db/pulls{/number}","milestones_url":"https://api.github.com/repos/opencadc/caom2db/milestones{/number}","notifications_url":"https://api.github.com/repos/opencadc/caom2db/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/opencadc/caom2db/labels{/name}","releases_url":"https://api.github.com/repos/opencadc/caom2db/releases{/id}","deployments_url":"https://api.github.com/repos/opencadc/caom2db/deployments","created_at":"2016-08-05T15:56:27Z","updated_at":"2018-07-04T17:18:59Z","pushed_at":"2018-07-09T23:02:10Z","git_url":"git://github.com/opencadc/caom2db.git","ssh_url":"git@github.com:opencadc/caom2db.git","clone_url":"https://github.com/opencadc/caom2db.git","svn_url":"https://github.com/opencadc/caom2db","homepage":null,"size":2068,"stargazers_count":3,"watchers_count":3,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":12,"mirror_url":null,"archived":false,"open_issues_count":12,"license":{"key":"agpl-3.0","name":"GNU Affero General Public License v3.0","spdx_id":"AGPL-3.0","url":"https://api.github.com/licenses/agpl-3.0","node_id":"MDc6TGljZW5zZTE="},"forks":12,"open_issues":12,"watchers":3,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/opencadc/caom2db/pulls/110"},"html":{"href":"https://github.com/opencadc/caom2db/pull/110"},"issue":{"href":"https://api.github.com/repos/opencadc/caom2db/issues/110"},"comments":{"href":"https://api.github.com/repos/opencadc/caom2db/issues/110/comments"},"review_comments":{"href":"https://api.github.com/repos/opencadc/caom2db/pulls/110/comments"},"review_comment":{"href":"https://api.github.com/repos/opencadc/caom2db/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/opencadc/caom2db/pulls/110/commits"},"statuses":{"href":"https://api.github.com/repos/opencadc/caom2db/statuses/6af79d755aa13ea3d863f6ed9a9e615968e9be4c"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"pdowler"}}