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
.persistence
.dao
.taxon
;
12 import java
.util
.List
;
14 import org
.hibernate
.criterion
.Criterion
;
16 import eu
.etaxonomy
.cdm
.model
.common
.RelationshipBase
;
17 import eu
.etaxonomy
.cdm
.model
.reference
.ReferenceBase
;
18 import eu
.etaxonomy
.cdm
.model
.taxon
.Synonym
;
19 import eu
.etaxonomy
.cdm
.model
.taxon
.Taxon
;
20 import eu
.etaxonomy
.cdm
.model
.taxon
.TaxonBase
;
21 import eu
.etaxonomy
.cdm
.persistence
.dao
.common
.IIdentifiableDao
;
22 import eu
.etaxonomy
.cdm
.persistence
.dao
.common
.ITitledDao
;
23 import eu
.etaxonomy
.cdm
.persistence
.fetch
.CdmFetch
;
29 public interface ITaxonDao
extends IIdentifiableDao
<TaxonBase
>, ITitledDao
<TaxonBase
> {
31 public List
<TaxonBase
> getTaxaByName(String name
, ReferenceBase sec
);
34 * Computes all Taxon instances that do not have a taxonomic parent and has at least one child.
35 * @return The List<Taxon> of root taxa.
37 public List
<Taxon
> getRootTaxa(ReferenceBase sec
);
42 * Computes all Taxon instances that do not have a taxonomic parent.
43 * @param sec The concept reference that the taxon belongs to
44 * @param cdmFetch TODO
45 * @param onlyWithChildren if true only taxa are returned that have taxonomic children. <Br>Default: true.
46 * @return The List<Taxon> of root taxa.
48 public List
<Taxon
> getRootTaxa(ReferenceBase sec
, CdmFetch cdmFetch
, Boolean onlyWithChildren
);
52 * @param pagesize max maximum number of returned taxa
53 * @param page page to start, with 0 being first page
56 public List
<TaxonBase
> getAllTaxa(Integer pagesize
, Integer page
);
64 public List
<Synonym
> getAllSynonyms(Integer limit
, Integer start
);
71 //public List<TaxonRelationship> getAllTaxonRelationships(Integer limit, Integer start);
78 //public List<SynonymRelationship> getAllSynonymRelationships(Integer limit, Integer start);
80 public List
<RelationshipBase
> getAllRelationships(Integer limit
, Integer start
);
83 * Find taxa by searching for @{link NameBase}
88 * @param onlyAcccepted
91 public List
<Taxon
> findByName(String queryString
, ITitledDao
.MATCH_MODE matchMode
, int page
, int pagesize
, boolean onlyAcccepted
);
96 * @param onlyAcccepted
99 public int countMatchesByName(String queryString
, ITitledDao
.MATCH_MODE matchMode
, boolean onlyAcccepted
);
104 * @param onlyAcccepted
108 public int countMatchesByName(String queryString
, ITitledDao
.MATCH_MODE matchMode
, boolean onlyAcccepted
, List
<Criterion
> criteria
);