33 lines
925 B
Java
33 lines
925 B
Java
package eu.dnetlib.is.context;
|
|
|
|
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.context.model.Context;
|
|
import eu.dnetlib.is.context.model.repository.ContextRepository;
|
|
|
|
@Controller
|
|
public class ContextUIController {
|
|
|
|
@Autowired
|
|
private ContextRepository contextRepository;
|
|
|
|
@GetMapping("/contextEditor")
|
|
public void vocabularyEditor(@RequestParam final String id, final ModelMap map) {
|
|
final Context ctx = contextRepository.getById(id);
|
|
|
|
map.put("ctxId", ctx.getId());
|
|
map.put("ctxLabel", ctx.getLabel());
|
|
map.put("ctxType", ctx.getType());
|
|
map.put("ctxParams", ctx.getParameters());
|
|
}
|
|
|
|
@GetMapping("/contexts")
|
|
public void contexts(final ModelMap map) {
|
|
|
|
}
|
|
}
|