/*
 * Created on 13.01.2004
 *
 * To change the template for this generated file go to
 * Window>Preferences>Java>Code Generation>Code and Comments
 */
package CH.ifa.draw.io.importFormats;

import de.renew.draw.ui.ontology.AbstractCommand;


/**
 * To change the template for this generated type comment go to
 * Window>Preferences>Java>Code Generation>Code and Comments
 *
 * @author 9tell
 * @deprecated This class is not to be used anymore and will later be removed.
 */
@Deprecated(since = "5.0", forRemoval = true)
@SuppressWarnings("removal")
public abstract class ImportFormatCommand extends AbstractCommand {
    // Attributes
    // The ImportFormat
    private ImportFormat _format;

    /**
     * Constructs Import format command with a given import format.
     * @param format the given import format
     */
    public ImportFormatCommand(ImportFormat format) {
        super(format.formatName());
        setFormat(format);
    }

    // Methods


    /**
     * Returns the FormatId.
     * @ensure result != null.
     * @return FormatId the formatId.
     */
    public ImportFormat format() {
        ImportFormat result = null;
        result = _format;
        assert (result != null) : "Failure in GuiPlugin.FormatCommand: result == null";
        return result;
    }

    /**
     * Sets _formatId to formatId.
     * @ensure formatId() != null.
     * @param format the value to be set.
     */
    private void setFormat(ImportFormat format) {
        _format = format;
        assert (format() != null) : "Failure in GuiPlugin.FormatCommand: formatId() == null";
    }
}