gvsig-osm / org.gvsig.raster.osm / trunk / org.gvsig.raster.osm / org.gvsig.raster.osm.app.osmclient / src / main / java / org / gvsig / raster / osm / app / osmclient / OSMServer.java @ 85
History | View | Annotate | Download (2.1 KB)
1 |
/* OSM layers for gvSIG.
|
---|---|
2 |
* Geographic Information System of the Valencian Government
|
3 |
*
|
4 |
* Copyright (C) 2012 Nacho Brodin
|
5 |
*
|
6 |
* This program is free software; you can redistribute it and/or
|
7 |
* modify it under the terms of the GNU General Public License
|
8 |
* as published by the Free Software Foundation; either version 2
|
9 |
* of the License, or (at your option) any later version.
|
10 |
*
|
11 |
* This program is distributed in the hope that it will be useful,
|
12 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
13 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
14 |
* GNU General Public License for more details.
|
15 |
*
|
16 |
* You should have received a copy of the GNU General Public License
|
17 |
* along with this program; if not, write to the Free Software
|
18 |
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
19 |
* MA 02110-1301, USA.
|
20 |
*
|
21 |
*/
|
22 |
package org.gvsig.raster.osm.app.osmclient; |
23 |
|
24 |
/**
|
25 |
* Fixed parameters for a Open Street Map server. These parameters
|
26 |
* are known for each server added.
|
27 |
*
|
28 |
* @author Nacho Brodin (nachobrodin@gmail.com)
|
29 |
*/
|
30 |
public class OSMServer { |
31 |
private String serverURL = null; |
32 |
private int levels = 0; |
33 |
private String name = null; |
34 |
private String suffix = null; |
35 |
|
36 |
/**
|
37 |
* Constructor
|
38 |
* @param server
|
39 |
* The server URL
|
40 |
* @param levels
|
41 |
* The number of resolution levels
|
42 |
* @param name
|
43 |
* Layer's name
|
44 |
* @param suffix
|
45 |
* The suffix of the image file.
|
46 |
*
|
47 |
*/
|
48 |
public OSMServer(String server, int levels, String name, String suffix) { |
49 |
this.serverURL = server;
|
50 |
this.levels = levels;
|
51 |
this.name = name;
|
52 |
this.suffix = suffix;
|
53 |
} |
54 |
|
55 |
/**
|
56 |
* Gets the server URL
|
57 |
* @return
|
58 |
*/
|
59 |
public String getServerURL() { |
60 |
return serverURL;
|
61 |
} |
62 |
|
63 |
/**
|
64 |
* Gets the number of resolution levels
|
65 |
* @return
|
66 |
*/
|
67 |
public int getLevels() { |
68 |
return levels;
|
69 |
} |
70 |
|
71 |
/**
|
72 |
* Gets the layer's name
|
73 |
* @return
|
74 |
*/
|
75 |
public String getName() { |
76 |
return name;
|
77 |
} |
78 |
|
79 |
/**
|
80 |
* Gets the suffix of the image file.
|
81 |
* This suffix depends on the kind of the image (tif, png, jpg,...)
|
82 |
* @return
|
83 |
*/
|
84 |
public String getSuffix() { |
85 |
return suffix;
|
86 |
} |
87 |
|
88 |
public String toString() { |
89 |
return name;
|
90 |
} |
91 |
} |