eu.etaxonomy.cdm.api.service
Interface IOccurrenceService

All Superinterfaces:
IAnnotatableService<SpecimenOrObservationBase>, IIdentifiableEntityService<SpecimenOrObservationBase>, IService<SpecimenOrObservationBase>, IVersionableService<SpecimenOrObservationBase>
All Known Implementing Classes:
OccurrenceServiceImpl

public interface IOccurrenceService
extends IIdentifiableEntityService<SpecimenOrObservationBase>

Author:
a.babadshanjan

Method Summary
 Pager<SearchResult<SpecimenOrObservationBase>> findByFullText(Class<? extends SpecimenOrObservationBase> clazz, String queryString, org.hibernate.search.spatial.impl.Rectangle boundingBox, List<Language> languages, boolean highlightFragments, Integer pageSize, Integer pageNumber, List<OrderHint> orderHints, List<String> propertyPaths)
           
 WaterbodyOrCountry getCountryByIso(String iso639)
           
 Pager<DerivationEvent> getDerivationEvents(SpecimenOrObservationBase occurence, Integer pageSize, Integer pageNumber, List<String> propertyPaths)
          Returns a list of derivation events that have involved creating new DerivedUnits from this occurence
 List<UuidAndTitleCache<DerivedUnitBase>> getDerivedUnitBaseUuidAndTitleCache()
           
 DerivedUnitFacade getDerivedUnitFacade(DerivedUnitBase derivedUnit, List<String> propertyPaths)
           
 Pager<DeterminationEvent> getDeterminations(SpecimenOrObservationBase occurence, TaxonBase taxonBase, Integer pageSize, Integer pageNumber, List<String> propertyPaths)
          Returns a List of determinations that have been made for a given occurence
 List<UuidAndTitleCache<FieldObservation>> getFieldObservationUuidAndTitleCache()
           
 Pager<Media> getMedia(SpecimenOrObservationBase occurence, Integer pageSize, Integer pageNumber, List<String> propertyPaths)
          Returns a List of Media that are associated with a given occurence
 List<WaterbodyOrCountry> getWaterbodyOrCountryByName(String name)
           
 Pager<SpecimenOrObservationBase> list(Class<? extends SpecimenOrObservationBase> type, TaxonBase determinedAs, Integer limit, Integer start, List<OrderHint> orderHints, List<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.
<T extends SpecimenOrObservationBase>
List<T>
listByAssociatedTaxon(Class<T> type, Set<TaxonRelationshipEdge> includeRelationships, Taxon associatedTaxon, Integer maxDepth, Integer pageSize, Integer pageNumber, List<OrderHint> orderHints, List<String> propertyPaths)
          Lists all instances of SpecimenOrObservationBase which are associated with the taxon specified as parameter.
 List<DerivedUnitFacade> listDerivedUnitFacades(DescriptionBase description, List<String> propertyPaths)
           
<T extends SpecimenOrObservationBase>
Pager<T>
pageByAssociatedTaxon(Class<T> type, Set<TaxonRelationshipEdge> includeRelationships, Taxon associatedTaxon, Integer maxDepth, Integer pageSize, Integer pageNumber, List<OrderHint> orderHints, List<String> propertyPaths)
          See listByAssociatedTaxon(Class, Set, Taxon, Integer, Integer, Integer, List, List)
 Pager<SpecimenOrObservationBase> search(Class<? extends SpecimenOrObservationBase> clazz, String query, Integer pageSize, Integer pageNumber, List<OrderHint> orderHints, List<String> propertyPaths)
          Returns a Paged List of SpecimenOrObservationBase 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, 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

getCountryByIso

WaterbodyOrCountry getCountryByIso(String iso639)

getWaterbodyOrCountryByName

List<WaterbodyOrCountry> getWaterbodyOrCountryByName(String name)

list

Pager<SpecimenOrObservationBase> list(Class<? extends SpecimenOrObservationBase> type,
                                      TaxonBase determinedAs,
                                      Integer limit,
                                      Integer start,
                                      List<OrderHint> orderHints,
                                      List<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.

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.

Parameters:
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 to
pageSize - The maximum number of objects returned (can be null for all matching objects)
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)
orderHints - Supports path like orderHints.propertyNames which include *-to-one properties like createdBy.username or authorTeam.persistentTitleCache
propertyPaths - properties to be initialized
Returns:

getMedia

Pager<Media> getMedia(SpecimenOrObservationBase occurence,
                      Integer pageSize,
                      Integer pageNumber,
                      List<String> propertyPaths)
Returns a List of Media that are associated with a given occurence

Parameters:
occurence - the occurence associated with these media
pageSize - 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)
Returns:
a Pager of media instances

getDeterminations

Pager<DeterminationEvent> getDeterminations(SpecimenOrObservationBase occurence,
                                            TaxonBase taxonBase,
                                            Integer pageSize,
                                            Integer pageNumber,
                                            List<String> propertyPaths)
Returns a List of determinations that have been made for a given occurence

Parameters:
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)
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)
Returns:
a Pager of determination instances

getDerivationEvents

Pager<DerivationEvent> getDerivationEvents(SpecimenOrObservationBase occurence,
                                           Integer pageSize,
                                           Integer pageNumber,
                                           List<String> propertyPaths)
Returns a list of derivation events that have involved creating new DerivedUnits from this occurence

Parameters:
occurence - the occurence that was a source of these derivation events
pageSize - 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)
Returns:
a Pager of derivation events

search

Pager<SpecimenOrObservationBase> search(Class<? extends SpecimenOrObservationBase> clazz,
                                        String query,
                                        Integer pageSize,
                                        Integer pageNumber,
                                        List<OrderHint> orderHints,
                                        List<String> propertyPaths)
Returns a Paged List of SpecimenOrObservationBase instances where the default field matches the String queryString (as interpreted by the Lucene QueryParser)

Specified by:
search in interface IIdentifiableEntityService<SpecimenOrObservationBase>
Parameters:
clazz - filter the results by class (or pass null to return all SpecimenOrObservationBase instances)
queryString -
pageSize - The maximum number of occurrences returned (can be null for all matching occurrences)
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.persistentTitleCache
propertyPaths - properties to be initialized
Returns:
a Pager SpecimenOrObservationBase instances
See Also:
Apache Lucene - Query Parser Syntax

getFieldObservationUuidAndTitleCache

List<UuidAndTitleCache<FieldObservation>> getFieldObservationUuidAndTitleCache()

getDerivedUnitBaseUuidAndTitleCache

List<UuidAndTitleCache<DerivedUnitBase>> getDerivedUnitBaseUuidAndTitleCache()

getDerivedUnitFacade

DerivedUnitFacade getDerivedUnitFacade(DerivedUnitBase derivedUnit,
                                       List<String> propertyPaths)
                                       throws DerivedUnitFacadeNotSupportedException
Throws:
DerivedUnitFacadeNotSupportedException

listDerivedUnitFacades

List<DerivedUnitFacade> listDerivedUnitFacades(DescriptionBase description,
                                               List<String> propertyPaths)

listByAssociatedTaxon

<T extends SpecimenOrObservationBase> List<T> listByAssociatedTaxon(Class<T> type,
                                                                    Set<TaxonRelationshipEdge> includeRelationships,
                                                                    Taxon associatedTaxon,
                                                                    Integer maxDepth,
                                                                    Integer pageSize,
                                                                    Integer pageNumber,
                                                                    List<OrderHint> orderHints,
                                                                    List<String> propertyPaths)
Lists all instances of 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: Further more there also can be taxa which are associated with the taxon in question (parameter associatedTaxon) by TaxonRelationships. If the parameter includeRelationships is containing elements, these according s and directional information will be used to collect further SpecimenOrObservationBase instances found this way.

Type Parameters:
T -
Parameters:
type -
associatedTaxon -
Set - includeRelationships. TaxonRelationships will not be taken into account if this is NULL.
maxDepth - TODO
pageSize -
pageNumber -
orderHints -
propertyPaths -
Returns:

pageByAssociatedTaxon

<T extends SpecimenOrObservationBase> Pager<T> pageByAssociatedTaxon(Class<T> type,
                                                                     Set<TaxonRelationshipEdge> includeRelationships,
                                                                     Taxon associatedTaxon,
                                                                     Integer maxDepth,
                                                                     Integer pageSize,
                                                                     Integer pageNumber,
                                                                     List<OrderHint> orderHints,
                                                                     List<String> propertyPaths)
See listByAssociatedTaxon(Class, Set, Taxon, Integer, Integer, Integer, List, List)

Parameters:
type -
includeRelationships -
associatedTaxon -
maxDepth -
pageSize -
pageNumber -
orderHints -
propertyPaths -
Returns:
a Pager

findByFullText

Pager<SearchResult<SpecimenOrObservationBase>> findByFullText(Class<? extends SpecimenOrObservationBase> clazz,
                                                              String queryString,
                                                              org.hibernate.search.spatial.impl.Rectangle boundingBox,
                                                              List<Language> languages,
                                                              boolean highlightFragments,
                                                              Integer pageSize,
                                                              Integer pageNumber,
                                                              List<OrderHint> orderHints,
                                                              List<String> propertyPaths)
                                                              throws org.apache.lucene.index.CorruptIndexException,
                                                                     IOException,
                                                                     org.apache.lucene.queryParser.ParseException
Parameters:
clazz -
queryString -
languages -
highlightFragments -
pageSize -
pageNumber -
orderHints -
propertyPaths -
Returns:
Throws:
org.apache.lucene.index.CorruptIndexException
IOException
org.apache.lucene.queryParser.ParseException


Copyright © 2007-2013 EDIT. All Rights Reserved.