package graphmatcher.matcher;
import graphmatcher.graph.Graph;
import graphmatcher.matcher.komatcher.KOSystemGraphMatcher;
import graphmatcher.matcher.shapecontext.ShapeContextGraphMatcher;
import graphmatcher.matcher.simple.SimpleMatcher;
public class MatcherFactory {
public static AbstractMatcher createMatcher(String matcherID, Graph pattern, Graph template) {
if (matcherID.equals(SimpleMatcher.matcherID)) {
return new SimpleMatcher(pattern, template);
}
if (matcherID.equals(ShapeContextGraphMatcher.matcherID)) {
return new ShapeContextGraphMatcher(pattern, template);
}
if (matcherID.equals(KOSystemGraphMatcher.matcherID)) {
return new KOSystemGraphMatcher(pattern, template);
}
throw new IllegalArgumentException("unbekannter MatcherID");
}
}