{"action":"created","comment":{"url":"https://api.github.com/repos/uwdata/compassql/pulls/comments/74331839","id":74331839,"diff_hunk":"@@ -462,3 +463,61 @@ export class SpecQueryModel {\n     this._rankingScore[rankingName] = score;\n   }\n }\n+\n+export class SpecQueryModelGroup {\n+  private _name: string;\n+  private _path: string;\n+  private _items: (SpecQueryModel | SpecQueryModelGroup)[];\n+  private _groupBy: GroupBy;\n+  private _orderGroupBy: string;\n+\n+  constructor(name: string = '', path: string = '', items: (SpecQueryModel | SpecQueryModelGroup)[] = [],\n+              groupBy: GroupBy = undefined, orderGroupBy: string = undefined) {\n+    this._name = name;\n+    this._path = path;\n+    this._items = items;\n+    this.groupBy = groupBy;\n+    this._orderGroupBy = orderGroupBy;\n+  }\n+\n+  public getTopSpecModel(g: SpecQueryModelGroup): SpecQueryModel {\n+    const topItem = g._items[0];\n+    if (topItem instanceof SpecQueryModelGroup) {\n+      return this.getTopSpecModel(topItem);\n+    } else {\n+      return topItem;\n+    }\n+  }\n+\n+  public get name() {\n+    return this._name;\n+  }\n+\n+  public set name(name: string) {\n+    this._name = name;\n+  }\n+\n+  public get items() {\n+    return this._items;\n+  }\n+\n+  public set items(items: (SpecQueryModel | SpecQueryModelGroup)[]) {\n+    this._items = items;\n+  }\n+\n+  public set groupBy(groupBy: GroupBy) {\n+    this._groupBy = groupBy;\n+  }\n+\n+  // Currently, we do not need to get orderGroupBy for anything in CQL.","path":"src/model.ts","position":58,"original_position":58,"commit_id":"fa6194db7e2bd1fb7fad9e1b741f1a086c14699f","original_commit_id":"fa6194db7e2bd1fb7fad9e1b741f1a086c14699f","user":{"login":"kanitw","id":111269,"avatar_url":"https://avatars.githubusercontent.com/u/111269?v=3","gravatar_id":"","url":"https://api.github.com/users/kanitw","html_url":"https://github.com/kanitw","followers_url":"https://api.github.com/users/kanitw/followers","following_url":"https://api.github.com/users/kanitw/following{/other_user}","gists_url":"https://api.github.com/users/kanitw/gists{/gist_id}","starred_url":"https://api.github.com/users/kanitw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kanitw/subscriptions","organizations_url":"https://api.github.com/users/kanitw/orgs","repos_url":"https://api.github.com/users/kanitw/repos","events_url":"https://api.github.com/users/kanitw/events{/privacy}","received_events_url":"https://api.github.com/users/kanitw/received_events","type":"User","site_admin":false},"body":"Have you check if we use them in editor / vlui? \r\n\r\nIt's kinda weird if you can set something but can't get them.  Usually it's the other way around.  (Can `get` but not `set`)  ","created_at":"2016-08-10T21:13:17Z","updated_at":"2016-08-10T21:13:17Z","html_url":"https://github.com/uwdata/compassql/pull/211#discussion_r74331839","pull_request_url":"https://api.github.com/repos/uwdata/compassql/pulls/211","_links":{"self":{"href":"https://api.github.com/repos/uwdata/compassql/pulls/comments/74331839"},"html":{"href":"https://github.com/uwdata/compassql/pull/211#discussion_r74331839"},"pull_request":{"href":"https://api.github.com/repos/uwdata/compassql/pulls/211"}}},"pull_request":{"url":"https://api.github.com/repos/uwdata/compassql/pulls/211","id":80868272,"html_url":"https://github.com/uwdata/compassql/pull/211","diff_url":"https://github.com/uwdata/compassql/pull/211.diff","patch_url":"https://github.com/uwdata/compassql/pull/211.patch","issue_url":"https://api.github.com/repos/uwdata/compassql/issues/211","number":211,"state":"open","locked":false,"title":"[WIP] Convert SpecQueryModelGroup to Class","user":{"login":"felixcodes","id":17525561,"avatar_url":"https://avatars.githubusercontent.com/u/17525561?v=3","gravatar_id":"","url":"https://api.github.com/users/felixcodes","html_url":"https://github.com/felixcodes","followers_url":"https://api.github.com/users/felixcodes/followers","following_url":"https://api.github.com/users/felixcodes/following{/other_user}","gists_url":"https://api.github.com/users/felixcodes/gists{/gist_id}","starred_url":"https://api.github.com/users/felixcodes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/felixcodes/subscriptions","organizations_url":"https://api.github.com/users/felixcodes/orgs","repos_url":"https://api.github.com/users/felixcodes/repos","events_url":"https://api.github.com/users/felixcodes/events{/privacy}","received_events_url":"https://api.github.com/users/felixcodes/received_events","type":"User","site_admin":false},"body":"fix #181 \r\n- add SpecQueryModelGroup class in model.ts\r\n- remove isSpecQueryModelGroup method (we can reliably use instanceof)\r\n- rename getTopItem to getTopSpecModel","created_at":"2016-08-10T21:10:29Z","updated_at":"2016-08-10T21:13:17Z","closed_at":null,"merged_at":null,"merge_commit_sha":"95ed08cc7750447ffb2b862b60c0ab74e4f2cb02","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/uwdata/compassql/pulls/211/commits","review_comments_url":"https://api.github.com/repos/uwdata/compassql/pulls/211/comments","review_comment_url":"https://api.github.com/repos/uwdata/compassql/pulls/comments{/number}","comments_url":"https://api.github.com/repos/uwdata/compassql/issues/211/comments","statuses_url":"https://api.github.com/repos/uwdata/compassql/statuses/fa6194db7e2bd1fb7fad9e1b741f1a086c14699f","head":{"label":"uwdata:fo/181-convert-SpecQueryModelGroup-to-class","ref":"fo/181-convert-SpecQueryModelGroup-to-class","sha":"fa6194db7e2bd1fb7fad9e1b741f1a086c14699f","user":{"login":"uwdata","id":5448960,"avatar_url":"https://avatars.githubusercontent.com/u/5448960?v=3","gravatar_id":"","url":"https://api.github.com/users/uwdata","html_url":"https://github.com/uwdata","followers_url":"https://api.github.com/users/uwdata/followers","following_url":"https://api.github.com/users/uwdata/following{/other_user}","gists_url":"https://api.github.com/users/uwdata/gists{/gist_id}","starred_url":"https://api.github.com/users/uwdata/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uwdata/subscriptions","organizations_url":"https://api.github.com/users/uwdata/orgs","repos_url":"https://api.github.com/users/uwdata/repos","events_url":"https://api.github.com/users/uwdata/events{/privacy}","received_events_url":"https://api.github.com/users/uwdata/received_events","type":"Organization","site_admin":false},"repo":{"id":58768960,"name":"compassql","full_name":"uwdata/compassql","owner":{"login":"uwdata","id":5448960,"avatar_url":"https://avatars.githubusercontent.com/u/5448960?v=3","gravatar_id":"","url":"https://api.github.com/users/uwdata","html_url":"https://github.com/uwdata","followers_url":"https://api.github.com/users/uwdata/followers","following_url":"https://api.github.com/users/uwdata/following{/other_user}","gists_url":"https://api.github.com/users/uwdata/gists{/gist_id}","starred_url":"https://api.github.com/users/uwdata/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uwdata/subscriptions","organizations_url":"https://api.github.com/users/uwdata/orgs","repos_url":"https://api.github.com/users/uwdata/repos","events_url":"https://api.github.com/users/uwdata/events{/privacy}","received_events_url":"https://api.github.com/users/uwdata/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/uwdata/compassql","description":"CompassQL Query Language for visualization recommendation.","fork":false,"url":"https://api.github.com/repos/uwdata/compassql","forks_url":"https://api.github.com/repos/uwdata/compassql/forks","keys_url":"https://api.github.com/repos/uwdata/compassql/keys{/key_id}","collaborators_url":"https://api.github.com/repos/uwdata/compassql/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/uwdata/compassql/teams","hooks_url":"https://api.github.com/repos/uwdata/compassql/hooks","issue_events_url":"https://api.github.com/repos/uwdata/compassql/issues/events{/number}","events_url":"https://api.github.com/repos/uwdata/compassql/events","assignees_url":"https://api.github.com/repos/uwdata/compassql/assignees{/user}","branches_url":"https://api.github.com/repos/uwdata/compassql/branches{/branch}","tags_url":"https://api.github.com/repos/uwdata/compassql/tags","blobs_url":"https://api.github.com/repos/uwdata/compassql/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/uwdata/compassql/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/uwdata/compassql/git/refs{/sha}","trees_url":"https://api.github.com/repos/uwdata/compassql/git/trees{/sha}","statuses_url":"https://api.github.com/repos/uwdata/compassql/statuses/{sha}","languages_url":"https://api.github.com/repos/uwdata/compassql/languages","stargazers_url":"https://api.github.com/repos/uwdata/compassql/stargazers","contributors_url":"https://api.github.com/repos/uwdata/compassql/contributors","subscribers_url":"https://api.github.com/repos/uwdata/compassql/subscribers","subscription_url":"https://api.github.com/repos/uwdata/compassql/subscription","commits_url":"https://api.github.com/repos/uwdata/compassql/commits{/sha}","git_commits_url":"https://api.github.com/repos/uwdata/compassql/git/commits{/sha}","comments_url":"https://api.github.com/repos/uwdata/compassql/comments{/number}","issue_comment_url":"https://api.github.com/repos/uwdata/compassql/issues/comments{/number}","contents_url":"https://api.github.com/repos/uwdata/compassql/contents/{+path}","compare_url":"https://api.github.com/repos/uwdata/compassql/compare/{base}...{head}","merges_url":"https://api.github.com/repos/uwdata/compassql/merges","archive_url":"https://api.github.com/repos/uwdata/compassql/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/uwdata/compassql/downloads","issues_url":"https://api.github.com/repos/uwdata/compassql/issues{/number}","pulls_url":"https://api.github.com/repos/uwdata/compassql/pulls{/number}","milestones_url":"https://api.github.com/repos/uwdata/compassql/milestones{/number}","notifications_url":"https://api.github.com/repos/uwdata/compassql/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/uwdata/compassql/labels{/name}","releases_url":"https://api.github.com/repos/uwdata/compassql/releases{/id}","deployments_url":"https://api.github.com/repos/uwdata/compassql/deployments","created_at":"2016-05-13T20:01:53Z","updated_at":"2016-07-19T01:19:16Z","pushed_at":"2016-08-10T21:10:29Z","git_url":"git://github.com/uwdata/compassql.git","ssh_url":"git@github.com:uwdata/compassql.git","clone_url":"https://github.com/uwdata/compassql.git","svn_url":"https://github.com/uwdata/compassql","homepage":null,"size":1265,"stargazers_count":2,"watchers_count":2,"language":"TypeScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":57,"forks":0,"open_issues":57,"watchers":2,"default_branch":"master"}},"base":{"label":"uwdata:master","ref":"master","sha":"56f92f3c5355cb87e937977ec5ee37ccc9290b43","user":{"login":"uwdata","id":5448960,"avatar_url":"https://avatars.githubusercontent.com/u/5448960?v=3","gravatar_id":"","url":"https://api.github.com/users/uwdata","html_url":"https://github.com/uwdata","followers_url":"https://api.github.com/users/uwdata/followers","following_url":"https://api.github.com/users/uwdata/following{/other_user}","gists_url":"https://api.github.com/users/uwdata/gists{/gist_id}","starred_url":"https://api.github.com/users/uwdata/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uwdata/subscriptions","organizations_url":"https://api.github.com/users/uwdata/orgs","repos_url":"https://api.github.com/users/uwdata/repos","events_url":"https://api.github.com/users/uwdata/events{/privacy}","received_events_url":"https://api.github.com/users/uwdata/received_events","type":"Organization","site_admin":false},"repo":{"id":58768960,"name":"compassql","full_name":"uwdata/compassql","owner":{"login":"uwdata","id":5448960,"avatar_url":"https://avatars.githubusercontent.com/u/5448960?v=3","gravatar_id":"","url":"https://api.github.com/users/uwdata","html_url":"https://github.com/uwdata","followers_url":"https://api.github.com/users/uwdata/followers","following_url":"https://api.github.com/users/uwdata/following{/other_user}","gists_url":"https://api.github.com/users/uwdata/gists{/gist_id}","starred_url":"https://api.github.com/users/uwdata/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uwdata/subscriptions","organizations_url":"https://api.github.com/users/uwdata/orgs","repos_url":"https://api.github.com/users/uwdata/repos","events_url":"https://api.github.com/users/uwdata/events{/privacy}","received_events_url":"https://api.github.com/users/uwdata/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/uwdata/compassql","description":"CompassQL Query Language for visualization recommendation.","fork":false,"url":"https://api.github.com/repos/uwdata/compassql","forks_url":"https://api.github.com/repos/uwdata/compassql/forks","keys_url":"https://api.github.com/repos/uwdata/compassql/keys{/key_id}","collaborators_url":"https://api.github.com/repos/uwdata/compassql/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/uwdata/compassql/teams","hooks_url":"https://api.github.com/repos/uwdata/compassql/hooks","issue_events_url":"https://api.github.com/repos/uwdata/compassql/issues/events{/number}","events_url":"https://api.github.com/repos/uwdata/compassql/events","assignees_url":"https://api.github.com/repos/uwdata/compassql/assignees{/user}","branches_url":"https://api.github.com/repos/uwdata/compassql/branches{/branch}","tags_url":"https://api.github.com/repos/uwdata/compassql/tags","blobs_url":"https://api.github.com/repos/uwdata/compassql/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/uwdata/compassql/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/uwdata/compassql/git/refs{/sha}","trees_url":"https://api.github.com/repos/uwdata/compassql/git/trees{/sha}","statuses_url":"https://api.github.com/repos/uwdata/compassql/statuses/{sha}","languages_url":"https://api.github.com/repos/uwdata/compassql/languages","stargazers_url":"https://api.github.com/repos/uwdata/compassql/stargazers","contributors_url":"https://api.github.com/repos/uwdata/compassql/contributors","subscribers_url":"https://api.github.com/repos/uwdata/compassql/subscribers","subscription_url":"https://api.github.com/repos/uwdata/compassql/subscription","commits_url":"https://api.github.com/repos/uwdata/compassql/commits{/sha}","git_commits_url":"https://api.github.com/repos/uwdata/compassql/git/commits{/sha}","comments_url":"https://api.github.com/repos/uwdata/compassql/comments{/number}","issue_comment_url":"https://api.github.com/repos/uwdata/compassql/issues/comments{/number}","contents_url":"https://api.github.com/repos/uwdata/compassql/contents/{+path}","compare_url":"https://api.github.com/repos/uwdata/compassql/compare/{base}...{head}","merges_url":"https://api.github.com/repos/uwdata/compassql/merges","archive_url":"https://api.github.com/repos/uwdata/compassql/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/uwdata/compassql/downloads","issues_url":"https://api.github.com/repos/uwdata/compassql/issues{/number}","pulls_url":"https://api.github.com/repos/uwdata/compassql/pulls{/number}","milestones_url":"https://api.github.com/repos/uwdata/compassql/milestones{/number}","notifications_url":"https://api.github.com/repos/uwdata/compassql/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/uwdata/compassql/labels{/name}","releases_url":"https://api.github.com/repos/uwdata/compassql/releases{/id}","deployments_url":"https://api.github.com/repos/uwdata/compassql/deployments","created_at":"2016-05-13T20:01:53Z","updated_at":"2016-07-19T01:19:16Z","pushed_at":"2016-08-10T21:10:29Z","git_url":"git://github.com/uwdata/compassql.git","ssh_url":"git@github.com:uwdata/compassql.git","clone_url":"https://github.com/uwdata/compassql.git","svn_url":"https://github.com/uwdata/compassql","homepage":null,"size":1265,"stargazers_count":2,"watchers_count":2,"language":"TypeScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":57,"forks":0,"open_issues":57,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/uwdata/compassql/pulls/211"},"html":{"href":"https://github.com/uwdata/compassql/pull/211"},"issue":{"href":"https://api.github.com/repos/uwdata/compassql/issues/211"},"comments":{"href":"https://api.github.com/repos/uwdata/compassql/issues/211/comments"},"review_comments":{"href":"https://api.github.com/repos/uwdata/compassql/pulls/211/comments"},"review_comment":{"href":"https://api.github.com/repos/uwdata/compassql/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/uwdata/compassql/pulls/211/commits"},"statuses":{"href":"https://api.github.com/repos/uwdata/compassql/statuses/fa6194db7e2bd1fb7fad9e1b741f1a086c14699f"}}}}
{"actor":{"display_login":"kanitw"}}