blob: 9443a6c8901514ee44bbd12c6ffe864db4af64f0 [file] [log] [blame]
/**
* Copyright (c) 2019 CEA LIST.
*
* All rights reserved. This program and the accompanying materials
* are the property of the CEA.
* Any use is subject to specific agreement with the CEA.
* Contributors:
*
* Gabriel Pedroza (CEA LIST) - API extensions and modifications
* Patrick Tessier (CEA LIST) - Initial API and implementation
*
*/
package org.eclipse.papyrus.pdp4eng.designer.datastrategies;
import org.eclipse.emf.common.command.Command;
import org.eclipse.emf.transaction.TransactionalEditingDomain;
import org.eclipse.papyrus.pdp4eng.designer.datastrategies.command.KAnonymityCommand;
import org.eclipse.papyrus.pdp4eng.designer.engine.api.IStrategy;
import org.eclipse.uml2.uml.Element;
public class KanonymityStrategy implements IStrategy {
@Override
public String getName() {
return "K Anonymity Strategy";
}
@Override
public String getGoal() {
return "Apply K-anonymity algorithm";
}
@Override
public boolean canBeApplied(Element element) {
if( element instanceof org.eclipse.uml2.uml.NamedElement) {return true;}
return false;
}
@Override
public Command getCommand(Element element, TransactionalEditingDomain domain) {
// TODO Auto-generated method stub
return new KAnonymityCommand(domain, element);
}
}