001package javax.visrec.spi; 002 003import javax.visrec.ml.classification.Classifier; 004 005/** 006 * Service to provide the correct {@link Classifier} implementation. 007 * 008 * @author Kevin Berendsen 009 * @since 1.0 010 */ 011public interface ClassifierService { 012 013 /** 014 * Get the {@link Classifier} which is able to classify images by the {@code sourceType} object. 015 * 016 * @param sourceType {@link Class} object of the source type. 017 * @param resultMapType {@link Class} object of the result map. 018 * @param <T> the class which is able to be handled by the {@link Classifier} and given as {@link Class} object. 019 * @param <R> type of classification result map eg. String is commonly used , but Enum as well 020 * @return {@link Classifier} which is able to classify images of {@code T} 021 */ 022 <T, R> Classifier<T, R> getBySource(Class<T> sourceType, Class<R> resultMapType); 023}