annotate gnv/src/main/java/de/intevation/gnv/artifactdatabase/objects/map/DefaultMapService.java @ 1022:28a0628b11b0

Added license file and license header. gnv/trunk@1258 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Tue, 02 Nov 2010 17:15:08 +0000
parents 541ff0db1b12
children
rev   line source
1022
28a0628b11b0 Added license file and license header.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 994
diff changeset
1 /*
28a0628b11b0 Added license file and license header.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 994
diff changeset
2 * Copyright (c) 2010 by Intevation GmbH
28a0628b11b0 Added license file and license header.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 994
diff changeset
3 *
28a0628b11b0 Added license file and license header.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 994
diff changeset
4 * This program is free software under the LGPL (>=v2.1)
28a0628b11b0 Added license file and license header.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 994
diff changeset
5 * Read the file LGPL.txt coming with the software for details
28a0628b11b0 Added license file and license header.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 994
diff changeset
6 * or visit http://www.gnu.org/licenses/ if it does not exist.
28a0628b11b0 Added license file and license header.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 994
diff changeset
7 */
28a0628b11b0 Added license file and license header.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 994
diff changeset
8
402
b88e881e8e94 Added the first Implementation (not complete and not ready to use) for the Interface from the MapViewer to the GNV
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
9 package de.intevation.gnv.artifactdatabase.objects.map;
b88e881e8e94 Added the first Implementation (not complete and not ready to use) for the Interface from the MapViewer to the GNV
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
10
b88e881e8e94 Added the first Implementation (not complete and not ready to use) for the Interface from the MapViewer to the GNV
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
11 import java.util.Collection;
b88e881e8e94 Added the first Implementation (not complete and not ready to use) for the Interface from the MapViewer to the GNV
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
12
b88e881e8e94 Added the first Implementation (not complete and not ready to use) for the Interface from the MapViewer to the GNV
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
13 /**
690
254f062e334b Added JavaDoc.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 684
diff changeset
14 * The default implementation of <code>MapService</code>.
699
af22fa5567a6 Removed trailing whitespace.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 690
diff changeset
15 *
684
57fa8019fbdc Bring @author javadoc tags in form '@author <a href="john.doe@example.com">John Doe</a>'
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 683
diff changeset
16 * @author <a href="mailto:tim.englich@intevation.de">Tim Englich</a>
402
b88e881e8e94 Added the first Implementation (not complete and not ready to use) for the Interface from the MapViewer to the GNV
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
17 */
b88e881e8e94 Added the first Implementation (not complete and not ready to use) for the Interface from the MapViewer to the GNV
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
18 public class DefaultMapService implements MapService {
b88e881e8e94 Added the first Implementation (not complete and not ready to use) for the Interface from the MapViewer to the GNV
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
19
959
0846c9c4abdd Add more Javadocs
Tim Englich <tim.englich@intevation.de>
parents: 700
diff changeset
20 /**
0846c9c4abdd Add more Javadocs
Tim Englich <tim.englich@intevation.de>
parents: 700
diff changeset
21 * The id of this mapservice.
0846c9c4abdd Add more Javadocs
Tim Englich <tim.englich@intevation.de>
parents: 700
diff changeset
22 */
402
b88e881e8e94 Added the first Implementation (not complete and not ready to use) for the Interface from the MapViewer to the GNV
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
23 private String id = null;
681
15ac78a91d1b Removed trailing whitespace.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 402
diff changeset
24
959
0846c9c4abdd Add more Javadocs
Tim Englich <tim.englich@intevation.de>
parents: 700
diff changeset
25 /**
0846c9c4abdd Add more Javadocs
Tim Englich <tim.englich@intevation.de>
parents: 700
diff changeset
26 * The layer which are provided by this mapservice.
0846c9c4abdd Add more Javadocs
Tim Englich <tim.englich@intevation.de>
parents: 700
diff changeset
27 */
402
b88e881e8e94 Added the first Implementation (not complete and not ready to use) for the Interface from the MapViewer to the GNV
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
28 private Collection<Layer> layer = null;
681
15ac78a91d1b Removed trailing whitespace.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 402
diff changeset
29
959
0846c9c4abdd Add more Javadocs
Tim Englich <tim.englich@intevation.de>
parents: 700
diff changeset
30 /**
0846c9c4abdd Add more Javadocs
Tim Englich <tim.englich@intevation.de>
parents: 700
diff changeset
31 * The type of this mapservice.
0846c9c4abdd Add more Javadocs
Tim Englich <tim.englich@intevation.de>
parents: 700
diff changeset
32 */
402
b88e881e8e94 Added the first Implementation (not complete and not ready to use) for the Interface from the MapViewer to the GNV
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
33 private String type = null;
681
15ac78a91d1b Removed trailing whitespace.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 402
diff changeset
34
959
0846c9c4abdd Add more Javadocs
Tim Englich <tim.englich@intevation.de>
parents: 700
diff changeset
35 /**
0846c9c4abdd Add more Javadocs
Tim Englich <tim.englich@intevation.de>
parents: 700
diff changeset
36 * The URl of this mapservice.
0846c9c4abdd Add more Javadocs
Tim Englich <tim.englich@intevation.de>
parents: 700
diff changeset
37 */
402
b88e881e8e94 Added the first Implementation (not complete and not ready to use) for the Interface from the MapViewer to the GNV
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
38 private String url = null;
984
cfc7bd35ee0b Set the map to the extent which was sent by the rest-server
Tim Englich <tim.englich@intevation.de>
parents: 959
diff changeset
39
cfc7bd35ee0b Set the map to the extent which was sent by the rest-server
Tim Englich <tim.englich@intevation.de>
parents: 959
diff changeset
40 /**
cfc7bd35ee0b Set the map to the extent which was sent by the rest-server
Tim Englich <tim.englich@intevation.de>
parents: 959
diff changeset
41 * The Bbox which surrounds the data of the Mapservice
cfc7bd35ee0b Set the map to the extent which was sent by the rest-server
Tim Englich <tim.englich@intevation.de>
parents: 959
diff changeset
42 */
cfc7bd35ee0b Set the map to the extent which was sent by the rest-server
Tim Englich <tim.englich@intevation.de>
parents: 959
diff changeset
43 private String bbox = null;
994
541ff0db1b12 Added the informations about how the WMS which was published during the
Tim Englich <tim.englich@intevation.de>
parents: 984
diff changeset
44
541ff0db1b12 Added the informations about how the WMS which was published during the
Tim Englich <tim.englich@intevation.de>
parents: 984
diff changeset
45 /**
541ff0db1b12 Added the informations about how the WMS which was published during the
Tim Englich <tim.englich@intevation.de>
parents: 984
diff changeset
46 * The time until the server will provide the data.
541ff0db1b12 Added the informations about how the WMS which was published during the
Tim Englich <tim.englich@intevation.de>
parents: 984
diff changeset
47 */
541ff0db1b12 Added the informations about how the WMS which was published during the
Tim Englich <tim.englich@intevation.de>
parents: 984
diff changeset
48 private String ttl = null;
699
af22fa5567a6 Removed trailing whitespace.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 690
diff changeset
49
402
b88e881e8e94 Added the first Implementation (not complete and not ready to use) for the Interface from the MapViewer to the GNV
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
50 /**
b88e881e8e94 Added the first Implementation (not complete and not ready to use) for the Interface from the MapViewer to the GNV
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
51 * Constructor
959
0846c9c4abdd Add more Javadocs
Tim Englich <tim.englich@intevation.de>
parents: 700
diff changeset
52 *
0846c9c4abdd Add more Javadocs
Tim Englich <tim.englich@intevation.de>
parents: 700
diff changeset
53 * @param id the id of this mapservice
0846c9c4abdd Add more Javadocs
Tim Englich <tim.englich@intevation.de>
parents: 700
diff changeset
54 * @param layer the layer which are provided by this mapservice
0846c9c4abdd Add more Javadocs
Tim Englich <tim.englich@intevation.de>
parents: 700
diff changeset
55 * @param type the type of this mapservice
0846c9c4abdd Add more Javadocs
Tim Englich <tim.englich@intevation.de>
parents: 700
diff changeset
56 * @param url the URl of this mapservice
402
b88e881e8e94 Added the first Implementation (not complete and not ready to use) for the Interface from the MapViewer to the GNV
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
57 */
681
15ac78a91d1b Removed trailing whitespace.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 402
diff changeset
58 public DefaultMapService(String id, Collection<Layer> layer,
402
b88e881e8e94 Added the first Implementation (not complete and not ready to use) for the Interface from the MapViewer to the GNV
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
59 String type, String url) {
b88e881e8e94 Added the first Implementation (not complete and not ready to use) for the Interface from the MapViewer to the GNV
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
60 super();
b88e881e8e94 Added the first Implementation (not complete and not ready to use) for the Interface from the MapViewer to the GNV
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
61 this.id = id;
b88e881e8e94 Added the first Implementation (not complete and not ready to use) for the Interface from the MapViewer to the GNV
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
62 this.layer = layer;
b88e881e8e94 Added the first Implementation (not complete and not ready to use) for the Interface from the MapViewer to the GNV
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
63 this.type = type;
b88e881e8e94 Added the first Implementation (not complete and not ready to use) for the Interface from the MapViewer to the GNV
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
64 this.url = url;
b88e881e8e94 Added the first Implementation (not complete and not ready to use) for the Interface from the MapViewer to the GNV
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
65 }
984
cfc7bd35ee0b Set the map to the extent which was sent by the rest-server
Tim Englich <tim.englich@intevation.de>
parents: 959
diff changeset
66
cfc7bd35ee0b Set the map to the extent which was sent by the rest-server
Tim Englich <tim.englich@intevation.de>
parents: 959
diff changeset
67 /**
cfc7bd35ee0b Set the map to the extent which was sent by the rest-server
Tim Englich <tim.englich@intevation.de>
parents: 959
diff changeset
68 * Constructor
cfc7bd35ee0b Set the map to the extent which was sent by the rest-server
Tim Englich <tim.englich@intevation.de>
parents: 959
diff changeset
69 *
cfc7bd35ee0b Set the map to the extent which was sent by the rest-server
Tim Englich <tim.englich@intevation.de>
parents: 959
diff changeset
70 * @param id the id of this mapservice
cfc7bd35ee0b Set the map to the extent which was sent by the rest-server
Tim Englich <tim.englich@intevation.de>
parents: 959
diff changeset
71 * @param layer the layer which are provided by this mapservice
cfc7bd35ee0b Set the map to the extent which was sent by the rest-server
Tim Englich <tim.englich@intevation.de>
parents: 959
diff changeset
72 * @param type the type of this mapservice
cfc7bd35ee0b Set the map to the extent which was sent by the rest-server
Tim Englich <tim.englich@intevation.de>
parents: 959
diff changeset
73 * @param url the URl of this mapservice
cfc7bd35ee0b Set the map to the extent which was sent by the rest-server
Tim Englich <tim.englich@intevation.de>
parents: 959
diff changeset
74 * @param bbox the Bbox which surrounds the data of the Mapservice
994
541ff0db1b12 Added the informations about how the WMS which was published during the
Tim Englich <tim.englich@intevation.de>
parents: 984
diff changeset
75 * @param ttl the time until the server will provide the data.
984
cfc7bd35ee0b Set the map to the extent which was sent by the rest-server
Tim Englich <tim.englich@intevation.de>
parents: 959
diff changeset
76 */
cfc7bd35ee0b Set the map to the extent which was sent by the rest-server
Tim Englich <tim.englich@intevation.de>
parents: 959
diff changeset
77 public DefaultMapService(String id, Collection<Layer> layer,
994
541ff0db1b12 Added the informations about how the WMS which was published during the
Tim Englich <tim.englich@intevation.de>
parents: 984
diff changeset
78 String type, String url, String bbox, String ttl) {
984
cfc7bd35ee0b Set the map to the extent which was sent by the rest-server
Tim Englich <tim.englich@intevation.de>
parents: 959
diff changeset
79 this(id,layer,type,url);
cfc7bd35ee0b Set the map to the extent which was sent by the rest-server
Tim Englich <tim.englich@intevation.de>
parents: 959
diff changeset
80 this.bbox = bbox;
994
541ff0db1b12 Added the informations about how the WMS which was published during the
Tim Englich <tim.englich@intevation.de>
parents: 984
diff changeset
81 this.ttl = ttl;
984
cfc7bd35ee0b Set the map to the extent which was sent by the rest-server
Tim Englich <tim.englich@intevation.de>
parents: 959
diff changeset
82 }
402
b88e881e8e94 Added the first Implementation (not complete and not ready to use) for the Interface from the MapViewer to the GNV
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
83
690
254f062e334b Added JavaDoc.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 684
diff changeset
84
402
b88e881e8e94 Added the first Implementation (not complete and not ready to use) for the Interface from the MapViewer to the GNV
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
85 public String getID() {
b88e881e8e94 Added the first Implementation (not complete and not ready to use) for the Interface from the MapViewer to the GNV
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
86 return this.id;
b88e881e8e94 Added the first Implementation (not complete and not ready to use) for the Interface from the MapViewer to the GNV
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
87 }
b88e881e8e94 Added the first Implementation (not complete and not ready to use) for the Interface from the MapViewer to the GNV
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
88
690
254f062e334b Added JavaDoc.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 684
diff changeset
89
402
b88e881e8e94 Added the first Implementation (not complete and not ready to use) for the Interface from the MapViewer to the GNV
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
90 public Collection<Layer> getLayer() {
b88e881e8e94 Added the first Implementation (not complete and not ready to use) for the Interface from the MapViewer to the GNV
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
91 return this.layer;
b88e881e8e94 Added the first Implementation (not complete and not ready to use) for the Interface from the MapViewer to the GNV
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
92 }
b88e881e8e94 Added the first Implementation (not complete and not ready to use) for the Interface from the MapViewer to the GNV
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
93
690
254f062e334b Added JavaDoc.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 684
diff changeset
94
402
b88e881e8e94 Added the first Implementation (not complete and not ready to use) for the Interface from the MapViewer to the GNV
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
95 public String getType() {
b88e881e8e94 Added the first Implementation (not complete and not ready to use) for the Interface from the MapViewer to the GNV
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
96 return this.type;
b88e881e8e94 Added the first Implementation (not complete and not ready to use) for the Interface from the MapViewer to the GNV
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
97 }
b88e881e8e94 Added the first Implementation (not complete and not ready to use) for the Interface from the MapViewer to the GNV
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
98
690
254f062e334b Added JavaDoc.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 684
diff changeset
99
402
b88e881e8e94 Added the first Implementation (not complete and not ready to use) for the Interface from the MapViewer to the GNV
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
100 public String getURL() {
b88e881e8e94 Added the first Implementation (not complete and not ready to use) for the Interface from the MapViewer to the GNV
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
101 return this.url;
b88e881e8e94 Added the first Implementation (not complete and not ready to use) for the Interface from the MapViewer to the GNV
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
102 }
984
cfc7bd35ee0b Set the map to the extent which was sent by the rest-server
Tim Englich <tim.englich@intevation.de>
parents: 959
diff changeset
103
cfc7bd35ee0b Set the map to the extent which was sent by the rest-server
Tim Englich <tim.englich@intevation.de>
parents: 959
diff changeset
104 public String getBBoxValue() {
cfc7bd35ee0b Set the map to the extent which was sent by the rest-server
Tim Englich <tim.englich@intevation.de>
parents: 959
diff changeset
105 return this.bbox;
cfc7bd35ee0b Set the map to the extent which was sent by the rest-server
Tim Englich <tim.englich@intevation.de>
parents: 959
diff changeset
106 }
994
541ff0db1b12 Added the informations about how the WMS which was published during the
Tim Englich <tim.englich@intevation.de>
parents: 984
diff changeset
107 public String getTtl() {
541ff0db1b12 Added the informations about how the WMS which was published during the
Tim Englich <tim.englich@intevation.de>
parents: 984
diff changeset
108 return this.ttl;
541ff0db1b12 Added the informations about how the WMS which was published during the
Tim Englich <tim.englich@intevation.de>
parents: 984
diff changeset
109 }
402
b88e881e8e94 Added the first Implementation (not complete and not ready to use) for the Interface from the MapViewer to the GNV
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
110 }
700
89ade245ca7a Using unix line endings only.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 699
diff changeset
111 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :

http://dive4elements.wald.intevation.org