X-Git-Url: https://dev.e-taxonomy.eu/gitweb/cdmlib.git/blobdiff_plain/adadf4fa77d430a52c3ef71ce0b250b73e771dd8..45546a913cf144912d383d54758aa51c81367ec9:/cdmlib-services/src/main/java/eu/etaxonomy/cdm/api/service/IReferenceService.java?ds=sidebyside diff --git a/cdmlib-services/src/main/java/eu/etaxonomy/cdm/api/service/IReferenceService.java b/cdmlib-services/src/main/java/eu/etaxonomy/cdm/api/service/IReferenceService.java index 3f5b2ac443..71e528a8da 100644 --- a/cdmlib-services/src/main/java/eu/etaxonomy/cdm/api/service/IReferenceService.java +++ b/cdmlib-services/src/main/java/eu/etaxonomy/cdm/api/service/IReferenceService.java @@ -1,91 +1,30 @@ // $Id$ /** * Copyright (C) 2007 EDIT -* European Distributed Institute of Taxonomy +* European Distributed Institute of Taxonomy * http://www.e-taxonomy.eu -* +* * The contents of this file are subject to the Mozilla Public License Version 1.1 * See LICENSE.TXT at the top of this package for the full license terms. */ package eu.etaxonomy.cdm.api.service; -import java.util.Collection; import java.util.List; -import java.util.Map; -import java.util.UUID; import eu.etaxonomy.cdm.api.service.pager.Pager; -import eu.etaxonomy.cdm.model.reference.ReferenceBase; +import eu.etaxonomy.cdm.model.reference.Reference; +import eu.etaxonomy.cdm.model.taxon.TaxonBase; +import eu.etaxonomy.cdm.persistence.dto.UuidAndTitleCache; import eu.etaxonomy.cdm.persistence.query.OrderHint; -public interface IReferenceService extends IIdentifiableEntityService { - - /** - * FIXME candidate for harmonization? - * - * Finds reference by UUID - */ - public abstract ReferenceBase getReferenceByUuid(UUID uuid); +public interface IReferenceService extends IIdentifiableEntityService { /** - * FIXME candidate for harmonization? - * Finds references by title - */ - public List getReferencesByTitle(String title); - - /** - * FIXME candidate for harmonization? - * Finds references of a certain kind by title - */ - public List getReferencesByTitle(String title, Class clazz); - - /** - * FIXME candidate for harmonization? - * Gets all references - * @deprecated use {@link #getAllReferences(Integer, Integer) instead - */ - @Deprecated - public abstract List getAllReferences(int limit, int start); - - /** - * Gets all references ordered by the properties defined by orderHints - * @param pageSize the maximum number of entities returned entries per page. Can be null to return all entities. - * @param pageNumber a numeric zero based page index - * @param orderHints - * @return a Pager instance - */ - public Pager getAllReferences(Integer pageSize, Integer pageNumber, List orderHints); - - /** - * Gets all references unordered - * @param pageSize the maximum number of entities returned entries per page. Can be null to return all entities. - * @param pageNumber a numeric zero based page index - * @return a Pager instance - */ - public abstract Pager getAllReferences(Integer pageSize, Integer pageNumber); - -// public abstract UUID saveReference(ReferenceBase reference); - - /** - * FIXME candidate for harmonization? - * Saves a reference and return its UUID - */ - public abstract UUID saveReference(ReferenceBase reference); - -// public abstract Map saveReferenceAll(Collection referenceCollection); - - /** - * FIXME candidate for harmonization? - * Saves a collection of references - */ - public abstract Map saveReferenceAll(Collection referenceCollection); - - /** - * Returns a Paged List of ReferenceBase instances where the default field matches the String queryString (as interpreted by the Lucene QueryParser) - * - * @param clazz filter the results by class (or pass null to return all ReferenceBase instances) + * Returns a Paged List of Reference instances where the default field matches the String queryString (as interpreted by the Lucene QueryParser) + * + * @param clazz filter the results by class (or pass null to return all Reference instances) * @param queryString * @param pageSize The maximum number of references returned (can be null for all matching references) * @param pageNumber The offset (in pageSize chunks) from the start of the result set (0 - based) @@ -94,17 +33,53 @@ public interface IReferenceService extends IIdentifiableEntityServiceApache Lucene - Query Parser Syntax */ - public Pager search(Class clazz, String queryString, Integer pageSize, Integer pageNumber, List orderHints, List propertyPaths); - + @Override + public Pager search(Class clazz, String queryString, Integer pageSize, Integer pageNumber, List orderHints, List propertyPaths); + /** * Returns a map that holds uuid, titleCache pairs of all references in the current database - * - * @return + * + * @return * a Map containing uuid and titleCache of references */ - public Map getUuidAndTitleCacheOfReferences(); - + public List> getUuidAndTitle(); + + /** + * TODO candidate for harmonization: rename to listForPublishing + * @return + */ + public List getAllReferencesForPublishing(); + + /** + * TODO candidate for harmonization: rename to listNomenclaturalReferences + * @return + */ + public List getAllNomenclaturalReferences(); + + /** + * returns + * + *
    + *
  1. all taxa directly covered by this reference
  2. + *
  3. all taxa covered by the according in references of this reference
  4. + *
+ * + * searches for taxa using the following relations: + *
    + *
  • taxon.name.nomenclaturalreference
  • + *
  • taxon.descriptions.descriptionElement.sources.citation
  • + *
  • taxon.descriptions.descriptionSources
  • + *
  • taxon.name.descriptions.descriptionElement.sources
  • + *
  • taxon.name.descriptions.descriptionSources
  • + *
+ * + * @param reference + * @param includeSubordinateReferences TODO + * @param propertyPaths + * @return + */ + public List listCoveredTaxa(Reference reference, boolean includeSubordinateReferences, List propertyPaths); }