2 * Copyright (C) 2007 EDIT
3 * European Distributed Institute of Taxonomy
4 * http://www.e-taxonomy.eu
6 * The contents of this file are subject to the Mozilla Public License Version 1.1
7 * See LICENSE.TXT at the top of this package for the full license terms.
10 package eu
.etaxonomy
.cdm
.api
.service
;
12 import java
.util
.List
;
14 import java
.util
.UUID
;
16 import eu
.etaxonomy
.cdm
.api
.service
.config
.IIdentifiableEntityServiceConfigurator
;
17 import eu
.etaxonomy
.cdm
.api
.service
.dto
.IdentifiedEntityDTO
;
18 import eu
.etaxonomy
.cdm
.api
.service
.pager
.Pager
;
19 import eu
.etaxonomy
.cdm
.model
.name
.TaxonName
;
20 import eu
.etaxonomy
.cdm
.model
.reference
.Reference
;
21 import eu
.etaxonomy
.cdm
.model
.reference
.ReferenceType
;
22 import eu
.etaxonomy
.cdm
.model
.taxon
.TaxonBase
;
23 import eu
.etaxonomy
.cdm
.model
.term
.DefinedTerm
;
24 import eu
.etaxonomy
.cdm
.persistence
.dto
.UuidAndTitleCache
;
25 import eu
.etaxonomy
.cdm
.persistence
.query
.MatchMode
;
26 import eu
.etaxonomy
.cdm
.persistence
.query
.OrderHint
;
29 public interface IReferenceService
extends IIdentifiableEntityService
<Reference
> {
32 * Returns a Paged List of Reference instances where the default field matches the String queryString (as interpreted by the Lucene QueryParser)
34 * @param clazz filter the results by class (or pass null to return all Reference instances)
36 * @param pageSize The maximum number of references returned (can be null for all matching references)
37 * @param pageNumber The offset (in pageSize chunks) from the start of the result set (0 - based)
39 * Supports path like <code>orderHints.propertyNames</code> which
40 * include *-to-one properties like createdBy.username or
41 * authorTeam.persistentTitleCache
42 * @param propertyPaths properties to be initialized
43 * @return a Pager Reference instances
44 * @see <a href="http://lucene.apache.org/java/2_4_0/queryparsersyntax.html">Apache Lucene - Query Parser Syntax</a>
47 public Pager
<Reference
> search(Class
<?
extends Reference
> clazz
, String queryString
, Integer pageSize
, Integer pageNumber
, List
<OrderHint
> orderHints
, List
<String
> propertyPaths
);
50 * Returns a map that holds uuid, titleCache pairs of all references in the current database
53 * a <code>Map</code> containing uuid and titleCache of references
55 public List
<UuidAndTitleCache
<Reference
>> getUuidAndTitle();
58 * lists all references marked as "publish" and not used as nomenclatural references
60 public List
<Reference
> listReferencesForPublishing();
63 * Lists all references used as nomenclatural references in at least 1 {@link TaxonName}
65 public List
<Reference
> listNomenclaturalReferences();
71 * <li>all taxa directly covered by this reference</li>
72 * <li>all taxa covered by the according in references of this reference</li>
75 * searches for taxa using the following relations:
77 * <li>taxon.name.nomenclaturalSource.citation</li>
78 * <li>taxon.descriptions.descriptionElement.sources.citation</li>
79 * <li>taxon.descriptions.descriptionSources</li>
80 * <li>taxon.name.descriptions.descriptionElement.sources</li>
81 * <li>taxon.name.descriptions.descriptionSources</li>
85 * @param includeSubordinateReferences TODO
86 * @param propertyPaths
89 public List
<TaxonBase
> listCoveredTaxa(Reference reference
, boolean includeSubordinateReferences
, List
<String
> propertyPaths
);
92 public List
<UuidAndTitleCache
<Reference
>> getUuidAndAbbrevTitleCache(Integer limit
, String pattern
);
100 public List
<UuidAndTitleCache
<Reference
>> getUuidAndAbbrevTitleCache(Integer limit
, String pattern
, ReferenceType type
);
107 public List
<UuidAndTitleCache
<Reference
>> getUuidAndTitleCache(Integer limit
, String pattern
, ReferenceType type
);
111 * @param identifierType
116 public List
<IdentifiedEntityDTO
<Reference
>> listByIdentifierAbbrev(String identifier
, DefinedTerm identifierType
,
117 MatchMode matchmode
, Integer limit
);
125 List
<UuidAndTitleCache
<Reference
>> getUuidAndAbbrevTitleCacheForAuthor(Integer limit
, String pattern
,
134 List
<UuidAndTitleCache
<Reference
>> getUuidAndAbbrevTitleCacheForAuthorID(Integer limit
, Integer authorID
,
135 ReferenceType refType
);
142 List
<UuidAndTitleCache
<Reference
>> getUuidAndTitleCacheForUUIDS(Set
<UUID
> uuids
);
146 * @param identifierType
151 List
<IdentifiedEntityDTO
<Reference
>> listByIdentifierAndTitleCacheAbbrev(String identifier
,
152 DefinedTerm identifierType
, MatchMode matchmode
, Integer limit
);
159 List
<UuidAndTitleCache
<Reference
>> getUuidAndTitleCacheForUUIDS(Set
<UUID
> uuids
, ReferenceType refType
);
165 List
<Reference
> findByTitleAndAbbrevTitle(IIdentifiableEntityServiceConfigurator
<Reference
> config
);