{"action":"created","comment":{"url":"https://api.github.com/repos/vireshjivane/ScalaXMLParserApacheSpark/pulls/comments/31922989","id":31922989,"diff_hunk":"@@ -263,4 +254,107 @@ class ScalaApplicationS3 {\n     true\n   }\n \n+  def S3ObjectWriter(bucketName: String, objectKey: String, elements: ListBuffer[ArrayBuffer[Element]]): Boolean = {\n+\n+    val elementArray = new ArrayBuffer[Element]\n+\n+    for (element <- elements) {\n+\n+      for (innerElement <- element) {\n+\n+        elementArray.append(innerElement)\n+      }\n+    }\n+    objectWriter(bucketName, objectKey, elementArray)\n+\n+    true\n+  }\n+\n+\n+  def objectWriter(bucketName: String, objectKey: String, elements: ArrayBuffer[Element]): Boolean = {\n+\n+\n+    println(\"Length => \" + elements.length)\n+\n+\n+    val temporaryFile = \"tempFile.txt\"\n+\n+    val file = new File(temporaryFile);\n+\n+    val writer = new OutputStreamWriter(new FileOutputStream(file))\n+\n+    elements.foreach({ element =>\n+\n+      val xPath = element.xpath\n+      val data = element.data\n+      val depth = element.depth\n+      var attributes = \"\"\n+\n+      if (element.attributes.length == 0) {\n+        attributes = \"\"\n+      }\n+      else {\n+\n+\n+        element.attributes.foreach {\n+\n+          attribute => attributes += attribute.attributeName + \": \" + attribute.attributeValue + \" \"\n+\n+        }\n+      }\n+      writer.write(\"xPath => \" + xPath + \", \" + \"Data => \" + data + \", \" + \"Depth => \" + depth + \", \" + \"Attributes => \" + attributes + \"\\n\");\n+    })\n+    writer.close();\n+\n+    file.deleteOnExit()\n+\n+    println(\"Calling put file object...\")\n+    putFileObjectInBucket(bucketName, objectKey, file)\n+    println(\"bucket => \" + bucketName + \" object => \" + objectKey + \" file =>\" + file.getAbsolutePath)\n+\n+    println(\"Returned from put file object...\")\n+    true\n+  }\n }\n+\n+\n+/*","path":"src/main/scala/ScalaS3Client.scala","position":150,"original_position":150,"commit_id":"368524493df825b5a52c0f139dee01b7e3292823","original_commit_id":"368524493df825b5a52c0f139dee01b7e3292823","user":{"login":"bruckhaus","id":1251008,"avatar_url":"https://avatars.githubusercontent.com/u/1251008?v=3","gravatar_id":"","url":"https://api.github.com/users/bruckhaus","html_url":"https://github.com/bruckhaus","followers_url":"https://api.github.com/users/bruckhaus/followers","following_url":"https://api.github.com/users/bruckhaus/following{/other_user}","gists_url":"https://api.github.com/users/bruckhaus/gists{/gist_id}","starred_url":"https://api.github.com/users/bruckhaus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bruckhaus/subscriptions","organizations_url":"https://api.github.com/users/bruckhaus/orgs","repos_url":"https://api.github.com/users/bruckhaus/repos","events_url":"https://api.github.com/users/bruckhaus/events{/privacy}","received_events_url":"https://api.github.com/users/bruckhaus/received_events","type":"User","site_admin":false},"body":"Don't check in commented code.","created_at":"2015-06-08T15:00:01Z","updated_at":"2015-06-08T15:00:01Z","html_url":"https://github.com/vireshjivane/ScalaXMLParserApacheSpark/pull/1#discussion_r31922989","pull_request_url":"https://api.github.com/repos/vireshjivane/ScalaXMLParserApacheSpark/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/vireshjivane/ScalaXMLParserApacheSpark/pulls/comments/31922989"},"html":{"href":"https://github.com/vireshjivane/ScalaXMLParserApacheSpark/pull/1#discussion_r31922989"},"pull_request":{"href":"https://api.github.com/repos/vireshjivane/ScalaXMLParserApacheSpark/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/vireshjivane/ScalaXMLParserApacheSpark/pulls/1","id":36865450,"html_url":"https://github.com/vireshjivane/ScalaXMLParserApacheSpark/pull/1","diff_url":"https://github.com/vireshjivane/ScalaXMLParserApacheSpark/pull/1.diff","patch_url":"https://github.com/vireshjivane/ScalaXMLParserApacheSpark/pull/1.patch","issue_url":"https://api.github.com/repos/vireshjivane/ScalaXMLParserApacheSpark/issues/1","number":1,"state":"open","locked":false,"title":"Attributes and Complex XML File Processing","user":{"login":"vireshjivane","id":8596714,"avatar_url":"https://avatars.githubusercontent.com/u/8596714?v=3","gravatar_id":"","url":"https://api.github.com/users/vireshjivane","html_url":"https://github.com/vireshjivane","followers_url":"https://api.github.com/users/vireshjivane/followers","following_url":"https://api.github.com/users/vireshjivane/following{/other_user}","gists_url":"https://api.github.com/users/vireshjivane/gists{/gist_id}","starred_url":"https://api.github.com/users/vireshjivane/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vireshjivane/subscriptions","organizations_url":"https://api.github.com/users/vireshjivane/orgs","repos_url":"https://api.github.com/users/vireshjivane/repos","events_url":"https://api.github.com/users/vireshjivane/events{/privacy}","received_events_url":"https://api.github.com/users/vireshjivane/received_events","type":"User","site_admin":false},"body":"Description on Changes in Source Code :\r\nThis is improved version of Scala based XML parser with support for attribute value processing of complex/large XML files\r\n\r\nThe code has been modified for the following: \r\n1. Fetch parent node attributes. \r\n2. Capability to parse valid XML files that are complex and are of multiple levels depth.\r\n\r\n\r\nNotes:\r\nCommit #1 [ 3832620] refers to all modifications in new version when compared to old version. \r\nCommit #2 [ 3685244 ] refers to all the additions of new files in current version.","created_at":"2015-06-03T18:56:06Z","updated_at":"2015-06-08T15:00:02Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e64a7ef227bcdbe581f4695d327360d6efc6e548","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/vireshjivane/ScalaXMLParserApacheSpark/pulls/1/commits","review_comments_url":"https://api.github.com/repos/vireshjivane/ScalaXMLParserApacheSpark/pulls/1/comments","review_comment_url":"https://api.github.com/repos/vireshjivane/ScalaXMLParserApacheSpark/pulls/comments{/number}","comments_url":"https://api.github.com/repos/vireshjivane/ScalaXMLParserApacheSpark/issues/1/comments","statuses_url":"https://api.github.com/repos/vireshjivane/ScalaXMLParserApacheSpark/statuses/368524493df825b5a52c0f139dee01b7e3292823","head":{"label":"vireshjivane:AttributesAndComplexFileProcessing","ref":"AttributesAndComplexFileProcessing","sha":"368524493df825b5a52c0f139dee01b7e3292823","user":{"login":"vireshjivane","id":8596714,"avatar_url":"https://avatars.githubusercontent.com/u/8596714?v=3","gravatar_id":"","url":"https://api.github.com/users/vireshjivane","html_url":"https://github.com/vireshjivane","followers_url":"https://api.github.com/users/vireshjivane/followers","following_url":"https://api.github.com/users/vireshjivane/following{/other_user}","gists_url":"https://api.github.com/users/vireshjivane/gists{/gist_id}","starred_url":"https://api.github.com/users/vireshjivane/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vireshjivane/subscriptions","organizations_url":"https://api.github.com/users/vireshjivane/orgs","repos_url":"https://api.github.com/users/vireshjivane/repos","events_url":"https://api.github.com/users/vireshjivane/events{/privacy}","received_events_url":"https://api.github.com/users/vireshjivane/received_events","type":"User","site_admin":false},"repo":{"id":36822828,"name":"ScalaXMLParserApacheSpark","full_name":"vireshjivane/ScalaXMLParserApacheSpark","owner":{"login":"vireshjivane","id":8596714,"avatar_url":"https://avatars.githubusercontent.com/u/8596714?v=3","gravatar_id":"","url":"https://api.github.com/users/vireshjivane","html_url":"https://github.com/vireshjivane","followers_url":"https://api.github.com/users/vireshjivane/followers","following_url":"https://api.github.com/users/vireshjivane/following{/other_user}","gists_url":"https://api.github.com/users/vireshjivane/gists{/gist_id}","starred_url":"https://api.github.com/users/vireshjivane/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vireshjivane/subscriptions","organizations_url":"https://api.github.com/users/vireshjivane/orgs","repos_url":"https://api.github.com/users/vireshjivane/repos","events_url":"https://api.github.com/users/vireshjivane/events{/privacy}","received_events_url":"https://api.github.com/users/vireshjivane/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/vireshjivane/ScalaXMLParserApacheSpark","description":"","fork":false,"url":"https://api.github.com/repos/vireshjivane/ScalaXMLParserApacheSpark","forks_url":"https://api.github.com/repos/vireshjivane/ScalaXMLParserApacheSpark/forks","keys_url":"https://api.github.com/repos/vireshjivane/ScalaXMLParserApacheSpark/keys{/key_id}","collaborators_url":"https://api.github.com/repos/vireshjivane/ScalaXMLParserApacheSpark/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/vireshjivane/ScalaXMLParserApacheSpark/teams","hooks_url":"https://api.github.com/repos/vireshjivane/ScalaXMLParserApacheSpark/hooks","issue_events_url":"https://api.github.com/repos/vireshjivane/ScalaXMLParserApacheSpark/issues/events{/number}","events_url":"https://api.github.com/repos/vireshjivane/ScalaXMLParserApacheSpark/events","assignees_url":"https://api.github.com/repos/vireshjivane/ScalaXMLParserApacheSpark/assignees{/user}","branches_url":"https://api.github.com/repos/vireshjivane/ScalaXMLParserApacheSpark/branches{/branch}","tags_url":"https://api.github.com/repos/vireshjivane/ScalaXMLParserApacheSpark/tags","blobs_url":"https://api.github.com/repos/vireshjivane/ScalaXMLParserApacheSpark/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/vireshjivane/ScalaXMLParserApacheSpark/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/vireshjivane/ScalaXMLParserApacheSpark/git/refs{/sha}","trees_url":"https://api.github.com/repos/vireshjivane/ScalaXMLParserApacheSpark/git/trees{/sha}","statuses_url":"https://api.github.com/repos/vireshjivane/ScalaXMLParserApacheSpark/statuses/{sha}","languages_url":"https://api.github.com/repos/vireshjivane/ScalaXMLParserApacheSpark/languages","stargazers_url":"https://api.github.com/repos/vireshjivane/ScalaXMLParserApacheSpark/stargazers","contributors_url":"https://api.github.com/repos/vireshjivane/ScalaXMLParserApacheSpark/contributors","subscribers_url":"https://api.github.com/repos/vireshjivane/ScalaXMLParserApacheSpark/subscribers","subscription_url":"https://api.github.com/repos/vireshjivane/ScalaXMLParserApacheSpark/subscription","commits_url":"https://api.github.com/repos/vireshjivane/ScalaXMLParserApacheSpark/commits{/sha}","git_commits_url":"https://api.github.com/repos/vireshjivane/ScalaXMLParserApacheSpark/git/commits{/sha}","comments_url":"https://api.github.com/repos/vireshjivane/ScalaXMLParserApacheSpark/comments{/number}","issue_comment_url":"https://api.github.com/repos/vireshjivane/ScalaXMLParserApacheSpark/issues/comments{/number}","contents_url":"https://api.github.com/repos/vireshjivane/ScalaXMLParserApacheSpark/contents/{+path}","compare_url":"https://api.github.com/repos/vireshjivane/ScalaXMLParserApacheSpark/compare/{base}...{head}","merges_url":"https://api.github.com/repos/vireshjivane/ScalaXMLParserApacheSpark/merges","archive_url":"https://api.github.com/repos/vireshjivane/ScalaXMLParserApacheSpark/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/vireshjivane/ScalaXMLParserApacheSpark/downloads","issues_url":"https://api.github.com/repos/vireshjivane/ScalaXMLParserApacheSpark/issues{/number}","pulls_url":"https://api.github.com/repos/vireshjivane/ScalaXMLParserApacheSpark/pulls{/number}","milestones_url":"https://api.github.com/repos/vireshjivane/ScalaXMLParserApacheSpark/milestones{/number}","notifications_url":"https://api.github.com/repos/vireshjivane/ScalaXMLParserApacheSpark/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/vireshjivane/ScalaXMLParserApacheSpark/labels{/name}","releases_url":"https://api.github.com/repos/vireshjivane/ScalaXMLParserApacheSpark/releases{/id}","created_at":"2015-06-03T18:36:06Z","updated_at":"2015-06-03T18:41:54Z","pushed_at":"2015-06-03T18:56:07Z","git_url":"git://github.com/vireshjivane/ScalaXMLParserApacheSpark.git","ssh_url":"git@github.com:vireshjivane/ScalaXMLParserApacheSpark.git","clone_url":"https://github.com/vireshjivane/ScalaXMLParserApacheSpark.git","svn_url":"https://github.com/vireshjivane/ScalaXMLParserApacheSpark","homepage":null,"size":0,"stargazers_count":0,"watchers_count":0,"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":0,"default_branch":"master"}},"base":{"label":"vireshjivane:master","ref":"master","sha":"95179366e1179b3d07bd8bb574673ea532741b72","user":{"login":"vireshjivane","id":8596714,"avatar_url":"https://avatars.githubusercontent.com/u/8596714?v=3","gravatar_id":"","url":"https://api.github.com/users/vireshjivane","html_url":"https://github.com/vireshjivane","followers_url":"https://api.github.com/users/vireshjivane/followers","following_url":"https://api.github.com/users/vireshjivane/following{/other_user}","gists_url":"https://api.github.com/users/vireshjivane/gists{/gist_id}","starred_url":"https://api.github.com/users/vireshjivane/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vireshjivane/subscriptions","organizations_url":"https://api.github.com/users/vireshjivane/orgs","repos_url":"https://api.github.com/users/vireshjivane/repos","events_url":"https://api.github.com/users/vireshjivane/events{/privacy}","received_events_url":"https://api.github.com/users/vireshjivane/received_events","type":"User","site_admin":false},"repo":{"id":36822828,"name":"ScalaXMLParserApacheSpark","full_name":"vireshjivane/ScalaXMLParserApacheSpark","owner":{"login":"vireshjivane","id":8596714,"avatar_url":"https://avatars.githubusercontent.com/u/8596714?v=3","gravatar_id":"","url":"https://api.github.com/users/vireshjivane","html_url":"https://github.com/vireshjivane","followers_url":"https://api.github.com/users/vireshjivane/followers","following_url":"https://api.github.com/users/vireshjivane/following{/other_user}","gists_url":"https://api.github.com/users/vireshjivane/gists{/gist_id}","starred_url":"https://api.github.com/users/vireshjivane/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vireshjivane/subscriptions","organizations_url":"https://api.github.com/users/vireshjivane/orgs","repos_url":"https://api.github.com/users/vireshjivane/repos","events_url":"https://api.github.com/users/vireshjivane/events{/privacy}","received_events_url":"https://api.github.com/users/vireshjivane/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/vireshjivane/ScalaXMLParserApacheSpark","description":"","fork":false,"url":"https://api.github.com/repos/vireshjivane/ScalaXMLParserApacheSpark","forks_url":"https://api.github.com/repos/vireshjivane/ScalaXMLParserApacheSpark/forks","keys_url":"https://api.github.com/repos/vireshjivane/ScalaXMLParserApacheSpark/keys{/key_id}","collaborators_url":"https://api.github.com/repos/vireshjivane/ScalaXMLParserApacheSpark/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/vireshjivane/ScalaXMLParserApacheSpark/teams","hooks_url":"https://api.github.com/repos/vireshjivane/ScalaXMLParserApacheSpark/hooks","issue_events_url":"https://api.github.com/repos/vireshjivane/ScalaXMLParserApacheSpark/issues/events{/number}","events_url":"https://api.github.com/repos/vireshjivane/ScalaXMLParserApacheSpark/events","assignees_url":"https://api.github.com/repos/vireshjivane/ScalaXMLParserApacheSpark/assignees{/user}","branches_url":"https://api.github.com/repos/vireshjivane/ScalaXMLParserApacheSpark/branches{/branch}","tags_url":"https://api.github.com/repos/vireshjivane/ScalaXMLParserApacheSpark/tags","blobs_url":"https://api.github.com/repos/vireshjivane/ScalaXMLParserApacheSpark/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/vireshjivane/ScalaXMLParserApacheSpark/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/vireshjivane/ScalaXMLParserApacheSpark/git/refs{/sha}","trees_url":"https://api.github.com/repos/vireshjivane/ScalaXMLParserApacheSpark/git/trees{/sha}","statuses_url":"https://api.github.com/repos/vireshjivane/ScalaXMLParserApacheSpark/statuses/{sha}","languages_url":"https://api.github.com/repos/vireshjivane/ScalaXMLParserApacheSpark/languages","stargazers_url":"https://api.github.com/repos/vireshjivane/ScalaXMLParserApacheSpark/stargazers","contributors_url":"https://api.github.com/repos/vireshjivane/ScalaXMLParserApacheSpark/contributors","subscribers_url":"https://api.github.com/repos/vireshjivane/ScalaXMLParserApacheSpark/subscribers","subscription_url":"https://api.github.com/repos/vireshjivane/ScalaXMLParserApacheSpark/subscription","commits_url":"https://api.github.com/repos/vireshjivane/ScalaXMLParserApacheSpark/commits{/sha}","git_commits_url":"https://api.github.com/repos/vireshjivane/ScalaXMLParserApacheSpark/git/commits{/sha}","comments_url":"https://api.github.com/repos/vireshjivane/ScalaXMLParserApacheSpark/comments{/number}","issue_comment_url":"https://api.github.com/repos/vireshjivane/ScalaXMLParserApacheSpark/issues/comments{/number}","contents_url":"https://api.github.com/repos/vireshjivane/ScalaXMLParserApacheSpark/contents/{+path}","compare_url":"https://api.github.com/repos/vireshjivane/ScalaXMLParserApacheSpark/compare/{base}...{head}","merges_url":"https://api.github.com/repos/vireshjivane/ScalaXMLParserApacheSpark/merges","archive_url":"https://api.github.com/repos/vireshjivane/ScalaXMLParserApacheSpark/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/vireshjivane/ScalaXMLParserApacheSpark/downloads","issues_url":"https://api.github.com/repos/vireshjivane/ScalaXMLParserApacheSpark/issues{/number}","pulls_url":"https://api.github.com/repos/vireshjivane/ScalaXMLParserApacheSpark/pulls{/number}","milestones_url":"https://api.github.com/repos/vireshjivane/ScalaXMLParserApacheSpark/milestones{/number}","notifications_url":"https://api.github.com/repos/vireshjivane/ScalaXMLParserApacheSpark/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/vireshjivane/ScalaXMLParserApacheSpark/labels{/name}","releases_url":"https://api.github.com/repos/vireshjivane/ScalaXMLParserApacheSpark/releases{/id}","created_at":"2015-06-03T18:36:06Z","updated_at":"2015-06-03T18:41:54Z","pushed_at":"2015-06-03T18:56:07Z","git_url":"git://github.com/vireshjivane/ScalaXMLParserApacheSpark.git","ssh_url":"git@github.com:vireshjivane/ScalaXMLParserApacheSpark.git","clone_url":"https://github.com/vireshjivane/ScalaXMLParserApacheSpark.git","svn_url":"https://github.com/vireshjivane/ScalaXMLParserApacheSpark","homepage":null,"size":0,"stargazers_count":0,"watchers_count":0,"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":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/vireshjivane/ScalaXMLParserApacheSpark/pulls/1"},"html":{"href":"https://github.com/vireshjivane/ScalaXMLParserApacheSpark/pull/1"},"issue":{"href":"https://api.github.com/repos/vireshjivane/ScalaXMLParserApacheSpark/issues/1"},"comments":{"href":"https://api.github.com/repos/vireshjivane/ScalaXMLParserApacheSpark/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/vireshjivane/ScalaXMLParserApacheSpark/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/vireshjivane/ScalaXMLParserApacheSpark/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/vireshjivane/ScalaXMLParserApacheSpark/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/vireshjivane/ScalaXMLParserApacheSpark/statuses/368524493df825b5a52c0f139dee01b7e3292823"}}}}