public void populateFromAttributes(Element element) { author = element.getAttribute("author").intern(); copyright = element.getAttribute("copyright").intern(); description = StringUtil.internString(UtilXml.childElementValue(element, "description")); title = element.getAttribute("title").intern(); version = element.getAttribute("version").intern(); defaultResourceName = StringUtil.internString(element.getAttribute("default-resource-name")); }
public void populateFromElements(Element element) { author = StringUtil.internString(UtilXml.childElementValue(element, "author")); copyright = StringUtil.internString(UtilXml.childElementValue(element, "copyright")); description = StringUtil.internString(UtilXml.childElementValue(element, "description")); title = StringUtil.internString(UtilXml.childElementValue(element, "title")); version = StringUtil.internString(UtilXml.childElementValue(element, "version")); defaultResourceName = StringUtil.internString(UtilXml.childElementValue(element, "default-resource-name")); }
/** XML Constructor */ public ModelIndex(ModelEntity mainEntity, Element indexElement) { super(mainEntity); this.name = UtilXml.checkEmpty(indexElement.getAttribute("name")).intern(); this.unique = "true".equals(UtilXml.checkEmpty(indexElement.getAttribute("unique"))); this.description = StringUtil.internString(UtilXml.childElementValue(indexElement, "description")); NodeList indexFieldList = indexElement.getElementsByTagName("index-field"); for (int i = 0; i < indexFieldList.getLength(); i++) { Element indexFieldElement = (Element) indexFieldList.item(i); if (indexFieldElement.getParentNode() == indexElement) { String fieldName = indexFieldElement.getAttribute("name").intern(); this.fieldNames.add(fieldName); } } }