{"action":"created","comment":{"url":"https://api.github.com/repos/socrata/geospace/pulls/comments/25962785","id":25962785,"diff_hunk":"@@ -11,36 +11,41 @@ import java.nio.file.Files\n import java.util.zip.ZipFile\n import org.apache.commons.io.{FileUtils, FilenameUtils, IOUtils}\n \n-/** Saves the contents of a zip file in a single flattened directory\n- * and cleans up all temporary files afterwards.\n- *\n- * @constructor create a new temporary zip given the zip file as a byte array.\n- * @param compressed byte array representation of the zip file\n- */\n-class TemporaryZip(compressed: Array[Byte]) extends Closeable with Logging {\n-  require(Option(compressed).filter(_.nonEmpty).isDefined, \"Null or empty zip file\")\n+import scala.annotation.tailrec\n+\n+\n+/**\n+  * Abstract class which is responsible for creating a temporary zip file from a source\n+  * then allows you to unarchive contents and return the directory with directory structure flattened.\n+  */\n+abstract class AbstractZip(tmpDir: Option[File]) extends Closeable with Logging {\n+\n+  def this() = this(None)\n+  /** output temp file, override if declaring another directory. **/\n+\n+\n+  var tmpFile:File = {","path":"geospace-lib/src/main/scala/com/socrata/geospace/lib/shapefile/ZipUtils.scala","position":25,"original_position":25,"commit_id":"35d7f7a1810ff9f49a6f2dcf687f8ac5152c814f","original_commit_id":"35d7f7a1810ff9f49a6f2dcf687f8ac5152c814f","user":{"login":"urmilan","id":6767006,"avatar_url":"https://avatars.githubusercontent.com/u/6767006?v=3","gravatar_id":"","url":"https://api.github.com/users/urmilan","html_url":"https://github.com/urmilan","followers_url":"https://api.github.com/users/urmilan/followers","following_url":"https://api.github.com/users/urmilan/following{/other_user}","gists_url":"https://api.github.com/users/urmilan/gists{/gist_id}","starred_url":"https://api.github.com/users/urmilan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/urmilan/subscriptions","organizations_url":"https://api.github.com/users/urmilan/orgs","repos_url":"https://api.github.com/users/urmilan/repos","events_url":"https://api.github.com/users/urmilan/events{/privacy}","received_events_url":"https://api.github.com/users/urmilan/received_events","type":"User","site_admin":false},"body":"Style: add a space here after the colon","created_at":"2015-03-06T17:54:19Z","updated_at":"2015-03-06T17:54:19Z","html_url":"https://github.com/socrata/geospace/pull/43#discussion_r25962785","pull_request_url":"https://api.github.com/repos/socrata/geospace/pulls/43","_links":{"self":{"href":"https://api.github.com/repos/socrata/geospace/pulls/comments/25962785"},"html":{"href":"https://github.com/socrata/geospace/pull/43#discussion_r25962785"},"pull_request":{"href":"https://api.github.com/repos/socrata/geospace/pulls/43"}}},"pull_request":{"url":"https://api.github.com/repos/socrata/geospace/pulls/43","id":30618028,"html_url":"https://github.com/socrata/geospace/pull/43","diff_url":"https://github.com/socrata/geospace/pull/43.diff","patch_url":"https://github.com/socrata/geospace/pull/43.patch","issue_url":"https://api.github.com/repos/socrata/geospace/issues/43","number":43,"state":"open","locked":false,"title":"Some changes for use in di2","user":{"login":"AEscobarCruz","id":9326515,"avatar_url":"https://avatars.githubusercontent.com/u/9326515?v=3","gravatar_id":"","url":"https://api.github.com/users/AEscobarCruz","html_url":"https://github.com/AEscobarCruz","followers_url":"https://api.github.com/users/AEscobarCruz/followers","following_url":"https://api.github.com/users/AEscobarCruz/following{/other_user}","gists_url":"https://api.github.com/users/AEscobarCruz/gists{/gist_id}","starred_url":"https://api.github.com/users/AEscobarCruz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AEscobarCruz/subscriptions","organizations_url":"https://api.github.com/users/AEscobarCruz/orgs","repos_url":"https://api.github.com/users/AEscobarCruz/repos","events_url":"https://api.github.com/users/AEscobarCruz/events{/privacy}","received_events_url":"https://api.github.com/users/AEscobarCruz/received_events","type":"User","site_admin":false},"body":"modified temporaryZip to create the same logic for a stream and to allow... the creation of a temp zip in a temp directory. ShapeFileReader was changed to an object and a trait then used in combination to produce a SingleLayerShapeReader and a MultiLayerShapeReader that, as the name implies, can ingest a single layer, or multiple layers as needed. Although functionally simlar they will produce results slight different than each other, in part for historical reasons.\r\n\r\nadded a new test for testing multilayered shape files. ","created_at":"2015-03-06T03:16:08Z","updated_at":"2015-03-06T17:54:19Z","closed_at":null,"merged_at":null,"merge_commit_sha":"82cda1994af227ef517bca9f60cb6de76fcac9a4","assignee":{"login":"urmilan","id":6767006,"avatar_url":"https://avatars.githubusercontent.com/u/6767006?v=3","gravatar_id":"","url":"https://api.github.com/users/urmilan","html_url":"https://github.com/urmilan","followers_url":"https://api.github.com/users/urmilan/followers","following_url":"https://api.github.com/users/urmilan/following{/other_user}","gists_url":"https://api.github.com/users/urmilan/gists{/gist_id}","starred_url":"https://api.github.com/users/urmilan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/urmilan/subscriptions","organizations_url":"https://api.github.com/users/urmilan/orgs","repos_url":"https://api.github.com/users/urmilan/repos","events_url":"https://api.github.com/users/urmilan/events{/privacy}","received_events_url":"https://api.github.com/users/urmilan/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/socrata/geospace/pulls/43/commits","review_comments_url":"https://api.github.com/repos/socrata/geospace/pulls/43/comments","review_comment_url":"https://api.github.com/repos/socrata/geospace/pulls/comments{/number}","comments_url":"https://api.github.com/repos/socrata/geospace/issues/43/comments","statuses_url":"https://api.github.com/repos/socrata/geospace/statuses/35d7f7a1810ff9f49a6f2dcf687f8ac5152c814f","head":{"label":"socrata:ae_dev","ref":"ae_dev","sha":"35d7f7a1810ff9f49a6f2dcf687f8ac5152c814f","user":{"login":"socrata","id":57695,"avatar_url":"https://avatars.githubusercontent.com/u/57695?v=3","gravatar_id":"","url":"https://api.github.com/users/socrata","html_url":"https://github.com/socrata","followers_url":"https://api.github.com/users/socrata/followers","following_url":"https://api.github.com/users/socrata/following{/other_user}","gists_url":"https://api.github.com/users/socrata/gists{/gist_id}","starred_url":"https://api.github.com/users/socrata/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/socrata/subscriptions","organizations_url":"https://api.github.com/users/socrata/orgs","repos_url":"https://api.github.com/users/socrata/repos","events_url":"https://api.github.com/users/socrata/events{/privacy}","received_events_url":"https://api.github.com/users/socrata/received_events","type":"Organization","site_admin":false},"repo":{"id":20041576,"name":"geospace","full_name":"socrata/geospace","owner":{"login":"socrata","id":57695,"avatar_url":"https://avatars.githubusercontent.com/u/57695?v=3","gravatar_id":"","url":"https://api.github.com/users/socrata","html_url":"https://github.com/socrata","followers_url":"https://api.github.com/users/socrata/followers","following_url":"https://api.github.com/users/socrata/following{/other_user}","gists_url":"https://api.github.com/users/socrata/gists{/gist_id}","starred_url":"https://api.github.com/users/socrata/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/socrata/subscriptions","organizations_url":"https://api.github.com/users/socrata/orgs","repos_url":"https://api.github.com/users/socrata/repos","events_url":"https://api.github.com/users/socrata/events{/privacy}","received_events_url":"https://api.github.com/users/socrata/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/socrata/geospace","description":"Geospatial dataset microservice for Socrata SODA Server","fork":false,"url":"https://api.github.com/repos/socrata/geospace","forks_url":"https://api.github.com/repos/socrata/geospace/forks","keys_url":"https://api.github.com/repos/socrata/geospace/keys{/key_id}","collaborators_url":"https://api.github.com/repos/socrata/geospace/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/socrata/geospace/teams","hooks_url":"https://api.github.com/repos/socrata/geospace/hooks","issue_events_url":"https://api.github.com/repos/socrata/geospace/issues/events{/number}","events_url":"https://api.github.com/repos/socrata/geospace/events","assignees_url":"https://api.github.com/repos/socrata/geospace/assignees{/user}","branches_url":"https://api.github.com/repos/socrata/geospace/branches{/branch}","tags_url":"https://api.github.com/repos/socrata/geospace/tags","blobs_url":"https://api.github.com/repos/socrata/geospace/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/socrata/geospace/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/socrata/geospace/git/refs{/sha}","trees_url":"https://api.github.com/repos/socrata/geospace/git/trees{/sha}","statuses_url":"https://api.github.com/repos/socrata/geospace/statuses/{sha}","languages_url":"https://api.github.com/repos/socrata/geospace/languages","stargazers_url":"https://api.github.com/repos/socrata/geospace/stargazers","contributors_url":"https://api.github.com/repos/socrata/geospace/contributors","subscribers_url":"https://api.github.com/repos/socrata/geospace/subscribers","subscription_url":"https://api.github.com/repos/socrata/geospace/subscription","commits_url":"https://api.github.com/repos/socrata/geospace/commits{/sha}","git_commits_url":"https://api.github.com/repos/socrata/geospace/git/commits{/sha}","comments_url":"https://api.github.com/repos/socrata/geospace/comments{/number}","issue_comment_url":"https://api.github.com/repos/socrata/geospace/issues/comments{/number}","contents_url":"https://api.github.com/repos/socrata/geospace/contents/{+path}","compare_url":"https://api.github.com/repos/socrata/geospace/compare/{base}...{head}","merges_url":"https://api.github.com/repos/socrata/geospace/merges","archive_url":"https://api.github.com/repos/socrata/geospace/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/socrata/geospace/downloads","issues_url":"https://api.github.com/repos/socrata/geospace/issues{/number}","pulls_url":"https://api.github.com/repos/socrata/geospace/pulls{/number}","milestones_url":"https://api.github.com/repos/socrata/geospace/milestones{/number}","notifications_url":"https://api.github.com/repos/socrata/geospace/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/socrata/geospace/labels{/name}","releases_url":"https://api.github.com/repos/socrata/geospace/releases{/id}","created_at":"2014-05-22T00:02:28Z","updated_at":"2015-03-05T22:13:05Z","pushed_at":"2015-03-06T03:14:52Z","git_url":"git://github.com/socrata/geospace.git","ssh_url":"git@github.com:socrata/geospace.git","clone_url":"https://github.com/socrata/geospace.git","svn_url":"https://github.com/socrata/geospace","homepage":null,"size":2464,"stargazers_count":3,"watchers_count":3,"language":"Scala","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":3,"default_branch":"master"}},"base":{"label":"socrata:master","ref":"master","sha":"da28c74316c5af50b7e5d911bc22e7cc0bc5ca4f","user":{"login":"socrata","id":57695,"avatar_url":"https://avatars.githubusercontent.com/u/57695?v=3","gravatar_id":"","url":"https://api.github.com/users/socrata","html_url":"https://github.com/socrata","followers_url":"https://api.github.com/users/socrata/followers","following_url":"https://api.github.com/users/socrata/following{/other_user}","gists_url":"https://api.github.com/users/socrata/gists{/gist_id}","starred_url":"https://api.github.com/users/socrata/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/socrata/subscriptions","organizations_url":"https://api.github.com/users/socrata/orgs","repos_url":"https://api.github.com/users/socrata/repos","events_url":"https://api.github.com/users/socrata/events{/privacy}","received_events_url":"https://api.github.com/users/socrata/received_events","type":"Organization","site_admin":false},"repo":{"id":20041576,"name":"geospace","full_name":"socrata/geospace","owner":{"login":"socrata","id":57695,"avatar_url":"https://avatars.githubusercontent.com/u/57695?v=3","gravatar_id":"","url":"https://api.github.com/users/socrata","html_url":"https://github.com/socrata","followers_url":"https://api.github.com/users/socrata/followers","following_url":"https://api.github.com/users/socrata/following{/other_user}","gists_url":"https://api.github.com/users/socrata/gists{/gist_id}","starred_url":"https://api.github.com/users/socrata/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/socrata/subscriptions","organizations_url":"https://api.github.com/users/socrata/orgs","repos_url":"https://api.github.com/users/socrata/repos","events_url":"https://api.github.com/users/socrata/events{/privacy}","received_events_url":"https://api.github.com/users/socrata/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/socrata/geospace","description":"Geospatial dataset microservice for Socrata SODA Server","fork":false,"url":"https://api.github.com/repos/socrata/geospace","forks_url":"https://api.github.com/repos/socrata/geospace/forks","keys_url":"https://api.github.com/repos/socrata/geospace/keys{/key_id}","collaborators_url":"https://api.github.com/repos/socrata/geospace/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/socrata/geospace/teams","hooks_url":"https://api.github.com/repos/socrata/geospace/hooks","issue_events_url":"https://api.github.com/repos/socrata/geospace/issues/events{/number}","events_url":"https://api.github.com/repos/socrata/geospace/events","assignees_url":"https://api.github.com/repos/socrata/geospace/assignees{/user}","branches_url":"https://api.github.com/repos/socrata/geospace/branches{/branch}","tags_url":"https://api.github.com/repos/socrata/geospace/tags","blobs_url":"https://api.github.com/repos/socrata/geospace/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/socrata/geospace/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/socrata/geospace/git/refs{/sha}","trees_url":"https://api.github.com/repos/socrata/geospace/git/trees{/sha}","statuses_url":"https://api.github.com/repos/socrata/geospace/statuses/{sha}","languages_url":"https://api.github.com/repos/socrata/geospace/languages","stargazers_url":"https://api.github.com/repos/socrata/geospace/stargazers","contributors_url":"https://api.github.com/repos/socrata/geospace/contributors","subscribers_url":"https://api.github.com/repos/socrata/geospace/subscribers","subscription_url":"https://api.github.com/repos/socrata/geospace/subscription","commits_url":"https://api.github.com/repos/socrata/geospace/commits{/sha}","git_commits_url":"https://api.github.com/repos/socrata/geospace/git/commits{/sha}","comments_url":"https://api.github.com/repos/socrata/geospace/comments{/number}","issue_comment_url":"https://api.github.com/repos/socrata/geospace/issues/comments{/number}","contents_url":"https://api.github.com/repos/socrata/geospace/contents/{+path}","compare_url":"https://api.github.com/repos/socrata/geospace/compare/{base}...{head}","merges_url":"https://api.github.com/repos/socrata/geospace/merges","archive_url":"https://api.github.com/repos/socrata/geospace/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/socrata/geospace/downloads","issues_url":"https://api.github.com/repos/socrata/geospace/issues{/number}","pulls_url":"https://api.github.com/repos/socrata/geospace/pulls{/number}","milestones_url":"https://api.github.com/repos/socrata/geospace/milestones{/number}","notifications_url":"https://api.github.com/repos/socrata/geospace/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/socrata/geospace/labels{/name}","releases_url":"https://api.github.com/repos/socrata/geospace/releases{/id}","created_at":"2014-05-22T00:02:28Z","updated_at":"2015-03-05T22:13:05Z","pushed_at":"2015-03-06T03:14:52Z","git_url":"git://github.com/socrata/geospace.git","ssh_url":"git@github.com:socrata/geospace.git","clone_url":"https://github.com/socrata/geospace.git","svn_url":"https://github.com/socrata/geospace","homepage":null,"size":2464,"stargazers_count":3,"watchers_count":3,"language":"Scala","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":3,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/socrata/geospace/pulls/43"},"html":{"href":"https://github.com/socrata/geospace/pull/43"},"issue":{"href":"https://api.github.com/repos/socrata/geospace/issues/43"},"comments":{"href":"https://api.github.com/repos/socrata/geospace/issues/43/comments"},"review_comments":{"href":"https://api.github.com/repos/socrata/geospace/pulls/43/comments"},"review_comment":{"href":"https://api.github.com/repos/socrata/geospace/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/socrata/geospace/pulls/43/commits"},"statuses":{"href":"https://api.github.com/repos/socrata/geospace/statuses/35d7f7a1810ff9f49a6f2dcf687f8ac5152c814f"}}}}