-// $Id$\r
/**\r
* Copyright (C) 2009 EDIT European Distributed Institute of Taxonomy\r
* http://www.e-taxonomy.eu\r
\r
package eu.etaxonomy.cdm.remote.controller;\r
\r
+import io.swagger.annotations.Api;\r
+\r
import java.io.IOException;\r
import java.util.Arrays;\r
import java.util.List;\r
import org.springframework.web.bind.annotation.RequestMapping;\r
import org.springframework.web.bind.annotation.RequestMethod;\r
\r
-import com.wordnik.swagger.annotations.Api;\r
-\r
import eu.etaxonomy.cdm.api.service.IClassificationService;\r
import eu.etaxonomy.cdm.api.service.ITaxonService;\r
import eu.etaxonomy.cdm.api.service.ITermService;\r
@Controller\r
@Api("portal_classification")\r
@RequestMapping(value="/portal/classification")\r
-public class ClassificationPortalListController extends IdentifiableListController<Classification,IClassificationService> {\r
+public class ClassificationPortalListController extends AbstractIdentifiableListController<Classification,IClassificationService> {\r
\r
\r
private static final List<String> CLASSIFICATION_INIT_STRATEGY = Arrays.asList(new String[]{\r
\r
private static final List<String> NODE_INIT_STRATEGY = Arrays.asList(new String[]{\r
"taxon.name.rank",\r
+ "taxon.sec"\r
});\r
\r
\r
}\r
rank = findRank(rankUuid);\r
\r
- long start = System.currentTimeMillis();\r
+// long start = System.currentTimeMillis();\r
List<TaxonNode> rootNodes = service.listRankSpecificRootNodes(tree, rank, null, null, NODE_INIT_STRATEGY);\r
- System.err.println("service.listRankSpecificRootNodes() " + (System.currentTimeMillis() - start));\r
+// System.err.println("service.listRankSpecificRootNodes() " + (System.currentTimeMillis() - start));\r
return rootNodes;\r
}\r
\r
\r
}\r
\r
+ @RequestMapping(\r
+ value = {"{treeUuid}/siblingsOf/{taxonUuid}"},\r
+ method = RequestMethod.GET)\r
+ public List<TaxonNode> getSiblingsOfTaxon(\r
+ @PathVariable("treeUuid") UUID treeUuid,\r
+ @PathVariable("taxonUuid") UUID taxonUuid,\r
+ HttpServletRequest request,\r
+ HttpServletResponse response) throws IOException {\r
+ logger.info("getSiblingsOfTaxon() " + request.getRequestURI());\r
+\r
+ //FIXME return pager\r
+ List<TaxonNode> childs = service.listSiblingsOfTaxon(taxonUuid, treeUuid, null, null, NODE_INIT_STRATEGY);\r
+ return childs;\r
+\r
+ }\r
+\r
/**\r
* Provides path of {@link TaxonNode}s from the base node to the node of the specified taxon.\r
* <p>\r
}\r
\r
\r
-}
\ No newline at end of file
+}