return;
}
// Create node
NamespaceHelper helper = new NamespaceHelper(NAMESPACE_URI, "", document);
Element child = helper.createElement(SiteTreeNodeImpl.NODE_NAME);
child.setAttribute(SiteTreeNodeImpl.ID_ATTRIBUTE_NAME, id);
if (visibleInNav) {
child.setAttribute(SiteTreeNodeImpl.VISIBLEINNAV_ATTRIBUTE_NAME, "true");
} else {
child.setAttribute(SiteTreeNodeImpl.VISIBLEINNAV_ATTRIBUTE_NAME, "false");
}
if ((href != null) && (href.length() > 0)) {
child.setAttribute(SiteTreeNodeImpl.HREF_ATTRIBUTE_NAME, href);
}
if ((suffix != null) && (suffix.length() > 0)) {
child.setAttribute(SiteTreeNodeImpl.SUFFIX_ATTRIBUTE_NAME, suffix);
}
if (link) {
child.setAttribute(SiteTreeNodeImpl.LINK_ATTRIBUTE_NAME, "true");
}
for (int i = 0; i < labels.length; i++) {
String labelName = labels[i].getLabel();
Element label = helper.createElement(SiteTreeNodeImpl.LABEL_NAME, labelName);
String labelLanguage = labels[i].getLanguage();
if ((labelLanguage != null) && (labelLanguage.length() > 0)) {
label.setAttribute(SiteTreeNodeImpl.LANGUAGE_ATTRIBUTE_NAME, labelLanguage);
}