1
|
/**
|
2
|
* Copyright (C) 2009 EDIT
|
3
|
* European Distributed Institute of Taxonomy
|
4
|
* http://www.e-taxonomy.eu
|
5
|
*
|
6
|
* The contents of this file are subject to the Mozilla Public License Version 1.1
|
7
|
* See LICENSE.TXT at the top of this package for the full license terms.
|
8
|
*/
|
9
|
package eu.etaxonomy.cdm.remote.controller;
|
10
|
|
11
|
import java.util.Arrays;
|
12
|
import java.util.List;
|
13
|
|
14
|
import org.springframework.beans.factory.annotation.Autowired;
|
15
|
import org.springframework.stereotype.Controller;
|
16
|
import org.springframework.web.bind.annotation.RequestMapping;
|
17
|
|
18
|
import eu.etaxonomy.cdm.api.service.IPolytomousKeyNodeService;
|
19
|
import eu.etaxonomy.cdm.model.description.PolytomousKeyNode;
|
20
|
import io.swagger.annotations.Api;
|
21
|
|
22
|
/**
|
23
|
* @author a.kohlbecker
|
24
|
* @since 24.03.2011
|
25
|
*
|
26
|
*/
|
27
|
@Controller
|
28
|
@Api("polytomousKeyNode")
|
29
|
@RequestMapping(value = {"/polytomousKeyNode/{uuid}"})
|
30
|
public class PolytomousKeyNodeController extends BaseController<PolytomousKeyNode, IPolytomousKeyNodeService> {
|
31
|
|
32
|
|
33
|
private static final List<String> NODE_INIT_STRATEGY = Arrays.asList(new String[]{
|
34
|
"$",
|
35
|
"question.label",
|
36
|
"statement.label",
|
37
|
"children.$",
|
38
|
"otherNode"
|
39
|
});
|
40
|
|
41
|
public PolytomousKeyNodeController() {
|
42
|
super();
|
43
|
setInitializationStrategy(NODE_INIT_STRATEGY);
|
44
|
}
|
45
|
|
46
|
@Override
|
47
|
@Autowired
|
48
|
public void setService(IPolytomousKeyNodeService service) {
|
49
|
this.service = service;
|
50
|
}
|
51
|
}
|