* @version $Id: AbstractLayoutNodeSerializer.java,v 1.7 2005-07-06 18:10:49 winnetou25 Exp $
*/
public abstract class AbstractLayoutNodeSerializer implements ISerializer {
public Element serialize(Document document, Object object) {
LayoutNode layoutNode = (LayoutNode) object;
Element layoutNodeElement = getElement(document, object);
ISerializer layoutNodeSerializer = SerializerRegistry.getSerializer(LayoutNode.class);
int childCount = layoutNode.getChildCount();
for (int i=0; i<childCount; i++) {
MutableTreeNode childTreeNode = (MutableTreeNode) layoutNode.getChildAt(i);
Element element = layoutNodeSerializer.serialize(document, childTreeNode);
layoutNodeElement.appendChild(element);
}
return layoutNodeElement;