1
|
package eu.etaxonomy.cdm.ext.geo;
|
2
|
|
3
|
import javax.xml.stream.XMLStreamException;
|
4
|
|
5
|
import eu.etaxonomy.cdm.model.location.NamedArea;
|
6
|
|
7
|
/**
|
8
|
* Class that offers mapping functionality from a CDM {@link NamedArea named area}
|
9
|
* to a {@link GeoServiceArea geo service data holder} class.
|
10
|
* It also offers mapping definition functionality.<BR>
|
11
|
* The mapping is unidirectional.
|
12
|
*
|
13
|
* @author a.mueller
|
14
|
* @date 15.08.2011
|
15
|
*
|
16
|
*/
|
17
|
public interface IGeoServiceAreaMapping {
|
18
|
|
19
|
/**
|
20
|
* Transforms a CDM area to an geoservice area
|
21
|
* @param area the CDM NamedArea
|
22
|
* @return GeoServiceArea the geoservice area representing the CDM area
|
23
|
*/
|
24
|
public GeoServiceArea valueOf(NamedArea area);
|
25
|
|
26
|
/**
|
27
|
* Set the mapping. Usually the mapping should be set in a persistent way, so it is
|
28
|
* available after restarting the application.
|
29
|
* @param area
|
30
|
* @param geoServiceArea
|
31
|
* @throws XMLStreamException
|
32
|
*/
|
33
|
public void set(NamedArea area, GeoServiceArea geoServiceArea);
|
34
|
|
35
|
/**
|
36
|
* Clear the mapping for the given NamedArea
|
37
|
* @param area
|
38
|
*/
|
39
|
public void clear(NamedArea area);
|
40
|
|
41
|
}
|