{"action":"created","comment":{"url":"https://api.github.com/repos/gemini-hlsw/ocs/pulls/comments/22735664","id":22735664,"diff_hunk":"@@ -0,0 +1,19 @@\n+package edu.gemini.ags.gems\n+\n+import edu.gemini.catalog.api.{MagnitudeLimits, MagnitudeConstraints}\n+import edu.gemini.ags.impl._\n+import edu.gemini.spModel.core.MagnitudeBand\n+import edu.gemini.spModel.core.Target.SiderealTarget\n+import edu.gemini.spModel.target.SPTarget\n+import edu.gemini.shared.util.immutable.ScalaConverters._\n+\n+/**\n+ * Utility methods for Java classes to access scala classes/methods\n+ */\n+object GemsUtils4Java {\n+  // Returns true if the target magnitude is within the given limits\n+  def checkMagLimit(target: SPTarget, magLimits: MagnitudeConstraints): Boolean =\n+    // TODO This method has too many conversions, should be simplified\n+    target.getMagnitude(magLimits.band.toOldModel).asScalaOpt.map(m => magLimits.contains(m.toNewModel)).getOrElse(true)","path":"bundle/edu.gemini.ags/src/main/scala/edu/gemini/ags/gems/GemsUtils4Java.scala","position":17,"original_position":17,"commit_id":"fa1b4d71f5f7b475e9775d0b9a42332ba4958075","original_commit_id":"fa1b4d71f5f7b475e9775d0b9a42332ba4958075","user":{"login":"cquiroz","id":3615303,"avatar_url":"https://avatars.githubusercontent.com/u/3615303?v=3","gravatar_id":"","url":"https://api.github.com/users/cquiroz","html_url":"https://github.com/cquiroz","followers_url":"https://api.github.com/users/cquiroz/followers","following_url":"https://api.github.com/users/cquiroz/following{/other_user}","gists_url":"https://api.github.com/users/cquiroz/gists{/gist_id}","starred_url":"https://api.github.com/users/cquiroz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cquiroz/subscriptions","organizations_url":"https://api.github.com/users/cquiroz/orgs","repos_url":"https://api.github.com/users/cquiroz/repos","events_url":"https://api.github.com/users/cquiroz/events{/privacy}","received_events_url":"https://api.github.com/users/cquiroz/received_events","type":"User","site_admin":false},"body":"certainly, I'd also expect this to migrate and perhaps to be a method on `SiderealTarget`, like `target.isInLimits(constraints)`","created_at":"2015-01-09T19:07:15Z","updated_at":"2015-01-09T19:07:15Z","html_url":"https://github.com/gemini-hlsw/ocs/pull/195#discussion_r22735664","pull_request_url":"https://api.github.com/repos/gemini-hlsw/ocs/pulls/195","_links":{"self":{"href":"https://api.github.com/repos/gemini-hlsw/ocs/pulls/comments/22735664"},"html":{"href":"https://github.com/gemini-hlsw/ocs/pull/195#discussion_r22735664"},"pull_request":{"href":"https://api.github.com/repos/gemini-hlsw/ocs/pulls/195"}}},"pull_request":{"url":"https://api.github.com/repos/gemini-hlsw/ocs/pulls/195","id":27116098,"html_url":"https://github.com/gemini-hlsw/ocs/pull/195","diff_url":"https://github.com/gemini-hlsw/ocs/pull/195.diff","patch_url":"https://github.com/gemini-hlsw/ocs/pull/195.patch","issue_url":"https://api.github.com/repos/gemini-hlsw/ocs/issues/195","number":195,"state":"open","locked":false,"title":"OCSADV-27: Another step to port AGS","user":{"login":"cquiroz","id":3615303,"avatar_url":"https://avatars.githubusercontent.com/u/3615303?v=3","gravatar_id":"","url":"https://api.github.com/users/cquiroz","html_url":"https://github.com/cquiroz","followers_url":"https://api.github.com/users/cquiroz/followers","following_url":"https://api.github.com/users/cquiroz/following{/other_user}","gists_url":"https://api.github.com/users/cquiroz/gists{/gist_id}","starred_url":"https://api.github.com/users/cquiroz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cquiroz/subscriptions","organizations_url":"https://api.github.com/users/cquiroz/orgs","repos_url":"https://api.github.com/users/cquiroz/repos","events_url":"https://api.github.com/users/cquiroz/events{/privacy}","received_events_url":"https://api.github.com/users/cquiroz/received_events","type":"User","site_admin":false},"body":"This PR contains many small commits to port the internals and API of AGS to use the new spModel classes\r\n\r\nMost of the changes are quite mechanical and sometimes they are reverted on the next commit when other parts of the code is ported, however, each commit compiles and passes the tests.\r\n\r\nThis is close to how far I can get without ripping the old catalog out and replace it with the new one","created_at":"2015-01-09T17:42:12Z","updated_at":"2015-01-09T19:07:15Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0ae1c8b9c828885fddee6b671b026c36559825f1","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/gemini-hlsw/ocs/pulls/195/commits","review_comments_url":"https://api.github.com/repos/gemini-hlsw/ocs/pulls/195/comments","review_comment_url":"https://api.github.com/repos/gemini-hlsw/ocs/pulls/comments/{number}","comments_url":"https://api.github.com/repos/gemini-hlsw/ocs/issues/195/comments","statuses_url":"https://api.github.com/repos/gemini-hlsw/ocs/statuses/fa1b4d71f5f7b475e9775d0b9a42332ba4958075","head":{"label":"cquiroz:feature/OCSADV-27","ref":"feature/OCSADV-27","sha":"fa1b4d71f5f7b475e9775d0b9a42332ba4958075","user":{"login":"cquiroz","id":3615303,"avatar_url":"https://avatars.githubusercontent.com/u/3615303?v=3","gravatar_id":"","url":"https://api.github.com/users/cquiroz","html_url":"https://github.com/cquiroz","followers_url":"https://api.github.com/users/cquiroz/followers","following_url":"https://api.github.com/users/cquiroz/following{/other_user}","gists_url":"https://api.github.com/users/cquiroz/gists{/gist_id}","starred_url":"https://api.github.com/users/cquiroz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cquiroz/subscriptions","organizations_url":"https://api.github.com/users/cquiroz/orgs","repos_url":"https://api.github.com/users/cquiroz/repos","events_url":"https://api.github.com/users/cquiroz/events{/privacy}","received_events_url":"https://api.github.com/users/cquiroz/received_events","type":"User","site_admin":false},"repo":{"id":23979014,"name":"ocs","full_name":"cquiroz/ocs","owner":{"login":"cquiroz","id":3615303,"avatar_url":"https://avatars.githubusercontent.com/u/3615303?v=3","gravatar_id":"","url":"https://api.github.com/users/cquiroz","html_url":"https://github.com/cquiroz","followers_url":"https://api.github.com/users/cquiroz/followers","following_url":"https://api.github.com/users/cquiroz/following{/other_user}","gists_url":"https://api.github.com/users/cquiroz/gists{/gist_id}","starred_url":"https://api.github.com/users/cquiroz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cquiroz/subscriptions","organizations_url":"https://api.github.com/users/cquiroz/orgs","repos_url":"https://api.github.com/users/cquiroz/repos","events_url":"https://api.github.com/users/cquiroz/events{/privacy}","received_events_url":"https://api.github.com/users/cquiroz/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/cquiroz/ocs","description":"","fork":true,"url":"https://api.github.com/repos/cquiroz/ocs","forks_url":"https://api.github.com/repos/cquiroz/ocs/forks","keys_url":"https://api.github.com/repos/cquiroz/ocs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cquiroz/ocs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cquiroz/ocs/teams","hooks_url":"https://api.github.com/repos/cquiroz/ocs/hooks","issue_events_url":"https://api.github.com/repos/cquiroz/ocs/issues/events{/number}","events_url":"https://api.github.com/repos/cquiroz/ocs/events","assignees_url":"https://api.github.com/repos/cquiroz/ocs/assignees{/user}","branches_url":"https://api.github.com/repos/cquiroz/ocs/branches{/branch}","tags_url":"https://api.github.com/repos/cquiroz/ocs/tags","blobs_url":"https://api.github.com/repos/cquiroz/ocs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cquiroz/ocs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cquiroz/ocs/git/refs{/sha}","trees_url":"https://api.github.com/repos/cquiroz/ocs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cquiroz/ocs/statuses/{sha}","languages_url":"https://api.github.com/repos/cquiroz/ocs/languages","stargazers_url":"https://api.github.com/repos/cquiroz/ocs/stargazers","contributors_url":"https://api.github.com/repos/cquiroz/ocs/contributors","subscribers_url":"https://api.github.com/repos/cquiroz/ocs/subscribers","subscription_url":"https://api.github.com/repos/cquiroz/ocs/subscription","commits_url":"https://api.github.com/repos/cquiroz/ocs/commits{/sha}","git_commits_url":"https://api.github.com/repos/cquiroz/ocs/git/commits{/sha}","comments_url":"https://api.github.com/repos/cquiroz/ocs/comments{/number}","issue_comment_url":"https://api.github.com/repos/cquiroz/ocs/issues/comments/{number}","contents_url":"https://api.github.com/repos/cquiroz/ocs/contents/{+path}","compare_url":"https://api.github.com/repos/cquiroz/ocs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cquiroz/ocs/merges","archive_url":"https://api.github.com/repos/cquiroz/ocs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cquiroz/ocs/downloads","issues_url":"https://api.github.com/repos/cquiroz/ocs/issues{/number}","pulls_url":"https://api.github.com/repos/cquiroz/ocs/pulls{/number}","milestones_url":"https://api.github.com/repos/cquiroz/ocs/milestones{/number}","notifications_url":"https://api.github.com/repos/cquiroz/ocs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cquiroz/ocs/labels{/name}","releases_url":"https://api.github.com/repos/cquiroz/ocs/releases{/id}","created_at":"2014-09-12T22:30:57Z","updated_at":"2015-01-09T14:25:57Z","pushed_at":"2015-01-09T16:59:31Z","git_url":"git://github.com/cquiroz/ocs.git","ssh_url":"git@github.com:cquiroz/ocs.git","clone_url":"https://github.com/cquiroz/ocs.git","svn_url":"https://github.com/cquiroz/ocs","homepage":null,"size":255082,"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":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"develop"}},"base":{"label":"gemini-hlsw:develop","ref":"develop","sha":"b5e7e68ccd16d5b2a4dde195b694d818af6d75e1","user":{"login":"gemini-hlsw","id":8593735,"avatar_url":"https://avatars.githubusercontent.com/u/8593735?v=3","gravatar_id":"","url":"https://api.github.com/users/gemini-hlsw","html_url":"https://github.com/gemini-hlsw","followers_url":"https://api.github.com/users/gemini-hlsw/followers","following_url":"https://api.github.com/users/gemini-hlsw/following{/other_user}","gists_url":"https://api.github.com/users/gemini-hlsw/gists{/gist_id}","starred_url":"https://api.github.com/users/gemini-hlsw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gemini-hlsw/subscriptions","organizations_url":"https://api.github.com/users/gemini-hlsw/orgs","repos_url":"https://api.github.com/users/gemini-hlsw/repos","events_url":"https://api.github.com/users/gemini-hlsw/events{/privacy}","received_events_url":"https://api.github.com/users/gemini-hlsw/received_events","type":"Organization","site_admin":false},"repo":{"id":23963494,"name":"ocs","full_name":"gemini-hlsw/ocs","owner":{"login":"gemini-hlsw","id":8593735,"avatar_url":"https://avatars.githubusercontent.com/u/8593735?v=3","gravatar_id":"","url":"https://api.github.com/users/gemini-hlsw","html_url":"https://github.com/gemini-hlsw","followers_url":"https://api.github.com/users/gemini-hlsw/followers","following_url":"https://api.github.com/users/gemini-hlsw/following{/other_user}","gists_url":"https://api.github.com/users/gemini-hlsw/gists{/gist_id}","starred_url":"https://api.github.com/users/gemini-hlsw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gemini-hlsw/subscriptions","organizations_url":"https://api.github.com/users/gemini-hlsw/orgs","repos_url":"https://api.github.com/users/gemini-hlsw/repos","events_url":"https://api.github.com/users/gemini-hlsw/events{/privacy}","received_events_url":"https://api.github.com/users/gemini-hlsw/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/gemini-hlsw/ocs","description":"Observatory Control Software","fork":false,"url":"https://api.github.com/repos/gemini-hlsw/ocs","forks_url":"https://api.github.com/repos/gemini-hlsw/ocs/forks","keys_url":"https://api.github.com/repos/gemini-hlsw/ocs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gemini-hlsw/ocs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gemini-hlsw/ocs/teams","hooks_url":"https://api.github.com/repos/gemini-hlsw/ocs/hooks","issue_events_url":"https://api.github.com/repos/gemini-hlsw/ocs/issues/events{/number}","events_url":"https://api.github.com/repos/gemini-hlsw/ocs/events","assignees_url":"https://api.github.com/repos/gemini-hlsw/ocs/assignees{/user}","branches_url":"https://api.github.com/repos/gemini-hlsw/ocs/branches{/branch}","tags_url":"https://api.github.com/repos/gemini-hlsw/ocs/tags","blobs_url":"https://api.github.com/repos/gemini-hlsw/ocs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gemini-hlsw/ocs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gemini-hlsw/ocs/git/refs{/sha}","trees_url":"https://api.github.com/repos/gemini-hlsw/ocs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gemini-hlsw/ocs/statuses/{sha}","languages_url":"https://api.github.com/repos/gemini-hlsw/ocs/languages","stargazers_url":"https://api.github.com/repos/gemini-hlsw/ocs/stargazers","contributors_url":"https://api.github.com/repos/gemini-hlsw/ocs/contributors","subscribers_url":"https://api.github.com/repos/gemini-hlsw/ocs/subscribers","subscription_url":"https://api.github.com/repos/gemini-hlsw/ocs/subscription","commits_url":"https://api.github.com/repos/gemini-hlsw/ocs/commits{/sha}","git_commits_url":"https://api.github.com/repos/gemini-hlsw/ocs/git/commits{/sha}","comments_url":"https://api.github.com/repos/gemini-hlsw/ocs/comments{/number}","issue_comment_url":"https://api.github.com/repos/gemini-hlsw/ocs/issues/comments/{number}","contents_url":"https://api.github.com/repos/gemini-hlsw/ocs/contents/{+path}","compare_url":"https://api.github.com/repos/gemini-hlsw/ocs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gemini-hlsw/ocs/merges","archive_url":"https://api.github.com/repos/gemini-hlsw/ocs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gemini-hlsw/ocs/downloads","issues_url":"https://api.github.com/repos/gemini-hlsw/ocs/issues{/number}","pulls_url":"https://api.github.com/repos/gemini-hlsw/ocs/pulls{/number}","milestones_url":"https://api.github.com/repos/gemini-hlsw/ocs/milestones{/number}","notifications_url":"https://api.github.com/repos/gemini-hlsw/ocs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gemini-hlsw/ocs/labels{/name}","releases_url":"https://api.github.com/repos/gemini-hlsw/ocs/releases{/id}","created_at":"2014-09-12T14:20:23Z","updated_at":"2015-01-09T17:36:26Z","pushed_at":"2015-01-09T17:36:26Z","git_url":"git://github.com/gemini-hlsw/ocs.git","ssh_url":"git@github.com:gemini-hlsw/ocs.git","clone_url":"https://github.com/gemini-hlsw/ocs.git","svn_url":"https://github.com/gemini-hlsw/ocs","homepage":"","size":260616,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":8,"mirror_url":null,"open_issues_count":4,"forks":8,"open_issues":4,"watchers":0,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/gemini-hlsw/ocs/pulls/195"},"html":{"href":"https://github.com/gemini-hlsw/ocs/pull/195"},"issue":{"href":"https://api.github.com/repos/gemini-hlsw/ocs/issues/195"},"comments":{"href":"https://api.github.com/repos/gemini-hlsw/ocs/issues/195/comments"},"review_comments":{"href":"https://api.github.com/repos/gemini-hlsw/ocs/pulls/195/comments"},"review_comment":{"href":"https://api.github.com/repos/gemini-hlsw/ocs/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/gemini-hlsw/ocs/pulls/195/commits"},"statuses":{"href":"https://api.github.com/repos/gemini-hlsw/ocs/statuses/fa1b4d71f5f7b475e9775d0b9a42332ba4958075"}}}}