import java.util.logging.Logger;
import net.pterodactylus.sone.core.Core.SoneStatus;
+import net.pterodactylus.sone.data.Client;
import net.pterodactylus.sone.data.Post;
import net.pterodactylus.sone.data.Profile;
import net.pterodactylus.sone.data.Reply;
return null;
}
+ SimpleXML clientXml = soneXml.getNode("client");
+ if (clientXml != null) {
+ String clientName = clientXml.getValue("name", null);
+ String clientVersion = clientXml.getValue("version", null);
+ if ((clientName == null) || (clientVersion == null)) {
+ logger.log(Level.WARNING, "Download Sone %s with client XML but missing name or version!", sone);
+ return null;
+ }
+ sone.setClient(new Client(clientName, clientVersion));
+ }
+
String soneRequestUri = soneXml.getValue("request-uri", null);
if (soneRequestUri != null) {
try {