use of org.eclipse.winery.topologygraph.matching.patterndetection.ToscaComponentPatternMatcher in project winery by eclipse.
the class ComponentPatternDetectionTest method isCompatible.
private boolean isCompatible(OTPatternRefinementModel prm, List<OTRefinementModel> refinementModels) {
ToscaComponentPatternMatcher matcher = new ToscaComponentPatternMatcher(prm, null, refinementModels, new HashMap<>());
ToscaIsomorphismMatcher isomorphismMatcher = new ToscaIsomorphismMatcher();
ToscaGraph detectorGraph = ToscaTransformer.createTOSCAGraph(prm.getDetector());
ToscaGraph topologyGraph = ToscaTransformer.createTOSCAGraph(topology);
Iterator<GraphMapping<ToscaNode, ToscaEdge>> matches = isomorphismMatcher.findMatches(detectorGraph, topologyGraph, matcher);
return matches.hasNext();
}
Aggregations