public void fromXNode(XNode node) { setID(node.getAttributeValue("id")); setName(node.getChildText("name")); setDescription(node.getChildText("description")); setNotes(node.getChildText("notes")); XNode subNode = node.getChild("subCategories"); for (XNode subCatNode : subNode.getChildren()) { addSubCategory(new NonHumanSubCategory(subCatNode)); } }
private void storeSimpleFieldValues(NonHumanCategory category) { String name = (String) txtName.getText(); if (name.length() > 0) category.setName(name); category.setDescription((String) txtDesc.getText()); category.setNotes((String) txtNotes.getText()); }