Search in sources :

Example 1 with FieldUnitDTO

use of eu.etaxonomy.cdm.api.service.dto.FieldUnitDTO in project cdmlib by cybertaxonomy.

the class OccurrenceServiceImpl method listRootUnitDTOsByAssociatedTaxon.

@Override
@Transactional
public List<SpecimenOrObservationBaseDTO> listRootUnitDTOsByAssociatedTaxon(Set<TaxonRelationshipEdge> includedRelationships, UUID associatedTaxonUuid, List<String> propertyPaths) {
    Set<Taxon> taxa = new HashSet<>();
    Set<SpecimenOrObservationBaseDTO> rootUnitDTOs = new HashSet<>();
    boolean includeUnpublished = INCLUDE_UNPUBLISHED;
    Taxon associatedTaxon = (Taxon) taxonService.load(associatedTaxonUuid);
    if (includedRelationships != null) {
        taxa = taxonService.listRelatedTaxa(associatedTaxon, includedRelationships, null, includeUnpublished, null, null, null);
    }
    taxa.add(associatedTaxon);
    HashMap<UUID, SpecimenOrObservationBaseDTO> alreadyCollectedUnits = new HashMap<>();
    for (Taxon taxon : taxa) {
        // TODO there might be a good potential to speed up the whole processing by collecting all entities first
        // and to create the DTOs in a second step
        Set<SpecimenOrObservationBase> perTaxonOccurrences = dao.listByAssociatedTaxon(null, taxon, null, null, null, propertyPaths).stream().map(u -> HibernateProxyHelper.deproxy(u, SpecimenOrObservationBase.class)).collect(Collectors.toSet());
        for (SpecimenOrObservationBase<?> unit : perTaxonOccurrences) {
            unit = HibernateProxyHelper.deproxy(unit);
            if (unit instanceof DerivedUnit) {
                DerivedUnitDTO derivativeDTO;
                if (!alreadyCollectedUnits.containsKey(unit.getUuid())) {
                    DerivedUnit derivedUnit = (DerivedUnit) unit;
                    derivativeDTO = (DerivedUnitDTO) SpecimenOrObservationDTOFactory.fromEntity(derivedUnit, null);
                    if (unit instanceof DnaSample) {
                        derivativeDTO = DNASampleDTO.fromEntity((DnaSample) unit);
                    } else {
                        derivativeDTO = DerivedUnitDTO.fromEntity(derivedUnit, null, null);
                    }
                    alreadyCollectedUnits.put(derivativeDTO.getUuid(), derivativeDTO);
                    derivativeDTO.addAllDerivatives(getDerivedUnitDTOsFor(derivativeDTO, derivedUnit, alreadyCollectedUnits));
                }
                derivativeDTO = (DerivedUnitDTO) alreadyCollectedUnits.get(unit.getUuid());
                rootUnitDTOs.addAll(findRootUnitDTOs(derivativeDTO, alreadyCollectedUnits));
            } else {
                // only other option is FieldUnit
                rootUnitDTOs.add(FieldUnitDTO.fromEntity((FieldUnit) unit, 0, null));
            }
        }
    }
    List<SpecimenOrObservationBaseDTO> orderdDTOs = new ArrayList<>(rootUnitDTOs);
    // TODO order dtos by date can only be done by string comparison
    // the FieldUnitDTO.date needs to be a Partial object for sensible ordering
    Collections.sort(orderdDTOs, new Comparator<SpecimenOrObservationBaseDTO>() {

        @Override
        public int compare(SpecimenOrObservationBaseDTO o1, SpecimenOrObservationBaseDTO o2) {
            if (o1 instanceof FieldUnitDTO && o2 instanceof FieldUnitDTO) {
                FieldUnitDTO fu1 = (FieldUnitDTO) o1;
                FieldUnitDTO fu2 = (FieldUnitDTO) o2;
                // PartialComparator.INSTANCE_NULL_SMALLEST() here
                return PartialComparator.INSTANCE().compare(fu1.getDate(), fu2.getDate());
            }
            if (o1 instanceof DerivedUnitDTO && o2 instanceof DerivedUnitDTO) {
                SpecimenOrObservationBaseDTO du1 = o1;
                SpecimenOrObservationBaseDTO du2 = o2;
                return StringUtils.compare(du1.getLabel(), du2.getLabel());
            }
            if (o1 instanceof FieldUnitDTO && o2 instanceof DerivedUnitDTO) {
                return -1;
            } else {
                return 1;
            }
        }
    });
    return orderdDTOs;
}
Also used : Arrays(java.util.Arrays) Sequence(eu.etaxonomy.cdm.model.molecular.Sequence) Pager(eu.etaxonomy.cdm.api.service.pager.Pager) Rectangle(org.hibernate.search.spatial.impl.Rectangle) MediaDTO(eu.etaxonomy.cdm.api.service.dto.MediaDTO) IProgressMonitor(eu.etaxonomy.cdm.common.monitor.IProgressMonitor) PartialComparator(eu.etaxonomy.cdm.compare.common.PartialComparator) GatheringEvent(eu.etaxonomy.cdm.model.occurrence.GatheringEvent) Builder(org.apache.lucene.search.BooleanQuery.Builder) DefaultPagerImpl(eu.etaxonomy.cdm.api.service.pager.impl.DefaultPagerImpl) Autowired(org.springframework.beans.factory.annotation.Autowired) DNASampleDTO(eu.etaxonomy.cdm.api.service.dto.DNASampleDTO) DerivedUnit(eu.etaxonomy.cdm.model.occurrence.DerivedUnit) StringUtils(org.apache.commons.lang3.StringUtils) LuceneParseException(eu.etaxonomy.cdm.api.service.search.LuceneParseException) SpecimenTypeDesignation(eu.etaxonomy.cdm.model.name.SpecimenTypeDesignation) LuceneSearch(eu.etaxonomy.cdm.api.service.search.LuceneSearch) Logger(org.apache.log4j.Logger) TaxonBase(eu.etaxonomy.cdm.model.taxon.TaxonBase) SpecimenOrObservationType(eu.etaxonomy.cdm.model.occurrence.SpecimenOrObservationType) Map(java.util.Map) ILuceneIndexToolProvider(eu.etaxonomy.cdm.api.service.search.ILuceneIndexToolProvider) SortField(org.apache.lucene.search.SortField) CdmBaseType(eu.etaxonomy.cdm.model.CdmBaseType) EnumSet(java.util.EnumSet) ReferencedObjectUndeletableException(eu.etaxonomy.cdm.api.service.exception.ReferencedObjectUndeletableException) DeterminationEvent(eu.etaxonomy.cdm.model.occurrence.DeterminationEvent) Occur(org.apache.lucene.search.BooleanClause.Occur) BytesRef(org.apache.lucene.util.BytesRef) DescriptionElementBase(eu.etaxonomy.cdm.model.description.DescriptionElementBase) Collection(java.util.Collection) DerivedUnitDTO(eu.etaxonomy.cdm.api.service.dto.DerivedUnitDTO) Set(java.util.Set) FieldUnitDTO(eu.etaxonomy.cdm.api.service.dto.FieldUnitDTO) UUID(java.util.UUID) Collectors(java.util.stream.Collectors) SpecimenDeleteConfigurator(eu.etaxonomy.cdm.api.service.config.SpecimenDeleteConfigurator) SpecimenOrObservationDTOFactory(eu.etaxonomy.cdm.api.service.dto.SpecimenOrObservationDTOFactory) TransientObjectException(org.hibernate.TransientObjectException) AmplificationResult(eu.etaxonomy.cdm.model.molecular.AmplificationResult) List(java.util.List) IIdentifiableEntityServiceConfigurator(eu.etaxonomy.cdm.api.service.config.IIdentifiableEntityServiceConfigurator) TaxonRelationshipEdge(eu.etaxonomy.cdm.api.util.TaxonRelationshipEdge) DerivationEvent(eu.etaxonomy.cdm.model.occurrence.DerivationEvent) SpecimenOrObservationBase(eu.etaxonomy.cdm.model.occurrence.SpecimenOrObservationBase) DescriptionBase(eu.etaxonomy.cdm.model.description.DescriptionBase) TaxonName(eu.etaxonomy.cdm.model.name.TaxonName) OrderHint(eu.etaxonomy.cdm.persistence.query.OrderHint) SpecimenDescription(eu.etaxonomy.cdm.model.description.SpecimenDescription) ParseException(org.apache.lucene.queryparser.classic.ParseException) AbstractBeanInitializer(eu.etaxonomy.cdm.persistence.dao.initializer.AbstractBeanInitializer) IIdentifiableEntityCacheStrategy(eu.etaxonomy.cdm.strategy.cache.common.IIdentifiableEntityCacheStrategy) DerivedUnitFacadeConfigurator(eu.etaxonomy.cdm.api.facade.DerivedUnitFacadeConfigurator) Taxon(eu.etaxonomy.cdm.model.taxon.Taxon) HashMap(java.util.HashMap) Status(eu.etaxonomy.cdm.api.service.UpdateResult.Status) IndividualsAssociation(eu.etaxonomy.cdm.model.description.IndividualsAssociation) SingleRead(eu.etaxonomy.cdm.model.molecular.SingleRead) DataRetrievalFailureException(org.springframework.dao.DataRetrievalFailureException) FindOccurrencesConfigurator(eu.etaxonomy.cdm.api.service.config.FindOccurrencesConfigurator) UuidAndTitleCache(eu.etaxonomy.cdm.persistence.dto.UuidAndTitleCache) Media(eu.etaxonomy.cdm.model.media.Media) ArrayList(java.util.ArrayList) HashSet(java.util.HashSet) SpecimenNodeWrapper(eu.etaxonomy.cdm.persistence.dto.SpecimenNodeWrapper) DeleteConfiguratorBase(eu.etaxonomy.cdm.api.service.config.DeleteConfiguratorBase) TopGroups(org.apache.lucene.search.grouping.TopGroups) Service(org.springframework.stereotype.Service) IOccurrenceDao(eu.etaxonomy.cdm.persistence.dao.occurrence.IOccurrenceDao) DnaSample(eu.etaxonomy.cdm.model.molecular.DnaSample) CdmBase(eu.etaxonomy.cdm.model.common.CdmBase) MediaSpecimen(eu.etaxonomy.cdm.model.occurrence.MediaSpecimen) Iterator(java.util.Iterator) ISequenceService(eu.etaxonomy.cdm.api.service.molecular.ISequenceService) ISearchResultBuilder(eu.etaxonomy.cdm.api.service.search.ISearchResultBuilder) HibernateProxyHelper(eu.etaxonomy.cdm.hibernate.HibernateProxyHelper) AbstractPagerImpl(eu.etaxonomy.cdm.api.service.pager.impl.AbstractPagerImpl) IOException(java.io.IOException) SearchResult(eu.etaxonomy.cdm.api.service.search.SearchResult) DerivedUnitFacade(eu.etaxonomy.cdm.api.facade.DerivedUnitFacade) TaxonDescription(eu.etaxonomy.cdm.model.description.TaxonDescription) SpecimenOrObservationBaseDTO(eu.etaxonomy.cdm.api.service.dto.SpecimenOrObservationBaseDTO) Point(eu.etaxonomy.cdm.model.location.Point) FieldUnit(eu.etaxonomy.cdm.model.occurrence.FieldUnit) Language(eu.etaxonomy.cdm.model.common.Language) SearchResultBuilder(eu.etaxonomy.cdm.api.service.search.SearchResultBuilder) AssignmentStatus(eu.etaxonomy.cdm.persistence.query.AssignmentStatus) Comparator(java.util.Comparator) Collections(java.util.Collections) DerivedUnitFacadeNotSupportedException(eu.etaxonomy.cdm.api.facade.DerivedUnitFacadeNotSupportedException) Transactional(org.springframework.transaction.annotation.Transactional) QueryFactory(eu.etaxonomy.cdm.api.service.search.QueryFactory) FieldUnit(eu.etaxonomy.cdm.model.occurrence.FieldUnit) HashMap(java.util.HashMap) Taxon(eu.etaxonomy.cdm.model.taxon.Taxon) SpecimenOrObservationBaseDTO(eu.etaxonomy.cdm.api.service.dto.SpecimenOrObservationBaseDTO) ArrayList(java.util.ArrayList) DerivedUnitDTO(eu.etaxonomy.cdm.api.service.dto.DerivedUnitDTO) DerivedUnit(eu.etaxonomy.cdm.model.occurrence.DerivedUnit) FieldUnitDTO(eu.etaxonomy.cdm.api.service.dto.FieldUnitDTO) DnaSample(eu.etaxonomy.cdm.model.molecular.DnaSample) SpecimenOrObservationBase(eu.etaxonomy.cdm.model.occurrence.SpecimenOrObservationBase) UUID(java.util.UUID) HashSet(java.util.HashSet) Transactional(org.springframework.transaction.annotation.Transactional)

Example 2 with FieldUnitDTO

use of eu.etaxonomy.cdm.api.service.dto.FieldUnitDTO in project cdmlib by cybertaxonomy.

the class OccurrenceServiceImpl method assembleFieldUnitDTO.

@Override
public FieldUnitDTO assembleFieldUnitDTO(FieldUnit fieldUnit) {
    if (!getSession().contains(fieldUnit)) {
        fieldUnit = (FieldUnit) load(fieldUnit.getUuid());
    }
    // FIXME the filter for SpecimenOrObservationType.PreservedSpecimen has been preserved from the former implementation (see commit 07e3f63c7d  and older)
    // it is questionable if this filter makes sense for all use cases or if it is only a sensible default for the
    // compressed specimen table in the cdm-dataportal (see #6816, #6870)
    EnumSet<SpecimenOrObservationType> typeIncludeFilter = EnumSet.of(SpecimenOrObservationType.PreservedSpecimen);
    FieldUnitDTO fieldUnitDTO = FieldUnitDTO.fromEntity(fieldUnit, null, typeIncludeFilter);
    return fieldUnitDTO;
}
Also used : FieldUnitDTO(eu.etaxonomy.cdm.api.service.dto.FieldUnitDTO) SpecimenOrObservationType(eu.etaxonomy.cdm.model.occurrence.SpecimenOrObservationType)

Example 3 with FieldUnitDTO

use of eu.etaxonomy.cdm.api.service.dto.FieldUnitDTO in project cdmlib by cybertaxonomy.

the class OccurrenceServiceImpl method findRootUnitDTOs.

@Override
public Collection<SpecimenOrObservationBaseDTO> findRootUnitDTOs(UUID unitUUID) {
    SpecimenOrObservationBase<?> entity = load(unitUUID);
    SpecimenOrObservationBaseDTO derivedUnitDTO = SpecimenOrObservationDTOFactory.fromEntity(entity);
    Collection<SpecimenOrObservationBaseDTO> rootUnitDTOs = new ArrayList<>();
    if (derivedUnitDTO != null) {
        if (derivedUnitDTO instanceof FieldUnitDTO) {
            rootUnitDTOs.add(derivedUnitDTO);
        } else {
            Map<UUID, SpecimenOrObservationBaseDTO> alreadyCollectedSpecimen = new HashMap<>();
            rootUnitDTOs = findRootUnitDTOs((DerivedUnitDTO) derivedUnitDTO, alreadyCollectedSpecimen);
        }
    }
    return rootUnitDTOs;
}
Also used : FieldUnitDTO(eu.etaxonomy.cdm.api.service.dto.FieldUnitDTO) HashMap(java.util.HashMap) SpecimenOrObservationBaseDTO(eu.etaxonomy.cdm.api.service.dto.SpecimenOrObservationBaseDTO) ArrayList(java.util.ArrayList) DerivedUnitDTO(eu.etaxonomy.cdm.api.service.dto.DerivedUnitDTO) UUID(java.util.UUID)

Example 4 with FieldUnitDTO

use of eu.etaxonomy.cdm.api.service.dto.FieldUnitDTO in project cdmlib by cybertaxonomy.

the class OccurrenceServiceImpl method loadFieldUnitDTO.

@Override
@Transactional(readOnly = true)
public FieldUnitDTO loadFieldUnitDTO(UUID derivedUnitUuid) {
    FieldUnitDTO fieldUnitDTO = null;
    DerivedUnitDTO derivedUnitDTO = null;
    Map<UUID, SpecimenOrObservationBaseDTO> cycleDetectionMap = new HashMap<>();
    SpecimenOrObservationBase<?> derivative = dao.load(derivedUnitUuid);
    if (derivative != null) {
        if (derivative instanceof FieldUnit) {
            fieldUnitDTO = FieldUnitDTO.fromEntity((FieldUnit) derivative);
            return fieldUnitDTO;
        } else {
            // must be a DerivedUnit otherwise
            derivedUnitDTO = DerivedUnitDTO.fromEntity((DerivedUnit) derivative);
            while (true) {
                Set<SpecimenOrObservationBaseDTO> originals = originalDTOs(derivedUnitDTO.getUuid());
                if (originals.isEmpty()) {
                    break;
                }
                if (originals.size() > 1) {
                    logger.debug("The derived unit with uuid " + derivedUnitUuid + "has more than one orginal, ignoring all but the first one.");
                }
                SpecimenOrObservationBaseDTO originalDTO = originals.iterator().next();
                // cycle detection and handling
                if (cycleDetectionMap.containsKey(originalDTO.getUuid())) {
                    // cycle detected!!!
                    try {
                        throw new Exception();
                    } catch (Exception e) {
                        logger.error("Cycle in derivate graph detected at DerivedUnit with uuid=" + originalDTO.getUuid(), e);
                    }
                    // but let the derivate to be added to the original which is closer to the FieldUnit (below at originalDTO.addDerivate(derivedUnitDTO);)
                    for (SpecimenOrObservationBaseDTO seenOriginal : cycleDetectionMap.values()) {
                        for (SpecimenOrObservationBaseDTO derivateDTO : seenOriginal.getDerivatives()) {
                            if (derivateDTO.equals(originalDTO)) {
                                seenOriginal.getDerivatives().remove(originalDTO);
                            }
                        }
                    }
                } else {
                    cycleDetectionMap.put(originalDTO.getUuid(), originalDTO);
                }
                if (originalDTO instanceof FieldUnitDTO) {
                    fieldUnitDTO = (FieldUnitDTO) originalDTO;
                    break;
                } else {
                    // So this must be a DerivedUnitDTO
                    if (derivedUnitDTO == null) {
                        derivedUnitDTO = (DerivedUnitDTO) originalDTO;
                    } else {
                        derivedUnitDTO = (DerivedUnitDTO) originalDTO;
                    }
                }
            }
        }
    }
    return fieldUnitDTO;
}
Also used : DerivedUnit(eu.etaxonomy.cdm.model.occurrence.DerivedUnit) FieldUnit(eu.etaxonomy.cdm.model.occurrence.FieldUnit) FieldUnitDTO(eu.etaxonomy.cdm.api.service.dto.FieldUnitDTO) HashMap(java.util.HashMap) SpecimenOrObservationBaseDTO(eu.etaxonomy.cdm.api.service.dto.SpecimenOrObservationBaseDTO) DerivedUnitDTO(eu.etaxonomy.cdm.api.service.dto.DerivedUnitDTO) UUID(java.util.UUID) LuceneParseException(eu.etaxonomy.cdm.api.service.search.LuceneParseException) ReferencedObjectUndeletableException(eu.etaxonomy.cdm.api.service.exception.ReferencedObjectUndeletableException) TransientObjectException(org.hibernate.TransientObjectException) ParseException(org.apache.lucene.queryparser.classic.ParseException) DataRetrievalFailureException(org.springframework.dao.DataRetrievalFailureException) IOException(java.io.IOException) DerivedUnitFacadeNotSupportedException(eu.etaxonomy.cdm.api.facade.DerivedUnitFacadeNotSupportedException) Transactional(org.springframework.transaction.annotation.Transactional)

Example 5 with FieldUnitDTO

use of eu.etaxonomy.cdm.api.service.dto.FieldUnitDTO in project cdmlib by cybertaxonomy.

the class OccurrenceServiceImpl method _findRootUnitDTOs.

/**
 * Method for recursive calls, must only be used by {@link #findRootUnitDTOs(DerivedUnitDTO, HashMap)}
 * <p>
 * It will search recursively over all {@link DerivationEvent}s and get the "originals" ({@link SpecimenOrObservationBase})
 * from which this DerivedUnit was derived until all FieldUnits are found.
 */
private void _findRootUnitDTOs(DerivedUnitDTO derivedUnitDTO, Map<UUID, SpecimenOrObservationBaseDTO> rootUnitDTOs, Map<UUID, SpecimenOrObservationBaseDTO> alreadyCollectedSpecimen) {
    List<String> propertyPaths = new ArrayList<>();
    // add the supplied DTO the the alreadyCollectedSpecimen if not yet there
    if (!alreadyCollectedSpecimen.containsKey(derivedUnitDTO.getUuid())) {
        alreadyCollectedSpecimen.put(derivedUnitDTO.getUuid(), derivedUnitDTO);
    }
    List<SpecimenOrObservationBase> originals = dao.findOriginalsForDerivedUnit(derivedUnitDTO.getUuid(), propertyPaths);
    if (originals.size() > 0) {
        if (originals.size() > 1) {
            logger.warn("The derived unit with uuid " + derivedUnitDTO.getUuid() + "has more than one orginal");
        }
        // FIXME allow handling multiple originals
        SpecimenOrObservationBase<?> original = originals.get(0);
        original = HibernateProxyHelper.deproxy(original);
        if (alreadyCollectedSpecimen.containsKey(original.getUuid())) {
            alreadyCollectedSpecimen.get(original.getUuid()).addDerivative(derivedUnitDTO);
        // if ( alreadyCollectedSpecimen.get(specimen.getUuid()) instanceof FieldUnitDTO){
        // ((FieldUnitDTO)alreadyCollectedSpecimen.get(specimen.getUuid())).getTaxonRelatedDerivedUnits().add(derivedUnitDTO.getUuid());
        // }
        } else {
            if (!rootUnitDTOs.containsKey(original.getUuid())) {
                // the direct derivatives of the field unit are added in the factory method, so it is guaranteed that
                // the derivedUnitDTO is already contained.
                // ----
                // Don't assemble derivatives for originals since we have them collected already
                // when ascending to the originals, we only want to collect those derivatives which are on the path up to the root
                final Integer maxDepth = 0;
                SpecimenOrObservationBaseDTO originalDTO = SpecimenOrObservationDTOFactory.fromEntity(original, maxDepth);
                originalDTO.addDerivative(derivedUnitDTO);
                alreadyCollectedSpecimen.put(originalDTO.getUuid(), originalDTO);
                if (original instanceof FieldUnit) {
                    rootUnitDTOs.put(originalDTO.getUuid(), originalDTO);
                } else {
                    _findRootUnitDTOs((DerivedUnitDTO) originalDTO, rootUnitDTOs, alreadyCollectedSpecimen);
                }
            } else {
                SpecimenOrObservationBaseDTO previouslyFoundRootUnit = rootUnitDTOs.get(original.getUuid());
                if (!previouslyFoundRootUnit.getDerivatives().stream().anyMatch(uDTO -> uDTO.getUuid().equals(derivedUnitDTO.getUuid()))) {
                    previouslyFoundRootUnit.addDerivative(derivedUnitDTO);
                }
            }
        }
    } else {
        rootUnitDTOs.put(derivedUnitDTO.getUuid(), derivedUnitDTO);
    }
}
Also used : Arrays(java.util.Arrays) Sequence(eu.etaxonomy.cdm.model.molecular.Sequence) Pager(eu.etaxonomy.cdm.api.service.pager.Pager) Rectangle(org.hibernate.search.spatial.impl.Rectangle) MediaDTO(eu.etaxonomy.cdm.api.service.dto.MediaDTO) IProgressMonitor(eu.etaxonomy.cdm.common.monitor.IProgressMonitor) PartialComparator(eu.etaxonomy.cdm.compare.common.PartialComparator) GatheringEvent(eu.etaxonomy.cdm.model.occurrence.GatheringEvent) Builder(org.apache.lucene.search.BooleanQuery.Builder) DefaultPagerImpl(eu.etaxonomy.cdm.api.service.pager.impl.DefaultPagerImpl) Autowired(org.springframework.beans.factory.annotation.Autowired) DNASampleDTO(eu.etaxonomy.cdm.api.service.dto.DNASampleDTO) DerivedUnit(eu.etaxonomy.cdm.model.occurrence.DerivedUnit) StringUtils(org.apache.commons.lang3.StringUtils) LuceneParseException(eu.etaxonomy.cdm.api.service.search.LuceneParseException) SpecimenTypeDesignation(eu.etaxonomy.cdm.model.name.SpecimenTypeDesignation) LuceneSearch(eu.etaxonomy.cdm.api.service.search.LuceneSearch) Logger(org.apache.log4j.Logger) TaxonBase(eu.etaxonomy.cdm.model.taxon.TaxonBase) SpecimenOrObservationType(eu.etaxonomy.cdm.model.occurrence.SpecimenOrObservationType) Map(java.util.Map) ILuceneIndexToolProvider(eu.etaxonomy.cdm.api.service.search.ILuceneIndexToolProvider) SortField(org.apache.lucene.search.SortField) CdmBaseType(eu.etaxonomy.cdm.model.CdmBaseType) EnumSet(java.util.EnumSet) ReferencedObjectUndeletableException(eu.etaxonomy.cdm.api.service.exception.ReferencedObjectUndeletableException) DeterminationEvent(eu.etaxonomy.cdm.model.occurrence.DeterminationEvent) Occur(org.apache.lucene.search.BooleanClause.Occur) BytesRef(org.apache.lucene.util.BytesRef) DescriptionElementBase(eu.etaxonomy.cdm.model.description.DescriptionElementBase) Collection(java.util.Collection) DerivedUnitDTO(eu.etaxonomy.cdm.api.service.dto.DerivedUnitDTO) Set(java.util.Set) FieldUnitDTO(eu.etaxonomy.cdm.api.service.dto.FieldUnitDTO) UUID(java.util.UUID) Collectors(java.util.stream.Collectors) SpecimenDeleteConfigurator(eu.etaxonomy.cdm.api.service.config.SpecimenDeleteConfigurator) SpecimenOrObservationDTOFactory(eu.etaxonomy.cdm.api.service.dto.SpecimenOrObservationDTOFactory) TransientObjectException(org.hibernate.TransientObjectException) AmplificationResult(eu.etaxonomy.cdm.model.molecular.AmplificationResult) List(java.util.List) IIdentifiableEntityServiceConfigurator(eu.etaxonomy.cdm.api.service.config.IIdentifiableEntityServiceConfigurator) TaxonRelationshipEdge(eu.etaxonomy.cdm.api.util.TaxonRelationshipEdge) DerivationEvent(eu.etaxonomy.cdm.model.occurrence.DerivationEvent) SpecimenOrObservationBase(eu.etaxonomy.cdm.model.occurrence.SpecimenOrObservationBase) DescriptionBase(eu.etaxonomy.cdm.model.description.DescriptionBase) TaxonName(eu.etaxonomy.cdm.model.name.TaxonName) OrderHint(eu.etaxonomy.cdm.persistence.query.OrderHint) SpecimenDescription(eu.etaxonomy.cdm.model.description.SpecimenDescription) ParseException(org.apache.lucene.queryparser.classic.ParseException) AbstractBeanInitializer(eu.etaxonomy.cdm.persistence.dao.initializer.AbstractBeanInitializer) IIdentifiableEntityCacheStrategy(eu.etaxonomy.cdm.strategy.cache.common.IIdentifiableEntityCacheStrategy) DerivedUnitFacadeConfigurator(eu.etaxonomy.cdm.api.facade.DerivedUnitFacadeConfigurator) Taxon(eu.etaxonomy.cdm.model.taxon.Taxon) HashMap(java.util.HashMap) Status(eu.etaxonomy.cdm.api.service.UpdateResult.Status) IndividualsAssociation(eu.etaxonomy.cdm.model.description.IndividualsAssociation) SingleRead(eu.etaxonomy.cdm.model.molecular.SingleRead) DataRetrievalFailureException(org.springframework.dao.DataRetrievalFailureException) FindOccurrencesConfigurator(eu.etaxonomy.cdm.api.service.config.FindOccurrencesConfigurator) UuidAndTitleCache(eu.etaxonomy.cdm.persistence.dto.UuidAndTitleCache) Media(eu.etaxonomy.cdm.model.media.Media) ArrayList(java.util.ArrayList) HashSet(java.util.HashSet) SpecimenNodeWrapper(eu.etaxonomy.cdm.persistence.dto.SpecimenNodeWrapper) DeleteConfiguratorBase(eu.etaxonomy.cdm.api.service.config.DeleteConfiguratorBase) TopGroups(org.apache.lucene.search.grouping.TopGroups) Service(org.springframework.stereotype.Service) IOccurrenceDao(eu.etaxonomy.cdm.persistence.dao.occurrence.IOccurrenceDao) DnaSample(eu.etaxonomy.cdm.model.molecular.DnaSample) CdmBase(eu.etaxonomy.cdm.model.common.CdmBase) MediaSpecimen(eu.etaxonomy.cdm.model.occurrence.MediaSpecimen) Iterator(java.util.Iterator) ISequenceService(eu.etaxonomy.cdm.api.service.molecular.ISequenceService) ISearchResultBuilder(eu.etaxonomy.cdm.api.service.search.ISearchResultBuilder) HibernateProxyHelper(eu.etaxonomy.cdm.hibernate.HibernateProxyHelper) AbstractPagerImpl(eu.etaxonomy.cdm.api.service.pager.impl.AbstractPagerImpl) IOException(java.io.IOException) SearchResult(eu.etaxonomy.cdm.api.service.search.SearchResult) DerivedUnitFacade(eu.etaxonomy.cdm.api.facade.DerivedUnitFacade) TaxonDescription(eu.etaxonomy.cdm.model.description.TaxonDescription) SpecimenOrObservationBaseDTO(eu.etaxonomy.cdm.api.service.dto.SpecimenOrObservationBaseDTO) Point(eu.etaxonomy.cdm.model.location.Point) FieldUnit(eu.etaxonomy.cdm.model.occurrence.FieldUnit) Language(eu.etaxonomy.cdm.model.common.Language) SearchResultBuilder(eu.etaxonomy.cdm.api.service.search.SearchResultBuilder) AssignmentStatus(eu.etaxonomy.cdm.persistence.query.AssignmentStatus) Comparator(java.util.Comparator) Collections(java.util.Collections) DerivedUnitFacadeNotSupportedException(eu.etaxonomy.cdm.api.facade.DerivedUnitFacadeNotSupportedException) Transactional(org.springframework.transaction.annotation.Transactional) QueryFactory(eu.etaxonomy.cdm.api.service.search.QueryFactory) FieldUnit(eu.etaxonomy.cdm.model.occurrence.FieldUnit) ArrayList(java.util.ArrayList) SpecimenOrObservationBase(eu.etaxonomy.cdm.model.occurrence.SpecimenOrObservationBase) SpecimenOrObservationBaseDTO(eu.etaxonomy.cdm.api.service.dto.SpecimenOrObservationBaseDTO)

Aggregations

FieldUnitDTO (eu.etaxonomy.cdm.api.service.dto.FieldUnitDTO)5 DerivedUnitDTO (eu.etaxonomy.cdm.api.service.dto.DerivedUnitDTO)4 SpecimenOrObservationBaseDTO (eu.etaxonomy.cdm.api.service.dto.SpecimenOrObservationBaseDTO)4 HashMap (java.util.HashMap)4 UUID (java.util.UUID)4 DerivedUnitFacadeNotSupportedException (eu.etaxonomy.cdm.api.facade.DerivedUnitFacadeNotSupportedException)3 ReferencedObjectUndeletableException (eu.etaxonomy.cdm.api.service.exception.ReferencedObjectUndeletableException)3 LuceneParseException (eu.etaxonomy.cdm.api.service.search.LuceneParseException)3 DerivedUnitFacade (eu.etaxonomy.cdm.api.facade.DerivedUnitFacade)2 DerivedUnitFacadeConfigurator (eu.etaxonomy.cdm.api.facade.DerivedUnitFacadeConfigurator)2 Status (eu.etaxonomy.cdm.api.service.UpdateResult.Status)2 DeleteConfiguratorBase (eu.etaxonomy.cdm.api.service.config.DeleteConfiguratorBase)2 FindOccurrencesConfigurator (eu.etaxonomy.cdm.api.service.config.FindOccurrencesConfigurator)2 IIdentifiableEntityServiceConfigurator (eu.etaxonomy.cdm.api.service.config.IIdentifiableEntityServiceConfigurator)2 SpecimenDeleteConfigurator (eu.etaxonomy.cdm.api.service.config.SpecimenDeleteConfigurator)2 DNASampleDTO (eu.etaxonomy.cdm.api.service.dto.DNASampleDTO)2 MediaDTO (eu.etaxonomy.cdm.api.service.dto.MediaDTO)2 SpecimenOrObservationDTOFactory (eu.etaxonomy.cdm.api.service.dto.SpecimenOrObservationDTOFactory)2 ISequenceService (eu.etaxonomy.cdm.api.service.molecular.ISequenceService)2 Pager (eu.etaxonomy.cdm.api.service.pager.Pager)2