@Service @Transactional(readOnly=true) public class DescriptionServiceImpl extends IdentifiableServiceBase<DescriptionBase,IDescriptionDao> implements IDescriptionService
Modifier and Type | Field and Description |
---|---|
protected IDescriptiveDataSetDao |
dataSetDao |
protected IDefinedTermDao |
definedTermDao |
protected IDescriptionElementDao |
descriptionElementDao |
protected IDescriptiveDataSetDao |
descriptiveDataSetDao |
protected ITermTreeDao |
featureTreeDao |
protected ITaxonNameDao |
nameDao |
protected IOccurrenceDao |
occurrenceDao |
protected IStatisticalMeasurementValueDao |
statisticalMeasurementValueDao |
protected ITaxonDao |
taxonDao |
protected ITaxonNodeDao |
taxonNodeDao |
protected ITermNodeDao |
termNodeDao |
protected ITermVocabularyDao |
vocabularyDao |
UPDATE_TITLE_CACHE_DEFAULT_STEP_SIZE
commonService
appContext, dao, INCLUDE_UNPUBLISHED, NO_UNPUBLISHED
Constructor and Description |
---|
DescriptionServiceImpl() |
Modifier and Type | Method and Description |
---|---|
long |
count(java.lang.Class<? extends DescriptionBase> type,
java.lang.Boolean hasImages,
java.lang.Boolean hasText,
java.util.Set<Feature> feature)
Count the descriptions of type
|
int |
countTaxonDescriptionMedia(java.util.UUID taxonUuid,
boolean limitToGalleries,
java.util.Set<MarkerType> markerTypes)
Returns count for all
Media attached to a taxon via TaxonDescription.elements.media. |
DeleteResult |
deleteDescription(DescriptionBase description) |
DeleteResult |
deleteDescription(java.util.UUID descriptionUuid) |
java.util.UUID |
deleteDescriptionElement(DescriptionElementBase descriptionElement)
FIXME Candidate for harmonization
descriptionElementService.delete
|
java.util.UUID |
deleteDescriptionElement(java.util.UUID descriptionElementUuid) |
java.lang.String |
generateNaturalLanguageDescription(TermTree featureTree,
TaxonDescription description,
java.util.List<Language> preferredLanguages,
java.lang.String separator)
Generate a string representation of the structured
description supplied in natural language
The featureTree will be used to structure the NaturalLanguageDescription. |
TermVocabulary<Feature> |
getDefaultFeatureVocabulary() |
Pager<Annotation> |
getDescriptionElementAnnotations(DescriptionElementBase annotatedObj,
MarkerType status,
java.lang.Integer pageSize,
java.lang.Integer pageNumber,
java.util.List<OrderHint> orderHints,
java.util.List<java.lang.String> propertyPaths)
Return a Pager containing Annotation entities belonging to the DescriptionElementBase instance supplied, optionally filtered by MarkerType
|
DescriptionElementBase |
getDescriptionElementByUuid(java.util.UUID uuid)
FIXME Candidate for harmonization
descriptionElementService.find
|
<T extends DescriptionElementBase> |
getDescriptionElements(DescriptionBase description,
java.util.Set<Feature> features,
java.lang.Class<T> type,
java.lang.Integer pageSize,
java.lang.Integer pageNumber,
java.util.List<java.lang.String> propertyPaths)
Deprecated.
|
<T extends DescriptionElementBase> |
getDescriptionElementsForTaxon(Taxon taxon,
java.util.Set<Feature> features,
java.lang.Class<T> type,
java.lang.Integer pageSize,
java.lang.Integer pageNumber,
java.util.List<java.lang.String> propertyPaths)
Deprecated.
|
TermVocabulary<Feature> |
getFeatureVocabulary(java.util.UUID uuid) |
Pager<Media> |
getMedia(DescriptionElementBase descriptionElement,
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 description element
|
DistributionTree |
getOrderedDistributions(java.util.Set<TaxonDescription> taxonDescriptions,
boolean subAreaPreference,
boolean statusOrderPreference,
java.util.Set<MarkerType> hiddenAreaMarkerTypes,
java.util.Set<NamedAreaLevel> omitLevels,
java.util.List<java.lang.String> propertyPaths)
Deprecated.
|
Pager<TaxonNameDescription> |
getTaxonNameDescriptions(TaxonName name,
java.lang.Integer pageSize,
java.lang.Integer pageNumber,
java.util.List<java.lang.String> propertyPaths)
Returns a List of TaxonNameDescription instances, optionally filtered by the name which they refer to
|
boolean |
hasStructuredData(DescriptionBase<?> description)
Preliminary method to test whether a description contains structured data.
|
DeleteResult |
isDeletable(java.util.UUID descriptionUuid) |
<T extends DescriptionElementBase> |
listDescriptionElements(DescriptionBase description,
java.lang.Class<? extends DescriptionBase> descriptionType,
java.util.Set<Feature> features,
java.lang.Class<T> type,
java.lang.Integer pageSize,
java.lang.Integer pageNumber,
java.util.List<java.lang.String> propertyPaths)
Returns description elements of type
|
<T extends DescriptionElementBase> |
listDescriptionElements(DescriptionBase description,
java.util.Set<Feature> features,
java.lang.Class<T> type,
java.lang.Integer pageSize,
java.lang.Integer pageNumber,
java.util.List<java.lang.String> propertyPaths)
Deprecated.
|
<T extends DescriptionElementBase> |
listDescriptionElementsForTaxon(Taxon taxon,
java.util.Set<Feature> features,
java.lang.Class<T> type,
java.lang.Integer pageSize,
java.lang.Integer pageNumber,
java.util.List<java.lang.String> propertyPaths)
Provides access to all DescriptionElements associated with the given Taxon
via a TaxonDescrition.
|
java.util.List<Media> |
listTaxonDescriptionMedia(java.util.UUID taxonUuid,
boolean limitToGalleries,
java.util.Set<MarkerType> markerTypes,
java.lang.Integer pageSize,
java.lang.Integer pageNumber,
java.util.List<java.lang.String> propertyPaths)
Returns all
Media attached to a taxon via TaxonDescription.elements.media. |
java.util.List<TaxonDescription> |
listTaxonDescriptions(Taxon taxon,
java.util.Set<DefinedTerm> scopes,
java.util.Set<NamedArea> geographicalScope,
java.lang.Integer pageSize,
java.lang.Integer pageNumber,
java.util.List<java.lang.String> propertyPaths) |
java.util.List<TaxonDescription> |
listTaxonDescriptions(Taxon taxon,
java.util.Set<DefinedTerm> scopes,
java.util.Set<NamedArea> geographicalScope,
java.util.Set<MarkerType> markerTypes,
java.util.Set<DescriptionType> descriptionTypes,
java.lang.Integer pageSize,
java.lang.Integer pageNumber,
java.util.List<java.lang.String> propertyPaths) |
DescriptionElementBase |
loadDescriptionElement(java.util.UUID uuid,
java.util.List<java.lang.String> propertyPaths)
FIXME Candidate for harmonization
descriptionElementService.load
|
java.util.List<MergeResult<DescriptionBase>> |
mergeDescriptionElements(java.util.Collection<TaxonDistributionDTO> descriptionElements,
boolean returnTransientEntity) |
UpdateResult |
moveDescriptionElementsToDescription(java.util.Collection<DescriptionElementBase> descriptionElements,
DescriptionBase targetDescription,
boolean isCopy,
boolean setNameInSource)
Add the collection of
description elements to the targetDescription . |
UpdateResult |
moveDescriptionElementsToDescription(java.util.Set<java.util.UUID> descriptionElementUUIDs,
DescriptionBase targetDescription,
boolean isCopy,
boolean setNameInSource) |
UpdateResult |
moveDescriptionElementsToDescription(java.util.Set<java.util.UUID> descriptionElementUUIDs,
java.util.UUID targetDescriptionUuid,
boolean isCopy,
boolean setNameInSource) |
UpdateResult |
moveDescriptionElementsToDescription(java.util.Set<java.util.UUID> descriptionElementUUIDs,
java.util.UUID targetTaxonUuid,
java.lang.String moveMessage,
boolean isCopy,
boolean setNameInSource) |
UpdateResult |
moveTaxonDescription(java.util.UUID descriptionUuid,
java.util.UUID targetTaxonUuid,
boolean setNameInSource) |
UpdateResult |
moveTaxonDescriptions(Taxon sourceTaxon,
Taxon targetTaxon,
boolean setNameInSource) |
UpdateResult |
moveTaxonDescriptions(java.util.UUID sourceTaxonUuid,
java.util.UUID targetTaxonUuid,
boolean setNameInSource) |
Pager<DescriptionBase> |
page(java.lang.Class<? extends DescriptionBase> type,
java.lang.Boolean hasImages,
java.lang.Boolean hasText,
java.util.Set<Feature> feature,
java.lang.Integer pageSize,
java.lang.Integer pageNumber,
java.util.List<OrderHint> orderHints,
java.util.List<java.lang.String> propertyPaths)
List the descriptions of type
|
<T extends DescriptionElementBase> |
pageDescriptionElements(DescriptionBase description,
java.lang.Class<? extends DescriptionBase> descriptionType,
java.util.Set<Feature> features,
java.lang.Class<T> type,
java.lang.Integer pageSize,
java.lang.Integer pageNumber,
java.util.List<java.lang.String> propertyPaths)
Returns description elements of type
|
<T extends DescriptionElementBase> |
pageDescriptionElementsForTaxon(Taxon taxon,
java.util.Set<Feature> features,
java.lang.Class<T> type,
java.lang.Integer pageSize,
java.lang.Integer pageNumber,
java.util.List<java.lang.String> propertyPaths)
Provides access to all DescriptionElements associated with the given Taxon
via a TaxonDescrition.
|
Pager<TermDto> |
pageNamedAreasInUse(boolean includeAllParents,
java.lang.Integer pageSize,
java.lang.Integer pageNumber)
Pager method to get all
NamedAreas instances which are currently used
by Distribution elements. |
Pager<TaxonDescription> |
pageTaxonDescriptions(Taxon taxon,
java.util.Set<DefinedTerm> scopes,
java.util.Set<NamedArea> geographicalScope,
java.lang.Integer pageSize,
java.lang.Integer pageNumber,
java.util.List<java.lang.String> propertyPaths)
Returns a List of TaxonDescription instances, optionally filtered by parameters passed to this method
|
Pager<TaxonDescription> |
pageTaxonDescriptions(Taxon taxon,
java.util.Set<DefinedTerm> scopes,
java.util.Set<NamedArea> geographicalScope,
java.util.Set<MarkerType> markerTypes,
java.util.Set<DescriptionType> descriptionTypes,
java.lang.Integer pageSize,
java.lang.Integer pageNumber,
java.util.List<java.lang.String> propertyPaths)
Returns a List of TaxonDescription instances, optionally filtered by parameters passed to this method
|
java.util.Map<java.util.UUID,DescriptionElementBase> |
saveDescriptionElement(java.util.Collection<DescriptionElementBase> descriptionElements)
FIXME Candidate for harmonization
descriptionElementService.save
|
java.util.UUID |
saveDescriptionElement(DescriptionElementBase descriptionElement)
FIXME Candidate for harmonization
descriptionElementService.save
|
Pager<TaxonDescription> |
searchDescriptionByDistribution(java.util.Set<NamedArea> namedAreas,
PresenceAbsenceTerm presence,
java.lang.Integer pageSize,
java.lang.Integer pageNumber,
java.util.List<OrderHint> orderHints,
java.util.List<java.lang.String> propertyPaths)
FIXME Candidate for harmonization
Rename: searchByDistribution
|
<S extends DescriptionElementBase> |
searchElements(java.lang.Class<S> clazz,
java.lang.String queryString,
java.lang.Integer pageSize,
java.lang.Integer pageNumber,
java.util.List<OrderHint> orderHints,
java.util.List<java.lang.String> propertyPaths)
FIXME Candidate for harmonization
move: descriptionElementService.search
|
protected void |
setDao(IDescriptionDao dao) |
protected void |
setDataSetDao(IDescriptiveDataSetDao dataSetDao) |
protected void |
setDefinedTermDao(IDefinedTermDao definedTermDao) |
protected void |
setDescriptionElementDao(IDescriptionElementDao descriptionElementDao) |
protected void |
setDescriptiveDataSetDao(IDescriptiveDataSetDao descriptiveDataSetDao) |
protected void |
setFeatureTreeDao(ITermTreeDao featureTreeDao) |
protected void |
setNaturalLanguageGenerator(NaturalLanguageGenerator naturalLanguageGenerator) |
protected void |
setTaxonDao(ITaxonDao taxonDao) |
protected void |
setTaxonNodeDao(ITaxonNodeDao taxonNodeDao) |
protected void |
setTermNodeDao(ITermNodeDao featureNodeDao) |
protected void |
setVocabularyDao(ITermVocabularyDao vocabularyDao) |
protected void |
statisticalMeasurementValueDao(IStatisticalMeasurementValueDao statisticalMeasurementValueDao) |
UpdateResult |
updateCaches(java.lang.Class<? extends DescriptionBase> clazz,
java.lang.Integer stepSize,
IIdentifiableEntityCacheStrategy<DescriptionBase> 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
protected IDescriptionElementDao descriptionElementDao
protected ITermTreeDao featureTreeDao
protected IDescriptiveDataSetDao descriptiveDataSetDao
protected ITermNodeDao termNodeDao
protected ITermVocabularyDao vocabularyDao
protected IDefinedTermDao definedTermDao
protected IStatisticalMeasurementValueDao statisticalMeasurementValueDao
protected ITaxonDao taxonDao
protected ITaxonNameDao nameDao
protected IOccurrenceDao occurrenceDao
protected ITaxonNodeDao taxonNodeDao
protected IDescriptiveDataSetDao dataSetDao
@Autowired protected void setFeatureTreeDao(ITermTreeDao featureTreeDao)
@Autowired protected void setDescriptiveDataSetDao(IDescriptiveDataSetDao descriptiveDataSetDao)
@Autowired protected void setTermNodeDao(ITermNodeDao featureNodeDao)
@Autowired protected void setVocabularyDao(ITermVocabularyDao vocabularyDao)
@Autowired protected void setDefinedTermDao(IDefinedTermDao definedTermDao)
@Autowired protected void statisticalMeasurementValueDao(IStatisticalMeasurementValueDao statisticalMeasurementValueDao)
@Autowired protected void setDescriptionElementDao(IDescriptionElementDao descriptionElementDao)
@Autowired protected void setNaturalLanguageGenerator(NaturalLanguageGenerator naturalLanguageGenerator)
@Autowired protected void setTaxonDao(ITaxonDao taxonDao)
@Autowired protected void setTaxonNodeDao(ITaxonNodeDao taxonNodeDao)
@Autowired protected void setDataSetDao(IDescriptiveDataSetDao dataSetDao)
@Transactional(readOnly=false) public UpdateResult updateCaches(java.lang.Class<? extends DescriptionBase> clazz, java.lang.Integer stepSize, IIdentifiableEntityCacheStrategy<DescriptionBase> cacheStrategy, IProgressMonitor monitor)
IIdentifiableEntityService
updateCaches
in interface IIdentifiableEntityService<DescriptionBase>
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 TermVocabulary<Feature> getDefaultFeatureVocabulary()
getDefaultFeatureVocabulary
in interface IDescriptionService
@Autowired protected void setDao(IDescriptionDao dao)
setDao
in class ServiceBase<DescriptionBase,IDescriptionDao>
public long count(java.lang.Class<? extends DescriptionBase> type, java.lang.Boolean hasImages, java.lang.Boolean hasText, java.util.Set<Feature> feature)
IDescriptionService
count
in interface IDescriptionService
type
- The type of description returned (Taxon, TaxonName, or Specimen)hasText
- Restrict the description to those that do (true) or don't (false) contain TextData elements that have some textual content (can be null)feature
- Restrict the description to those elements which are scoped by one of the Features passed (can be null or empty)public <T extends DescriptionElementBase> Pager<T> pageDescriptionElements(DescriptionBase description, java.lang.Class<? extends DescriptionBase> descriptionType, java.util.Set<Feature> features, java.lang.Class<T> type, java.lang.Integer pageSize, java.lang.Integer pageNumber, java.util.List<java.lang.String> propertyPaths)
IDescriptionService
pageDescriptionElements
in interface IDescriptionService
description
- The description which these description elements belong to
(can be null to count all description elements)descriptionType
- A filter DescriptionElements which belong to of a specific
class of Descriptionsfeatures
- Restrict the results to those description elements which are
scoped by one of the Features passed (can be null or empty)type
- A filter for DescriptionElements of a specific classpageSize
- The maximum number of description elements returned (can be
null for all description elements)pageNumber
- The offset (in pageSize chunks) from the start of the result
set (0 - based)propertyPaths
- Properties to initialize in the returned entities, following
the syntax described in
IBeanInitializer.initialize(Object, List)
@Deprecated public <T extends DescriptionElementBase> Pager<T> getDescriptionElements(DescriptionBase description, java.util.Set<Feature> features, java.lang.Class<T> type, java.lang.Integer pageSize, java.lang.Integer pageNumber, java.util.List<java.lang.String> propertyPaths)
IDescriptionService
getDescriptionElements
in interface IDescriptionService
description
- The description which these description elements belong to
(can be null to count all description elements)features
- Restrict the results to those description elements which are
scoped by one of the Features passed (can be null or empty)type
- A filter for DescriptionElements of a specific classpageSize
- The maximum number of description elements returned (can be
null for all description elements)pageNumber
- The offset (in pageSize chunks) from the start of the result
set (0 - based)propertyPaths
- Properties to initialize in the returned entities, following
the syntax described in
IBeanInitializer.initialize(Object, List)
public <T extends DescriptionElementBase> java.util.List<T> listDescriptionElements(DescriptionBase description, java.lang.Class<? extends DescriptionBase> descriptionType, java.util.Set<Feature> features, java.lang.Class<T> type, java.lang.Integer pageSize, java.lang.Integer pageNumber, java.util.List<java.lang.String> propertyPaths)
IDescriptionService
listDescriptionElements
in interface IDescriptionService
description
- The description which these description elements belong to
(can be null to count all description elements)features
- Restrict the results to those description elements which are
scoped by one of the Features passed (can be null or empty)type
- A filter DescriptionElements of a for specific classpageSize
- The maximum number of description elements returned (can be
null for all description elements)pageNumber
- The offset (in pageSize chunks) from the start of the result
set (0 - based)propertyPaths
- Properties to initialize in the returned entities, following
the syntax described in
IBeanInitializer.initialize(Object, List)
@Deprecated public <T extends DescriptionElementBase> java.util.List<T> listDescriptionElements(DescriptionBase description, java.util.Set<Feature> features, java.lang.Class<T> type, java.lang.Integer pageSize, java.lang.Integer pageNumber, java.util.List<java.lang.String> propertyPaths)
IDescriptionService
listDescriptionElements
in interface IDescriptionService
description
- The description which these description elements belong to
(can be null to count all description elements)features
- Restrict the results to those description elements which are
scoped by one of the Features passed (can be null or empty)type
- A filter for DescriptionElements of a specific classpageSize
- The maximum number of description elements returned (can be
null for all description elements)pageNumber
- The offset (in pageSize chunks) from the start of the result
set (0 - based)propertyPaths
- Properties to initialize in the returned entities, following
the syntax described in
IBeanInitializer.initialize(Object, List)
public Pager<Annotation> getDescriptionElementAnnotations(DescriptionElementBase annotatedObj, MarkerType status, java.lang.Integer pageSize, java.lang.Integer pageNumber, java.util.List<OrderHint> orderHints, java.util.List<java.lang.String> propertyPaths)
IDescriptionService
getDescriptionElementAnnotations
in interface IDescriptionService
annotatedObj
- The object that "owns" the annotations returnedstatus
- Only return annotations which are marked with a Marker of this type (can be null to return all annotations)pageSize
- The maximum number of terms returned (can be null for all annotations)pageNumber
- The offset (in pageSize chunks) from the start of the result set (0 - based)orderHints
- may be nullpropertyPaths
- properties to initialize - see IBeanInitializer.initialize(Object, List)
public Pager<Media> getMedia(DescriptionElementBase descriptionElement, java.lang.Integer pageSize, java.lang.Integer pageNumber, java.util.List<java.lang.String> propertyPaths)
IDescriptionService
getMedia
in interface IDescriptionService
descriptionElement
- the description element 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<TaxonDescription> pageTaxonDescriptions(Taxon taxon, java.util.Set<DefinedTerm> scopes, java.util.Set<NamedArea> geographicalScope, java.lang.Integer pageSize, java.lang.Integer pageNumber, java.util.List<java.lang.String> propertyPaths)
IDescriptionService
pageTaxonDescriptions
in interface IDescriptionService
taxon
- The taxon which the description refers to (can be null for all TaxonDescription instances)scopes
- Restrict the results to those descriptions which are scoped by one of the Scope instances passed (can be null or empty)geographicalScope
- Restrict the results to those descriptions which have a geographical scope that overlaps with the NamedArea instances passed (can be null or empty)pageSize
- The maximum number of descriptions returned (can be null for all descriptions)pageNumber
- The offset (in pageSize chunks) from the start of the result set (0 - based)propertyPaths
- Properties to initialize in the returned entities, following the syntax described in IBeanInitializer.initialize(Object, List)
#pageMarkedTaxonDescriptions(Taxon, Set, Set, Set, Integer, Integer, List)
public java.util.List<TaxonDescription> listTaxonDescriptions(Taxon taxon, java.util.Set<DefinedTerm> scopes, java.util.Set<NamedArea> geographicalScope, java.lang.Integer pageSize, java.lang.Integer pageNumber, java.util.List<java.lang.String> propertyPaths)
listTaxonDescriptions
in interface IDescriptionService
#pageTaxonDescriptions(Taxon, Set, Set, Integer, Integer, List)}
public Pager<TaxonDescription> pageTaxonDescriptions(Taxon taxon, java.util.Set<DefinedTerm> scopes, java.util.Set<NamedArea> geographicalScope, java.util.Set<MarkerType> markerTypes, java.util.Set<DescriptionType> descriptionTypes, java.lang.Integer pageSize, java.lang.Integer pageNumber, java.util.List<java.lang.String> propertyPaths)
IDescriptionService
pageTaxonDescriptions
in interface IDescriptionService
taxon
- The taxon which the description refers to (can be null for all TaxonDescription instances)scopes
- Restrict the results to those descriptions which are scoped by one of the Scope instances passed (can be null or empty)geographicalScope
- Restrict the results to those descriptions which have a geographical scope that overlaps with the NamedArea instances passed (can be null or empty)descriptionTypes
- Restrict the results to those descriptions of the given types (can be null or empty)pageSize
- The maximum number of descriptions returned (can be null for all descriptions)pageNumber
- The offset (in pageSize chunks) from the start of the result set (0 - based)propertyPaths
- Properties to initialize in the returned entities, following the syntax described in IBeanInitializer.initialize(Object, List)
public java.util.List<TaxonDescription> listTaxonDescriptions(Taxon taxon, java.util.Set<DefinedTerm> scopes, java.util.Set<NamedArea> geographicalScope, java.util.Set<MarkerType> markerTypes, java.util.Set<DescriptionType> descriptionTypes, java.lang.Integer pageSize, java.lang.Integer pageNumber, java.util.List<java.lang.String> propertyPaths)
listTaxonDescriptions
in interface IDescriptionService
#pageMarkedTaxonDescriptions(Taxon, Set, Set, Set, Integer, Integer, List)}
public java.util.List<Media> listTaxonDescriptionMedia(java.util.UUID taxonUuid, boolean limitToGalleries, java.util.Set<MarkerType> markerTypes, java.lang.Integer pageSize, java.lang.Integer pageNumber, java.util.List<java.lang.String> propertyPaths)
IDescriptionService
Media
attached to a taxon via TaxonDescription.elements.media.listTaxonDescriptionMedia
in interface IDescriptionService
taxonUuid
- the taxons uuid, if null media for all taxa are returnedlimitToGalleries
- if true only media in TaxonDescriptions with imageGallery flag=true are returnedmarkerTypes
- only media for TaxonDescriptions with marker of type markerType and marker.flag=true are returned, one matching marker type is sufficientpropertyPaths
- Properties to initialize in the returned entities, following the syntax described in IBeanInitializer.initialize(Object, List)
public int countTaxonDescriptionMedia(java.util.UUID taxonUuid, boolean limitToGalleries, java.util.Set<MarkerType> markerTypes)
IDescriptionService
Media
attached to a taxon via TaxonDescription.elements.media.countTaxonDescriptionMedia
in interface IDescriptionService
taxonUuid
- the taxons uuid, if null media for all taxa are returnedlimitToGalleries
- if true only media in TaxonDescriptions with imageGallery flag=true are returnedmarkerTypes
- only media for TaxonDescriptions with marker of type markerType and marker.flag=true are returned, one matching marker type is sufficient@Deprecated public DistributionTree getOrderedDistributions(java.util.Set<TaxonDescription> taxonDescriptions, boolean subAreaPreference, boolean statusOrderPreference, java.util.Set<MarkerType> hiddenAreaMarkerTypes, java.util.Set<NamedAreaLevel> omitLevels, java.util.List<java.lang.String> propertyPaths)
getOrderedDistributions
in interface IDescriptionService
subAreaPreference
- enables the Sub area preference rule if set to true,
see DescriptionUtility#filterDistributions(Collection,
boolean, boolean
statusOrderPreference
- enables the Status order preference rule if set to
true, see DescriptionUtility#filterDistributions(Collection, boolean,
boolean
hiddenAreaMarkerTypes
- distributions where the area has a Marker
with one of
the specified MarkerType
s will be skipped, see
DescriptionUtility#filterDistributions(Collection, boolean, boolean, Set)
omitLevels
- A Set NamedArea levels to omit - optionalpropertyPaths
- the initialization strategypublic Pager<TaxonNameDescription> getTaxonNameDescriptions(TaxonName name, java.lang.Integer pageSize, java.lang.Integer pageNumber, java.util.List<java.lang.String> propertyPaths)
IDescriptionService
getTaxonNameDescriptions
in interface IDescriptionService
name
- Restrict the results to those descriptions that refer to a specific name (can be null for all TaxonNameDescription instances)pageSize
- The maximum number of descriptions returned (can be null for all descriptions)pageNumber
- The offset (in pageSize chunks) from the start of the result set (0 - based)propertyPaths
- Properties to initialize in the returned entities, following the syntax described in IBeanInitializer.initialize(Object, List)
public Pager<DescriptionBase> page(java.lang.Class<? extends DescriptionBase> type, java.lang.Boolean hasImages, java.lang.Boolean hasText, java.util.Set<Feature> feature, java.lang.Integer pageSize, java.lang.Integer pageNumber, java.util.List<OrderHint> orderHints, java.util.List<java.lang.String> propertyPaths)
IDescriptionService
page
in interface IDescriptionService
type
- The type of description returned (Taxon, TaxonName, or Specimen)hasImages
- Restrict the description to those that do (true) or don't (false) contain elements that have one or more media (can be null)hasText
- Restrict the description to those that do (true) or don't (false) contain TextData elements that have some textual content (can be null)feature
- Restrict the description to those elements which are scoped by one of the Features passed (can be null or empty)pageSize
- The maximum number of descriptions returned (can be null for all descriptions)pageNumber
- The offset (in pageSize chunks) from the start of the result set (0 - based)orderHints
- may be nullpropertyPaths
- properties to initialize - see IBeanInitializer.initialize(Object, List)
public Pager<TaxonDescription> searchDescriptionByDistribution(java.util.Set<NamedArea> namedAreas, PresenceAbsenceTerm presence, java.lang.Integer pageSize, java.lang.Integer pageNumber, java.util.List<OrderHint> orderHints, java.util.List<java.lang.String> propertyPaths)
searchDescriptionByDistribution
in interface IDescriptionService
namedAreas
- The set of NamedArea instancespresence
- Restrict the descriptions to those which have Distribution elements are of this status (can be null)pageSize
- The maximum number of descriptions returned (can be null for all descriptions)pageNumber
- The offset (in pageSize chunks) from the start of the result set (0 - based)propertyPaths
- Properties to initialize in the returned entities, following the syntax described in IBeanInitializer.initialize(Object, List)
public <S extends DescriptionElementBase> Pager<S> searchElements(java.lang.Class<S> clazz, java.lang.String queryString, java.lang.Integer pageSize, java.lang.Integer pageNumber, java.util.List<OrderHint> orderHints, java.util.List<java.lang.String> propertyPaths)
searchElements
in interface IDescriptionService
clazz
- filter the results by class (or pass null to return all DescriptionElementBase instances)pageSize
- The maximum number of descriptionElements returned (can be null for all matching descriptionElements)pageNumber
- The offset (in pageSize chunks) from the start of the result set (0 - based)orderHints
- Supports path like orderHints.propertyNames
which
include *-to-one properties like createdBy.username or
authorTeam.persistentTitleCachepropertyPaths
- properties to be initializedpublic DescriptionElementBase getDescriptionElementByUuid(java.util.UUID uuid)
getDescriptionElementByUuid
in interface IDescriptionService
uuid
- the uuid of the DescriptionElement of interestpublic DescriptionElementBase loadDescriptionElement(java.util.UUID uuid, java.util.List<java.lang.String> propertyPaths)
loadDescriptionElement
in interface IDescriptionService
uuid
- the uuid of the DescriptionElement of interest@Transactional(readOnly=false) public java.util.UUID saveDescriptionElement(DescriptionElementBase descriptionElement)
saveDescriptionElement
in interface IDescriptionService
@Transactional(readOnly=false) public java.util.Map<java.util.UUID,DescriptionElementBase> saveDescriptionElement(java.util.Collection<DescriptionElementBase> descriptionElements)
saveDescriptionElement
in interface IDescriptionService
@Transactional(readOnly=false) public java.util.List<MergeResult<DescriptionBase>> mergeDescriptionElements(java.util.Collection<TaxonDistributionDTO> descriptionElements, boolean returnTransientEntity)
mergeDescriptionElements
in interface IDescriptionService
public java.util.UUID deleteDescriptionElement(DescriptionElementBase descriptionElement)
deleteDescriptionElement
in interface IDescriptionService
descriptionElement
- the description element to be deletedpublic java.util.UUID deleteDescriptionElement(java.util.UUID descriptionElementUuid)
deleteDescriptionElement
in interface IDescriptionService
@Transactional(readOnly=false) public DeleteResult deleteDescription(DescriptionBase description)
deleteDescription
in interface IDescriptionService
@Transactional(readOnly=false) public DeleteResult deleteDescription(java.util.UUID descriptionUuid)
deleteDescription
in interface IDescriptionService
public DeleteResult isDeletable(java.util.UUID descriptionUuid)
isDeletable
in interface IDescriptionService
public TermVocabulary<Feature> getFeatureVocabulary(java.util.UUID uuid)
getFeatureVocabulary
in interface IDescriptionService
@Deprecated public <T extends DescriptionElementBase> java.util.List<T> getDescriptionElementsForTaxon(Taxon taxon, java.util.Set<Feature> features, java.lang.Class<T> type, java.lang.Integer pageSize, java.lang.Integer pageNumber, java.util.List<java.lang.String> propertyPaths)
IDescriptionService
getDescriptionElementsForTaxon
in interface IDescriptionService
taxon
- The Taxon to return Description elements forfeatures
- Restrict the results to those description elements which are
scoped by one of the Features passed (can be null or empty)type
- A filter for DescriptionElements of a specific classpageSize
- The maximum number of description elements returned (can be
null for all description elements)pageNumber
- The offset (in pageSize chunks) from the start of the result
set (0 - based)propertyPaths
- Properties to initialize in the returned entities, following
the syntax described in
IBeanInitializer.initialize(Object, List)
public <T extends DescriptionElementBase> java.util.List<T> listDescriptionElementsForTaxon(Taxon taxon, java.util.Set<Feature> features, java.lang.Class<T> type, java.lang.Integer pageSize, java.lang.Integer pageNumber, java.util.List<java.lang.String> propertyPaths)
IDescriptionService
listDescriptionElementsForTaxon
in interface IDescriptionService
taxon
- The Taxon to return Description elements forfeatures
- Restrict the results to those description elements which are
scoped by one of the Features passed (can be null or empty)type
- A filter for DescriptionElements of a specific classpageSize
- The maximum number of description elements returned (can be
null for all description elements)pageNumber
- The offset (in pageSize chunks) from the start of the result
set (0 - based)propertyPaths
- Properties to initialize in the returned entities, following
the syntax described in
IBeanInitializer.initialize(Object, List)
public <T extends DescriptionElementBase> Pager<T> pageDescriptionElementsForTaxon(Taxon taxon, java.util.Set<Feature> features, java.lang.Class<T> type, java.lang.Integer pageSize, java.lang.Integer pageNumber, java.util.List<java.lang.String> propertyPaths)
IDescriptionService
pageDescriptionElementsForTaxon
in interface IDescriptionService
taxon
- The Taxon to return Description elements forfeatures
- Restrict the results to those description elements which are
scoped by one of the Features passed (can be null or empty)type
- A filter for DescriptionElements of a specific classpageSize
- The maximum number of description elements returnedpageNumber
- The offset (in pageSize chunks) from the start of the result
set (0 - based)propertyPaths
- Properties to initialize in the returned entities, following
the syntax described in
IBeanInitializer.initialize(Object, List)
public java.lang.String generateNaturalLanguageDescription(TermTree featureTree, TaxonDescription description, java.util.List<Language> preferredLanguages, java.lang.String separator)
IDescriptionService
description
supplied in natural language
The featureTree
will be used to structure the NaturalLanguageDescription.
This method does not require a initialization strategy so there is no propertyPaths
parameter.generateNaturalLanguageDescription
in interface IDescriptionService
public boolean hasStructuredData(DescriptionBase<?> description)
IDescriptionService
hasStructuredData
in interface IDescriptionService
public UpdateResult moveDescriptionElementsToDescription(java.util.Collection<DescriptionElementBase> descriptionElements, DescriptionBase targetDescription, boolean isCopy, boolean setNameInSource)
IDescriptionService
description elements
to the targetDescription
.
Remove the description elements from the description they are currently associated with.moveDescriptionElementsToDescription
in interface IDescriptionService
isCopy
- if true, the elements are only copied (cloned) and not removed from the
old description@Transactional(readOnly=false) public UpdateResult moveDescriptionElementsToDescription(java.util.Set<java.util.UUID> descriptionElementUUIDs, java.util.UUID targetDescriptionUuid, boolean isCopy, boolean setNameInSource)
moveDescriptionElementsToDescription
in interface IDescriptionService
@Transactional(readOnly=false) public UpdateResult moveDescriptionElementsToDescription(java.util.Set<java.util.UUID> descriptionElementUUIDs, DescriptionBase targetDescription, boolean isCopy, boolean setNameInSource)
moveDescriptionElementsToDescription
in interface IDescriptionService
@Transactional(readOnly=false) public UpdateResult moveDescriptionElementsToDescription(java.util.Set<java.util.UUID> descriptionElementUUIDs, java.util.UUID targetTaxonUuid, java.lang.String moveMessage, boolean isCopy, boolean setNameInSource)
moveDescriptionElementsToDescription
in interface IDescriptionService
public Pager<TermDto> pageNamedAreasInUse(boolean includeAllParents, java.lang.Integer pageSize, java.lang.Integer pageNumber)
IDescriptionService
NamedAreas
instances which are currently used
by Distribution
elements.pageNamedAreasInUse
in interface IDescriptionService
pageSize
- The maximum number of description elements returnedpageNumber
- The offset (in pageSize chunks) from the start of the result
set (0 - based)@Transactional(readOnly=false) public UpdateResult moveTaxonDescriptions(Taxon sourceTaxon, Taxon targetTaxon, boolean setNameInSource)
moveTaxonDescriptions
in interface IDescriptionService
@Transactional(readOnly=false) public UpdateResult moveTaxonDescriptions(java.util.UUID sourceTaxonUuid, java.util.UUID targetTaxonUuid, boolean setNameInSource)
moveTaxonDescriptions
in interface IDescriptionService
@Transactional(readOnly=false) public UpdateResult moveTaxonDescription(java.util.UUID descriptionUuid, java.util.UUID targetTaxonUuid, boolean setNameInSource)
moveTaxonDescription
in interface IDescriptionService
Copyright © 2007-2020 EDIT. All Rights Reserved.