/** * This is the preferred way for creating a Representation via a customized Resource serialization * * @param rootName * @param serialization */ public JdomRepresentation(String rootName, CoupleList<String, Object> serialization) { Element root = new Element(rootName); for (Couple<String, Object> couple : serialization) { Element elt = new Element(couple.getLeft()); if (couple.getRight() == null) { elt.setText(this.getEmptyValue()); } else { elt.setText(couple.getRight().toString()); } root.addContent(elt); } this.document = new Document(root); }