@Service @Transactional(readOnly=true) public class DescriptiveDataSetService extends IdentifiableServiceBase<DescriptiveDataSet,IDescriptiveDataSetDao> implements IDescriptiveDataSetService
UPDATE_TITLE_CACHE_DEFAULT_STEP_SIZE
commonService
appContext, dao, INCLUDE_UNPUBLISHED, NO_UNPUBLISHED
Constructor and Description |
---|
DescriptiveDataSetService() |
Modifier and Type | Method and Description |
---|---|
UpdateResult |
addRowWrapperToDataset(java.util.Collection<SpecimenNodeWrapper> wrappers,
java.util.UUID datasetUuid)
Creates a
SpecimenRowWrapperDTO from the given SpecimenNodeWrapper.This service method is used when adding new specimen to the character matrix resp. |
SpecimenRowWrapperDTO |
createSpecimenRowWrapper(SpecimenDescription description,
java.util.UUID descriptiveDataSetUuid)
Creates a specimen row wrapper object for the given description
|
TaxonRowWrapperDTO |
createTaxonDescription(java.util.UUID dataSetUuid,
java.util.UUID taxonNodeUuid,
DescriptionType descriptionType)
Creates a new taxon description with the features defined in the dataset for the
taxon associated with the given taxon node.
|
TaxonRowWrapperDTO |
createTaxonRowWrapper(java.util.UUID taxonDescriptionUuid,
java.util.UUID descriptiveDataSetUuid)
Creates a taxon row wrapper object for the given description
|
TaxonDescription |
findDefaultDescription(java.util.UUID specimenDescriptionUuid,
java.util.UUID dataSetUuid)
Returns the first
TaxonDescription with DescriptionType.DEFAULT_VALUES_FOR_AGGREGATION
found in the taxon node hierarchy of the associated taxon |
java.util.List<java.util.UUID> |
findFilteredTaxonNodes(DescriptiveDataSet descriptiveDataSet)
Lists all taxon nodes that match the filter set defined in the
DescriptiveDataSet given. |
SpecimenDescription |
findSpecimenDescription(java.util.UUID descriptiveDataSetUuid,
java.util.UUID specimenUuid,
boolean addDatasetSource)
Returns a
SpecimenDescription for a given specimen with corresponding
features according to the DescriptiveDataSet .If a description is found that matches all features of the data set this description will be returned. |
TaxonDescription |
findTaxonDescriptionByDescriptionType(java.util.UUID dataSetUuid,
java.util.UUID taxonNodeUuid,
DescriptionType descriptionType)
Returns a
TaxonDescription for a given taxon node with corresponding
features according to the DescriptiveDataSet and the having the given DescriptionType . |
UpdateResult |
generatePolytomousKey(java.util.UUID descriptiveDataSetUuid,
java.util.UUID taxonUuid)
Generates a
PolytomousKey for the given DescriptiveDataSet and sets
the given taxon as the taxonomic scope |
java.util.Map<DescriptionBase,java.util.Set<DescriptionElementBase>> |
getDescriptionElements(DescriptiveDataSet descriptiveDataSet,
java.util.Set<Feature> features,
java.lang.Integer pageSize,
java.lang.Integer pageNumber,
java.util.List<java.lang.String> propertyPaths)
Returns a Map of descriptions each with the description elements that match
the supplied features (or all description elements if no features are supplied)
|
java.util.List<UuidAndTitleCache<DescriptiveDataSet>> |
getDescriptiveDataSetUuidAndTitleCache(java.lang.Integer limitOfInitialElements,
java.lang.String pattern)
Returns a list of
UuidAndTitleCache elements for all DescriptiveDataSet s in the data base |
java.util.ArrayList<RowWrapperDTO> |
getRowWrapper(java.util.UUID descriptiveDataSetUuid,
IProgressMonitor monitor)
Returns a collection of
RowWrapperDTO objects for the given DescriptiveDataSet .A RowWrapper represents on row in the character matrix. |
java.util.List<TermDto> |
getSupportedStatesForFeature(java.util.UUID featureUuid)
Returns all states for all supportedCategoricalEnumeration of this categorical feature
|
<T extends DescriptionElementBase> |
getTaxonFeatureDescriptionElementMap(java.lang.Class<T> clazz,
java.util.UUID descriptiveDataSetUuid,
DescriptiveSystemRole role) |
java.util.List<TaxonNode> |
loadFilteredTaxonNodes(DescriptiveDataSet descriptiveDataSet,
java.util.List<java.lang.String> propertyPaths)
Loads all taxon nodes that match the filter set defined in the
DescriptiveDataSet given. |
java.util.Collection<SpecimenNodeWrapper> |
loadSpecimens(DescriptiveDataSet descriptiveDataSet)
Loads all available specimens wrapped in a
SpecimenNodeWrapper object for
a given DescriptiveDataSet according to the filters set in the working set |
java.util.Collection<SpecimenNodeWrapper> |
loadSpecimens(java.util.UUID descriptiveDataSetUuid) |
DeleteResult |
removeDescription(java.util.UUID descriptionUuid,
java.util.UUID descriptiveDataSetUuid)
Removes the description specified by the given
UUID from the given DescriptiveDataSet . |
protected void |
setDao(IDescriptiveDataSetDao dao) |
UpdateResult |
updateCaches(java.lang.Class<? extends DescriptiveDataSet> clazz,
java.lang.Integer stepSize,
IIdentifiableEntityCacheStrategy<DescriptiveDataSet> cacheStrategy,
IProgressMonitor monitor)
(Re-)generate the caches for all objects of this concrete IdentifiableEntity class
|
countByTitle, countByTitle, countByTitleWithRestrictions, deduplicate, find, findByIdentifier, findByMarker, findByTitle, 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, isDeletable, 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
countByTitle, countByTitle, countByTitleWithRestrictions, deduplicate, find, findByIdentifier, findByMarker, findByTitle, findByTitle, findByTitleWithRestrictions, findTitleCache, findUuidAndTitleCacheByMarker, getRights, getSourcedObjectByIdInSource, getSources, getTitleCache, getUuidAndTitleCache, getUuidAndTitleCache, listByIdentifier, listByReferenceTitle, listByReferenceTitleWithRestrictions, listByTitle, listByTitleWithRestrictions, replace, search, updateCaches
countMarkers, getAnnotations, getMarkers, groupMarkers
getNextAuditEvent, getPreviousAuditEvent, isDeletable, 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
@Autowired protected void setDao(IDescriptiveDataSetDao dao)
setDao
in class ServiceBase<DescriptiveDataSet,IDescriptiveDataSetDao>
public java.util.Map<DescriptionBase,java.util.Set<DescriptionElementBase>> getDescriptionElements(DescriptiveDataSet descriptiveDataSet, java.util.Set<Feature> features, java.lang.Integer pageSize, java.lang.Integer pageNumber, java.util.List<java.lang.String> propertyPaths)
IDescriptiveDataSetService
getDescriptionElements
in interface IDescriptiveDataSetService
descriptiveDataSet
- the data set which the descriptions belong tofeatures
- restrict the returned description elements to those which have features in this setpageSize
- The maximum number of descriptions returned (can be null for all descriptions that belong to the data set)pageNumber
- The offset (in pageSize chunks) from the start of the result set (0 - based,
can be null, equivalent of starting at the beginning of the recordset). Descriptions are sorted by titleCachepropertyPaths
- properties to be initialized (applied to the descriptionElements)public <T extends DescriptionElementBase> java.util.Map<UuidAndTitleCache,java.util.Map<java.util.UUID,java.util.Set<T>>> getTaxonFeatureDescriptionElementMap(java.lang.Class<T> clazz, java.util.UUID descriptiveDataSetUuid, DescriptiveSystemRole role)
getTaxonFeatureDescriptionElementMap
in interface IDescriptiveDataSetService
public java.util.List<UuidAndTitleCache<DescriptiveDataSet>> getDescriptiveDataSetUuidAndTitleCache(java.lang.Integer limitOfInitialElements, java.lang.String pattern)
IDescriptiveDataSetService
UuidAndTitleCache
elements for all DescriptiveDataSet
s in the data basegetDescriptiveDataSetUuidAndTitleCache
in interface IDescriptiveDataSetService
public java.util.ArrayList<RowWrapperDTO> getRowWrapper(java.util.UUID descriptiveDataSetUuid, IProgressMonitor monitor)
IDescriptiveDataSetService
RowWrapperDTO
objects for the given DescriptiveDataSet
.getRowWrapper
in interface IDescriptiveDataSetService
descriptiveDataSetUuid
- the working set for which the row wrapper objects should be fetchedpublic java.util.Collection<SpecimenNodeWrapper> loadSpecimens(DescriptiveDataSet descriptiveDataSet)
IDescriptiveDataSetService
SpecimenNodeWrapper
object for
a given DescriptiveDataSet
according to the filters set in the working setloadSpecimens
in interface IDescriptiveDataSetService
descriptiveDataSet
- the data set for which the specimens should be fetchedpublic java.util.Collection<SpecimenNodeWrapper> loadSpecimens(java.util.UUID descriptiveDataSetUuid)
loadSpecimens
in interface IDescriptiveDataSetService
public java.util.List<java.util.UUID> findFilteredTaxonNodes(DescriptiveDataSet descriptiveDataSet)
IDescriptiveDataSetService
DescriptiveDataSet
given.findFilteredTaxonNodes
in interface IDescriptiveDataSetService
UUID
s from the filtered nodespublic java.util.List<TaxonNode> loadFilteredTaxonNodes(DescriptiveDataSet descriptiveDataSet, java.util.List<java.lang.String> propertyPaths)
IDescriptiveDataSetService
DescriptiveDataSet
given.loadFilteredTaxonNodes
in interface IDescriptiveDataSetService
TaxonNode
s from the filtered nodespublic TaxonDescription findDefaultDescription(java.util.UUID specimenDescriptionUuid, java.util.UUID dataSetUuid)
IDescriptiveDataSetService
TaxonDescription
with DescriptionType.DEFAULT_VALUES_FOR_AGGREGATION
found in the taxon node hierarchy of the associated taxonfindDefaultDescription
in interface IDescriptiveDataSetService
specimenDescriptionUuid
- the specimen descriptiondataSetUuid
- the data setnull
public TaxonRowWrapperDTO createTaxonRowWrapper(java.util.UUID taxonDescriptionUuid, java.util.UUID descriptiveDataSetUuid)
IDescriptiveDataSetService
createTaxonRowWrapper
in interface IDescriptiveDataSetService
taxonDescriptionUuid
- the taxon description for which the wrapper should be created@Transactional(readOnly=false) public UpdateResult addRowWrapperToDataset(java.util.Collection<SpecimenNodeWrapper> wrappers, java.util.UUID datasetUuid)
IDescriptiveDataSetService
SpecimenRowWrapperDTO
from the given SpecimenNodeWrapper.DescriptiveDataSet
.addRowWrapperToDataset
in interface IDescriptiveDataSetService
wrappers
- the specimen wrapper to use for creating the row wrapperdatasetUuid
- the target datasetpublic SpecimenRowWrapperDTO createSpecimenRowWrapper(SpecimenDescription description, java.util.UUID descriptiveDataSetUuid)
IDescriptiveDataSetService
createSpecimenRowWrapper
in interface IDescriptiveDataSetService
description
- the specimen description for which the wrapper should be createddescriptiveDataSetUuid
- the data set it should be used in@Transactional(readOnly=false) public UpdateResult updateCaches(java.lang.Class<? extends DescriptiveDataSet> clazz, java.lang.Integer stepSize, IIdentifiableEntityCacheStrategy<DescriptiveDataSet> cacheStrategy, IProgressMonitor monitor)
IIdentifiableEntityService
updateCaches
in interface IIdentifiableEntityService<DescriptiveDataSet>
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 TaxonDescription findTaxonDescriptionByDescriptionType(java.util.UUID dataSetUuid, java.util.UUID taxonNodeUuid, DescriptionType descriptionType)
IDescriptiveDataSetService
TaxonDescription
for a given taxon node with corresponding
features according to the DescriptiveDataSet
and the having the given DescriptionType
.findTaxonDescriptionByDescriptionType
in interface IDescriptiveDataSetService
taxonNodeUuid
- the uuid of the taxon node that links to the taxondescriptionType
- the DescriptionType
that the description should havenull
@Transactional(readOnly=false) public UpdateResult generatePolytomousKey(java.util.UUID descriptiveDataSetUuid, java.util.UUID taxonUuid)
IDescriptiveDataSetService
PolytomousKey
for the given DescriptiveDataSet
and sets
the given taxon as the taxonomic scopegeneratePolytomousKey
in interface IDescriptiveDataSetService
taxonUuid
- the taxonomic scope of the key@Transactional(readOnly=false) public DeleteResult removeDescription(java.util.UUID descriptionUuid, java.util.UUID descriptiveDataSetUuid)
IDescriptiveDataSetService
UUID
from the given DescriptiveDataSet
.removeDescription
in interface IDescriptiveDataSetService
descriptionUuid
- the UUID of the description to deletedescriptiveDataSetUuid
- the UUID of the data set to delete@Transactional(readOnly=false) public TaxonRowWrapperDTO createTaxonDescription(java.util.UUID dataSetUuid, java.util.UUID taxonNodeUuid, DescriptionType descriptionType)
IDescriptiveDataSetService
createTaxonDescription
in interface IDescriptiveDataSetService
taxonNodeUuid
- the uuid of the taxon node that links to the taxondescriptionType
- the type of the descriptionpublic java.util.List<TermDto> getSupportedStatesForFeature(java.util.UUID featureUuid)
IDescriptiveDataSetService
getSupportedStatesForFeature
in interface IDescriptiveDataSetService
featureUuid
- the feature which has to support categorical data@Transactional(readOnly=false) public SpecimenDescription findSpecimenDescription(java.util.UUID descriptiveDataSetUuid, java.util.UUID specimenUuid, boolean addDatasetSource)
IDescriptiveDataSetService
SpecimenDescription
for a given specimen with corresponding
features according to the DescriptiveDataSet
.findSpecimenDescription
in interface IDescriptiveDataSetService
descriptiveDataSetUuid
- the uuid of the dataset defining the featuresspecimenUuid
- the uuid of the specimenaddDatasetSource
- if true
the source(s) of the descriptive dataset
will be added to the description if a new one is createdCopyright © 2007-2020 EDIT. All Rights Reserved.