\r
import java.util.List;\r
\r
+import eu.etaxonomy.cdm.api.facade.DerivedUnitFacade;\r
+import eu.etaxonomy.cdm.api.facade.DerivedUnitFacadeNotSupportedException;\r
import eu.etaxonomy.cdm.api.service.pager.Pager;\r
import eu.etaxonomy.cdm.model.common.UuidAndTitleCache;\r
+import eu.etaxonomy.cdm.model.description.DescriptionBase;\r
+import eu.etaxonomy.cdm.model.description.IndividualsAssociation;\r
+import eu.etaxonomy.cdm.model.description.TaxonDescription;\r
import eu.etaxonomy.cdm.model.location.WaterbodyOrCountry;\r
import eu.etaxonomy.cdm.model.media.Media;\r
-import eu.etaxonomy.cdm.model.taxon.TaxonBase;\r
+import eu.etaxonomy.cdm.model.name.HomotypicalGroup;\r
+import eu.etaxonomy.cdm.model.name.SpecimenTypeDesignation;\r
import eu.etaxonomy.cdm.model.occurrence.DerivationEvent;\r
import eu.etaxonomy.cdm.model.occurrence.DerivedUnitBase;\r
import eu.etaxonomy.cdm.model.occurrence.DeterminationEvent;\r
import eu.etaxonomy.cdm.model.occurrence.FieldObservation;\r
import eu.etaxonomy.cdm.model.occurrence.SpecimenOrObservationBase;\r
+import eu.etaxonomy.cdm.model.taxon.Taxon;\r
import eu.etaxonomy.cdm.model.taxon.TaxonBase;\r
import eu.etaxonomy.cdm.persistence.dao.BeanInitializer;\r
import eu.etaxonomy.cdm.persistence.query.OrderHint;\r
public List<WaterbodyOrCountry> getWaterbodyOrCountryByName(String name);\r
\r
/**\r
- * Returns a paged list of occurrences that have been determined to belong to the taxon concept\r
- * determinedAs, optionally restricted to objects belonging to a class that that extends \r
- * SpecimenOrObservationBase\r
+ * Returns a paged list of occurrences that have been determined to belong\r
+ * to the taxon concept determinedAs, optionally restricted to objects\r
+ * belonging to a class that that extends SpecimenOrObservationBase.\r
+ * <p>\r
+ * In contrast to {@link #listByAnyAssociation(Class, Taxon, List)} this\r
+ * method only takes SpecimenOrObservationBase instances into account which\r
+ * are actually determined as the taxon specified by\r
+ * <code>determinedAs</code>.\r
* \r
- * @param type The type of entities to return (can be null to count all entities of type <T>)\r
- * @param determinedAs the taxon concept that the occurrences have been determined to belong to\r
- * @param pageSize The maximum number of objects returned (can be null for all matching objects)\r
- * @param pageNumber The offset (in pageSize chunks) from the start of the result set (0 - based, \r
- * can be null, equivalent of starting at the beginning of the recordset)\r
+ * @param type\r
+ * The type of entities to return (can be null to count all\r
+ * entities of type <T>)\r
+ * @param determinedAs\r
+ * the taxon concept that the occurrences have been determined to\r
+ * belong to\r
+ * @param pageSize\r
+ * The maximum number of objects returned (can be null for all\r
+ * matching objects)\r
+ * @param pageNumber\r
+ * The offset (in pageSize chunks) from the start of the result\r
+ * set (0 - based, can be null, equivalent of starting at the\r
+ * beginning of the recordset)\r
* @param orderHints\r
* Supports path like <code>orderHints.propertyNames</code> which\r
* include *-to-one properties like createdBy.username or\r
* authorTeam.persistentTitleCache\r
- * @param propertyPaths properties to be initialized\r
+ * @param propertyPaths\r
+ * properties to be initialized\r
* @return\r
*/\r
public Pager<SpecimenOrObservationBase> list(Class<? extends SpecimenOrObservationBase> type, TaxonBase determinedAs, Integer limit, Integer start, List<OrderHint> orderHints, List<String> propertyPaths);\r
public Pager<SpecimenOrObservationBase> search(Class<? extends SpecimenOrObservationBase> clazz, String query, Integer pageSize,Integer pageNumber, List<OrderHint> orderHints,List<String> propertyPaths);\r
\r
public List<UuidAndTitleCache<FieldObservation>> getFieldObservationUuidAndTitleCache();\r
+ \r
public List<UuidAndTitleCache<DerivedUnitBase>> getDerivedUnitBaseUuidAndTitleCache();\r
+ \r
+ public DerivedUnitFacade getDerivedUnitFacade(DerivedUnitBase derivedUnit, List<String> propertyPaths) throws DerivedUnitFacadeNotSupportedException;\r
+ \r
+ public List<DerivedUnitFacade> listDerivedUnitFacades(DescriptionBase description, List<String> propertyPaths);\r
+ \r
+ /**\r
+ * Lists all instances of {@link SpecimenOrObservationBase} which are associated with the <code>taxon</code> specified as parameter.\r
+ * SpecimenOrObservationBase instances can be associated to taxa in multiple ways, all these possible relations are taken into account:\r
+ * <ul>\r
+ * <li>The {@link IndividualsAssociation} elements in a {@link TaxonDescription} contain {@link DerivedUnitBase}s</li>\r
+ * <li>{@link SpecimenTypeDesignation}s may be associated with any {@link HomotypicalGroup} related to the specific {@link Taxon}.</li>\r
+ * <li>A {@link Taxon} may be referenced by the {@link DeterminationEvent} of the {@link SpecimenOrObservationBase}</li> \r
+ * </ul>\r
+ * \r
+ * @param <T>\r
+ * @param type\r
+ * @param associatedTaxon\r
+ * @param limit\r
+ * @param start\r
+ * @param orderHints\r
+ * @param propertyPaths\r
+ * @return\r
+ */\r
+ public <T extends SpecimenOrObservationBase> List<T> listByAnyAssociation(Class<T> type,\r
+ Taxon associatedTaxon, Integer limit, Integer start, List<OrderHint> orderHints, List<String> propertyPaths);\r
+ \r
}\r