001package org.biopax.paxtools.command; 002 003import org.biopax.paxtools.model.BioPAXElement; 004import org.biopax.paxtools.model.Model; 005 006import java.util.Set; 007 008/** 009 */ 010public class AddCommand extends AbstractAddRemoveCommand 011{ 012 013 public AddCommand(Model model, Set<BioPAXElement> bpes) 014 { 015 super(model, bpes); 016 } 017 018 @Override 019 protected void undoAction(BioPAXElement bpe) 020 { 021 model.remove(bpe); 022 } 023 024 @Override 025 protected void redoAction(BioPAXElement bpe) 026 { 027 model.add(bpe); 028 029 } 030 031 032 public String getPresentationName() 033 { 034 return "Add objects to model"; 035 } 036 037 public String getUndoPresentationName() 038 { 039 return "Remove objects from model"; 040 } 041 042 public String getRedoPresentationName() 043 { 044 return "Readd objects to the model"; 045 } 046 047 048}