solving problems with homonyms renderization at the portal
[cdmlib.git] / cdmlib-remote / src / main / java / eu / etaxonomy / cdm / remote / controller / DescriptionPortalController.java
index b2546aef605313dfa23282c5a7359fdadb0bf47b..09d60e78a4cdcb3f65ac0776f1132630ac34cf11 100644 (file)
@@ -71,25 +71,14 @@ public class DescriptionPortalController extends AnnotatableController<Descripti
                                "root.children.feature.representations",\r
                        });\r
        private static final List<String> DESCRIPTIONS_DISTRIBUTION_INIT_STRATEGY = Arrays.asList(new String []{\r
-                       // taxon descriptions\r
-                       //"$",\r
-                       //"elements.$",\r
-                       "elements.sources.citation",\r
                        "elements.sources.citation.$",\r
-                       "elements.area",\r
                        "elements.area.$",\r
-                       //"elements.area.level",\r
                        });\r
        protected static final List<String> TAXONDESCRIPTION_INIT_STRATEGY = Arrays.asList(new String []{\r
                        "$",\r
                        "elements.$",\r
-                       "elements.sources.citation.",\r
-                       "elements.sources.citation.authorTeam.$",               \r
-//                     "elements.sources.citation.authorTeam.titleCache",\r
-//                     "elements.sources.citation.authorTeam.nomenclaturalTitleCache",\r
-                       "elements.sources.nameUsedInSource.titleCache",\r
+                       "elements.sources.citation.authorTeam.$",\r
                        "elements.sources.nameUsedInSource.originalNameString",\r
-//                     "elements.area",\r
                        "elements.area.level",\r
                        "elements.modifyingText",\r
        });\r
@@ -143,23 +132,6 @@ public class DescriptionPortalController extends AnnotatableController<Descripti
                return annotations;\r
        }\r
        \r
-       @RequestMapping(value = "/portal/description/{uuid_list}/namedAreaTree", method = RequestMethod.GET)\r
-       public NamedAreaTree doGetOrderedDistributions(\r
-                       @PathVariable("uuid_list") UuidList descriptionUuidList,\r
-                       @RequestParam(value = "omitLevels", required = false) Set<NamedAreaLevel> levels,\r
-                       //@ModelAttribute("omitLevels") HashSet<NamedAreaLevel> levels,\r
-                       HttpServletRequest request, HttpServletResponse response) {\r
-               logger.info("getOrderedDistributions(" + ObjectUtils.toString(levels) + ") - " + request.getServletPath());\r
-               Set<TaxonDescription> taxonDescriptions = new HashSet<TaxonDescription>();\r
-               TaxonDescription description;\r
-               for (UUID descriptionUuid : descriptionUuidList) {\r
-                       description = (TaxonDescription) service.load(descriptionUuid);\r
-                       taxonDescriptions.add(description);\r
-               }\r
-               NamedAreaTree areaTree = service.getOrderedDistributions(taxonDescriptions, levels);\r
-               return areaTree;\r
-       }\r
-       \r
        @RequestMapping(value = "/portal/description/{uuid_list}/DistributionTree", method = RequestMethod.GET)\r
        public DistributionTree doGetOrderedDistributionsB(\r
                        @PathVariable("uuid_list") UuidList descriptionUuidList,\r
@@ -172,7 +144,7 @@ public class DescriptionPortalController extends AnnotatableController<Descripti
                        description = (TaxonDescription) service.load(descriptionUuid, TAXONDESCRIPTION_INIT_STRATEGY);\r
                        taxonDescriptions.add(description);\r
                }\r
-               DistributionTree distTree = service.getOrderedDistributionsB(taxonDescriptions, levels, TAXONDESCRIPTION_INIT_STRATEGY);\r
+               DistributionTree distTree = service.getOrderedDistributions(taxonDescriptions, levels, TAXONDESCRIPTION_INIT_STRATEGY);\r
                return distTree;\r
        }\r
        \r