{"action":"created","issue":{"url":"https://api.github.com/repos/HydraCG/Heracles.ts/issues/34","repository_url":"https://api.github.com/repos/HydraCG/Heracles.ts","labels_url":"https://api.github.com/repos/HydraCG/Heracles.ts/issues/34/labels{/name}","comments_url":"https://api.github.com/repos/HydraCG/Heracles.ts/issues/34/comments","events_url":"https://api.github.com/repos/HydraCG/Heracles.ts/issues/34/events","html_url":"https://github.com/HydraCG/Heracles.ts/pull/34","id":313047349,"number":34,"title":"Obtaining all collection members fixing issue 33","user":{"login":"alien-mcl","id":8111925,"avatar_url":"https://avatars1.githubusercontent.com/u/8111925?v=4","gravatar_id":"","url":"https://api.github.com/users/alien-mcl","html_url":"https://github.com/alien-mcl","followers_url":"https://api.github.com/users/alien-mcl/followers","following_url":"https://api.github.com/users/alien-mcl/following{/other_user}","gists_url":"https://api.github.com/users/alien-mcl/gists{/gist_id}","starred_url":"https://api.github.com/users/alien-mcl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alien-mcl/subscriptions","organizations_url":"https://api.github.com/users/alien-mcl/orgs","repos_url":"https://api.github.com/users/alien-mcl/repos","events_url":"https://api.github.com/users/alien-mcl/events{/privacy}","received_events_url":"https://api.github.com/users/alien-mcl/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":14,"created_at":"2018-04-10T18:53:07Z","updated_at":"2018-05-16T19:13:37Z","closed_at":null,"author_association":"MEMBER","pull_request":{"url":"https://api.github.com/repos/HydraCG/Heracles.ts/pulls/34","html_url":"https://github.com/HydraCG/Heracles.ts/pull/34","diff_url":"https://github.com/HydraCG/Heracles.ts/pull/34.diff","patch_url":"https://github.com/HydraCG/Heracles.ts/pull/34.patch"},"body":"Please find the attached pull request fixing issue 33 which is related to obtaining all collection members.\n\n<!-- Reviewable:start -->\n---\nThis change is [<img src=\"https://reviewable.io/review_button.svg\" height=\"34\" align=\"absmiddle\" alt=\"Reviewable\"/>](https://reviewable.io/reviews/hydracg/heracles.ts/34)\n<!-- Reviewable:end -->\n"},"comment":{"url":"https://api.github.com/repos/HydraCG/Heracles.ts/issues/comments/389633482","html_url":"https://github.com/HydraCG/Heracles.ts/pull/34#issuecomment-389633482","issue_url":"https://api.github.com/repos/HydraCG/Heracles.ts/issues/34","id":389633482,"user":{"login":"alien-mcl","id":8111925,"avatar_url":"https://avatars1.githubusercontent.com/u/8111925?v=4","gravatar_id":"","url":"https://api.github.com/users/alien-mcl","html_url":"https://github.com/alien-mcl","followers_url":"https://api.github.com/users/alien-mcl/followers","following_url":"https://api.github.com/users/alien-mcl/following{/other_user}","gists_url":"https://api.github.com/users/alien-mcl/gists{/gist_id}","starred_url":"https://api.github.com/users/alien-mcl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alien-mcl/subscriptions","organizations_url":"https://api.github.com/users/alien-mcl/orgs","repos_url":"https://api.github.com/users/alien-mcl/repos","events_url":"https://api.github.com/users/alien-mcl/events{/privacy}","received_events_url":"https://api.github.com/users/alien-mcl/received_events","type":"User","site_admin":false},"created_at":"2018-05-16T19:13:37Z","updated_at":"2018-05-16T19:13:37Z","author_association":"MEMBER","body":"\n\n\n\nReview status: 15 of 28 files reviewed at latest revision, 10 unresolved discussions.\n\n---\n\n*[integration-tests/HydraClient.EntryPoint.spec.ts, line 163 at r2](https://reviewable.io/reviews/hydracg/heracles.ts/34#-LBHTF142lJZFvp416Wb:-LCeHc7j15tNvQwQ0tcd:b37ifzf) ([raw file](https://github.com/hydracg/heracles.ts/blob/5593d6c51ee75c2c85f197c68b16d0f55aad07ee/integration-tests/HydraClient.EntryPoint.spec.ts#L163)):*\n<details><summary><i>Previously, lanthaler (Markus Lanthaler) wrote…</i></summary><blockquote>\n\nI see. Having some form of iterator or crawler as you just implemented is the way to go then IMO.\n</blockquote></details>\n\nOK. I've introduced both, `hydra:view` mapped to `view` property and `getIterator` method to obtain the iterator.\nBTW - `hydra:view` is `hydra:Link meaning it can be obtained, but there are two issues here:\n1. IRI of that resource on the right hand side of `hydra:view` relation will be in most cases a blank node\n2. It is not the collection - dereferencing that resource is meaningles\n3. I don't expect server to provide that resource if it's not a blank node for non-RDF backends\n\n---\n\n*[integration-tests/server/api/people.jsonld, line 11 at r3](https://reviewable.io/reviews/hydracg/heracles.ts/34#-LBjnq4P0sUey7XiJKrG:-LCeKu9I5RH3C4nO2_b5:bmoiudt) ([raw file](https://github.com/hydracg/heracles.ts/blob/fd9b0cf7c22ca84f386615d6c0a16d4a5434a852/integration-tests/server/api/people.jsonld#L11)):*\n<details><summary><i>Previously, lanthaler (Markus Lanthaler) wrote…</i></summary><blockquote>\n\nCould you please give this view an `@id` so that it's clear what page this it. Same for other files.\n</blockquote></details>\n\nAnd what page is it? Do you mean `/api/people/page1`? I'm unsure if that's the case. Resource under that IRI should be a `hydra:Collection` - assigning that IRI to that view would make that resource both `hydra:Collection` and `hydra:PartialCollectionView`. I know there is no formal constraint on this, but I don't think this is a behavior we want. This would lead us to old design when `hydra:PartialCollectionView` was a `hydra:PagedCollection`.\nPlease confirm this as I hesitate to make that kind of change.\n\n---\n\n*[src/PartialCollectionCrawler.ts, line 26 at r3](https://reviewable.io/reviews/hydracg/heracles.ts/34#-LBjoG3mBlMmjYYafluZ:-LCeMIo-Ah5bZKvYH5gn:b-896fix) ([raw file](https://github.com/hydracg/heracles.ts/blob/fd9b0cf7c22ca84f386615d6c0a16d4a5434a852/src/PartialCollectionCrawler.ts#L26)):*\n<details><summary><i>Previously, lanthaler (Markus Lanthaler) wrote…</i></summary><blockquote>\n\nAs this interface is primarily used to set these options, I would change the documentation to something along the line of \"The crawling direction\", \"The maximum number of members to retrieve\", etc.\n</blockquote></details>\n\nDone.\n\n---\n\n*[src/PartialCollectionCrawler.ts, line 41 at r3](https://reviewable.io/reviews/hydracg/heracles.ts/34#-LBjocb84EKAQpbMqCtH:-LCeIcoi3SyV-ORYW1yZ:b-8i63zh) ([raw file](https://github.com/hydracg/heracles.ts/blob/fd9b0cf7c22ca84f386615d6c0a16d4a5434a852/src/PartialCollectionCrawler.ts#L41)):*\n<details><summary><i>Previously, lanthaler (Markus Lanthaler) wrote…</i></summary><blockquote>\n\nA cleaner design might be to allow direction to not only be `forward` and `backward` but also `both`.\n</blockquote></details>\n\nI was thinking about it and I don't know how it should work. Currently, if there option `rewind` is given, while forwarding, it'll get back to first page and proceed unless visited (for backward direction it will got to last page repsectively). For `both`, does it mean after reaching last page (or first for backward), it should go back to the initial page and change direction?\n\n---\n\n*[src/PartialCollectionCrawler.ts, line 70 at r3](https://reviewable.io/reviews/hydracg/heracles.ts/34#-LBjp0zi5-W2Wjg4mvNK:-LCeJITS-ML-WbfFdLK2:b-896fix) ([raw file](https://github.com/hydracg/heracles.ts/blob/fd9b0cf7c22ca84f386615d6c0a16d4a5434a852/src/PartialCollectionCrawler.ts#L70)):*\n<details><summary><i>Previously, lanthaler (Markus Lanthaler) wrote…</i></summary><blockquote>\n\nI think `getMembers` might be a more appropriate name given that it includes the members of the view that was passed to `from` and that it is possible to restrict the number of members/requests via `options`.\n</blockquote></details>\n\nDone.\n\n---\n\n*[src/PartialCollectionCrawler.ts, line 74 at r3](https://reviewable.io/reviews/hydracg/heracles.ts/34#-LBjpaRN0gCJYP78dyv5:-LCeJYrrDzypTCRHJl66:b-896fix) ([raw file](https://github.com/hydracg/heracles.ts/blob/fd9b0cf7c22ca84f386615d6c0a16d4a5434a852/src/PartialCollectionCrawler.ts#L74)):*\n<details><summary><i>Previously, lanthaler (Markus Lanthaler) wrote…</i></summary><blockquote>\n\nThis shouldn't add more members than `options.memberLimit`\n</blockquote></details>\n\nDone.\n\n---\n\n*[src/PartialCollectionCrawler.ts, line 102 at r3](https://reviewable.io/reviews/hydracg/heracles.ts/34#-LBjqAmo-fJqsq-fuR35:-LCeMLGt0H7NaO4jJJ4s:b-896fix) ([raw file](https://github.com/hydracg/heracles.ts/blob/fd9b0cf7c22ca84f386615d6c0a16d4a5434a852/src/PartialCollectionCrawler.ts#L102)):*\n<details><summary><i>Previously, lanthaler (Markus Lanthaler) wrote…</i></summary><blockquote>\n\n... again, this shouldn't add more members than the specified limit.\n</blockquote></details>\n\nDone.\n\n---\n\n\n*Comments from [Reviewable](https://reviewable.io/reviews/hydracg/heracles.ts/34)*\n<!-- Sent from Reviewable.io -->\n"}}
{"actor":{"display_login":"alien-mcl"}}