@@ -0,0 +1,1051 @@
+package org.pdxfinder.services;%0A%0Aimport org.pdxfinder.dao.OntologyTerm;%0Aimport org.pdxfinder.repositories.OntologyTermRepository;%0Aimport org.pdxfinder.services.ds.AutoSuggestOption;%0Aimport org.springframework.stereotype.Service;%0A%0Aimport java.util.*;%0A%0A/*%0A * Created by csaba on 05/02/2018.%0A */%0A@Service%0Apublic class AutoCompleteService %7B%0A%0A%0A    private OntologyTermRepository ontologyTermRepository;%0A%0A%0A    public AutoCompleteService(OntologyTermRepository ontologyTermRepository) %7B%0A        this.ontologyTermRepository = ontologyTermRepository;%0A    %7D%0A%0A%0A    public List%3CAutoSuggestOption%3E getAutoSuggestions()%7B%0A%0A        Collection%3COntologyTerm%3E ontologyTerms = ontologyTermRepository.findAllWithMappings();%0A        List%3CAutoSuggestOption%3E autoSuggestList = new ArrayList%3C%3E();%0A%0A        for (OntologyTerm ontologyTerm : ontologyTerms) %7B%0A            if (ontologyTerm.getLabel() != null) %7B%0A%0A                autoSuggestList.add(new AutoSuggestOption(ontologyTerm.getLabel(), %22OntologyTerm%22));%0A            %7D%0A        %7D%0A%0A        return autoSuggestList;%0A    %7D%0A%0A%0A%7D%0A

Add autocomplete service