|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface IDescriptionService
| Method Summary | ||
|---|---|---|
int |
count(Class<? extends DescriptionBase> type,
Boolean hasImages,
Boolean hasText,
Set<Feature> feature)
Count the descriptions of type |
|
int |
countTaxonDescriptionMedia(UUID taxonUuid,
boolean limitToGalleries,
Set<MarkerType> markerTypes)
Returns count for all Media attached to a taxon via TaxonDescription.elements.media. |
|
UUID |
deleteDescriptionElement(DescriptionElementBase descriptionElement)
Delete an existing description element |
|
String |
generateNaturalLanguageDescription(FeatureTree featureTree,
TaxonDescription description,
List<Language> preferredLanguages,
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()
Deprecated. use TermService#getVocabulary(VocabularyType) instead |
|
Pager<Annotation> |
getDescriptionElementAnnotations(DescriptionElementBase annotatedObj,
MarkerType status,
Integer pageSize,
Integer pageNumber,
List<OrderHint> orderHints,
List<String> propertyPaths)
Return a Pager containing Annotation entities belonging to the DescriptionElementBase instance supplied, optionally filtered by MarkerType |
|
DescriptionElementBase |
getDescriptionElementByUuid(UUID uuid)
Gets a DescriptionElementBase instance matching the supplied uuid |
|
Pager<DescriptionElementBase> |
getDescriptionElements(DescriptionBase description,
Set<Feature> features,
Class<? extends DescriptionElementBase> type,
Integer pageSize,
Integer pageNumber,
List<String> propertyPaths)
Returns description elements of type |
|
|
getDescriptionElementsForTaxon(Taxon taxon,
Set<Feature> features,
Class<T> type,
Integer pageSize,
Integer pageNumber,
List<String> propertyPaths)
|
|
TermVocabulary<Feature> |
getFeatureVocabulary(UUID uuid)
Deprecated. use TermService#getVocabulary(VocabularyType) instead |
|
Pager<Media> |
getMedia(DescriptionElementBase descriptionElement,
Integer pageSize,
Integer pageNumber,
List<String> propertyPaths)
Returns a List of Media that are associated with a given description element |
|
DistributionTree |
getOrderedDistributions(Set<TaxonDescription> taxonDescriptions,
Set<NamedAreaLevel> levels,
List<String> propertyPaths)
|
|
Pager<TaxonNameDescription> |
getTaxonNameDescriptions(TaxonNameBase name,
Integer pageSize,
Integer pageNumber,
List<String> propertyPaths)
Returns a List of TaxonNameDescription instances, optionally filtered by the name which they refer to |
|
boolean |
hasStructuredData(DescriptionBase<?> description)
Deprecated. The means of determining this fact may change soon, so this method is annotated as being deprecated. |
|
List<DescriptionElementBase> |
listDescriptionElements(DescriptionBase description,
Set<Feature> features,
Class<? extends DescriptionElementBase> type,
Integer pageSize,
Integer pageNumber,
List<String> propertyPaths)
Returns description elements of type |
|
List<Media> |
listTaxonDescriptionMedia(UUID taxonUuid,
boolean limitToGalleries,
Set<MarkerType> markerTypes,
Integer pageSize,
Integer pageNumber,
List<String> propertyPaths)
Returns all Media attached to a taxon via TaxonDescription.elements.media. |
|
List<TaxonDescription> |
listTaxonDescriptions(Taxon taxon,
Set<Scope> scopes,
Set<NamedArea> geographicalScope,
Integer pageSize,
Integer pageNumber,
List<String> propertyPaths)
|
|
List<TaxonDescription> |
listTaxonDescriptions(Taxon taxon,
Set<Scope> scopes,
Set<NamedArea> geographicalScope,
Set<MarkerType> markerTypes,
Integer pageSize,
Integer pageNumber,
List<String> propertyPaths)
|
|
DescriptionElementBase |
loadDescriptionElement(UUID uuid,
List<String> propertyPaths)
Loads and existing DescriptionElementBase instance matching the supplied uuid, and recursively initializes all bean properties given in the propertyPaths parameter. |
|
void |
moveDescriptionElementsToDescription(Collection<DescriptionElementBase> descriptionElements,
DescriptionBase targetDescription,
boolean isPaste)
Add the collection of description elements to the targetDescription. |
|
Pager<DescriptionBase> |
page(Class<? extends DescriptionBase> type,
Boolean hasMedia,
Boolean hasText,
Set<Feature> feature,
Integer pageSize,
Integer pageNumber,
List<OrderHint> orderHints,
List<String> propertyPaths)
List the descriptions of type |
|
Pager<TaxonDescription> |
pageTaxonDescriptions(Taxon taxon,
Set<Scope> scopes,
Set<NamedArea> geographicalScope,
Integer pageSize,
Integer pageNumber,
List<String> propertyPaths)
Returns a List of TaxonDescription instances, optionally filtered by parameters passed to this method |
|
Pager<TaxonDescription> |
pageTaxonDescriptions(Taxon taxon,
Set<Scope> scopes,
Set<NamedArea> geographicalScope,
Set<MarkerType> markerTypes,
Integer pageSize,
Integer pageNumber,
List<String> propertyPaths)
Returns a List of TaxonDescription instances, optionally filtered by parameters passed to this method |
|
Map<UUID,DescriptionElementBase> |
saveDescriptionElement(Collection<DescriptionElementBase> descriptionElements)
Persists a collection of DescriptionElementBase |
|
UUID |
saveDescriptionElement(DescriptionElementBase descriptionElement)
Persists a DescriptionElementBase |
|
Pager<TaxonDescription> |
searchDescriptionByDistribution(Set<NamedArea> namedAreas,
PresenceAbsenceTermBase presence,
Integer pageSize,
Integer pageNumber,
List<OrderHint> orderHints,
List<String> propertyPaths)
Returns a List of distinct TaxonDescription instances which have Distribution elements that refer to one of the NamedArea instances passed (optionally filtered by a type of PresenceAbsenceTerm e.g. |
|
Pager<DescriptionElementBase> |
searchElements(Class<? extends DescriptionElementBase> clazz,
String queryString,
Integer pageSize,
Integer pageNumber,
List<OrderHint> orderHints,
List<String> propertyPaths)
Returns a Paged List of DescriptionElementBase instances where the default field matches the String queryString (as interpreted by the Lucene QueryParser) |
|
| Methods inherited from interface eu.etaxonomy.cdm.api.service.IIdentifiableEntityService |
|---|
countByTitle, countByTitle, deduplicate, find, findByTitle, findByTitle, findTitleCache, getRights, getSourcedObjectByIdInSource, getSources, getUuidAndTitleCache, listByReferenceTitle, listByTitle, replace, search, updateTitleCache, updateTitleCache |
| Methods inherited from interface eu.etaxonomy.cdm.api.service.IAnnotatableService |
|---|
countMarkers, getAnnotations, getMarkers, groupMarkers |
| Methods inherited from interface eu.etaxonomy.cdm.api.service.IVersionableService |
|---|
getNextAuditEvent, getPreviousAuditEvent, pageAuditEvents, pageAuditEvents |
| Methods inherited from interface eu.etaxonomy.cdm.api.service.IService |
|---|
clear, count, delete, exists, find, find, find, findById, getSession, group, list, list, load, load, lock, merge, page, refresh, refresh, rows, save, save, saveOrUpdate, saveOrUpdate, update |
| Method Detail |
|---|
@Deprecated TermVocabulary<Feature> getDefaultFeatureVocabulary()
@Deprecated TermVocabulary<Feature> getFeatureVocabulary(UUID uuid)
DescriptionElementBase getDescriptionElementByUuid(UUID uuid)
uuid - the uuid of the DescriptionElement of interest
DescriptionElementBase loadDescriptionElement(UUID uuid,
List<String> propertyPaths)
propertyPaths parameter.
For detailed description and examples please refer to:
IBeanInitializer.initialize(Object, List)
uuid - the uuid of the DescriptionElement of interest
UUID saveDescriptionElement(DescriptionElementBase descriptionElement)
DescriptionElementBase
descriptionElement -
Map<UUID,DescriptionElementBase> saveDescriptionElement(Collection<DescriptionElementBase> descriptionElements)
DescriptionElementBase
descriptionElements -
UUID deleteDescriptionElement(DescriptionElementBase descriptionElement)
descriptionElement - the description element to be deleted
Pager<DescriptionBase> page(Class<? extends DescriptionBase> type,
Boolean hasMedia,
Boolean hasText,
Set<Feature> feature,
Integer pageSize,
Integer pageNumber,
List<OrderHint> orderHints,
List<String> propertyPaths)
type - The type of description returned (Taxon, TaxonName, or Specimen)hasMedia - 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)
int count(Class<? extends DescriptionBase> type,
Boolean hasImages,
Boolean hasText,
Set<Feature> feature)
type - The type of description returned (Taxon, TaxonName, or Specimen)hasMedia - 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)
Pager<DescriptionElementBase> getDescriptionElements(DescriptionBase description,
Set<Feature> features,
Class<? extends DescriptionElementBase> type,
Integer pageSize,
Integer pageNumber,
List<String> propertyPaths)
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 - The type of descriptionclass - pageSize - 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)
List<DescriptionElementBase> listDescriptionElements(DescriptionBase description,
Set<Feature> features,
Class<? extends DescriptionElementBase> type,
Integer pageSize,
Integer pageNumber,
List<String> propertyPaths)
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 - The type of descriptionclass - pageSize - 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)
Pager<Annotation> getDescriptionElementAnnotations(DescriptionElementBase annotatedObj,
MarkerType status,
Integer pageSize,
Integer pageNumber,
List<OrderHint> orderHints,
List<String> propertyPaths)
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)
Pager<TaxonDescription> pageTaxonDescriptions(Taxon taxon,
Set<Scope> scopes,
Set<NamedArea> geographicalScope,
Integer pageSize,
Integer pageNumber,
List<String> propertyPaths)
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)
Pager<TaxonDescription> pageTaxonDescriptions(Taxon taxon,
Set<Scope> scopes,
Set<NamedArea> geographicalScope,
Set<MarkerType> markerTypes,
Integer pageSize,
Integer pageNumber,
List<String> propertyPaths)
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)markerType - Restrict the results to those descriptions which are marked as true by one of the given marker 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)
List<TaxonDescription> listTaxonDescriptions(Taxon taxon,
Set<Scope> scopes,
Set<NamedArea> geographicalScope,
Integer pageSize,
Integer pageNumber,
List<String> propertyPaths)
taxon - scopes - geographicalScope - pageSize - pageNumber - propertyPaths -
#pageTaxonDescriptions(Taxon, Set, Set, Integer, Integer, List)}
List<TaxonDescription> listTaxonDescriptions(Taxon taxon,
Set<Scope> scopes,
Set<NamedArea> geographicalScope,
Set<MarkerType> markerTypes,
Integer pageSize,
Integer pageNumber,
List<String> propertyPaths)
taxon - scopes - geographicalScope - pageSize - pageNumber - propertyPaths -
#pageMarkedTaxonDescriptions(Taxon, Set, Set, Set, Integer, Integer, List)}
List<Media> listTaxonDescriptionMedia(UUID taxonUuid,
boolean limitToGalleries,
Set<MarkerType> markerTypes,
Integer pageSize,
Integer pageNumber,
List<String> propertyPaths)
Media attached to a taxon via TaxonDescription.elements.media.
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 sufficientpageSize - pageNumber - propertyPaths - Properties to initialize in the returned entities, following the syntax described in IBeanInitializer.initialize(Object, List)
int countTaxonDescriptionMedia(UUID taxonUuid,
boolean limitToGalleries,
Set<MarkerType> markerTypes)
Media attached to a taxon via TaxonDescription.elements.media.
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
Pager<TaxonNameDescription> getTaxonNameDescriptions(TaxonNameBase name,
Integer pageSize,
Integer pageNumber,
List<String> propertyPaths)
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)
Pager<TaxonDescription> searchDescriptionByDistribution(Set<NamedArea> namedAreas,
PresenceAbsenceTermBase presence,
Integer pageSize,
Integer pageNumber,
List<OrderHint> orderHints,
List<String> propertyPaths)
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)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)
Pager<DescriptionElementBase> searchElements(Class<? extends DescriptionElementBase> clazz,
String queryString,
Integer pageSize,
Integer pageNumber,
List<OrderHint> orderHints,
List<String> propertyPaths)
clazz - filter the results by class (or pass null to return all DescriptionElementBase instances)queryString - 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 initialized
Pager<Media> getMedia(DescriptionElementBase descriptionElement,
Integer pageSize,
Integer pageNumber,
List<String> propertyPaths)
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)
<T extends DescriptionElementBase> List<T> getDescriptionElementsForTaxon(Taxon taxon,
Set<Feature> features,
Class<T> type,
Integer pageSize,
Integer pageNumber,
List<String> propertyPaths)
DistributionTree getOrderedDistributions(Set<TaxonDescription> taxonDescriptions,
Set<NamedAreaLevel> levels,
List<String> propertyPaths)
String generateNaturalLanguageDescription(FeatureTree featureTree,
TaxonDescription description,
List<Language> preferredLanguages,
String separator)
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.
featureTree - description - preferredLanguages - separator -
@Deprecated boolean hasStructuredData(DescriptionBase<?> description)
description -
void moveDescriptionElementsToDescription(Collection<DescriptionElementBase> descriptionElements,
DescriptionBase targetDescription,
boolean isPaste)
description elements to the targetDescription.
Remove the description elements from the description they are currently associated with.
descriptionElements - targetDescription - isPaste - if true, the elements are only copied (cloned) and not removed from the
old description
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||