package de.renew.gui.pnml.creator;

import org.w3c.dom.Element;

import de.renew.gui.VirtualPlaceFigure;
import de.renew.gui.pnml.converter.Converter;


/**
 * @author volker
 * erstellt am Apr 30, 2004
 *
 */
public class VirtualPlaceCreator extends NodeCreator {

    /**
     * Creates a VirtualPlace, by calling the constructor of
     * the NodeCreator and adding "VirtualPlace" as the tag.
     * @param converter the converter that will convert the tag to an object
     *                  for a CPNDrawing
     */
    public VirtualPlaceCreator(Converter converter) {
        super("VirtualPlace", converter);
    }

    @Override
    protected void doCreateObject(PNMLCreator pnmlCreator, Element element) {
        int parentId = ((VirtualPlaceFigure) getFigure()).getSemanticFigure().getID();
        element.setAttribute("semanticPlaceFigure", String.valueOf(parentId));
    }
}