/** * Returns the {@code AtomConst} represented by {@code argElement}. * * @param argElement an {@code Element} produced by {@code serialize(Document)} * @return the {@code AtomConst} represented by {@code argElement} * @throws XMLParseException * @throws UnsupportedTypeException */ public static AtomConst deserialize(Element argElement) throws XMLParseException, UnsupportedTypeException { String value = DomUtils.getChildElementByName(argElement, "value").getTextContent(); AtomConst a = new AtomConst("null".equals(value) ? null : value); setDeserializeType(argElement, a); return a; }
@Override public Element serialize(Document doc) { Element result = super.serialize(doc); result.setAttribute("type", "const"); // It looks like _vaule is always a String? DomUtils.addChildWithText(doc, result, "value", _value == null ? "null" : _value.toString()); return result; }