import org.springframework.web.bind.annotation.RequestParam;\r
import org.springframework.web.servlet.ModelAndView;\r
\r
+import com.wordnik.swagger.annotations.Api;\r
+\r
import eu.etaxonomy.cdm.api.service.DistributionTree;\r
import eu.etaxonomy.cdm.api.service.IDescriptionService;\r
import eu.etaxonomy.cdm.api.service.ITermService;\r
import eu.etaxonomy.cdm.api.service.dto.DistributionInfoDTO.InfoPart;\r
import eu.etaxonomy.cdm.api.service.pager.Pager;\r
import eu.etaxonomy.cdm.api.utility.DescriptionUtility;\r
+import eu.etaxonomy.cdm.ext.geo.CondensedDistributionRecipe;\r
import eu.etaxonomy.cdm.ext.geo.EditGeoServiceUtilities;\r
import eu.etaxonomy.cdm.ext.geo.IEditGeoService;\r
import eu.etaxonomy.cdm.model.common.Annotation;\r
*\r
*/\r
@Controller\r
+@Api("portal_description")\r
@Transactional(readOnly=true)\r
@RequestMapping(value = {\r
"/portal/description/{uuid}",\r
/**\r
* @param taxonUuid\r
* @param parts\r
- * possible values: condensedStatusString, tree, mapUriParams,\r
+ * possible values: condensedStatus, tree, mapUriParams,\r
* elements,\r
* @param subAreaPreference\r
* @param statusOrderPreference\r
* @param hideMarkedAreasList\r
+ * @param recipe\r
+ * The recipe for creating the condensed distribution status\r
* @param omitLevels\r
* @param request\r
* @param response\r
@RequestParam(value = "subAreaPreference", required = false) boolean subAreaPreference,\r
@RequestParam(value = "statusOrderPreference", required = false) boolean statusOrderPreference,\r
@RequestParam(value = "hideMarkedAreas", required = false) DefinedTermBaseList<MarkerType> hideMarkedAreasList,\r
+ @RequestParam(value = "fallbackAreaMarkerType", required = false) MarkerType fallbackAreaMarkerType,\r
@RequestParam(value = "omitLevels", required = false) Set<NamedAreaLevel> omitLevels,\r
@RequestParam(value = "statusColors", required = false) String statusColorsString,\r
+ @RequestParam(value = "recipe", required = false, defaultValue="EuroPlusMed") CondensedDistributionRecipe recipe,\r
+\r
HttpServletRequest request,\r
HttpServletResponse response) throws JsonParseException, JsonMappingException, IOException {\r
\r
Map<PresenceAbsenceTerm, Color> presenceAbsenceTermColors = EditGeoServiceUtilities.buildStatusColorMap(statusColorsString, termService);\r
\r
DistributionInfoDTO dto = geoService.composeDistributionInfoFor(parts, taxonUuid, subAreaPreference, statusOrderPreference,\r
- hideMarkedAreas, omitLevels, presenceAbsenceTermColors, LocaleContext.getLanguages(), DISTRIBUTION_INFO_INIT_STRATEGY);\r
+ hideMarkedAreas, fallbackAreaMarkerType, omitLevels, presenceAbsenceTermColors, LocaleContext.getLanguages(), DISTRIBUTION_INFO_INIT_STRATEGY, recipe);\r
\r
mv.addObject(dto);\r
\r