// $Id$\r
/**\r
* Copyright (C) 2009 EDIT\r
-* European Distributed Institute of Taxonomy \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
import java.awt.Color;\r
import java.util.List;\r
import java.util.Map;\r
+import java.util.Set;\r
+\r
+import javax.xml.stream.XMLStreamException;\r
\r
import eu.etaxonomy.cdm.model.common.Language;\r
+import eu.etaxonomy.cdm.model.description.Distribution;\r
import eu.etaxonomy.cdm.model.description.PresenceAbsenceTermBase;\r
import eu.etaxonomy.cdm.model.description.TaxonDescription;\r
+import eu.etaxonomy.cdm.model.location.NamedArea;\r
import eu.etaxonomy.cdm.model.occurrence.SpecimenOrObservationBase;\r
-import eu.etaxonomy.cdm.model.taxon.Taxon;\r
+import eu.etaxonomy.cdm.model.occurrence.SpecimenOrObservationType;\r
\r
/**\r
* @author a.kohlbecker\r
*\r
*/\r
public interface IEditGeoService {\r
- \r
+\r
/**\r
* Retrieve a parameter string to pass to an EditGeoService endpoint\r
* The endpoint will deliver a a map generated by the Edit Geo Service for the given\r
* <code>TaxonDescription</code>\r
- * \r
+ *\r
* @param taxonDescriptions\r
* A List of <code>TaxonDescription</code> holding the distribution data\r
* @param presenceAbsenceTermColors\r
- * A map that classifies which <code>PresenceAbsenceTermBase</code> should \r
+ * A map that classifies which <code>PresenceAbsenceTermBase</code> should\r
* be assigned which <code>Color</code>\r
* @param width\r
* The width of the map image\r
* @param height\r
* The height of the map image\r
* @param bbox\r
- * \r
+ *\r
* @param backLayer\r
* @return\r
- * \r
+ *\r
*/\r
public String getDistributionServiceRequestParameterString(\r
List<TaxonDescription> taxonDescriptions,\r
int width, int height, String bbox, String backLayer,\r
List<Language> langs);\r
\r
+\r
/**\r
- * Retrieve a parameter string to pass to an EditGeoService endpoint\r
- * The endpoint will deliver a a map generated by the Edit Geo Service for the given\r
- * <code>TaxonDescription</code>\r
- * \r
- * @param description\r
- * The <code>TaxonDescription</code> holding the distribution data\r
+ *\r
+ * @param distributions\r
* @param presenceAbsenceTermColors\r
- * A map that classifies which <code>PresenceAbsenceTermBase</code> should \r
- * be assigned which <code>Color</code>\r
* @param width\r
- * The width of the map image\r
* @param height\r
- * The height of the map image\r
* @param bbox\r
- * \r
* @param backLayer\r
+ * @param langs\r
* @return\r
- * \r
*/\r
- public String getDistributionServiceRequestParameterString(TaxonDescription description, \r
- Map<PresenceAbsenceTermBase<?>,Color> presenceAbsenceTermColors, \r
- int width, \r
- int height, \r
- String bbox, \r
- String backLayer,\r
- List<Language> langs);\r
- \r
+ public String getDistributionServiceRequestParameterString(Set<Distribution> distributions, Map<PresenceAbsenceTermBase<?>, Color> presenceAbsenceTermColors, int width,\r
+ int height, String bbox, String backLayer, List<Language> langs);\r
+\r
+\r
/**\r
- * \r
- * \r
- * @param taxon\r
+ * Retrieve a parameter string to pass to an EditGeoService endpoint\r
+ * The endpoint will deliver a a map generated by the Edit Geo Service for the given\r
+ * <code>TaxonDescription</code>\r
+ *\r
+ * @param description\r
+ * The <code>TaxonDescription</code> holding the distribution data\r
* @param presenceAbsenceTermColors\r
+ * A map that classifies which <code>PresenceAbsenceTermBase</code> should\r
+ * be assigned which <code>Color</code>\r
* @param width\r
+ * The width of the map image\r
* @param height\r
+ * The height of the map image\r
* @param bbox\r
+ *\r
* @param backLayer\r
* @return\r
- * @deprecated \r
- * this method throws all distribution data from all taxon descriptions in one big pot \r
- * and returns a map based on this data. However this might be useful for certain \r
- * use cases it does not really make sense to mix data from different taxon descriptions.\r
- * Why have they been separated in the first place?\r
- * \r
+ *\r
+ * @deprecated use {@link #getDistributionServiceRequestParameterString(List, Map, int, int, String, String, List)} instead\r
*/\r
@Deprecated\r
- public String getDistributionServiceRequestParameterString(Taxon taxon, \r
- Map<PresenceAbsenceTermBase<?>,Color> presenceAbsenceTermColors, \r
- int width, \r
- int height, \r
- String bbox, \r
+ public String getDistributionServiceRequestParameterString(TaxonDescription description,\r
+ Map<PresenceAbsenceTermBase<?>,Color> presenceAbsenceTermColors,\r
+ int width,\r
+ int height,\r
+ String bbox,\r
String backLayer,\r
List<Language> langs);\r
- \r
- \r
+\r
+\r
public String getOccurrenceServiceRequestParameterString(\r
- List<TaxonDescription> taxonDescriptions, \r
- Map<Class<? extends SpecimenOrObservationBase<?>>,Color> specimenOrObservationTypeColors,\r
+ List<SpecimenOrObservationBase> specimensOrObersvations,\r
+ Map<SpecimenOrObservationType,Color> specimenOrObservationTypeColors,\r
Boolean doReturnImage,\r
- Integer width, \r
- Integer height, \r
- String bbox, \r
+ Integer width,\r
+ Integer height,\r
+ String bbox,\r
String backLayer);\r
- \r
+\r
+ /**\r
+ * Adds an area mapping (CDM area -> geo service area). It is recommended to set the mapping\r
+ * in a persistent way, so it is available after restarting the application.\r
+ * @param area\r
+ * @param geoServiceArea\r
+ * @throws XMLStreamException\r
+ */\r
+ public void setMapping(NamedArea area, GeoServiceArea geoServiceArea);\r
+\r
}\r