{"action":"created","comment":{"url":"https://api.github.com/repos/projecthydra-labs/hydra-works/pulls/comments/35121031","id":35121031,"diff_hunk":"@@ -22,6 +22,39 @@ module CollectionBehavior\n       type [RDFVocabularies::PCDMTerms.Collection,WorksVocabularies::WorksTerms.Collection]\n       include Hydra::Works::AggregatesGenericWorks\n       include Hydra::Works::AggregatesCollections\n+      include Hydra::Works::BlockChildObjects\n+\n+      filters_association :members, as: :child_collections, condition: :works_collection?\n+      filters_association :members, as: :child_generic_works, condition: :works_generic_work?\n+    end\n+\n+    module ClassMethods\n+      def indexer\n+        Hydra::Works::CollectionIndexer\n+      end\n+    end\n+\n+    # @return [Boolean] whether this instance is a Hydra::Works Collection.\n+    def works_collection?\n+      true\n+    end\n+\n+    # @return [Boolean] whether this instance is a Hydra::Works Generic Work.\n+    def works_generic_work?\n+      false\n+    end\n+\n+    # @return [Boolean] whether this instance is a Hydra::Works Generic File.\n+    def works_generic_file?","path":"lib/hydra/works/models/concerns/collection_behavior.rb","position":27,"original_position":27,"commit_id":"341bd4bbbe09e03b7ec3463fb9d7b40cb1e1b55c","original_commit_id":"341bd4bbbe09e03b7ec3463fb9d7b40cb1e1b55c","user":{"login":"jcoyne","id":92044,"avatar_url":"https://avatars.githubusercontent.com/u/92044?v=3","gravatar_id":"","url":"https://api.github.com/users/jcoyne","html_url":"https://github.com/jcoyne","followers_url":"https://api.github.com/users/jcoyne/followers","following_url":"https://api.github.com/users/jcoyne/following{/other_user}","gists_url":"https://api.github.com/users/jcoyne/gists{/gist_id}","starred_url":"https://api.github.com/users/jcoyne/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jcoyne/subscriptions","organizations_url":"https://api.github.com/users/jcoyne/orgs","repos_url":"https://api.github.com/users/jcoyne/repos","events_url":"https://api.github.com/users/jcoyne/events{/privacy}","received_events_url":"https://api.github.com/users/jcoyne/received_events","type":"User","site_admin":false},"body":"When would this method be called?","created_at":"2015-07-21T16:11:08Z","updated_at":"2015-07-21T16:11:08Z","html_url":"https://github.com/projecthydra-labs/hydra-works/pull/161#discussion_r35121031","pull_request_url":"https://api.github.com/repos/projecthydra-labs/hydra-works/pulls/161","_links":{"self":{"href":"https://api.github.com/repos/projecthydra-labs/hydra-works/pulls/comments/35121031"},"html":{"href":"https://github.com/projecthydra-labs/hydra-works/pull/161#discussion_r35121031"},"pull_request":{"href":"https://api.github.com/repos/projecthydra-labs/hydra-works/pulls/161"}}},"pull_request":{"url":"https://api.github.com/repos/projecthydra-labs/hydra-works/pulls/161","id":40472719,"html_url":"https://github.com/projecthydra-labs/hydra-works/pull/161","diff_url":"https://github.com/projecthydra-labs/hydra-works/pull/161.diff","patch_url":"https://github.com/projecthydra-labs/hydra-works/pull/161.patch","issue_url":"https://api.github.com/repos/projecthydra-labs/hydra-works/issues/161","number":161,"state":"open","locked":false,"title":"use filters, parent/child API, indexers, deprecate services","user":{"login":"elrayle","id":6855473,"avatar_url":"https://avatars.githubusercontent.com/u/6855473?v=3","gravatar_id":"","url":"https://api.github.com/users/elrayle","html_url":"https://github.com/elrayle","followers_url":"https://api.github.com/users/elrayle/followers","following_url":"https://api.github.com/users/elrayle/following{/other_user}","gists_url":"https://api.github.com/users/elrayle/gists{/gist_id}","starred_url":"https://api.github.com/users/elrayle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elrayle/subscriptions","organizations_url":"https://api.github.com/users/elrayle/orgs","repos_url":"https://api.github.com/users/elrayle/repos","events_url":"https://api.github.com/users/elrayle/events{/privacy}","received_events_url":"https://api.github.com/users/elrayle/received_events","type":"User","site_admin":false},"body":"Change Log:\r\n* use filter associations\r\n* rework to use parent/child consistently\r\n* add indexers for collections, generic works, generic files\r\n* deprecate atomic service objects\r\n* minimal updates to tests (mostly error messages, removal of unacceptable parent tests, unnecessary save-reload)","created_at":"2015-07-21T15:49:06Z","updated_at":"2015-07-21T16:11:08Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3b643645b10aa18ba4d46d4af9cffd1b8e1ee254","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/projecthydra-labs/hydra-works/pulls/161/commits","review_comments_url":"https://api.github.com/repos/projecthydra-labs/hydra-works/pulls/161/comments","review_comment_url":"https://api.github.com/repos/projecthydra-labs/hydra-works/pulls/comments{/number}","comments_url":"https://api.github.com/repos/projecthydra-labs/hydra-works/issues/161/comments","statuses_url":"https://api.github.com/repos/projecthydra-labs/hydra-works/statuses/341bd4bbbe09e03b7ec3463fb9d7b40cb1e1b55c","head":{"label":"projecthydra-labs:fix_149_rework_parent_child","ref":"fix_149_rework_parent_child","sha":"341bd4bbbe09e03b7ec3463fb9d7b40cb1e1b55c","user":{"login":"projecthydra-labs","id":7377013,"avatar_url":"https://avatars.githubusercontent.com/u/7377013?v=3","gravatar_id":"","url":"https://api.github.com/users/projecthydra-labs","html_url":"https://github.com/projecthydra-labs","followers_url":"https://api.github.com/users/projecthydra-labs/followers","following_url":"https://api.github.com/users/projecthydra-labs/following{/other_user}","gists_url":"https://api.github.com/users/projecthydra-labs/gists{/gist_id}","starred_url":"https://api.github.com/users/projecthydra-labs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/projecthydra-labs/subscriptions","organizations_url":"https://api.github.com/users/projecthydra-labs/orgs","repos_url":"https://api.github.com/users/projecthydra-labs/repos","events_url":"https://api.github.com/users/projecthydra-labs/events{/privacy}","received_events_url":"https://api.github.com/users/projecthydra-labs/received_events","type":"Organization","site_admin":false},"repo":{"id":24871990,"name":"hydra-works","full_name":"projecthydra-labs/hydra-works","owner":{"login":"projecthydra-labs","id":7377013,"avatar_url":"https://avatars.githubusercontent.com/u/7377013?v=3","gravatar_id":"","url":"https://api.github.com/users/projecthydra-labs","html_url":"https://github.com/projecthydra-labs","followers_url":"https://api.github.com/users/projecthydra-labs/followers","following_url":"https://api.github.com/users/projecthydra-labs/following{/other_user}","gists_url":"https://api.github.com/users/projecthydra-labs/gists{/gist_id}","starred_url":"https://api.github.com/users/projecthydra-labs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/projecthydra-labs/subscriptions","organizations_url":"https://api.github.com/users/projecthydra-labs/orgs","repos_url":"https://api.github.com/users/projecthydra-labs/repos","events_url":"https://api.github.com/users/projecthydra-labs/events{/privacy}","received_events_url":"https://api.github.com/users/projecthydra-labs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/projecthydra-labs/hydra-works","description":"A base work/file/collection model for hydra.","fork":false,"url":"https://api.github.com/repos/projecthydra-labs/hydra-works","forks_url":"https://api.github.com/repos/projecthydra-labs/hydra-works/forks","keys_url":"https://api.github.com/repos/projecthydra-labs/hydra-works/keys{/key_id}","collaborators_url":"https://api.github.com/repos/projecthydra-labs/hydra-works/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/projecthydra-labs/hydra-works/teams","hooks_url":"https://api.github.com/repos/projecthydra-labs/hydra-works/hooks","issue_events_url":"https://api.github.com/repos/projecthydra-labs/hydra-works/issues/events{/number}","events_url":"https://api.github.com/repos/projecthydra-labs/hydra-works/events","assignees_url":"https://api.github.com/repos/projecthydra-labs/hydra-works/assignees{/user}","branches_url":"https://api.github.com/repos/projecthydra-labs/hydra-works/branches{/branch}","tags_url":"https://api.github.com/repos/projecthydra-labs/hydra-works/tags","blobs_url":"https://api.github.com/repos/projecthydra-labs/hydra-works/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/projecthydra-labs/hydra-works/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/projecthydra-labs/hydra-works/git/refs{/sha}","trees_url":"https://api.github.com/repos/projecthydra-labs/hydra-works/git/trees{/sha}","statuses_url":"https://api.github.com/repos/projecthydra-labs/hydra-works/statuses/{sha}","languages_url":"https://api.github.com/repos/projecthydra-labs/hydra-works/languages","stargazers_url":"https://api.github.com/repos/projecthydra-labs/hydra-works/stargazers","contributors_url":"https://api.github.com/repos/projecthydra-labs/hydra-works/contributors","subscribers_url":"https://api.github.com/repos/projecthydra-labs/hydra-works/subscribers","subscription_url":"https://api.github.com/repos/projecthydra-labs/hydra-works/subscription","commits_url":"https://api.github.com/repos/projecthydra-labs/hydra-works/commits{/sha}","git_commits_url":"https://api.github.com/repos/projecthydra-labs/hydra-works/git/commits{/sha}","comments_url":"https://api.github.com/repos/projecthydra-labs/hydra-works/comments{/number}","issue_comment_url":"https://api.github.com/repos/projecthydra-labs/hydra-works/issues/comments{/number}","contents_url":"https://api.github.com/repos/projecthydra-labs/hydra-works/contents/{+path}","compare_url":"https://api.github.com/repos/projecthydra-labs/hydra-works/compare/{base}...{head}","merges_url":"https://api.github.com/repos/projecthydra-labs/hydra-works/merges","archive_url":"https://api.github.com/repos/projecthydra-labs/hydra-works/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/projecthydra-labs/hydra-works/downloads","issues_url":"https://api.github.com/repos/projecthydra-labs/hydra-works/issues{/number}","pulls_url":"https://api.github.com/repos/projecthydra-labs/hydra-works/pulls{/number}","milestones_url":"https://api.github.com/repos/projecthydra-labs/hydra-works/milestones{/number}","notifications_url":"https://api.github.com/repos/projecthydra-labs/hydra-works/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/projecthydra-labs/hydra-works/labels{/name}","releases_url":"https://api.github.com/repos/projecthydra-labs/hydra-works/releases{/id}","created_at":"2014-10-07T01:09:07Z","updated_at":"2015-06-10T16:11:41Z","pushed_at":"2015-07-21T15:49:06Z","git_url":"git://github.com/projecthydra-labs/hydra-works.git","ssh_url":"git@github.com:projecthydra-labs/hydra-works.git","clone_url":"https://github.com/projecthydra-labs/hydra-works.git","svn_url":"https://github.com/projecthydra-labs/hydra-works","homepage":null,"size":92444,"stargazers_count":16,"watchers_count":16,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":8,"mirror_url":null,"open_issues_count":34,"forks":8,"open_issues":34,"watchers":16,"default_branch":"master"}},"base":{"label":"projecthydra-labs:master","ref":"master","sha":"fac9bc27d5100a1e5c01becf7e90973a4584c8d6","user":{"login":"projecthydra-labs","id":7377013,"avatar_url":"https://avatars.githubusercontent.com/u/7377013?v=3","gravatar_id":"","url":"https://api.github.com/users/projecthydra-labs","html_url":"https://github.com/projecthydra-labs","followers_url":"https://api.github.com/users/projecthydra-labs/followers","following_url":"https://api.github.com/users/projecthydra-labs/following{/other_user}","gists_url":"https://api.github.com/users/projecthydra-labs/gists{/gist_id}","starred_url":"https://api.github.com/users/projecthydra-labs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/projecthydra-labs/subscriptions","organizations_url":"https://api.github.com/users/projecthydra-labs/orgs","repos_url":"https://api.github.com/users/projecthydra-labs/repos","events_url":"https://api.github.com/users/projecthydra-labs/events{/privacy}","received_events_url":"https://api.github.com/users/projecthydra-labs/received_events","type":"Organization","site_admin":false},"repo":{"id":24871990,"name":"hydra-works","full_name":"projecthydra-labs/hydra-works","owner":{"login":"projecthydra-labs","id":7377013,"avatar_url":"https://avatars.githubusercontent.com/u/7377013?v=3","gravatar_id":"","url":"https://api.github.com/users/projecthydra-labs","html_url":"https://github.com/projecthydra-labs","followers_url":"https://api.github.com/users/projecthydra-labs/followers","following_url":"https://api.github.com/users/projecthydra-labs/following{/other_user}","gists_url":"https://api.github.com/users/projecthydra-labs/gists{/gist_id}","starred_url":"https://api.github.com/users/projecthydra-labs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/projecthydra-labs/subscriptions","organizations_url":"https://api.github.com/users/projecthydra-labs/orgs","repos_url":"https://api.github.com/users/projecthydra-labs/repos","events_url":"https://api.github.com/users/projecthydra-labs/events{/privacy}","received_events_url":"https://api.github.com/users/projecthydra-labs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/projecthydra-labs/hydra-works","description":"A base work/file/collection model for hydra.","fork":false,"url":"https://api.github.com/repos/projecthydra-labs/hydra-works","forks_url":"https://api.github.com/repos/projecthydra-labs/hydra-works/forks","keys_url":"https://api.github.com/repos/projecthydra-labs/hydra-works/keys{/key_id}","collaborators_url":"https://api.github.com/repos/projecthydra-labs/hydra-works/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/projecthydra-labs/hydra-works/teams","hooks_url":"https://api.github.com/repos/projecthydra-labs/hydra-works/hooks","issue_events_url":"https://api.github.com/repos/projecthydra-labs/hydra-works/issues/events{/number}","events_url":"https://api.github.com/repos/projecthydra-labs/hydra-works/events","assignees_url":"https://api.github.com/repos/projecthydra-labs/hydra-works/assignees{/user}","branches_url":"https://api.github.com/repos/projecthydra-labs/hydra-works/branches{/branch}","tags_url":"https://api.github.com/repos/projecthydra-labs/hydra-works/tags","blobs_url":"https://api.github.com/repos/projecthydra-labs/hydra-works/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/projecthydra-labs/hydra-works/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/projecthydra-labs/hydra-works/git/refs{/sha}","trees_url":"https://api.github.com/repos/projecthydra-labs/hydra-works/git/trees{/sha}","statuses_url":"https://api.github.com/repos/projecthydra-labs/hydra-works/statuses/{sha}","languages_url":"https://api.github.com/repos/projecthydra-labs/hydra-works/languages","stargazers_url":"https://api.github.com/repos/projecthydra-labs/hydra-works/stargazers","contributors_url":"https://api.github.com/repos/projecthydra-labs/hydra-works/contributors","subscribers_url":"https://api.github.com/repos/projecthydra-labs/hydra-works/subscribers","subscription_url":"https://api.github.com/repos/projecthydra-labs/hydra-works/subscription","commits_url":"https://api.github.com/repos/projecthydra-labs/hydra-works/commits{/sha}","git_commits_url":"https://api.github.com/repos/projecthydra-labs/hydra-works/git/commits{/sha}","comments_url":"https://api.github.com/repos/projecthydra-labs/hydra-works/comments{/number}","issue_comment_url":"https://api.github.com/repos/projecthydra-labs/hydra-works/issues/comments{/number}","contents_url":"https://api.github.com/repos/projecthydra-labs/hydra-works/contents/{+path}","compare_url":"https://api.github.com/repos/projecthydra-labs/hydra-works/compare/{base}...{head}","merges_url":"https://api.github.com/repos/projecthydra-labs/hydra-works/merges","archive_url":"https://api.github.com/repos/projecthydra-labs/hydra-works/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/projecthydra-labs/hydra-works/downloads","issues_url":"https://api.github.com/repos/projecthydra-labs/hydra-works/issues{/number}","pulls_url":"https://api.github.com/repos/projecthydra-labs/hydra-works/pulls{/number}","milestones_url":"https://api.github.com/repos/projecthydra-labs/hydra-works/milestones{/number}","notifications_url":"https://api.github.com/repos/projecthydra-labs/hydra-works/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/projecthydra-labs/hydra-works/labels{/name}","releases_url":"https://api.github.com/repos/projecthydra-labs/hydra-works/releases{/id}","created_at":"2014-10-07T01:09:07Z","updated_at":"2015-06-10T16:11:41Z","pushed_at":"2015-07-21T15:49:06Z","git_url":"git://github.com/projecthydra-labs/hydra-works.git","ssh_url":"git@github.com:projecthydra-labs/hydra-works.git","clone_url":"https://github.com/projecthydra-labs/hydra-works.git","svn_url":"https://github.com/projecthydra-labs/hydra-works","homepage":null,"size":92444,"stargazers_count":16,"watchers_count":16,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":8,"mirror_url":null,"open_issues_count":34,"forks":8,"open_issues":34,"watchers":16,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/projecthydra-labs/hydra-works/pulls/161"},"html":{"href":"https://github.com/projecthydra-labs/hydra-works/pull/161"},"issue":{"href":"https://api.github.com/repos/projecthydra-labs/hydra-works/issues/161"},"comments":{"href":"https://api.github.com/repos/projecthydra-labs/hydra-works/issues/161/comments"},"review_comments":{"href":"https://api.github.com/repos/projecthydra-labs/hydra-works/pulls/161/comments"},"review_comment":{"href":"https://api.github.com/repos/projecthydra-labs/hydra-works/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/projecthydra-labs/hydra-works/pulls/161/commits"},"statuses":{"href":"https://api.github.com/repos/projecthydra-labs/hydra-works/statuses/341bd4bbbe09e03b7ec3463fb9d7b40cb1e1b55c"}}}}