Commit d0e2cbac authored by Hernan Ponce de Leon's avatar Hernan Ponce de Leon
Browse files

YELLOW (re-factored the method getTracesFromExternalRelSpec used in expressions)

parent 71d848ab
......@@ -28,8 +28,10 @@ import java.util.Arrays;
import java.util.Collection;
import java.util.Comparator;
import java.util.List;
import java.util.Set;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import java.util.stream.Collectors;
import org.apache.commons.lang.StringUtils;
import org.eclipse.emf.common.util.EList;
......@@ -83,7 +85,7 @@ import org.fortiss.tooling.kernel.service.ICommandStackService;
* @author mou
* @author $Author$
* @version $Rev$
* @ConQAT.Rating YELLOW Hash: 171E39E5B8EF4255D1BC5E169494A1BE
* @ConQAT.Rating YELLOW Hash: 93B0241D56993B637A04BDDEBAA4CC8C
*/
public class MiraUtils {
......@@ -1042,4 +1044,14 @@ public class MiraUtils {
}
return ts;
}
/**
* Given a list of external relation specifications, it
* returns a set with the IDs of the source requirements.
*/
public static Set<String> getTracesFromExternalRelSpec(
EList<ExternalRelationSpecification> specs) {
return specs.stream().map(e -> e.getExternalRelation().getSourceRequirement().getReqId())
.collect(Collectors.toSet());
}
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment