import java.io.InputStream;
import java.net.MalformedURLException;
import java.util.ArrayList;
import java.io.InputStream;
import java.net.MalformedURLException;
import java.util.ArrayList;
SimpleXML profileXml = soneXml.getNode("profile");
if (profileXml == null) {
/* TODO - mark Sone as bad. */
SimpleXML profileXml = soneXml.getNode("profile");
if (profileXml == null) {
/* TODO - mark Sone as bad. */
List<Album> topLevelAlbums = new ArrayList<Album>();
if (albumsXml != null) {
for (SimpleXML albumXml : albumsXml.getNodes("album")) {
List<Album> topLevelAlbums = new ArrayList<Album>();
if (albumsXml != null) {
for (SimpleXML albumXml : albumsXml.getNodes("album")) {
logger.log(Level.WARNING, String.format("Downloaded Sone %s contains image %s with invalid dimensions (%s, %s)!", sone, imageId, imageWidthString, imageHeightString));
return null;
}
logger.log(Level.WARNING, String.format("Downloaded Sone %s contains image %s with invalid dimensions (%s, %s)!", sone, imageId, imageWidthString, imageHeightString));
return null;
}
image = image.modify().setTitle(imageTitle).setDescription(imageDescription).update();
image = image.modify().setWidth(imageWidth).setHeight(imageHeight).update();
album.addImage(image);
image = image.modify().setTitle(imageTitle).setDescription(imageDescription).update();
image = image.modify().setWidth(imageWidth).setHeight(imageHeight).update();
album.addImage(image);