@Service @Transactional(readOnly=true) public class OccurrenceServiceImpl extends IdentifiableServiceBase<SpecimenOrObservationBase,IOccurrenceDao> implements IOccurrenceService
UPDATE_TITLE_CACHE_DEFAULT_STEP_SIZE
commonService
appContext, dao, INCLUDE_UNPUBLISHED, NO_UNPUBLISHED
Constructor and Description |
---|
OccurrenceServiceImpl() |
Modifier and Type | Method and Description |
---|---|
FieldUnitDTO |
assembleFieldUnitDTO(FieldUnit fieldUnit)
Assembles a
FieldUnitDTO for the given field unit. |
PreservedSpecimenDTO |
assemblePreservedSpecimenDTO(DerivedUnit derivedUnit)
Assembles a
PreservedSpecimenDTO for the given derived unit. |
PreservedSpecimenDTO |
assemblePreservedSpecimenDTO(DerivedUnit derivedUnit,
FieldUnitDTO fieldUnitDTO) |
long |
countByTitle(IIdentifiableEntityServiceConfigurator<SpecimenOrObservationBase> config)
Return an Integer of how many objects matching the given query string, optionally filtered by class, optionally with a particular MatchMode
|
long |
countDeterminations(SpecimenOrObservationBase occurence,
TaxonBase taxonbase)
Returns a count of determinations that have been made for a given occurence and for a given taxon concept
|
long |
countOccurrences(IIdentifiableEntityServiceConfigurator<SpecimenOrObservationBase> config)
Returns the number of specimens that match the given parameters
NOTE - issue #6484: the parameters FindOccurrencesConfigurator.getAssignmentStatus()
and FindOccurrencesConfigurator.isRetrieveIndirectlyAssociatedSpecimens() are not evaluated
in the count method |
DeleteResult |
delete(SpecimenOrObservationBase<?> specimen,
SpecimenDeleteConfigurator config)
Deletes the specified specimen according to the setting in the
SpecimenDeleteConfigurator . |
DeleteResult |
delete(java.util.UUID specimenUuid,
SpecimenDeleteConfigurator config)
Deletes the specified specimen belonging to the given
UUID
according to the setting in the SpecimenDeleteConfigurator . |
FieldUnitDTO |
findByAccessionNumber(java.lang.String accessionNumberString,
java.util.List<OrderHint> orderHints,
java.util.List<java.lang.String> propertyPaths) |
Pager<SearchResult<SpecimenOrObservationBase>> |
findByFullText(java.lang.Class<? extends SpecimenOrObservationBase> clazz,
java.lang.String queryString,
org.hibernate.search.spatial.impl.Rectangle boundingBox,
java.util.List<Language> languages,
boolean highlightFragments,
java.lang.Integer pageSize,
java.lang.Integer pageNumber,
java.util.List<OrderHint> orderHints,
java.util.List<java.lang.String> propertyPaths) |
<S extends SpecimenOrObservationBase> |
findByTitle(IIdentifiableEntityServiceConfigurator<S> config)
Return a Pager of objects matching the given query string, optionally filtered by class,
optionally with a particular MatchMode
|
java.util.List<PreservedSpecimenDTO> |
findByTitlePreservedSpecimenDTO(FindOccurrencesConfigurator config)
Returns a list of
PreservedSpecimenDTO for the specimens found with the
given configurator |
Pager<UuidAndTitleCache<SpecimenOrObservationBase>> |
findByTitleUuidAndTitleCache(FindOccurrencesConfigurator config)
Returns a list of
UuidAndTitleCache for the specimens found with the
given configurator |
FieldUnitDTO |
findFieldUnitDTO(DerivateDTO derivedUnitDTO,
java.util.Collection<FieldUnitDTO> fieldUnits,
java.util.HashMap<java.util.UUID,DerivateDTO> alreadyCollectedSpecimen) |
java.util.List<FieldUnitDTO> |
findFieldUnitDTOByAssociatedTaxon(java.util.Set<TaxonRelationshipEdge> includedRelationships,
java.util.UUID associatedTaxonUuid) |
java.util.Collection<FieldUnit> |
findFieldUnits(java.util.UUID derivedUnitUuid,
java.util.List<java.lang.String> propertyPaths)
|
java.util.List<FieldUnit> |
findFieldUnitsForGatheringEvent(java.util.UUID gatheringEventUuid)
Returns all
FieldUnit s that are referencing this GatheringEvent |
java.util.List<Point> |
findPointsForFieldUnitList(java.util.List<java.util.UUID> fieldUnitUuids) |
java.util.List<DerivedUnit> |
getAllChildDerivatives(SpecimenOrObservationBase<?> specimen)
Returns all child derivatives of the given specimen.
|
java.util.List<DerivedUnit> |
getAllChildDerivatives(java.util.UUID specimenUuid)
Returns all child derivatives of the given specimen.
|
java.util.List<SpecimenOrObservationBase<?>> |
getAllHierarchyDerivatives(SpecimenOrObservationBase<?> specimen)
Return the all
SpecimenOrObservationBase s of the complete
derivative hierarchy i.e. |
java.util.Collection<DescriptionElementBase> |
getCharacterDataForSpecimen(SpecimenOrObservationBase<?> specimen)
Deprecated.
|
java.util.Collection<DescriptionElementBase> |
getCharacterDataForSpecimen(java.util.UUID specimenUuid)
Gets all description elements that are used for describing the character
states of the given specimen
|
Country |
getCountryByIso(java.lang.String iso639)
FIXME Candidate for harmonization
move to termService
|
java.util.List<Country> |
getCountryByName(java.lang.String name)
FIXME Candidate for harmonization
move to termService
|
Pager<DerivationEvent> |
getDerivationEvents(SpecimenOrObservationBase occurence,
java.lang.Integer pageSize,
java.lang.Integer pageNumber,
java.util.List<java.lang.String> propertyPaths)
Returns a list of derivation events that have involved creating new DerivedUnits from this occurence
|
DerivedUnitFacade |
getDerivedUnitFacade(DerivedUnit derivedUnit,
java.util.List<java.lang.String> derivedUnitFacadeInitStrategy) |
java.util.List<UuidAndTitleCache<DerivedUnit>> |
getDerivedUnitUuidAndTitleCache(java.lang.Integer limit,
java.lang.String pattern)
Retrieves the
UUID and the string representation (title cache) of all
DerivedUnit s found in the data base. |
Pager<DeterminationEvent> |
getDeterminations(SpecimenOrObservationBase occurrence,
TaxonBase taxonBase,
java.lang.Integer pageSize,
java.lang.Integer pageNumber,
java.util.List<java.lang.String> propertyPaths)
Returns a List of determinations that have been made for a given occurence
|
java.util.List<UuidAndTitleCache<FieldUnit>> |
getFieldUnitUuidAndTitleCache()
Retrieves the
UUID and the string representation (title cache) of all
FieldUnit s found in the data base. |
Pager<Media> |
getMedia(SpecimenOrObservationBase occurence,
java.lang.Integer pageSize,
java.lang.Integer pageNumber,
java.util.List<java.lang.String> propertyPaths)
Returns a List of Media that are associated with a given occurence
|
Pager<Media> |
getMediainHierarchy(SpecimenOrObservationBase rootOccurence,
java.lang.Integer pageSize,
java.lang.Integer pageNumber,
java.util.List<java.lang.String> propertyPaths)
Returns all media attached to this occurence and its children.
|
java.lang.String |
getMostSignificantIdentifier(DerivedUnit derivedUnit)
Returns the most significant identifier for the given
DerivedUnit . |
DeleteResult |
isDeletable(java.util.UUID specimenUuid,
DeleteConfiguratorBase config)
the basic isDeletable method return false if the object is referenced from any other object.
|
Pager<SpecimenOrObservationBase> |
list(java.lang.Class<? extends SpecimenOrObservationBase> type,
TaxonBase determinedAs,
java.lang.Integer pageSize,
java.lang.Integer pageNumber,
java.util.List<OrderHint> orderHints,
java.util.List<java.lang.String> propertyPaths)
Returns a paged list of occurrences that have been determined to belong
to the taxon concept determinedAs, optionally restricted to objects
belonging to a class that that extends SpecimenOrObservationBase.
|
Pager<SpecimenOrObservationBase> |
list(java.lang.Class<? extends SpecimenOrObservationBase> type,
TaxonName determinedAs,
java.lang.Integer pageSize,
java.lang.Integer pageNumber,
java.util.List<OrderHint> orderHints,
java.util.List<java.lang.String> propertyPaths)
Returns a paged list of occurrences that have been determined to belong
to the taxon name determinedAs, optionally restricted to objects
belonging to a class that that extends SpecimenOrObservationBase.
|
java.util.Collection<TaxonBase<?>> |
listAssociatedTaxa(SpecimenOrObservationBase<?> specimen,
boolean includeUnpublished,
java.lang.Integer limit,
java.lang.Integer start,
java.util.List<OrderHint> orderHints,
java.util.List<java.lang.String> propertyPaths)
Retrieves all associated taxa for the given specimen (via type designations, determination, individuals associations)
|
java.util.Collection<TaxonBase<?>> |
listAssociatedTaxa(SpecimenOrObservationBase<?> specimen,
java.lang.Integer limit,
java.lang.Integer start,
java.util.List<OrderHint> orderHints,
java.util.List<java.lang.String> propertyPaths) |
<T extends SpecimenOrObservationBase> |
listByAssociatedTaxon(java.lang.Class<T> type,
java.util.Set<TaxonRelationshipEdge> includeRelationships,
Taxon associatedTaxon,
java.lang.Integer maxDepth,
java.lang.Integer pageSize,
java.lang.Integer pageNumber,
java.util.List<OrderHint> orderHints,
java.util.List<java.lang.String> propertyPaths)
Lists all instances of
SpecimenOrObservationBase which are
associated with the taxon specified as parameter. |
java.util.List<DerivedUnitFacade> |
listDerivedUnitFacades(DescriptionBase description,
java.util.List<java.lang.String> derivedUnitFacadeInitStrategy) |
java.util.Collection<DescriptionBase<?>> |
listDescriptionsWithDescriptionSpecimen(SpecimenOrObservationBase<?> specimen,
java.lang.Integer limit,
java.lang.Integer start,
java.util.List<OrderHint> orderHints,
java.util.List<java.lang.String> propertyPaths)
Retrieves all
DescriptionBase s that have the given specimen set as described specimen. |
java.util.Collection<DeterminationEvent> |
listDeterminationEvents(SpecimenOrObservationBase<?> specimen,
java.lang.Integer limit,
java.lang.Integer start,
java.util.List<OrderHint> orderHints,
java.util.List<java.lang.String> propertyPaths)
Retrieves all
DeterminationEvent s which have the given specimen set as identified unit. |
java.util.Collection<TaxonBase<?>> |
listDeterminedTaxa(SpecimenOrObservationBase<?> specimen,
boolean includeUnpublished,
java.lang.Integer limit,
java.lang.Integer start,
java.util.List<OrderHint> orderHints,
java.util.List<java.lang.String> propertyPaths)
Retrieves all taxa that the given specimen is determined as
|
java.util.Collection<TaxonBase<?>> |
listDeterminedTaxa(SpecimenOrObservationBase<?> specimen,
java.lang.Integer limit,
java.lang.Integer start,
java.util.List<OrderHint> orderHints,
java.util.List<java.lang.String> propertyPaths) |
java.util.Collection<SpecimenOrObservationBase> |
listFieldUnitsByAssociatedTaxon(Taxon associatedTaxon,
java.util.List<OrderHint> orderHints,
java.util.List<java.lang.String> propertyPaths)
Lists all instances of
FieldUnit which are
associated directly or indirectlywith the taxon specified
as parameter. |
java.util.Collection<IndividualsAssociation> |
listIndividualsAssociations(SpecimenOrObservationBase<?> specimen,
java.lang.Integer limit,
java.lang.Integer start,
java.util.List<OrderHint> orderHints,
java.util.List<java.lang.String> propertyPaths)
Retrieves all
IndividualsAssociation with the given specimen. |
java.util.Collection<TaxonBase<?>> |
listIndividualsAssociationTaxa(SpecimenOrObservationBase<?> specimen,
boolean includeUnpublished,
java.lang.Integer limit,
java.lang.Integer start,
java.util.List<OrderHint> orderHints,
java.util.List<java.lang.String> propertyPaths) |
java.util.Collection<TaxonBase<?>> |
listIndividualsAssociationTaxa(SpecimenOrObservationBase<?> specimen,
java.lang.Integer limit,
java.lang.Integer start,
java.util.List<OrderHint> orderHints,
java.util.List<java.lang.String> propertyPaths)
Retrieves all taxa linked via
IndividualsAssociation with the given specimen. |
java.util.Map<DerivedUnit,java.util.Collection<SpecimenTypeDesignation>> |
listTypeDesignations(java.util.Collection<DerivedUnit> specimens,
java.lang.Integer limit,
java.lang.Integer start,
java.util.List<OrderHint> orderHints,
java.util.List<java.lang.String> propertyPaths)
Retrieves all
SpecimenTypeDesignation s which have the given specimens as a type specimen. |
java.util.Collection<SpecimenTypeDesignation> |
listTypeDesignations(DerivedUnit specimen,
java.lang.Integer limit,
java.lang.Integer start,
java.util.List<OrderHint> orderHints,
java.util.List<java.lang.String> propertyPaths)
Retrieves all
SpecimenTypeDesignation s which have the given specimen as a type specimen. |
java.util.Collection<TaxonBase<?>> |
listTypeDesignationTaxa(DerivedUnit specimen,
boolean includeUnpublished,
java.lang.Integer limit,
java.lang.Integer start,
java.util.List<OrderHint> orderHints,
java.util.List<java.lang.String> propertyPaths) |
java.util.Collection<TaxonBase<?>> |
listTypeDesignationTaxa(DerivedUnit specimen,
java.lang.Integer limit,
java.lang.Integer start,
java.util.List<OrderHint> orderHints,
java.util.List<java.lang.String> propertyPaths)
Retrieves all taxa with a
SpecimenTypeDesignation with the given specimen as a type specimen. |
java.util.Collection<SpecimenNodeWrapper> |
listUuidAndTitleCacheByAssociatedTaxon(java.util.List<java.util.UUID> taxonNodeUuids,
java.lang.Integer limit,
java.lang.Integer start)
The method will search for specimen associated with the taxon nodes.
It will search for 3 possible association types: - via IndividualAssociations of the taxon - via TypeDesignations of the taxon name - via Determinations of the taxon or taxon name more are covered in IIdentifiableEntityService.findByTitle(IIdentifiableEntityServiceConfigurator) |
FieldUnitDTO |
loadFieldUnitDTO(java.util.UUID derivedUnitUuid)
Load the FieldUnitDTO for the given
derivedUnitUuid with all intermediate derivatives and GatheringEventDTO |
boolean |
moveDerivate(SpecimenOrObservationBase<?> from,
SpecimenOrObservationBase<?> to,
DerivedUnit derivate) |
UpdateResult |
moveDerivate(java.util.UUID specimenFromUuid,
java.util.UUID specimenToUuid,
java.util.UUID derivateUuid)
Moves the given
DerivedUnit from one SpecimenOrObservationBase to another. |
UpdateResult |
moveSequence(DnaSample from,
DnaSample to,
Sequence sequence)
|
UpdateResult |
moveSequence(java.util.UUID fromUuid,
java.util.UUID toUuid,
java.util.UUID sequenceUuid) |
<T extends SpecimenOrObservationBase> |
pageByAssociatedTaxon(java.lang.Class<T> type,
java.util.Set<TaxonRelationshipEdge> includeRelationships,
java.lang.String taxonUUID,
java.lang.Integer maxDepth,
java.lang.Integer pageSize,
java.lang.Integer pageNumber,
java.util.List<OrderHint> orderHints,
java.util.List<java.lang.String> propertyPaths)
See
#listByAssociatedTaxon(Class, Set, String, Integer, Integer, Integer, List, List) |
<T extends SpecimenOrObservationBase> |
pageByAssociatedTaxon(java.lang.Class<T> type,
java.util.Set<TaxonRelationshipEdge> includedRelationships,
Taxon associatedTaxon,
java.lang.Integer maxDepth,
java.lang.Integer pageSize,
java.lang.Integer pageNumber,
java.util.List<OrderHint> orderHints,
java.util.List<java.lang.String> propertyPaths)
|
Pager<SpecimenOrObservationBase> |
pageFieldUnitsByAssociatedTaxon(java.util.Set<TaxonRelationshipEdge> includeRelationships,
Taxon associatedTaxon,
java.lang.Integer maxDepth,
java.lang.Integer pageSize,
java.lang.Integer pageNumber,
java.util.List<OrderHint> orderHints,
java.util.List<java.lang.String> propertyPaths)
See
#listFieldUnitsByAssociatedTaxon(Set, Taxon, Integer, Integer, Integer, List, List) |
protected void |
setDao(IOccurrenceDao dao) |
UpdateResult |
updateCaches(java.lang.Class<? extends SpecimenOrObservationBase> clazz,
java.lang.Integer stepSize,
IIdentifiableEntityCacheStrategy<SpecimenOrObservationBase> cacheStrategy,
IProgressMonitor monitor)
(Re-)generate the caches for all objects of this concrete IdentifiableEntity class
|
countByTitle, countByTitleWithRestrictions, deduplicate, find, findByIdentifier, findByMarker, findByTitle, findByTitleWithRestrictions, findTitleCache, findUuidAndTitleCacheByMarker, getRights, getSourcedObjectByIdInSource, getSources, getTitleCache, getUuidAndTitleCache, getUuidAndTitleCache, listByIdentifier, listByReferenceTitle, listByReferenceTitleWithRestrictions, listByTitle, listByTitleWithRestrictions, replace, search, switchOfAutoinitializer, switchOnOldAutoInitializer, updateCaches, updateCachesImpl
countMarkers, getAnnotations, getMarkers, groupMarkers
getNextAuditEvent, getPreviousAuditEvent, pageAuditEvents, pageAuditEvents
checkPublished, clear, count, delete, delete, delete, exists, find, find, find, find, findById, findWithoutFlush, getSession, group, list, list, load, load, load, load, loadByIds, loadByIds, loadWithUpdate, lock, merge, merge, merge, merge, page, page, page, pageByParamWithRestrictions, refresh, refresh, save, save, saveOrUpdate, saveOrUpdate, setApplicationContext, update
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
search
countByTitle, countByTitleWithRestrictions, deduplicate, find, findByIdentifier, findByMarker, findByTitle, findByTitleWithRestrictions, findTitleCache, findUuidAndTitleCacheByMarker, getRights, getSourcedObjectByIdInSource, getSources, getTitleCache, getUuidAndTitleCache, getUuidAndTitleCache, listByIdentifier, listByReferenceTitle, listByReferenceTitleWithRestrictions, listByTitle, listByTitleWithRestrictions, replace, updateCaches
countMarkers, getAnnotations, getMarkers, groupMarkers
getNextAuditEvent, getPreviousAuditEvent, pageAuditEvents, pageAuditEvents
clear, count, delete, delete, delete, exists, find, find, find, find, findById, findWithoutFlush, getSession, group, list, list, load, load, load, load, loadByIds, loadByIds, loadWithUpdate, lock, merge, merge, merge, merge, page, page, page, pageByParamWithRestrictions, refresh, refresh, save, save, saveOrUpdate, saveOrUpdate, update
@Transactional(readOnly=false) public UpdateResult updateCaches(java.lang.Class<? extends SpecimenOrObservationBase> clazz, java.lang.Integer stepSize, IIdentifiableEntityCacheStrategy<SpecimenOrObservationBase> cacheStrategy, IProgressMonitor monitor)
IIdentifiableEntityService
updateCaches
in interface IIdentifiableEntityService<SpecimenOrObservationBase>
clazz
- class of objects to be updatedstepSize
- number of objects loaded per step. If null
use default.cacheStrategy
- cache strategy used for cache generation. If null
use default.monitor
- progress monitor. If null
use default.public Country getCountryByIso(java.lang.String iso639)
getCountryByIso
in interface IOccurrenceService
public java.util.List<Country> getCountryByName(java.lang.String name)
getCountryByName
in interface IOccurrenceService
@Autowired protected void setDao(IOccurrenceDao dao)
setDao
in class ServiceBase<SpecimenOrObservationBase,IOccurrenceDao>
public Pager<DerivationEvent> getDerivationEvents(SpecimenOrObservationBase occurence, java.lang.Integer pageSize, java.lang.Integer pageNumber, java.util.List<java.lang.String> propertyPaths)
IOccurrenceService
getDerivationEvents
in interface IOccurrenceService
occurence
- the occurence that was a source of these derivation eventspageSize
- The maximum number of derivation events returned (can be null for all related derivation events)pageNumber
- The offset (in pageSize chunks) from the start of the result set (0 - based)public long countDeterminations(SpecimenOrObservationBase occurence, TaxonBase taxonbase)
IOccurrenceService
countDeterminations
in interface IOccurrenceService
occurence
- the occurence associated with these determinations (can be null for all occurrences)taxonbase
- the taxon concept associated with these determinations (can be null for all taxon concepts)public Pager<DeterminationEvent> getDeterminations(SpecimenOrObservationBase occurrence, TaxonBase taxonBase, java.lang.Integer pageSize, java.lang.Integer pageNumber, java.util.List<java.lang.String> propertyPaths)
IOccurrenceService
getDeterminations
in interface IOccurrenceService
occurrence
- the occurence associated with these determinations (can be null for all occurrences)pageSize
- The maximum number of determinations returned (can be null for all related determinations)pageNumber
- The offset (in pageSize chunks) from the start of the result set (0 - based)public Pager<Media> getMedia(SpecimenOrObservationBase occurence, java.lang.Integer pageSize, java.lang.Integer pageNumber, java.util.List<java.lang.String> propertyPaths)
IOccurrenceService
getMedia
in interface IOccurrenceService
occurence
- the occurence associated with these mediapageSize
- The maximum number of media returned (can be null for all related media)pageNumber
- The offset (in pageSize chunks) from the start of the result set (0 - based)propertyPaths
- properties to initialize - see IBeanInitializer.initialize(Object, List)
public Pager<Media> getMediainHierarchy(SpecimenOrObservationBase rootOccurence, java.lang.Integer pageSize, java.lang.Integer pageNumber, java.util.List<java.lang.String> propertyPaths)
IOccurrenceService
MediaSpecimen
and molecular images into account.getMediainHierarchy
in interface IOccurrenceService
pageNumber
- The offset (in pageSize chunks) from the start of the result set (0 - based)propertyPaths
- properties to initialize - see IBeanInitializer.initialize(Object, List)
public Pager<SpecimenOrObservationBase> list(java.lang.Class<? extends SpecimenOrObservationBase> type, TaxonName determinedAs, java.lang.Integer pageSize, java.lang.Integer pageNumber, java.util.List<OrderHint> orderHints, java.util.List<java.lang.String> propertyPaths)
IOccurrenceService
In contrast to #listByAnyAssociation(Class, Taxon, List)
this
method only takes SpecimenOrObservationBase instances into account which
are actually determined as the taxon specified by
determinedAs
.
list
in interface IOccurrenceService
type
- The type of entities to return (can be null to count all
entities of type determinedAs
- the taxon name that the occurrences have been determined to
belong toorderHints
- Supports path like orderHints.propertyNames
which
include *-to-one properties like createdBy.username or
authorTeam.persistentTitleCachepropertyPaths
- properties to be initializedpublic Pager<SpecimenOrObservationBase> list(java.lang.Class<? extends SpecimenOrObservationBase> type, TaxonBase determinedAs, java.lang.Integer pageSize, java.lang.Integer pageNumber, java.util.List<OrderHint> orderHints, java.util.List<java.lang.String> propertyPaths)
IOccurrenceService
In contrast to #listByAnyAssociation(Class, Taxon, List)
this
method only takes SpecimenOrObservationBase instances into account which
are actually determined as the taxon specified by
determinedAs
.
list
in interface IOccurrenceService
type
- The type of entities to return (can be null to count all
entities of type determinedAs
- the taxon concept that the occurrences have been determined to
belong toorderHints
- Supports path like orderHints.propertyNames
which
include *-to-one properties like createdBy.username or
authorTeam.persistentTitleCachepropertyPaths
- properties to be initializedpublic java.util.List<UuidAndTitleCache<DerivedUnit>> getDerivedUnitUuidAndTitleCache(java.lang.Integer limit, java.lang.String pattern)
IOccurrenceService
UUID
and the string representation (title cache) of all
DerivedUnit
s found in the data base.getDerivedUnitUuidAndTitleCache
in interface IOccurrenceService
UuidAndTitleCache
public java.util.List<UuidAndTitleCache<FieldUnit>> getFieldUnitUuidAndTitleCache()
IOccurrenceService
UUID
and the string representation (title cache) of all
FieldUnit
s found in the data base.getFieldUnitUuidAndTitleCache
in interface IOccurrenceService
UuidAndTitleCache
public DerivedUnitFacade getDerivedUnitFacade(DerivedUnit derivedUnit, java.util.List<java.lang.String> derivedUnitFacadeInitStrategy) throws DerivedUnitFacadeNotSupportedException
getDerivedUnitFacade
in interface IOccurrenceService
DerivedUnitFacadeNotSupportedException
public java.util.List<DerivedUnitFacade> listDerivedUnitFacades(DescriptionBase description, java.util.List<java.lang.String> derivedUnitFacadeInitStrategy)
listDerivedUnitFacades
in interface IOccurrenceService
public <T extends SpecimenOrObservationBase> java.util.List<T> listByAssociatedTaxon(java.lang.Class<T> type, java.util.Set<TaxonRelationshipEdge> includeRelationships, Taxon associatedTaxon, java.lang.Integer maxDepth, java.lang.Integer pageSize, java.lang.Integer pageNumber, java.util.List<OrderHint> orderHints, java.util.List<java.lang.String> propertyPaths)
IOccurrenceService
SpecimenOrObservationBase
which are
associated with the taxon
specified as parameter.
SpecimenOrObservationBase instances can be associated to taxa in multiple
ways, all these possible relations are taken into account:
IndividualsAssociation
elements in a
TaxonDescription
contain DerivedUnit
sSpecimenTypeDesignation
s may be associated with any
HomotypicalGroup
related to the specific Taxon
.Taxon
may be referenced by the DeterminationEvent
of the SpecimenOrObservationBase
TaxonRelationship
s. If
the parameter includeRelationships
is containing elements,
these according s and
directional information will be used to collect further
SpecimenOrObservationBase
instances found this way.listByAssociatedTaxon
in interface IOccurrenceService
maxDepth
- TODOpublic java.util.Collection<SpecimenNodeWrapper> listUuidAndTitleCacheByAssociatedTaxon(java.util.List<java.util.UUID> taxonNodeUuids, java.lang.Integer limit, java.lang.Integer start)
IOccurrenceService
IIdentifiableEntityService.findByTitle(IIdentifiableEntityServiceConfigurator)
listUuidAndTitleCacheByAssociatedTaxon
in interface IOccurrenceService
taxonNodeUuids
- a list of UUID
s of the taxon nodesSpecimenNodeWrapper
containing the
TaxonNode
and the corresponding UuidAndTitleCache
object for the specimen found for this taxon nodepublic java.util.Collection<SpecimenOrObservationBase> listFieldUnitsByAssociatedTaxon(Taxon associatedTaxon, java.util.List<OrderHint> orderHints, java.util.List<java.lang.String> propertyPaths)
IOccurrenceService
FieldUnit
which are
associated directly or indirectlywith the taxon
specified
as parameter. "Indirectly" means that a sub derivate of the FieldUnit is
directly associated with the given taxon.
SpecimenOrObservationBase instances can be associated to taxa in multiple
ways, all these possible relations are taken into account:
IndividualsAssociation
elements in a
TaxonDescription
contain DerivedUnit
sSpecimenTypeDesignation
s may be associated with any
HomotypicalGroup
related to the specific Taxon
.Taxon
may be referenced by the DeterminationEvent
of the SpecimenOrObservationBase
TaxonRelationship
s. If
the parameter includeRelationships
is containing elements,
these according s and
directional information will be used to collect further
SpecimenOrObservationBase
instances found this way.listFieldUnitsByAssociatedTaxon
in interface IOccurrenceService
public Pager<SpecimenOrObservationBase> pageFieldUnitsByAssociatedTaxon(java.util.Set<TaxonRelationshipEdge> includeRelationships, Taxon associatedTaxon, java.lang.Integer maxDepth, java.lang.Integer pageSize, java.lang.Integer pageNumber, java.util.List<OrderHint> orderHints, java.util.List<java.lang.String> propertyPaths)
IOccurrenceService
#listFieldUnitsByAssociatedTaxon(Set, Taxon, Integer, Integer, Integer, List, List)
pageFieldUnitsByAssociatedTaxon
in interface IOccurrenceService
public FieldUnitDTO assembleFieldUnitDTO(FieldUnit fieldUnit)
IOccurrenceService
FieldUnitDTO
for the given field unit.assembleFieldUnitDTO
in interface IOccurrenceService
public PreservedSpecimenDTO assemblePreservedSpecimenDTO(DerivedUnit derivedUnit)
IOccurrenceService
PreservedSpecimenDTO
for the given derived unit.assemblePreservedSpecimenDTO
in interface IOccurrenceService
public java.lang.String getMostSignificantIdentifier(DerivedUnit derivedUnit)
IOccurrenceService
DerivedUnit
.getMostSignificantIdentifier
in interface IOccurrenceService
derivedUnit
- the derived unit to checkpublic PreservedSpecimenDTO assemblePreservedSpecimenDTO(DerivedUnit derivedUnit, FieldUnitDTO fieldUnitDTO)
public <T extends SpecimenOrObservationBase> Pager<T> pageByAssociatedTaxon(java.lang.Class<T> type, java.util.Set<TaxonRelationshipEdge> includedRelationships, Taxon associatedTaxon, java.lang.Integer maxDepth, java.lang.Integer pageSize, java.lang.Integer pageNumber, java.util.List<OrderHint> orderHints, java.util.List<java.lang.String> propertyPaths)
IOccurrenceService
IOccurrenceService.listByAssociatedTaxon(Class, Set, Taxon, Integer, Integer, Integer, List, List)
pageByAssociatedTaxon
in interface IOccurrenceService
public <T extends SpecimenOrObservationBase> Pager<T> pageByAssociatedTaxon(java.lang.Class<T> type, java.util.Set<TaxonRelationshipEdge> includeRelationships, java.lang.String taxonUUID, java.lang.Integer maxDepth, java.lang.Integer pageSize, java.lang.Integer pageNumber, java.util.List<OrderHint> orderHints, java.util.List<java.lang.String> propertyPaths)
IOccurrenceService
#listByAssociatedTaxon(Class, Set, String, Integer, Integer, Integer, List, List)
pageByAssociatedTaxon
in interface IOccurrenceService
public java.util.List<FieldUnitDTO> findFieldUnitDTOByAssociatedTaxon(java.util.Set<TaxonRelationshipEdge> includedRelationships, java.util.UUID associatedTaxonUuid)
findFieldUnitDTOByAssociatedTaxon
in interface IOccurrenceService
public FieldUnitDTO findByAccessionNumber(java.lang.String accessionNumberString, java.util.List<OrderHint> orderHints, java.util.List<java.lang.String> propertyPaths)
findByAccessionNumber
in interface IOccurrenceService
public Pager<SearchResult<SpecimenOrObservationBase>> findByFullText(java.lang.Class<? extends SpecimenOrObservationBase> clazz, java.lang.String queryString, org.hibernate.search.spatial.impl.Rectangle boundingBox, java.util.List<Language> languages, boolean highlightFragments, java.lang.Integer pageSize, java.lang.Integer pageNumber, java.util.List<OrderHint> orderHints, java.util.List<java.lang.String> propertyPaths) throws java.io.IOException, LuceneParseException
findByFullText
in interface IOccurrenceService
org.apache.lucene.index.CorruptIndexException
java.io.IOException
LuceneParseException
public java.util.Collection<FieldUnit> findFieldUnits(java.util.UUID derivedUnitUuid, java.util.List<java.lang.String> propertyPaths)
IOccurrenceService
findFieldUnits
in interface IOccurrenceService
derivedUnitUuid
- the UUID of the specimenpropertyPaths
- the property path@Transactional(readOnly=true) public FieldUnitDTO findFieldUnitDTO(DerivateDTO derivedUnitDTO, java.util.Collection<FieldUnitDTO> fieldUnits, java.util.HashMap<java.util.UUID,DerivateDTO> alreadyCollectedSpecimen)
findFieldUnitDTO
in interface IOccurrenceService
@Transactional(readOnly=true) public FieldUnitDTO loadFieldUnitDTO(java.util.UUID derivedUnitUuid)
IOccurrenceService
derivedUnitUuid
with all intermediate derivatives and GatheringEventDTO
loadFieldUnitDTO
in interface IOccurrenceService
@Transactional(readOnly=false) public UpdateResult moveSequence(DnaSample from, DnaSample to, Sequence sequence)
IOccurrenceService
moveSequence
in interface IOccurrenceService
from
- the DnaSample from which the sequence will be removedto
- the DnaSample which to which the sequence will be addedsequence
- the Sequence to movetrue
if successfully moved, false
otherwise@Transactional(readOnly=false) public UpdateResult moveSequence(java.util.UUID fromUuid, java.util.UUID toUuid, java.util.UUID sequenceUuid)
moveSequence
in interface IOccurrenceService
@Transactional(readOnly=false) public boolean moveDerivate(SpecimenOrObservationBase<?> from, SpecimenOrObservationBase<?> to, DerivedUnit derivate)
moveDerivate
in interface IOccurrenceService
@Transactional(readOnly=false) public UpdateResult moveDerivate(java.util.UUID specimenFromUuid, java.util.UUID specimenToUuid, java.util.UUID derivateUuid)
IOccurrenceService
DerivedUnit
from one SpecimenOrObservationBase
to another.moveDerivate
in interface IOccurrenceService
true
if successfully moved, false
otherwisepublic DeleteResult isDeletable(java.util.UUID specimenUuid, DeleteConfiguratorBase config)
VersionableServiceBase
isDeletable
in interface IVersionableService<SpecimenOrObservationBase>
isDeletable
in class VersionableServiceBase<SpecimenOrObservationBase,IOccurrenceDao>
@Transactional(readOnly=false) public DeleteResult delete(java.util.UUID specimenUuid, SpecimenDeleteConfigurator config)
UUID
according to the setting in the SpecimenDeleteConfigurator
.delete
in interface IOccurrenceService
config
- specifies options if and how the specimen should be deleted
like e.g. including all of its childrenDeleteResult
which holds information about the
outcome of this operation@Transactional(readOnly=false) public DeleteResult delete(SpecimenOrObservationBase<?> specimen, SpecimenDeleteConfigurator config)
IOccurrenceService
SpecimenDeleteConfigurator
.delete
in interface IOccurrenceService
specimen
- the specimen which shoul be deletedconfig
- specifies options if and how the specimen should be deleted like e.g. including all
of its childrenDeleteResult
which holds information about the outcome of this operationpublic java.util.Collection<IndividualsAssociation> listIndividualsAssociations(SpecimenOrObservationBase<?> specimen, java.lang.Integer limit, java.lang.Integer start, java.util.List<OrderHint> orderHints, java.util.List<java.lang.String> propertyPaths)
IOccurrenceService
IndividualsAssociation
with the given specimen.listIndividualsAssociations
in interface IOccurrenceService
specimen
- the specimen for which the associations are retrievedpublic java.util.Collection<TaxonBase<?>> listAssociatedTaxa(SpecimenOrObservationBase<?> specimen, java.lang.Integer limit, java.lang.Integer start, java.util.List<OrderHint> orderHints, java.util.List<java.lang.String> propertyPaths)
listAssociatedTaxa
in interface IOccurrenceService
#listAssociatedTaxa(SpecimenOrObservationBase, Integer, Integer, List, List)axa
public java.util.Collection<TaxonBase<?>> listAssociatedTaxa(SpecimenOrObservationBase<?> specimen, boolean includeUnpublished, java.lang.Integer limit, java.lang.Integer start, java.util.List<OrderHint> orderHints, java.util.List<java.lang.String> propertyPaths)
IOccurrenceService
listAssociatedTaxa
in interface IOccurrenceService
public java.util.Collection<TaxonBase<?>> listDeterminedTaxa(SpecimenOrObservationBase<?> specimen, java.lang.Integer limit, java.lang.Integer start, java.util.List<OrderHint> orderHints, java.util.List<java.lang.String> propertyPaths)
listDeterminedTaxa
in interface IOccurrenceService
IOccurrenceService.listDeterminedTaxa(SpecimenOrObservationBase, Integer, Integer, List, List)
public java.util.Collection<TaxonBase<?>> listDeterminedTaxa(SpecimenOrObservationBase<?> specimen, boolean includeUnpublished, java.lang.Integer limit, java.lang.Integer start, java.util.List<OrderHint> orderHints, java.util.List<java.lang.String> propertyPaths)
IOccurrenceService
listDeterminedTaxa
in interface IOccurrenceService
public java.util.Collection<TaxonBase<?>> listTypeDesignationTaxa(DerivedUnit specimen, java.lang.Integer limit, java.lang.Integer start, java.util.List<OrderHint> orderHints, java.util.List<java.lang.String> propertyPaths)
SpecimenTypeDesignation
with the given specimen as a type specimen.listTypeDesignationTaxa
in interface IOccurrenceService
specimen
- the type specimenpublic java.util.Collection<TaxonBase<?>> listTypeDesignationTaxa(DerivedUnit specimen, boolean includeUnpublished, java.lang.Integer limit, java.lang.Integer start, java.util.List<OrderHint> orderHints, java.util.List<java.lang.String> propertyPaths)
listTypeDesignationTaxa
in interface IOccurrenceService
IOccurrenceService.listTypeDesignationTaxa(DerivedUnit, Integer, Integer, List, List)a
public java.util.Collection<TaxonBase<?>> listIndividualsAssociationTaxa(SpecimenOrObservationBase<?> specimen, java.lang.Integer limit, java.lang.Integer start, java.util.List<OrderHint> orderHints, java.util.List<java.lang.String> propertyPaths)
IndividualsAssociation
with the given specimen.listIndividualsAssociationTaxa
in interface IOccurrenceService
specimen
- the specimen which is linked to the taxapublic java.util.Collection<TaxonBase<?>> listIndividualsAssociationTaxa(SpecimenOrObservationBase<?> specimen, boolean includeUnpublished, java.lang.Integer limit, java.lang.Integer start, java.util.List<OrderHint> orderHints, java.util.List<java.lang.String> propertyPaths)
listIndividualsAssociationTaxa
in interface IOccurrenceService
IOccurrenceService.listIndividualsAssociationTaxa(SpecimenOrObservationBase, Integer, Integer, List, List)
public java.util.Collection<DeterminationEvent> listDeterminationEvents(SpecimenOrObservationBase<?> specimen, java.lang.Integer limit, java.lang.Integer start, java.util.List<OrderHint> orderHints, java.util.List<java.lang.String> propertyPaths)
IOccurrenceService
DeterminationEvent
s which have the given specimen set as identified unit.listDeterminationEvents
in interface IOccurrenceService
public java.util.Map<DerivedUnit,java.util.Collection<SpecimenTypeDesignation>> listTypeDesignations(java.util.Collection<DerivedUnit> specimens, java.lang.Integer limit, java.lang.Integer start, java.util.List<OrderHint> orderHints, java.util.List<java.lang.String> propertyPaths)
IOccurrenceService
SpecimenTypeDesignation
s which have the given specimens as a type specimen.listTypeDesignations
in interface IOccurrenceService
specimens
- the type specimenspublic java.util.Collection<SpecimenTypeDesignation> listTypeDesignations(DerivedUnit specimen, java.lang.Integer limit, java.lang.Integer start, java.util.List<OrderHint> orderHints, java.util.List<java.lang.String> propertyPaths)
IOccurrenceService
SpecimenTypeDesignation
s which have the given specimen as a type specimen.listTypeDesignations
in interface IOccurrenceService
specimen
- the type specimenpublic java.util.Collection<DescriptionBase<?>> listDescriptionsWithDescriptionSpecimen(SpecimenOrObservationBase<?> specimen, java.lang.Integer limit, java.lang.Integer start, java.util.List<OrderHint> orderHints, java.util.List<java.lang.String> propertyPaths)
IOccurrenceService
DescriptionBase
s that have the given specimen set as described specimen.listDescriptionsWithDescriptionSpecimen
in interface IOccurrenceService
specimen
- the described specimen@Deprecated public java.util.Collection<DescriptionElementBase> getCharacterDataForSpecimen(SpecimenOrObservationBase<?> specimen)
IOccurrenceService
getCharacterDataForSpecimen
in interface IOccurrenceService
specimen
- the specimen for which the character state description
elements should be retrievedpublic java.util.Collection<DescriptionElementBase> getCharacterDataForSpecimen(java.util.UUID specimenUuid)
IOccurrenceService
getCharacterDataForSpecimen
in interface IOccurrenceService
specimenUuid
- the specimen UUID
for which the character state description
elements should be retrievedpublic long countByTitle(IIdentifiableEntityServiceConfigurator<SpecimenOrObservationBase> config)
IIdentifiableEntityService
countByTitle
in interface IIdentifiableEntityService<SpecimenOrObservationBase>
countByTitle
in class IdentifiableServiceBase<SpecimenOrObservationBase,IOccurrenceDao>
config
- an IIdentifiableEntityServiceConfigurator
objectpublic Pager<UuidAndTitleCache<SpecimenOrObservationBase>> findByTitleUuidAndTitleCache(FindOccurrencesConfigurator config)
IOccurrenceService
UuidAndTitleCache
for the specimens found with the
given configuratorfindByTitleUuidAndTitleCache
in interface IOccurrenceService
config
- the configurator for the searchpublic java.util.List<PreservedSpecimenDTO> findByTitlePreservedSpecimenDTO(FindOccurrencesConfigurator config)
IOccurrenceService
PreservedSpecimenDTO
for the specimens found with the
given configuratorfindByTitlePreservedSpecimenDTO
in interface IOccurrenceService
config
- the configurator for the searchPreservedSpecimenDTO
objectpublic <S extends SpecimenOrObservationBase> Pager<S> findByTitle(IIdentifiableEntityServiceConfigurator<S> config)
IIdentifiableEntityService
findByTitle
in interface IIdentifiableEntityService<SpecimenOrObservationBase>
findByTitle
in class IdentifiableServiceBase<SpecimenOrObservationBase,IOccurrenceDao>
public java.util.List<SpecimenOrObservationBase<?>> getAllHierarchyDerivatives(SpecimenOrObservationBase<?> specimen)
IOccurrenceService
SpecimenOrObservationBase
s of the complete
derivative hierarchy i.e. all parent and child derivatives and the given
specimen itself.getAllHierarchyDerivatives
in interface IOccurrenceService
specimen
- a specimen or observationpublic java.util.List<DerivedUnit> getAllChildDerivatives(java.util.UUID specimenUuid)
IOccurrenceService
getAllChildDerivatives
in interface IOccurrenceService
public java.util.List<DerivedUnit> getAllChildDerivatives(SpecimenOrObservationBase<?> specimen)
IOccurrenceService
getAllChildDerivatives
in interface IOccurrenceService
specimen
- a specimen or observationpublic long countOccurrences(IIdentifiableEntityServiceConfigurator<SpecimenOrObservationBase> config)
IOccurrenceService
FindOccurrencesConfigurator.getAssignmentStatus()
and FindOccurrencesConfigurator.isRetrieveIndirectlyAssociatedSpecimens()
are not evaluated
in the count methodcountOccurrences
in interface IOccurrenceService
public java.util.List<FieldUnit> findFieldUnitsForGatheringEvent(java.util.UUID gatheringEventUuid)
FieldUnit
s that are referencing this GatheringEvent
findFieldUnitsForGatheringEvent
in interface IOccurrenceService
gatheringEventUuid
- the UUID
of the gathering eventpublic java.util.List<Point> findPointsForFieldUnitList(java.util.List<java.util.UUID> fieldUnitUuids)
findPointsForFieldUnitList
in interface IOccurrenceService
Copyright © 2007-2020 EDIT. All Rights Reserved.