rename FieldObservation -> FieldUnit #3351
[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 import eu.etaxonomy.cdm.model.occurrence.SpecimenOrObservationType;
26
27 /**
28 * @author a.kohlbecker
29 * @date 18.06.2009
30 * @author n.hoffmann
31 *
32 */
33 public interface IEditGeoService {
34
35 /**
36 * Retrieve a parameter string to pass to an EditGeoService endpoint
37 * The endpoint will deliver a a map generated by the Edit Geo Service for the given
38 * <code>TaxonDescription</code>
39 *
40 * @param taxonDescriptions
41 * A List of <code>TaxonDescription</code> holding the distribution data
42 * @param presenceAbsenceTermColors
43 * A map that classifies which <code>PresenceAbsenceTermBase</code> should
44 * be assigned which <code>Color</code>
45 * @param width
46 * The width of the map image
47 * @param height
48 * The height of the map image
49 * @param bbox
50 *
51 * @param backLayer
52 * @return
53 *
54 */
55 public String getDistributionServiceRequestParameterString(
56 List<TaxonDescription> taxonDescriptions,
57 Map<PresenceAbsenceTermBase<?>, Color> presenceAbsenceTermColors,
58 int width, int height, String bbox, String backLayer,
59 List<Language> langs);
60
61
62 /**
63 *
64 * @param distributions
65 * @param presenceAbsenceTermColors
66 * @param width
67 * @param height
68 * @param bbox
69 * @param backLayer
70 * @param langs
71 * @return
72 */
73 public String getDistributionServiceRequestParameterString(Set<Distribution> distributions, Map<PresenceAbsenceTermBase<?>, Color> presenceAbsenceTermColors, int width,
74 int height, String bbox, String backLayer, List<Language> langs);
75
76
77 /**
78 * Retrieve a parameter string to pass to an EditGeoService endpoint
79 * The endpoint will deliver a a map generated by the Edit Geo Service for the given
80 * <code>TaxonDescription</code>
81 *
82 * @param description
83 * The <code>TaxonDescription</code> holding the distribution data
84 * @param presenceAbsenceTermColors
85 * A map that classifies which <code>PresenceAbsenceTermBase</code> should
86 * be assigned which <code>Color</code>
87 * @param width
88 * The width of the map image
89 * @param height
90 * The height of the map image
91 * @param bbox
92 *
93 * @param backLayer
94 * @return
95 *
96 * @deprecated use {@link #getDistributionServiceRequestParameterString(List, Map, int, int, String, String, List)} instead
97 */
98 @Deprecated
99 public String getDistributionServiceRequestParameterString(TaxonDescription description,
100 Map<PresenceAbsenceTermBase<?>,Color> presenceAbsenceTermColors,
101 int width,
102 int height,
103 String bbox,
104 String backLayer,
105 List<Language> langs);
106
107
108 public String getOccurrenceServiceRequestParameterString(
109 List<SpecimenOrObservationBase> specimensOrObersvations,
110 Map<SpecimenOrObservationType,Color> specimenOrObservationTypeColors,
111 Boolean doReturnImage,
112 Integer width,
113 Integer height,
114 String bbox,
115 String backLayer);
116
117 /**
118 * Adds an area mapping (CDM area -> geo service area). It is recommended to set the mapping
119 * in a persistent way, so it is available after restarting the application.
120 * @param area
121 * @param geoServiceArea
122 * @throws XMLStreamException
123 */
124 public void setMapping(NamedArea area, GeoServiceArea geoServiceArea);
125
126 }