merge trunk into cdm-3.3
[cdmlib.git] / cdmlib-ext / src / main / java / eu / etaxonomy / cdm / ext / geo / IEditGeoService.java
1 // $Id$
2 /**
3 * Copyright (C) 2009 EDIT
4 * European Distributed Institute of Taxonomy
5 * http://www.e-taxonomy.eu
6 *
7 * The contents of this file are subject to the Mozilla Public License Version 1.1
8 * See LICENSE.TXT at the top of this package for the full license terms.
9 */
10 package eu.etaxonomy.cdm.ext.geo;
11
12 import java.awt.Color;
13 import java.util.List;
14 import java.util.Map;
15 import java.util.Set;
16
17 import javax.xml.stream.XMLStreamException;
18
19 import eu.etaxonomy.cdm.model.common.Language;
20 import eu.etaxonomy.cdm.model.description.Distribution;
21 import eu.etaxonomy.cdm.model.description.PresenceAbsenceTermBase;
22 import eu.etaxonomy.cdm.model.description.TaxonDescription;
23 import eu.etaxonomy.cdm.model.location.NamedArea;
24 import eu.etaxonomy.cdm.model.occurrence.SpecimenOrObservationBase;
25
26 /**
27 * @author a.kohlbecker
28 * @date 18.06.2009
29 * @author n.hoffmann
30 *
31 */
32 public interface IEditGeoService {
33
34 /**
35 * Retrieve a parameter string to pass to an EditGeoService endpoint
36 * The endpoint will deliver a a map generated by the Edit Geo Service for the given
37 * <code>TaxonDescription</code>
38 *
39 * @param taxonDescriptions
40 * A List of <code>TaxonDescription</code> holding the distribution data
41 * @param presenceAbsenceTermColors
42 * A map that classifies which <code>PresenceAbsenceTermBase</code> should
43 * be assigned which <code>Color</code>
44 * @param width
45 * The width of the map image
46 * @param height
47 * The height of the map image
48 * @param bbox
49 *
50 * @param backLayer
51 * @return
52 *
53 */
54 public String getDistributionServiceRequestParameterString(
55 List<TaxonDescription> taxonDescriptions,
56 Map<PresenceAbsenceTermBase<?>, Color> presenceAbsenceTermColors,
57 int width, int height, String bbox, String backLayer,
58 List<Language> langs);
59
60
61 /**
62 *
63 * @param distributions
64 * @param presenceAbsenceTermColors
65 * @param width
66 * @param height
67 * @param bbox
68 * @param backLayer
69 * @param langs
70 * @return
71 */
72 public String getDistributionServiceRequestParameterString(Set<Distribution> distributions, Map<PresenceAbsenceTermBase<?>, Color> presenceAbsenceTermColors, int width,
73 int height, String bbox, String backLayer, List<Language> langs);
74
75
76 /**
77 * Retrieve a parameter string to pass to an EditGeoService endpoint
78 * The endpoint will deliver a a map generated by the Edit Geo Service for the given
79 * <code>TaxonDescription</code>
80 *
81 * @param description
82 * The <code>TaxonDescription</code> holding the distribution data
83 * @param presenceAbsenceTermColors
84 * A map that classifies which <code>PresenceAbsenceTermBase</code> should
85 * be assigned which <code>Color</code>
86 * @param width
87 * The width of the map image
88 * @param height
89 * The height of the map image
90 * @param bbox
91 *
92 * @param backLayer
93 * @return
94 *
95 * @deprecated use {@link #getDistributionServiceRequestParameterString(List, Map, int, int, String, String, List)} instead
96 */
97 @Deprecated
98 public String getDistributionServiceRequestParameterString(TaxonDescription description,
99 Map<PresenceAbsenceTermBase<?>,Color> presenceAbsenceTermColors,
100 int width,
101 int height,
102 String bbox,
103 String backLayer,
104 List<Language> langs);
105
106
107 public String getOccurrenceServiceRequestParameterString(
108 List<SpecimenOrObservationBase> specimensOrObersvations,
109 Map<Class<? extends SpecimenOrObservationBase>,Color> specimenOrObservationTypeColors,
110 Boolean doReturnImage,
111 Integer width,
112 Integer height,
113 String bbox,
114 String backLayer);
115
116 /**
117 * Adds an area mapping (CDM area -> geo service area). It is recommended to set the mapping
118 * in a persistent way, so it is available after restarting the application.
119 * @param area
120 * @param geoServiceArea
121 * @throws XMLStreamException
122 */
123 public void setMapping(NamedArea area, GeoServiceArea geoServiceArea);
124
125 }