32 lines
920 B
Java
32 lines
920 B
Java
package eu.dnetlib.is.vocabulary;
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.stereotype.Controller;
|
|
import org.springframework.ui.ModelMap;
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
import org.springframework.web.bind.annotation.RequestParam;
|
|
|
|
import eu.dnetlib.is.vocabulary.model.Vocabulary;
|
|
import eu.dnetlib.is.vocabulary.repository.VocabularyRepository;
|
|
|
|
@Controller
|
|
public class VocabularyUIController {
|
|
|
|
@Autowired
|
|
private VocabularyRepository vocabularyRepository;
|
|
|
|
@GetMapping("/vocabularyEditor")
|
|
public void vocabularyEditor(@RequestParam final String id, final ModelMap map) {
|
|
final Vocabulary voc = vocabularyRepository.getById(id);
|
|
|
|
map.put("vocId", voc.getId());
|
|
map.put("vocName", voc.getName());
|
|
map.put("vocDesc", voc.getDescription());
|
|
}
|
|
|
|
@GetMapping("/vocabularies")
|
|
public void vocabularies(final ModelMap map) {
|
|
|
|
}
|
|
}
|