final Element eCloud = new Element("cloud", getFeedNamespace());
final String domain = cloud.getDomain();
if (domain != null) {
eCloud.setAttribute(new Attribute("domain", domain));
}
final int port = cloud.getPort();
if (port != 0) {
eCloud.setAttribute(new Attribute("port", String.valueOf(port)));
}
final String path = cloud.getPath();
if (path != null) {
eCloud.setAttribute(new Attribute("path", path));
}
final String registerProcedure = cloud.getRegisterProcedure();
if (registerProcedure != null) {
eCloud.setAttribute(new Attribute("registerProcedure", registerProcedure));
}
final String protocol = cloud.getProtocol();
if (protocol != null) {
eCloud.setAttribute(new Attribute("protocol", protocol));
}
return eCloud;
}