// handle (required)
String handle = getHandle();
if (handle != null && handle.length() > 0) {
Element handleElement = new Element(Tags.HANDLE, Service.NAMESPACE);
Text handleText = new Text(handle);
handleElement.addContent(handleText);
weblog.addContent(handleElement);
}
// name
String name = getName();
if (name != null) {
Element nameElement = new Element(Tags.NAME, Service.NAMESPACE);
Text nameText = new Text(name);
nameElement.addContent(nameText);
weblog.addContent(nameElement);
}
// description
String desc = getDescription();
if (desc != null) {
Element descElement = new Element(Tags.DESCRIPTION, Service.NAMESPACE);
Text descText = new Text(desc);
descElement.addContent(descText);
weblog.addContent(descElement);
}
// locale
Locale locale = getLocale();
if (locale != null) {
Element localeElement = new Element(Tags.LOCALE, Service.NAMESPACE);
Text localeText = new Text(locale.toString());
localeElement.addContent(localeText);
weblog.addContent(localeElement);
}
// timezone
TimeZone tz = getTimezone();
if (tz != null) {
Element tzElement = new Element(Tags.TIMEZONE, Service.NAMESPACE);
Text tzText = new Text(tz.getID());
tzElement.addContent(tzText);
weblog.addContent(tzElement);
}
// creating user
String creator = getCreatingUser();
if (creator != null) {
Element creatorElement = new Element(Tags.CREATING_USER, Service.NAMESPACE);
Text creatorText = new Text(creator);
creatorElement.addContent(creatorText);
weblog.addContent(creatorElement);
}
// email address
String email = getEmailAddress();
if (email != null) {
Element emailElement = new Element(Tags.EMAIL_ADDRESS, Service.NAMESPACE);
Text emailText = new Text(email);
emailElement.addContent(emailText);
weblog.addContent(emailElement);
}
// creation date
Element dateCreatedElement = new Element(Tags.DATE_CREATED, Service.NAMESPACE);
Date datedCreated = getDateCreated();
if (dateCreated != null) {
Text createdText = new Text(String.valueOf(dateCreated.getTime()));
dateCreatedElement.addContent(createdText);
weblog.addContent(dateCreatedElement);
}
// APP entries URL
Element appEntriesUrlElement = new Element(Tags.APP_ENTRIES_URL, Service.NAMESPACE);
String appEntriesUrl = getAppEntriesUrl();
if (appEntriesUrl != null) {
Text appEntriesUrlText = new Text(appEntriesUrl);
appEntriesUrlElement.addContent(appEntriesUrlText);
weblog.addContent(appEntriesUrlElement);
}
// APP entries URL
Element appResourcesUrlElement = new Element(Tags.APP_RESOURCES_URL, Service.NAMESPACE);
String appResourcesUrl = getAppResourcesUrl();
if (appResourcesUrl != null) {
Text appResourcesUrlText = new Text(appResourcesUrl);
appResourcesUrlElement.addContent(appResourcesUrlText);
weblog.addContent(appResourcesUrlElement);
}
// enabled
Element enabledElement = new Element(Tags.ENABLED, Service.NAMESPACE);
Boolean enabled = getEnabled();
if (enabled != null) {
Text enabledText = new Text(getEnabled().toString());
enabledElement.addContent(enabledText);
weblog.addContent(enabledElement);
}
return doc;