public void endElement(String uri, String name, String qName) { if (qName.equals("ID")) { // owner stuff currentOwner = new CanonicalUser(currentOrNull(currentText)); } else if (qName.equals("DisplayName")) { currentOwner.setDisplayName(currentOrNull(currentText)); } else if (qName.equals("Bucket")) { buckets.add(new BucketMetadata(currentName, currentCreationDate, currentOwner)); } else if (qName.equals("Name")) { currentName = currentOrNull(currentText); } else if (qName.equals("CreationDate")) { currentCreationDate = dateParser.iso8601DateParse(currentOrNull(currentText)); } currentText = new StringBuilder(); }
public void endElement(String uri, String name, String qName) { if (qName.equals("ID")) { // owner stuff currentOwner = new CanonicalUser(currentOrNull(currentText)); } else if (qName.equals("DisplayName")) { currentOwner.setDisplayName(currentOrNull(currentText)); } else if (qName.equals("Bucket")) { buckets.add(new BucketMetadata(currentName, currentCreationDate, currentOwner)); } else if (qName.equals("Name")) { currentName = currentOrNull(currentText); } else if (qName.equals("CreationDate")) { currentCreationDate = dateParser .iso8601DateOrSecondsDateParse(currentOrNull(currentText)); } currentText.setLength(0); }
public void endElement(String uri, String name, String qName) { if (qName.equals("ID")) { // owner stuff currentOwner = new CanonicalUser(currentOrNull(currentText)); } else if (qName.equals("DisplayName")) { currentOwner.setDisplayName(currentOrNull(currentText)); } else if (qName.equals("Bucket")) { buckets.add(new BucketMetadata(currentName, currentCreationDate, currentOwner)); } else if (qName.equals("Name")) { currentName = currentOrNull(currentText); } else if (qName.equals("CreationDate")) { currentCreationDate = dateParser.iso8601DateParse(currentOrNull(currentText)); } currentText = new StringBuilder(); }
public void endElement(String uri, String name, String qName) { if (qName.equals("ID")) { // owner stuff currentOwner = new CanonicalUser(currentOrNull(currentText)); } else if (qName.equals("DisplayName")) { currentOwner.setDisplayName(currentOrNull(currentText)); } else if (qName.equals("Bucket")) { buckets.add(new BucketMetadata(currentName, currentCreationDate, currentOwner)); } else if (qName.equals("Name")) { currentName = currentOrNull(currentText); } else if (qName.equals("CreationDate")) { currentCreationDate = dateParser .iso8601DateOrSecondsDateParse(currentOrNull(currentText)); } currentText.setLength(0); }
public void endElement(String uri, String name, String qName) { if (qName.equals("ID")) { // owner stuff currentOwner = new CanonicalUser(currentOrNull(currentText)); } else if (qName.equals("DisplayName")) { currentOwner.setDisplayName(currentOrNull(currentText)); } else if (qName.equals("Bucket")) { buckets.add(new BucketMetadata(currentName, currentCreationDate, currentOwner)); } else if (qName.equals("Name")) { currentName = currentOrNull(currentText); } else if (qName.equals("CreationDate")) { currentCreationDate = dateParser .iso8601DateOrSecondsDateParse(currentOrNull(currentText)); } currentText.setLength(0); }
public void endElement(String uri, String name, String qName) { if (qName.equals("Owner")) { CanonicalUser owner = new CanonicalUser(currentId); owner.setDisplayName(currentDisplayName); acl.setOwner(owner); } else if (qName.equals("Grantee")) { if ("AmazonCustomerByEmail".equals(currentGranteeType)) { currentGrantee = new EmailAddressGrantee(currentId); } else if ("CanonicalUser".equals(currentGranteeType)) { currentGrantee = new CanonicalUserGrantee(currentId, currentDisplayName); } else if ("Group".equals(currentGranteeType)) { currentGrantee = new GroupGrantee(URI.create(currentId)); } } else if (qName.equals("Grant")) { acl.addPermission(currentGrantee, currentPermission); } else if (qName.equals("ID") || qName.equals("EmailAddress") || qName.equals("URI")) { currentId = currentOrNull(currentText); } else if (qName.equals("DisplayName")) { currentDisplayName = currentOrNull(currentText); } else if (qName.equals("Permission")) { currentPermission = currentOrNull(currentText); } currentText = new StringBuilder(); }
public void endElement(String uri, String name, String qName) { if (qName.equals("Owner")) { CanonicalUser owner = new CanonicalUser(currentId); owner.setDisplayName(currentDisplayName); acl.setOwner(owner); } else if (qName.equals("Grantee")) { if ("AmazonCustomerByEmail".equals(currentGranteeType)) { currentGrantee = new EmailAddressGrantee(currentId); } else if ("CanonicalUser".equals(currentGranteeType)) { currentGrantee = new CanonicalUserGrantee(currentId, currentDisplayName); } else if ("Group".equals(currentGranteeType)) { currentGrantee = new GroupGrantee(URI.create(currentId)); } } else if (qName.equals("Grant")) { acl.addPermission(currentGrantee, currentPermission); } else if (qName.equals("ID") || qName.equals("EmailAddress") || qName.equals("URI")) { currentId = currentOrNull(currentText); } else if (qName.equals("DisplayName")) { currentDisplayName = currentOrNull(currentText); } else if (qName.equals("Permission")) { currentPermission = currentOrNull(currentText); } currentText = new StringBuilder(); }
public void endElement(String uri, String name, String qName) { if (qName.equals("Owner")) { CanonicalUser owner = new CanonicalUser(currentId); owner.setDisplayName(currentDisplayName); acl.setOwner(owner); } else if (qName.equals("Grantee")) { if ("AmazonCustomerByEmail".equals(currentGranteeType)) { currentGrantee = new EmailAddressGrantee(currentId); } else if ("CanonicalUser".equals(currentGranteeType)) { currentGrantee = new CanonicalUserGrantee(currentId, currentDisplayName); } else if ("Group".equals(currentGranteeType)) { currentGrantee = new GroupGrantee(URI.create(currentId)); } } else if (qName.equals("Grant")) { acl.addPermission(currentGrantee, currentPermission); } else if (qName.equals("ID") || qName.equals("EmailAddress") || qName.equals("URI")) { currentId = currentOrNull(currentText); } else if (qName.equals("DisplayName")) { currentDisplayName = currentOrNull(currentText); } else if (qName.equals("Permission")) { currentPermission = currentOrNull(currentText); } currentText.setLength(0); }
public void endElement(String uri, String name, String qName) { if (qName.equals("Owner")) { CanonicalUser owner = new CanonicalUser(currentId); owner.setDisplayName(currentDisplayName); acl.setOwner(owner); } else if (qName.equals("Grantee")) { if ("AmazonCustomerByEmail".equals(currentGranteeType)) { currentGrantee = new EmailAddressGrantee(currentId); } else if ("CanonicalUser".equals(currentGranteeType)) { currentGrantee = new CanonicalUserGrantee(currentId, currentDisplayName); } else if ("Group".equals(currentGranteeType)) { currentGrantee = new GroupGrantee(URI.create(currentId)); } } else if (qName.equals("Grant")) { acl.addPermission(currentGrantee, currentPermission); } else if (qName.equals("ID") || qName.equals("EmailAddress") || qName.equals("URI")) { currentId = currentOrNull(currentText); } else if (qName.equals("DisplayName")) { currentDisplayName = currentOrNull(currentText); } else if (qName.equals("Permission")) { currentPermission = currentOrNull(currentText); } currentText.setLength(0); }
public void endElement(String uri, String name, String qName) { if (qName.equals("Owner")) { CanonicalUser owner = new CanonicalUser(currentId); owner.setDisplayName(currentDisplayName); acl.setOwner(owner); } else if (qName.equals("Grantee")) { if ("AmazonCustomerByEmail".equals(currentGranteeType)) { currentGrantee = new EmailAddressGrantee(currentId); } else if ("CanonicalUser".equals(currentGranteeType)) { currentGrantee = new CanonicalUserGrantee(currentId, currentDisplayName); } else if ("Group".equals(currentGranteeType)) { currentGrantee = new GroupGrantee(URI.create(currentId)); } } else if (qName.equals("Grant")) { acl.addPermission(currentGrantee, currentPermission); } else if (qName.equals("ID") || qName.equals("EmailAddress") || qName.equals("URI")) { currentId = currentOrNull(currentText); } else if (qName.equals("DisplayName")) { currentDisplayName = currentOrNull(currentText); } else if (qName.equals("Permission")) { currentPermission = currentOrNull(currentText); } currentText.setLength(0); }
currentOwner = new CanonicalUser(currentOrNull(currentText)); } else if (qName.equals("DisplayName")) { currentOwner.setDisplayName(currentOrNull(currentText)); } else if (qName.equals("Key")) { // content stuff if (currentText.length() == 0) {
currentOwner = new CanonicalUser(currentOrNull(currentText)); } else if (qName.equals("DisplayName")) { currentOwner.setDisplayName(currentOrNull(currentText)); } else if (qName.equals("Key")) { // content stuff currentKey = currentOrNull(currentText);
currentOwner = new CanonicalUser(currentOrNull(currentText)); } else if (qName.equals("DisplayName")) { currentOwner.setDisplayName(currentOrNull(currentText)); } else if (qName.equals("Key")) { // content stuff if (currentText.length() == 0) {
currentOwner = new CanonicalUser(currentOrNull(currentText)); } else if (qName.equals("DisplayName")) { currentOwner.setDisplayName(currentOrNull(currentText)); } else if (qName.equals("Key")) { // content stuff if (currentText.length() == 0) {
currentOwner = new CanonicalUser(currentOrNull(currentText)); } else if (qName.equals("DisplayName")) { currentOwner.setDisplayName(currentOrNull(currentText)); } else if (qName.equals("Key")) { // content stuff currentKey = currentOrNull(currentText);
public void testCanParseListContainerResult() throws HttpException { ListBucketResponse container = runParseListContainerResult(); assert !container.isTruncated(); assert container.getName().equals("adrianjbosstest"); assert container.size() == 1; ObjectMetadata object = container.iterator().next(); assert object.getKey().equals("3366"); Date expected = new SimpleDateFormatDateService().iso8601DateParse("2009-03-12T02:00:13.000Z"); assert object.getLastModified().equals(expected) : String.format("expected %1$s, but got %1$s", expected, object .getLastModified()); assertEquals(object.getETag(), "\"9d7bb64e8e18ee34eec06dd2cf37b766\""); assert object.getContentMetadata().getContentLength() == 136; CanonicalUser owner = new CanonicalUser("e1a5f66a480ca99a4fdfe8e318c3020446c9989d7004e7778029fbcc5d990fa0"); owner.setDisplayName("ferncam"); assert object.getOwner().equals(owner); assert object.getStorageClass().equals(StorageClass.STANDARD); }
public void testCanParseListContainerResult() throws HttpException { ListBucketResponse container = runParseListContainerResult(); assert !container.isTruncated(); assert container.getName().equals("adrianjbosstest"); assert container.size() == 1; ObjectMetadata object = container.iterator().next(); assert object.getKey().equals("3366"); Date expected = new SimpleDateFormatDateService().iso8601DateParse("2009-03-12T02:00:13.000Z"); assert object.getLastModified().equals(expected) : String.format("expected %1$s, but got %2$s", expected, object .getLastModified()); assertEquals(object.getETag(), "\"9d7bb64e8e18ee34eec06dd2cf37b766\""); assert object.getContentMetadata().getContentLength() == 136; CanonicalUser owner = new CanonicalUser("e1a5f66a480ca99a4fdfe8e318c3020446c9989d7004e7778029fbcc5d990fa0"); owner.setDisplayName("ferncam"); assert object.getOwner().equals(owner); assert object.getStorageClass().equals(StorageClass.STANDARD); }