package eu.dnetlib.is.vocabulary; import java.util.List; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PathVariable; import eu.dnetlib.common.controller.AbstractDnetController; import eu.dnetlib.is.model.vocabulary.Vocabulary; import eu.dnetlib.is.model.vocabulary.VocabularyTerm; public class AbstractVocabularyController extends AbstractDnetController { @Autowired protected VocabularyService vocabularyService; @GetMapping("/") public List listVocs() { return vocabularyService.listVocs(); } @GetMapping("/{vocabulary}/terms") public Iterable listTerms(@PathVariable final String vocabulary) { return vocabularyService.listTerms(vocabulary); } }