gvsig-raster / org.gvsig.raster / branches / org.gvsig.raster.2.4 / org.gvsig.wms / org.gvsig.wms.provider / src / main / java / org / gvsig / wms / provider / WMSRasterServerExplorerParameters.java @ 8690
History | View | Annotate | Download (3.39 KB)
1 | 8690 | fdiaz | /* gvSIG. Desktop Geographic Information System.
|
---|---|---|---|
2 | *
|
||
3 | * Copyright ? 2007-2016 gvSIG Association
|
||
4 | *
|
||
5 | * This program is free software; you can redistribute it and/or
|
||
6 | * modify it under the terms of the GNU General Public License
|
||
7 | * as published by the Free Software Foundation; either version 2
|
||
8 | * of the License, or (at your option) any later version.
|
||
9 | *
|
||
10 | * This program is distributed in the hope that it will be useful,
|
||
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||
13 | * GNU General Public License for more details.
|
||
14 | *
|
||
15 | * You should have received a copy of the GNU General Public License
|
||
16 | * along with this program; if not, write to the Free Software
|
||
17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||
18 | * MA 02110-1301, USA.
|
||
19 | *
|
||
20 | * For any additional information, do not hesitate to contact us
|
||
21 | * at info AT gvsig.com, or visit our website www.gvsig.com.
|
||
22 | */
|
||
23 | package org.gvsig.wms.provider; |
||
24 | |||
25 | import java.net.URL; |
||
26 | |||
27 | import org.slf4j.Logger; |
||
28 | import org.slf4j.LoggerFactory; |
||
29 | |||
30 | import org.gvsig.fmap.dal.DataServerExplorerParameters; |
||
31 | import org.gvsig.fmap.dal.FileHelper; |
||
32 | import org.gvsig.fmap.dal.spi.AbstractDataParameters; |
||
33 | import org.gvsig.fmap.dal.spi.DataStoreProviderServices; |
||
34 | import org.gvsig.tools.dynobject.DelegatedDynObject; |
||
35 | |||
36 | |||
37 | /**
|
||
38 | * @author fdiaz
|
||
39 | *
|
||
40 | */
|
||
41 | public class WMSRasterServerExplorerParameters extends AbstractDataParameters implements DataServerExplorerParameters { |
||
42 | |||
43 | private static final Logger logger = LoggerFactory.getLogger(WMSRasterServerExplorerParameters.class); |
||
44 | |||
45 | public static final String PARAMETERS_DEFINITION_NAME = "WMS"; |
||
46 | |||
47 | public static final String WMS_SERVICE_PARAMETER_NAME = "service"; |
||
48 | |||
49 | public static final String WMS_OVERRIDE_CAPABILITIES_PARAMETER_NAME = "override_capabilities"; |
||
50 | |||
51 | private DelegatedDynObject parameters;
|
||
52 | |||
53 | /**
|
||
54 | * Constructor
|
||
55 | */
|
||
56 | public WMSRasterServerExplorerParameters() {
|
||
57 | this(PARAMETERS_DEFINITION_NAME);
|
||
58 | } |
||
59 | |||
60 | protected WMSRasterServerExplorerParameters(String parametersDefinitionName) { |
||
61 | this(parametersDefinitionName, WMSRasterProvider.NAME);
|
||
62 | } |
||
63 | |||
64 | |||
65 | /**
|
||
66 | * Constructor
|
||
67 | * @param parametersDefinitionName
|
||
68 | * @param name
|
||
69 | */
|
||
70 | public WMSRasterServerExplorerParameters(String parametersDefinitionName, String name) { |
||
71 | super();
|
||
72 | this.parameters = (DelegatedDynObject) FileHelper.newParameters(parametersDefinitionName);
|
||
73 | this.setDynValue(DataStoreProviderServices.PROVIDER_PARAMTER_NAME, name);
|
||
74 | } |
||
75 | |||
76 | /**
|
||
77 | * @return service parameter.
|
||
78 | */
|
||
79 | public URL getService() { |
||
80 | return (URL) this.getDynValue(WMS_SERVICE_PARAMETER_NAME); |
||
81 | } |
||
82 | |||
83 | /**
|
||
84 | * @param service
|
||
85 | */
|
||
86 | public void setService(URL service) { |
||
87 | this.setDynValue(WMS_SERVICE_PARAMETER_NAME, service);
|
||
88 | } |
||
89 | |||
90 | /**
|
||
91 | * @return override cached capabilities file parameter.
|
||
92 | */
|
||
93 | public URL getOverride() { |
||
94 | return (URL) this.getDynValue(WMS_OVERRIDE_CAPABILITIES_PARAMETER_NAME); |
||
95 | } |
||
96 | |||
97 | /**
|
||
98 | * @param service
|
||
99 | */
|
||
100 | public void setOverride(boolean override) { |
||
101 | this.setDynValue(WMS_OVERRIDE_CAPABILITIES_PARAMETER_NAME, override);
|
||
102 | } |
||
103 | |||
104 | @Override
|
||
105 | protected DelegatedDynObject getDelegatedDynObject() {
|
||
106 | return parameters;
|
||
107 | } |
||
108 | |||
109 | @Override
|
||
110 | public String getExplorerName() { |
||
111 | return (String) this.getDynValue(DataStoreProviderServices.PROVIDER_PARAMTER_NAME); |
||
112 | } |
||
113 | |||
114 | } |