falg to turn off preliminar natural langage representation improvement
[cdmlib.git] / cdmlib-services / src / main / java / eu / etaxonomy / cdm / api / service / IOccurrenceService.java
index 8a567a799e64b20a3a36621f4799bde53685af34..9294063591d33be96befc58391054b9df71037a8 100644 (file)
@@ -1,20 +1,30 @@
 // $Id$\r
 /**\r
-* Copyright (C) 2008 EDIT\r
-* European Distributed Institute of Taxonomy \r
+* Copyright (C) 2009 EDIT\r
+* European Distributed Institute of Taxonomy\r
 * http://www.e-taxonomy.eu\r
-*/\r
+*\r
+* The contents of this file are subject to the Mozilla Public License Version 1.1\r
+* See LICENSE.TXT at the top of this package for the full license terms.\r
+*/ \r
 \r
 package eu.etaxonomy.cdm.api.service;\r
 \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.location.WaterbodyOrCountry;\r
 import eu.etaxonomy.cdm.model.media.Media;\r
+import eu.etaxonomy.cdm.model.taxon.TaxonBase;\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.TaxonBase;\r
 import eu.etaxonomy.cdm.persistence.dao.BeanInitializer;\r
 import eu.etaxonomy.cdm.persistence.query.OrderHint;\r
 \r
@@ -28,6 +38,25 @@ public interface IOccurrenceService extends IIdentifiableEntityService<SpecimenO
        \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
+        * \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 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
+        * @return\r
+        */\r
+       public Pager<SpecimenOrObservationBase> list(Class<? extends SpecimenOrObservationBase> type, TaxonBase determinedAs, Integer limit, Integer start, List<OrderHint> orderHints, List<String> propertyPaths);\r
+       \r
        /**\r
      * Returns a List of Media that are associated with a given occurence\r
      * \r
@@ -42,12 +71,13 @@ public interface IOccurrenceService extends IIdentifiableEntityService<SpecimenO
        /**\r
      * Returns a List of determinations that have been made for a given occurence\r
      * \r
-        * @param occurence the occurence associated with these determinations\r
+        * @param occurence the occurence associated with these determinations (can be null for all occurrences)\r
+        * @param taxonbase the taxon concept associated with these determinations (can be null for all taxon concepts)\r
         * @param pageSize The maximum number of determinations returned (can be null for all related determinations)\r
         * @param pageNumber The offset (in pageSize chunks) from the start of the result set (0 - based)\r
      * @return a Pager of determination instances\r
      */\r
-       public Pager<DeterminationEvent> getDeterminations(SpecimenOrObservationBase occurence, Integer pageSize, Integer pageNumber, List<String> propertyPaths);\r
+       public Pager<DeterminationEvent> getDeterminations(SpecimenOrObservationBase occurence, TaxonBase taxonBase, Integer pageSize, Integer pageNumber, List<String> propertyPaths);\r
        \r
        /**\r
      * Returns a list of derivation events that have involved creating new DerivedUnits from this occurence\r
@@ -75,4 +105,10 @@ public interface IOccurrenceService extends IIdentifiableEntityService<SpecimenO
         * @see <a href="http://lucene.apache.org/java/2_4_0/queryparsersyntax.html">Apache Lucene - Query Parser Syntax</a>\r
         */\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