{"action":"created","comment":{"url":"https://api.github.com/repos/CeON/saos/pulls/comments/27290292","id":27290292,"diff_hunk":"@@ -0,0 +1,61 @@\n+package pl.edu.icm.saos.importer.notapi.common.content;\n+\n+import java.io.File;\n+import java.io.FileInputStream;\n+import java.io.IOException;\n+import java.util.zip.ZipEntry;\n+import java.util.zip.ZipInputStream;\n+\n+import org.apache.commons.io.FilenameUtils;\n+import org.apache.commons.io.IOUtils;\n+import org.springframework.stereotype.Service;\n+\n+import pl.edu.icm.saos.importer.common.ImportException;\n+\n+/**\n+ * Extractor of judgment content files\n+ * \n+ * @author madryk\n+ */\n+@Service\n+public class JudgmentContentFileExtractor {\n+    \n+\n+    /**\n+     * Extracts judgment content from archive file.\n+     * At the moment only zip files are supported.\n+     */\n+    public InputStreamWithFilename extractJudgmentContent(File archiveFile, String judgmentSourceId) {","path":"saos-import/src/main/java/pl/edu/icm/saos/importer/notapi/common/content/JudgmentContentFileExtractor.java","position":28,"original_position":28,"commit_id":"ebfb3521218426fd24d53045e1da4788c52678bd","original_commit_id":"ebfb3521218426fd24d53045e1da4788c52678bd","user":{"login":"madryk","id":8190961,"avatar_url":"https://avatars.githubusercontent.com/u/8190961?v=3","gravatar_id":"","url":"https://api.github.com/users/madryk","html_url":"https://github.com/madryk","followers_url":"https://api.github.com/users/madryk/followers","following_url":"https://api.github.com/users/madryk/following{/other_user}","gists_url":"https://api.github.com/users/madryk/gists{/gist_id}","starred_url":"https://api.github.com/users/madryk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/madryk/subscriptions","organizations_url":"https://api.github.com/users/madryk/orgs","repos_url":"https://api.github.com/users/madryk/repos","events_url":"https://api.github.com/users/madryk/events{/privacy}","received_events_url":"https://api.github.com/users/madryk/received_events","type":"User","site_admin":false},"body":":+1: ","created_at":"2015-03-27T12:15:20Z","updated_at":"2015-03-27T12:15:20Z","html_url":"https://github.com/CeON/saos/pull/624#discussion_r27290292","pull_request_url":"https://api.github.com/repos/CeON/saos/pulls/624","_links":{"self":{"href":"https://api.github.com/repos/CeON/saos/pulls/comments/27290292"},"html":{"href":"https://github.com/CeON/saos/pull/624#discussion_r27290292"},"pull_request":{"href":"https://api.github.com/repos/CeON/saos/pulls/624"}}},"pull_request":{"url":"https://api.github.com/repos/CeON/saos/pulls/624","id":31737555,"html_url":"https://github.com/CeON/saos/pull/624","diff_url":"https://github.com/CeON/saos/pull/624.diff","patch_url":"https://github.com/CeON/saos/pull/624.patch","issue_url":"https://api.github.com/repos/CeON/saos/issues/624","number":624,"state":"open","locked":false,"title":"#612. Judgment file content - import process job","user":{"login":"madryk","id":8190961,"avatar_url":"https://avatars.githubusercontent.com/u/8190961?v=3","gravatar_id":"","url":"https://api.github.com/users/madryk","html_url":"https://github.com/madryk","followers_url":"https://api.github.com/users/madryk/followers","following_url":"https://api.github.com/users/madryk/following{/other_user}","gists_url":"https://api.github.com/users/madryk/gists{/gist_id}","starred_url":"https://api.github.com/users/madryk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/madryk/subscriptions","organizations_url":"https://api.github.com/users/madryk/orgs","repos_url":"https://api.github.com/users/madryk/repos","events_url":"https://api.github.com/users/madryk/events{/privacy}","received_events_url":"https://api.github.com/users/madryk/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-03-23T14:38:18Z","updated_at":"2015-03-27T12:15:20Z","closed_at":null,"merged_at":null,"merge_commit_sha":"bff277199c6f2c374a7410c8dc0463512031402c","assignee":{"login":"madryk","id":8190961,"avatar_url":"https://avatars.githubusercontent.com/u/8190961?v=3","gravatar_id":"","url":"https://api.github.com/users/madryk","html_url":"https://github.com/madryk","followers_url":"https://api.github.com/users/madryk/followers","following_url":"https://api.github.com/users/madryk/following{/other_user}","gists_url":"https://api.github.com/users/madryk/gists{/gist_id}","starred_url":"https://api.github.com/users/madryk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/madryk/subscriptions","organizations_url":"https://api.github.com/users/madryk/orgs","repos_url":"https://api.github.com/users/madryk/repos","events_url":"https://api.github.com/users/madryk/events{/privacy}","received_events_url":"https://api.github.com/users/madryk/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/CeON/saos/pulls/624/commits","review_comments_url":"https://api.github.com/repos/CeON/saos/pulls/624/comments","review_comment_url":"https://api.github.com/repos/CeON/saos/pulls/comments{/number}","comments_url":"https://api.github.com/repos/CeON/saos/issues/624/comments","statuses_url":"https://api.github.com/repos/CeON/saos/statuses/ebfb3521218426fd24d53045e1da4788c52678bd","head":{"label":"CeON:madryk_612_judgment_content_import_process","ref":"madryk_612_judgment_content_import_process","sha":"ebfb3521218426fd24d53045e1da4788c52678bd","user":{"login":"CeON","id":2034254,"avatar_url":"https://avatars.githubusercontent.com/u/2034254?v=3","gravatar_id":"","url":"https://api.github.com/users/CeON","html_url":"https://github.com/CeON","followers_url":"https://api.github.com/users/CeON/followers","following_url":"https://api.github.com/users/CeON/following{/other_user}","gists_url":"https://api.github.com/users/CeON/gists{/gist_id}","starred_url":"https://api.github.com/users/CeON/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CeON/subscriptions","organizations_url":"https://api.github.com/users/CeON/orgs","repos_url":"https://api.github.com/users/CeON/repos","events_url":"https://api.github.com/users/CeON/events{/privacy}","received_events_url":"https://api.github.com/users/CeON/received_events","type":"Organization","site_admin":false},"repo":{"id":19143929,"name":"saos","full_name":"CeON/saos","owner":{"login":"CeON","id":2034254,"avatar_url":"https://avatars.githubusercontent.com/u/2034254?v=3","gravatar_id":"","url":"https://api.github.com/users/CeON","html_url":"https://github.com/CeON","followers_url":"https://api.github.com/users/CeON/followers","following_url":"https://api.github.com/users/CeON/following{/other_user}","gists_url":"https://api.github.com/users/CeON/gists{/gist_id}","starred_url":"https://api.github.com/users/CeON/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CeON/subscriptions","organizations_url":"https://api.github.com/users/CeON/orgs","repos_url":"https://api.github.com/users/CeON/repos","events_url":"https://api.github.com/users/CeON/events{/privacy}","received_events_url":"https://api.github.com/users/CeON/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/CeON/saos","description":"System Analizy Orzeczeń Sądowych /Court Judgement Analysis System/","fork":false,"url":"https://api.github.com/repos/CeON/saos","forks_url":"https://api.github.com/repos/CeON/saos/forks","keys_url":"https://api.github.com/repos/CeON/saos/keys{/key_id}","collaborators_url":"https://api.github.com/repos/CeON/saos/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/CeON/saos/teams","hooks_url":"https://api.github.com/repos/CeON/saos/hooks","issue_events_url":"https://api.github.com/repos/CeON/saos/issues/events{/number}","events_url":"https://api.github.com/repos/CeON/saos/events","assignees_url":"https://api.github.com/repos/CeON/saos/assignees{/user}","branches_url":"https://api.github.com/repos/CeON/saos/branches{/branch}","tags_url":"https://api.github.com/repos/CeON/saos/tags","blobs_url":"https://api.github.com/repos/CeON/saos/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/CeON/saos/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/CeON/saos/git/refs{/sha}","trees_url":"https://api.github.com/repos/CeON/saos/git/trees{/sha}","statuses_url":"https://api.github.com/repos/CeON/saos/statuses/{sha}","languages_url":"https://api.github.com/repos/CeON/saos/languages","stargazers_url":"https://api.github.com/repos/CeON/saos/stargazers","contributors_url":"https://api.github.com/repos/CeON/saos/contributors","subscribers_url":"https://api.github.com/repos/CeON/saos/subscribers","subscription_url":"https://api.github.com/repos/CeON/saos/subscription","commits_url":"https://api.github.com/repos/CeON/saos/commits{/sha}","git_commits_url":"https://api.github.com/repos/CeON/saos/git/commits{/sha}","comments_url":"https://api.github.com/repos/CeON/saos/comments{/number}","issue_comment_url":"https://api.github.com/repos/CeON/saos/issues/comments{/number}","contents_url":"https://api.github.com/repos/CeON/saos/contents/{+path}","compare_url":"https://api.github.com/repos/CeON/saos/compare/{base}...{head}","merges_url":"https://api.github.com/repos/CeON/saos/merges","archive_url":"https://api.github.com/repos/CeON/saos/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/CeON/saos/downloads","issues_url":"https://api.github.com/repos/CeON/saos/issues{/number}","pulls_url":"https://api.github.com/repos/CeON/saos/pulls{/number}","milestones_url":"https://api.github.com/repos/CeON/saos/milestones{/number}","notifications_url":"https://api.github.com/repos/CeON/saos/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/CeON/saos/labels{/name}","releases_url":"https://api.github.com/repos/CeON/saos/releases{/id}","created_at":"2014-04-25T11:33:17Z","updated_at":"2015-03-27T12:08:30Z","pushed_at":"2015-03-27T12:11:40Z","git_url":"git://github.com/CeON/saos.git","ssh_url":"git@github.com:CeON/saos.git","clone_url":"https://github.com/CeON/saos.git","svn_url":"https://github.com/CeON/saos","homepage":null,"size":18475,"stargazers_count":5,"watchers_count":5,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":30,"forks":2,"open_issues":30,"watchers":5,"default_branch":"master"}},"base":{"label":"CeON:master","ref":"master","sha":"b5b0810948a30e5f5dd4b4e8d3a7d9dd5d6c40d8","user":{"login":"CeON","id":2034254,"avatar_url":"https://avatars.githubusercontent.com/u/2034254?v=3","gravatar_id":"","url":"https://api.github.com/users/CeON","html_url":"https://github.com/CeON","followers_url":"https://api.github.com/users/CeON/followers","following_url":"https://api.github.com/users/CeON/following{/other_user}","gists_url":"https://api.github.com/users/CeON/gists{/gist_id}","starred_url":"https://api.github.com/users/CeON/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CeON/subscriptions","organizations_url":"https://api.github.com/users/CeON/orgs","repos_url":"https://api.github.com/users/CeON/repos","events_url":"https://api.github.com/users/CeON/events{/privacy}","received_events_url":"https://api.github.com/users/CeON/received_events","type":"Organization","site_admin":false},"repo":{"id":19143929,"name":"saos","full_name":"CeON/saos","owner":{"login":"CeON","id":2034254,"avatar_url":"https://avatars.githubusercontent.com/u/2034254?v=3","gravatar_id":"","url":"https://api.github.com/users/CeON","html_url":"https://github.com/CeON","followers_url":"https://api.github.com/users/CeON/followers","following_url":"https://api.github.com/users/CeON/following{/other_user}","gists_url":"https://api.github.com/users/CeON/gists{/gist_id}","starred_url":"https://api.github.com/users/CeON/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CeON/subscriptions","organizations_url":"https://api.github.com/users/CeON/orgs","repos_url":"https://api.github.com/users/CeON/repos","events_url":"https://api.github.com/users/CeON/events{/privacy}","received_events_url":"https://api.github.com/users/CeON/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/CeON/saos","description":"System Analizy Orzeczeń Sądowych /Court Judgement Analysis System/","fork":false,"url":"https://api.github.com/repos/CeON/saos","forks_url":"https://api.github.com/repos/CeON/saos/forks","keys_url":"https://api.github.com/repos/CeON/saos/keys{/key_id}","collaborators_url":"https://api.github.com/repos/CeON/saos/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/CeON/saos/teams","hooks_url":"https://api.github.com/repos/CeON/saos/hooks","issue_events_url":"https://api.github.com/repos/CeON/saos/issues/events{/number}","events_url":"https://api.github.com/repos/CeON/saos/events","assignees_url":"https://api.github.com/repos/CeON/saos/assignees{/user}","branches_url":"https://api.github.com/repos/CeON/saos/branches{/branch}","tags_url":"https://api.github.com/repos/CeON/saos/tags","blobs_url":"https://api.github.com/repos/CeON/saos/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/CeON/saos/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/CeON/saos/git/refs{/sha}","trees_url":"https://api.github.com/repos/CeON/saos/git/trees{/sha}","statuses_url":"https://api.github.com/repos/CeON/saos/statuses/{sha}","languages_url":"https://api.github.com/repos/CeON/saos/languages","stargazers_url":"https://api.github.com/repos/CeON/saos/stargazers","contributors_url":"https://api.github.com/repos/CeON/saos/contributors","subscribers_url":"https://api.github.com/repos/CeON/saos/subscribers","subscription_url":"https://api.github.com/repos/CeON/saos/subscription","commits_url":"https://api.github.com/repos/CeON/saos/commits{/sha}","git_commits_url":"https://api.github.com/repos/CeON/saos/git/commits{/sha}","comments_url":"https://api.github.com/repos/CeON/saos/comments{/number}","issue_comment_url":"https://api.github.com/repos/CeON/saos/issues/comments{/number}","contents_url":"https://api.github.com/repos/CeON/saos/contents/{+path}","compare_url":"https://api.github.com/repos/CeON/saos/compare/{base}...{head}","merges_url":"https://api.github.com/repos/CeON/saos/merges","archive_url":"https://api.github.com/repos/CeON/saos/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/CeON/saos/downloads","issues_url":"https://api.github.com/repos/CeON/saos/issues{/number}","pulls_url":"https://api.github.com/repos/CeON/saos/pulls{/number}","milestones_url":"https://api.github.com/repos/CeON/saos/milestones{/number}","notifications_url":"https://api.github.com/repos/CeON/saos/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/CeON/saos/labels{/name}","releases_url":"https://api.github.com/repos/CeON/saos/releases{/id}","created_at":"2014-04-25T11:33:17Z","updated_at":"2015-03-27T12:08:30Z","pushed_at":"2015-03-27T12:11:40Z","git_url":"git://github.com/CeON/saos.git","ssh_url":"git@github.com:CeON/saos.git","clone_url":"https://github.com/CeON/saos.git","svn_url":"https://github.com/CeON/saos","homepage":null,"size":18475,"stargazers_count":5,"watchers_count":5,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":30,"forks":2,"open_issues":30,"watchers":5,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/CeON/saos/pulls/624"},"html":{"href":"https://github.com/CeON/saos/pull/624"},"issue":{"href":"https://api.github.com/repos/CeON/saos/issues/624"},"comments":{"href":"https://api.github.com/repos/CeON/saos/issues/624/comments"},"review_comments":{"href":"https://api.github.com/repos/CeON/saos/pulls/624/comments"},"review_comment":{"href":"https://api.github.com/repos/CeON/saos/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/CeON/saos/pulls/624/commits"},"statuses":{"href":"https://api.github.com/repos/CeON/saos/statuses/ebfb3521218426fd24d53045e1da4788c52678bd"}}}}