GitHub PullRequestReviewCommentEvent at 2014-07-25 11:09:43
Repository: atlas
Actor: maxtomassi
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/atlasapi/atlas/pulls/comments/15395859","id":15395859,"diff_hunk":"@@ -0,0 +1,121 @@\n+package org.atlasapi.remotesite.btvod;\n+\n+import static com.google.common.base.Preconditions.checkNotNull;\n+\n+import java.util.Map;\n+\n+import org.atlasapi.media.entity.Container;\n+import org.atlasapi.media.entity.Identified;\n+import org.atlasapi.media.entity.ParentRef;\n+import org.atlasapi.media.entity.Publisher;\n+import org.atlasapi.media.entity.Series;\n+import org.atlasapi.persistence.content.ContentResolver;\n+import org.atlasapi.persistence.content.ContentWriter;\n+import org.atlasapi.remotesite.ContentMerger;\n+import org.atlasapi.remotesite.ContentMerger.MergeStrategy;\n+import org.atlasapi.remotesite.btvod.BtVodData.BtVodDataRow;\n+import org.slf4j.Logger;\n+import org.slf4j.LoggerFactory;\n+\n+import com.google.common.collect.ImmutableSet;\n+import com.google.common.collect.Maps;\n+import com.metabroadcast.common.base.Maybe;\n+import com.metabroadcast.common.scheduling.UpdateProgress;\n+\n+\n+public class BtVodSeriesExtractor implements BtVodDataProcessor<UpdateProgress>{\n+\n+    private static final Logger log = LoggerFactory.getLogger(BtVodSeriesExtractor.class);\n+    \n+    private final ContentWriter writer;\n+    private final ContentResolver resolver;\n+    private final BtVodBrandExtractor brandExtractor;\n+    private final Publisher publisher;\n+    private final String uriPrefix;\n+    private final ContentMerger contentMerger;\n+    private final Map<String, ParentRef> processedSeries = Maps.newHashMap();\n+    private final BtVodContentListener listener;\n+    private UpdateProgress progress = UpdateProgress.START;\n+\n+    public BtVodSeriesExtractor(ContentWriter writer, ContentResolver resolver,\n+            BtVodBrandExtractor brandExtractor, Publisher publisher, \n+            String uriPrefix, BtVodContentListener listener) {\n+        this.listener = checkNotNull(listener);\n+        this.writer = checkNotNull(writer);\n+        this.resolver = checkNotNull(resolver);\n+        this.brandExtractor = checkNotNull(brandExtractor);\n+        this.publisher = checkNotNull(publisher);\n+        this.uriPrefix = checkNotNull(uriPrefix);\n+        this.contentMerger = new ContentMerger(MergeStrategy.REPLACE);\n+    }\n+    \n+    @Override\n+    public boolean process(BtVodDataRow row) {\n+        UpdateProgress thisProgress = UpdateProgress.FAILURE;\n+        try {\n+            if (!\"Y\".equals(row.getColumnValue(BtVodFileColumn.IS_SERIES))) {","path":"src/main/java/org/atlasapi/remotesite/btvod/BtVodSeriesExtractor.java","position":56,"original_position":56,"commit_id":"5545b799651ca2dbf5be538ccaa0eb87d8fb72d7","original_commit_id":"5545b799651ca2dbf5be538ccaa0eb87d8fb72d7","user":{"login":"maxtomassi","id":1065561,"avatar_url":"https://avatars.githubusercontent.com/u/1065561?","gravatar_id":"5475add1aed447e2d24e24815e1fbdca","url":"https://api.github.com/users/maxtomassi","html_url":"https://github.com/maxtomassi","followers_url":"https://api.github.com/users/maxtomassi/followers","following_url":"https://api.github.com/users/maxtomassi/following{/other_user}","gists_url":"https://api.github.com/users/maxtomassi/gists{/gist_id}","starred_url":"https://api.github.com/users/maxtomassi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maxtomassi/subscriptions","organizations_url":"https://api.github.com/users/maxtomassi/orgs","repos_url":"https://api.github.com/users/maxtomassi/repos","events_url":"https://api.github.com/users/maxtomassi/events{/privacy}","received_events_url":"https://api.github.com/users/maxtomassi/received_events","type":"User","site_admin":false},"body":"it would be nice for BtVodDataRow to have an isSeries method that incapsulate these details","created_at":"2014-07-25T11:09:43Z","updated_at":"2014-07-25T11:09:43Z","html_url":"https://github.com/atlasapi/atlas/pull/523#discussion_r15395859","pull_request_url":"https://api.github.com/repos/atlasapi/atlas/pulls/523","_links":{"self":{"href":"https://api.github.com/repos/atlasapi/atlas/pulls/comments/15395859"},"html":{"href":"https://github.com/atlasapi/atlas/pull/523#discussion_r15395859"},"pull_request":{"href":"https://api.github.com/repos/atlasapi/atlas/pulls/523"}}},"pull_request":{"url":"https://api.github.com/repos/atlasapi/atlas/pulls/523","id":18884202,"html_url":"https://github.com/atlasapi/atlas/pull/523","diff_url":"https://github.com/atlasapi/atlas/pull/523.diff","patch_url":"https://github.com/atlasapi/atlas/pull/523.patch","issue_url":"https://api.github.com/repos/atlasapi/atlas/issues/523","number":523,"state":"open","title":"BT VOD ingest","user":{"login":"tfm","id":747291,"avatar_url":"https://avatars.githubusercontent.com/u/747291?","gravatar_id":"b31d61df5602c336dde515ef8edbaa4b","url":"https://api.github.com/users/tfm","html_url":"https://github.com/tfm","followers_url":"https://api.github.com/users/tfm/followers","following_url":"https://api.github.com/users/tfm/following{/other_user}","gists_url":"https://api.github.com/users/tfm/gists{/gist_id}","starred_url":"https://api.github.com/users/tfm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tfm/subscriptions","organizations_url":"https://api.github.com/users/tfm/orgs","repos_url":"https://api.github.com/users/tfm/repos","events_url":"https://api.github.com/users/tfm/events{/privacy}","received_events_url":"https://api.github.com/users/tfm/received_events","type":"User","site_admin":false},"body":"","created_at":"2014-07-25T08:46:21Z","updated_at":"2014-07-25T11:09:43Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/atlasapi/atlas/pulls/523/commits","review_comments_url":"https://api.github.com/repos/atlasapi/atlas/pulls/523/comments","review_comment_url":"https://api.github.com/repos/atlasapi/atlas/pulls/comments/{number}","comments_url":"https://api.github.com/repos/atlasapi/atlas/issues/523/comments","statuses_url":"https://api.github.com/repos/atlasapi/atlas/statuses/5545b799651ca2dbf5be538ccaa0eb87d8fb72d7","head":{"label":"atlasapi:mbst-9059-bt-vod-ingest","ref":"mbst-9059-bt-vod-ingest","sha":"5545b799651ca2dbf5be538ccaa0eb87d8fb72d7","user":{"login":"atlasapi","id":325129,"avatar_url":"https://avatars.githubusercontent.com/u/325129?","gravatar_id":"b82fa5c8dc23a9adc392df95ed5faa30","url":"https://api.github.com/users/atlasapi","html_url":"https://github.com/atlasapi","followers_url":"https://api.github.com/users/atlasapi/followers","following_url":"https://api.github.com/users/atlasapi/following{/other_user}","gists_url":"https://api.github.com/users/atlasapi/gists{/gist_id}","starred_url":"https://api.github.com/users/atlasapi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/atlasapi/subscriptions","organizations_url":"https://api.github.com/users/atlasapi/orgs","repos_url":"https://api.github.com/users/atlasapi/repos","events_url":"https://api.github.com/users/atlasapi/events{/privacy}","received_events_url":"https://api.github.com/users/atlasapi/received_events","type":"Organization","site_admin":false},"repo":{"id":762119,"name":"atlas","full_name":"atlasapi/atlas","owner":{"login":"atlasapi","id":325129,"avatar_url":"https://avatars.githubusercontent.com/u/325129?","gravatar_id":"b82fa5c8dc23a9adc392df95ed5faa30","url":"https://api.github.com/users/atlasapi","html_url":"https://github.com/atlasapi","followers_url":"https://api.github.com/users/atlasapi/followers","following_url":"https://api.github.com/users/atlasapi/following{/other_user}","gists_url":"https://api.github.com/users/atlasapi/gists{/gist_id}","starred_url":"https://api.github.com/users/atlasapi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/atlasapi/subscriptions","organizations_url":"https://api.github.com/users/atlasapi/orgs","repos_url":"https://api.github.com/users/atlasapi/repos","events_url":"https://api.github.com/users/atlasapi/events{/privacy}","received_events_url":"https://api.github.com/users/atlasapi/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/atlasapi/atlas","description":"the global video & audio index","fork":false,"url":"https://api.github.com/repos/atlasapi/atlas","forks_url":"https://api.github.com/repos/atlasapi/atlas/forks","keys_url":"https://api.github.com/repos/atlasapi/atlas/keys{/key_id}","collaborators_url":"https://api.github.com/repos/atlasapi/atlas/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/atlasapi/atlas/teams","hooks_url":"https://api.github.com/repos/atlasapi/atlas/hooks","issue_events_url":"https://api.github.com/repos/atlasapi/atlas/issues/events{/number}","events_url":"https://api.github.com/repos/atlasapi/atlas/events","assignees_url":"https://api.github.com/repos/atlasapi/atlas/assignees{/user}","branches_url":"https://api.github.com/repos/atlasapi/atlas/branches{/branch}","tags_url":"https://api.github.com/repos/atlasapi/atlas/tags","blobs_url":"https://api.github.com/repos/atlasapi/atlas/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/atlasapi/atlas/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/atlasapi/atlas/git/refs{/sha}","trees_url":"https://api.github.com/repos/atlasapi/atlas/git/trees{/sha}","statuses_url":"https://api.github.com/repos/atlasapi/atlas/statuses/{sha}","languages_url":"https://api.github.com/repos/atlasapi/atlas/languages","stargazers_url":"https://api.github.com/repos/atlasapi/atlas/stargazers","contributors_url":"https://api.github.com/repos/atlasapi/atlas/contributors","subscribers_url":"https://api.github.com/repos/atlasapi/atlas/subscribers","subscription_url":"https://api.github.com/repos/atlasapi/atlas/subscription","commits_url":"https://api.github.com/repos/atlasapi/atlas/commits{/sha}","git_commits_url":"https://api.github.com/repos/atlasapi/atlas/git/commits{/sha}","comments_url":"https://api.github.com/repos/atlasapi/atlas/comments{/number}","issue_comment_url":"https://api.github.com/repos/atlasapi/atlas/issues/comments/{number}","contents_url":"https://api.github.com/repos/atlasapi/atlas/contents/{+path}","compare_url":"https://api.github.com/repos/atlasapi/atlas/compare/{base}...{head}","merges_url":"https://api.github.com/repos/atlasapi/atlas/merges","archive_url":"https://api.github.com/repos/atlasapi/atlas/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/atlasapi/atlas/downloads","issues_url":"https://api.github.com/repos/atlasapi/atlas/issues{/number}","pulls_url":"https://api.github.com/repos/atlasapi/atlas/pulls{/number}","milestones_url":"https://api.github.com/repos/atlasapi/atlas/milestones{/number}","notifications_url":"https://api.github.com/repos/atlasapi/atlas/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/atlasapi/atlas/labels{/name}","releases_url":"https://api.github.com/repos/atlasapi/atlas/releases{/id}","created_at":"2010-07-07T16:28:33Z","updated_at":"2014-07-02T07:27:09Z","pushed_at":"2014-07-25T08:45:30Z","git_url":"git://github.com/atlasapi/atlas.git","ssh_url":"git@github.com:atlasapi/atlas.git","clone_url":"https://github.com/atlasapi/atlas.git","svn_url":"https://github.com/atlasapi/atlas","homepage":"http://atlas.metabroadcast.com/","size":28863,"stargazers_count":21,"watchers_count":21,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"forks_count":5,"mirror_url":null,"open_issues_count":21,"forks":5,"open_issues":21,"watchers":21,"default_branch":"master"}},"base":{"label":"atlasapi:master","ref":"master","sha":"ee417b8b3b046c2fb9d10861a53fc57baef1dc9e","user":{"login":"atlasapi","id":325129,"avatar_url":"https://avatars.githubusercontent.com/u/325129?","gravatar_id":"b82fa5c8dc23a9adc392df95ed5faa30","url":"https://api.github.com/users/atlasapi","html_url":"https://github.com/atlasapi","followers_url":"https://api.github.com/users/atlasapi/followers","following_url":"https://api.github.com/users/atlasapi/following{/other_user}","gists_url":"https://api.github.com/users/atlasapi/gists{/gist_id}","starred_url":"https://api.github.com/users/atlasapi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/atlasapi/subscriptions","organizations_url":"https://api.github.com/users/atlasapi/orgs","repos_url":"https://api.github.com/users/atlasapi/repos","events_url":"https://api.github.com/users/atlasapi/events{/privacy}","received_events_url":"https://api.github.com/users/atlasapi/received_events","type":"Organization","site_admin":false},"repo":{"id":762119,"name":"atlas","full_name":"atlasapi/atlas","owner":{"login":"atlasapi","id":325129,"avatar_url":"https://avatars.githubusercontent.com/u/325129?","gravatar_id":"b82fa5c8dc23a9adc392df95ed5faa30","url":"https://api.github.com/users/atlasapi","html_url":"https://github.com/atlasapi","followers_url":"https://api.github.com/users/atlasapi/followers","following_url":"https://api.github.com/users/atlasapi/following{/other_user}","gists_url":"https://api.github.com/users/atlasapi/gists{/gist_id}","starred_url":"https://api.github.com/users/atlasapi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/atlasapi/subscriptions","organizations_url":"https://api.github.com/users/atlasapi/orgs","repos_url":"https://api.github.com/users/atlasapi/repos","events_url":"https://api.github.com/users/atlasapi/events{/privacy}","received_events_url":"https://api.github.com/users/atlasapi/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/atlasapi/atlas","description":"the global video & audio index","fork":false,"url":"https://api.github.com/repos/atlasapi/atlas","forks_url":"https://api.github.com/repos/atlasapi/atlas/forks","keys_url":"https://api.github.com/repos/atlasapi/atlas/keys{/key_id}","collaborators_url":"https://api.github.com/repos/atlasapi/atlas/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/atlasapi/atlas/teams","hooks_url":"https://api.github.com/repos/atlasapi/atlas/hooks","issue_events_url":"https://api.github.com/repos/atlasapi/atlas/issues/events{/number}","events_url":"https://api.github.com/repos/atlasapi/atlas/events","assignees_url":"https://api.github.com/repos/atlasapi/atlas/assignees{/user}","branches_url":"https://api.github.com/repos/atlasapi/atlas/branches{/branch}","tags_url":"https://api.github.com/repos/atlasapi/atlas/tags","blobs_url":"https://api.github.com/repos/atlasapi/atlas/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/atlasapi/atlas/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/atlasapi/atlas/git/refs{/sha}","trees_url":"https://api.github.com/repos/atlasapi/atlas/git/trees{/sha}","statuses_url":"https://api.github.com/repos/atlasapi/atlas/statuses/{sha}","languages_url":"https://api.github.com/repos/atlasapi/atlas/languages","stargazers_url":"https://api.github.com/repos/atlasapi/atlas/stargazers","contributors_url":"https://api.github.com/repos/atlasapi/atlas/contributors","subscribers_url":"https://api.github.com/repos/atlasapi/atlas/subscribers","subscription_url":"https://api.github.com/repos/atlasapi/atlas/subscription","commits_url":"https://api.github.com/repos/atlasapi/atlas/commits{/sha}","git_commits_url":"https://api.github.com/repos/atlasapi/atlas/git/commits{/sha}","comments_url":"https://api.github.com/repos/atlasapi/atlas/comments{/number}","issue_comment_url":"https://api.github.com/repos/atlasapi/atlas/issues/comments/{number}","contents_url":"https://api.github.com/repos/atlasapi/atlas/contents/{+path}","compare_url":"https://api.github.com/repos/atlasapi/atlas/compare/{base}...{head}","merges_url":"https://api.github.com/repos/atlasapi/atlas/merges","archive_url":"https://api.github.com/repos/atlasapi/atlas/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/atlasapi/atlas/downloads","issues_url":"https://api.github.com/repos/atlasapi/atlas/issues{/number}","pulls_url":"https://api.github.com/repos/atlasapi/atlas/pulls{/number}","milestones_url":"https://api.github.com/repos/atlasapi/atlas/milestones{/number}","notifications_url":"https://api.github.com/repos/atlasapi/atlas/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/atlasapi/atlas/labels{/name}","releases_url":"https://api.github.com/repos/atlasapi/atlas/releases{/id}","created_at":"2010-07-07T16:28:33Z","updated_at":"2014-07-02T07:27:09Z","pushed_at":"2014-07-25T08:45:30Z","git_url":"git://github.com/atlasapi/atlas.git","ssh_url":"git@github.com:atlasapi/atlas.git","clone_url":"https://github.com/atlasapi/atlas.git","svn_url":"https://github.com/atlasapi/atlas","homepage":"http://atlas.metabroadcast.com/","size":28863,"stargazers_count":21,"watchers_count":21,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"forks_count":5,"mirror_url":null,"open_issues_count":21,"forks":5,"open_issues":21,"watchers":21,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/atlasapi/atlas/pulls/523"},"html":{"href":"https://github.com/atlasapi/atlas/pull/523"},"issue":{"href":"https://api.github.com/repos/atlasapi/atlas/issues/523"},"comments":{"href":"https://api.github.com/repos/atlasapi/atlas/issues/523/comments"},"review_comments":{"href":"https://api.github.com/repos/atlasapi/atlas/pulls/523/comments"},"review_comment":{"href":"https://api.github.com/repos/atlasapi/atlas/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/atlasapi/atlas/pulls/523/commits"},"statuses":{"href":"https://api.github.com/repos/atlasapi/atlas/statuses/5545b799651ca2dbf5be538ccaa0eb87d8fb72d7"}}}}