import org.springframework.web.bind.annotation.RequestMapping;\r
import org.springframework.web.bind.annotation.RequestMethod;\r
\r
-import eu.etaxonomy.cdm.api.service.ITaxonTreeService;\r
+import eu.etaxonomy.cdm.api.service.IClassificationService;\r
import eu.etaxonomy.cdm.api.service.ITermService;\r
import eu.etaxonomy.cdm.model.common.DefinedTermBase;\r
import eu.etaxonomy.cdm.model.name.Rank;\r
import eu.etaxonomy.cdm.model.taxon.TaxonNode;\r
-import eu.etaxonomy.cdm.model.taxon.TaxonomicTree;\r
+import eu.etaxonomy.cdm.model.taxon.Classification;\r
import eu.etaxonomy.cdm.remote.editor.RankPropertyEditor;\r
-import eu.etaxonomy.cdm.remote.editor.UUIDPropertyEditor;\r
\r
/**\r
* @author a.kohlbecker\r
*\r
*/\r
@Controller\r
-@RequestMapping(value = {"/classification/*", "/classification/{uuid}"})\r
-public class ClassificationController extends AnnotatableController<TaxonomicTree,ITaxonTreeService> {\r
+@RequestMapping(value = {"/classification/{uuid}"})\r
+public class ClassificationController extends BaseController<Classification,IClassificationService> {\r
\r
\r
private ITermService termService;\r
*/\r
@Override\r
@Autowired\r
- public void setService(ITaxonTreeService service) {\r
+ public void setService(IClassificationService service) {\r
this.service = service;\r
}\r
\r
@InitBinder\r
@Override\r
public void initBinder(WebDataBinder binder) {\r
- binder.registerCustomEditor(UUID.class, new UUIDPropertyEditor());\r
+ super.initBinder(binder);\r
binder.registerCustomEditor(Rank.class, new RankPropertyEditor());\r
}\r
\r
private List<String> NODE_INIT_STRATEGY(){\r
return Arrays.asList(new String[]{\r
"taxon.sec", \r
- "taxon.name.taggedName",\r
-// "taxon.name.combinationAuthorTeam.*",\r
-// "taxon.name.exCombinationAuthorTeam.*",\r
-// "taxon.name.basionymAuthorTeam.*",\r
-// "taxon.name.exBasionymAuthorTeam.*",\r
- "taxon.name.titleCache",\r
- "taxonomicTree"\r
+ "taxon.name",\r
+ "classification"\r
});}\r
\r
- public ClassificationController(){\r
- super();\r
- setUuidParameterPattern("^/(?:[^/]+)/([^/?#&\\.]+).*");\r
- }\r
- \r
/**\r
* @param classificationUuid\r
* @param response\r
* @throws IOException\r
*/\r
@RequestMapping(\r
- value = {"{uuid}/childNodes/"},\r
+ value = {"childNodes"},\r
method = RequestMethod.GET)\r
public List<TaxonNode> getChildNodes(\r
@PathVariable("uuid") UUID classificationUuid,\r
}\r
\r
@RequestMapping(\r
- value = {"{uuid}/childNodesAt/{rankUuid}/"},\r
+ value = {"childNodesAt/{rankUuid}"},\r
method = RequestMethod.GET)\r
public List<TaxonNode> getChildNodesAtRank(\r
@PathVariable("uuid") UUID classificationUuid,\r
) throws IOException {\r
\r
logger.info("getChildNodesAtRank()");\r
- TaxonomicTree tree = null;\r
+ Classification tree = null;\r
Rank rank = null;\r
if(classificationUuid != null){\r
// get view and rank\r