import javax.persistence.EntityNotFoundException;
import org.apache.commons.collections.CollectionUtils;
-import org.apache.commons.lang.StringUtils;
+import org.apache.commons.lang3.StringUtils;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import eu.etaxonomy.cdm.api.service.config.CreateHierarchyForClassificationConfigurator;
import eu.etaxonomy.cdm.api.service.config.NodeDeletionConfigurator.ChildHandling;
import eu.etaxonomy.cdm.api.service.config.TaxonDeletionConfigurator;
-import eu.etaxonomy.cdm.api.service.dto.EntityDTO;
import eu.etaxonomy.cdm.api.service.dto.GroupedTaxonDTO;
import eu.etaxonomy.cdm.api.service.dto.MarkedEntityDTO;
import eu.etaxonomy.cdm.api.service.dto.TaxonInContextDTO;
import eu.etaxonomy.cdm.persistence.dao.taxon.ITaxonNodeDao;
import eu.etaxonomy.cdm.persistence.dao.term.IDefinedTermDao;
import eu.etaxonomy.cdm.persistence.dto.ClassificationLookupDTO;
+import eu.etaxonomy.cdm.persistence.dto.EntityDTO;
import eu.etaxonomy.cdm.persistence.dto.TaxonNodeDto;
import eu.etaxonomy.cdm.persistence.dto.TaxonStatus;
import eu.etaxonomy.cdm.persistence.dto.UuidAndTitleCache;
}
@Override
- public List<TaxonNodeDto> listChildNodeDtosOfTaxon(UUID taxonUuid, UUID classificationUuid, UUID subtreeUuid, boolean includeUnpublished,
- Integer pageSize, Integer pageIndex, TaxonNodeDtoSortMode sortMode, List<String> propertyPaths) throws FilterException{
+ public List<TaxonNodeDto> listChildNodeDtosOfTaxon(UUID taxonUuid, UUID classificationUuid,
+ UUID subtreeUuid, boolean includeUnpublished,
+ Integer pageSize, Integer pageIndex, TaxonNodeDtoSortMode sortMode) throws FilterException{
+
Classification classification = dao.load(classificationUuid);
Taxon taxon = (Taxon) taxonDao.load(taxonUuid);
TaxonNode subtree = taxonNodeDao.load(subtreeUuid);
taxon, classification, subtree, includeUnpublished, pageSize, pageIndex, propertyPaths);
Comparator<TaxonNodeDto> comparator = sortMode.comparator();
// TODO order during the hibernate query in the dao?
- List<TaxonNodeDto> dtos = results.stream().map(e -> new TaxonNodeDto(e)).sorted(comparator).collect(Collectors.toList());
+ List<TaxonNodeDto> dtos = results.stream()
+ .map(tn -> new TaxonNodeDto(tn))
+ .sorted(comparator)
+ .collect(Collectors.toList());
return dtos;
}