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