X-Git-Url: https://dev.e-taxonomy.eu/gitweb/cdmlib.git/blobdiff_plain/e0a4a80cf752e00119ff99e18f170b59d919b5d1..dd4c21b70742a1113a7a82c661a7a3cfe357ee31:/cdmlib-services/src/main/java/eu/etaxonomy/cdm/api/service/IDescriptionService.java diff --git a/cdmlib-services/src/main/java/eu/etaxonomy/cdm/api/service/IDescriptionService.java b/cdmlib-services/src/main/java/eu/etaxonomy/cdm/api/service/IDescriptionService.java index 5326427799..7ff9ad9aa6 100644 --- a/cdmlib-services/src/main/java/eu/etaxonomy/cdm/api/service/IDescriptionService.java +++ b/cdmlib-services/src/main/java/eu/etaxonomy/cdm/api/service/IDescriptionService.java @@ -34,7 +34,7 @@ import eu.etaxonomy.cdm.model.location.NamedAreaLevel; import eu.etaxonomy.cdm.model.media.Media; import eu.etaxonomy.cdm.model.name.TaxonNameBase; import eu.etaxonomy.cdm.model.taxon.Taxon; -import eu.etaxonomy.cdm.persistence.dao.BeanInitializer; +import eu.etaxonomy.cdm.persistence.dao.IBeanInitializer; import eu.etaxonomy.cdm.persistence.query.OrderHint; public interface IDescriptionService extends IIdentifiableEntityService { @@ -65,7 +65,7 @@ public interface IDescriptionService extends IIdentifiableEntityServicepropertyPaths parameter. *

* For detailed description and examples please refer to: - * {@link BeanInitializer#initialize(Object, List)} + * {@link IBeanInitializer#initialize(Object, List)} * * @param uuid the uuid of the DescriptionElement of interest * @return a DescriptionElement, or null if the DescriptionElement does not exist @@ -104,7 +104,7 @@ public interface IDescriptionService extends IIdentifiableEntityService page(Class type, Boolean hasMedia, Boolean hasText, Set feature, Integer pageSize, Integer pageNumber, List orderHints, List propertyPaths); @@ -129,7 +129,7 @@ public interface IDescriptionService extends IIdentifiableEntityService listDescriptionElements(DescriptionBase description,Set features, Class type, Integer pageSize, Integer pageNumber, List propertyPaths); @@ -157,7 +157,7 @@ public interface IDescriptionService extends IIdentifiableEntityService getDescriptionElementAnnotations(DescriptionElementBase annotatedObj, MarkerType status, Integer pageSize, Integer pageNumber, List orderHints, List propertyPaths); @@ -171,7 +171,7 @@ public interface IDescriptionService extends IIdentifiableEntityService pageTaxonDescriptions(Taxon taxon, Set scopes, Set geographicalScope, Set markerTypes, Integer pageSize, Integer pageNumber, List propertyPaths); @@ -222,6 +222,28 @@ public interface IDescriptionService extends IIdentifiableEntityService listTaxonDescriptions(Taxon taxon, Set scopes, Set geographicalScope, Set markerTypes, Integer pageSize, Integer pageNumber, List propertyPaths); + /** + * Returns all {@link Media} attached to a taxon via TaxonDescription.elements.media. + * @param taxonUuid the taxons uuid, if null media for all taxa are returned + * @param limitToGalleries if true only media in TaxonDescriptions with imageGallery flag=true are returned + * @param markerTypes only media for TaxonDescriptions with marker of type markerType and marker.flag=true are returned, one matching marker type is sufficient + * @param pageSize + * @param pageNumber + * @param propertyPaths Properties to initialize in the returned entities, following the syntax described in {@link IBeanInitializer#initialize(Object, List)} + * @return + */ + public List listTaxonDescriptionMedia(UUID taxonUuid, boolean limitToGalleries, Set markerTypes, Integer pageSize, Integer pageNumber, List propertyPaths); + + /** + * Returns count for all {@link Media} attached to a taxon via TaxonDescription.elements.media. + * @param taxonUuid the taxons uuid, if null media for all taxa are returned + * @param limitToGalleries if true only media in TaxonDescriptions with imageGallery flag=true are returned + * @param markerTypes only media for TaxonDescriptions with marker of type markerType and marker.flag=true are returned, one matching marker type is sufficient + * @return + */ + public int countTaxonDescriptionMedia(UUID taxonUuid, boolean limitToGalleries, Set markerTypes); + + /** * Returns a List of TaxonNameDescription instances, optionally filtered by the name which they refer to @@ -229,12 +251,13 @@ public interface IDescriptionService extends IIdentifiableEntityService getTaxonNameDescriptions(TaxonNameBase name, Integer pageSize, Integer pageNumber, List propertyPaths); + /** * Returns a List of distinct TaxonDescription instances which have Distribution elements that refer to one of the NamedArea instances passed (optionally @@ -245,7 +268,7 @@ public interface IDescriptionService extends IIdentifiableEntityService searchDescriptionByDistribution(Set namedAreas, PresenceAbsenceTermBase presence, Integer pageSize, Integer pageNumber, List orderHints, List propertyPaths); @@ -273,7 +296,7 @@ public interface IDescriptionService extends IIdentifiableEntityService