gvsig-raster / org.gvsig.raster / branches / org.gvsig.raster.2.4 / org.gvsig.wcs / org.gvsig.wcs.provider / src / main / java / org / gvsig / wcs / provider / WCSRasterServerExplorerParameters.java @ 8786
History | View | Annotate | Download (3.4 KB)
1 |
package org.gvsig.wcs.provider; |
---|---|
2 |
/* gvSIG. Desktop Geographic Information System.
|
3 |
*
|
4 |
* Copyright ? 2007-2016 gvSIG Association
|
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 |
* For any additional information, do not hesitate to contact us
|
22 |
* at info AT gvsig.com, or visit our website www.gvsig.com.
|
23 |
*/
|
24 |
|
25 |
|
26 |
import java.net.URL; |
27 |
|
28 |
import org.slf4j.Logger; |
29 |
import org.slf4j.LoggerFactory; |
30 |
|
31 |
import org.gvsig.fmap.dal.DataServerExplorerParameters; |
32 |
import org.gvsig.fmap.dal.FileHelper; |
33 |
import org.gvsig.fmap.dal.spi.AbstractDataParameters; |
34 |
import org.gvsig.fmap.dal.spi.DataStoreProviderServices; |
35 |
import org.gvsig.tools.dynobject.DelegatedDynObject; |
36 |
|
37 |
|
38 |
/**
|
39 |
* @author fdiaz
|
40 |
*
|
41 |
*/
|
42 |
public class WCSRasterServerExplorerParameters extends AbstractDataParameters implements DataServerExplorerParameters { |
43 |
|
44 |
private static final Logger logger = LoggerFactory.getLogger(WCSRasterServerExplorerParameters.class); |
45 |
|
46 |
public static final String PARAMETERS_DEFINITION_NAME = "WCS"; |
47 |
|
48 |
public static final String WCS_SERVICE_PARAMETER_NAME = "service"; |
49 |
|
50 |
public static final String WCS_OVERRIDE_CAPABILITIES_PARAMETER_NAME = "override_capabilities"; |
51 |
|
52 |
private DelegatedDynObject parameters;
|
53 |
|
54 |
/**
|
55 |
* Constructor
|
56 |
*/
|
57 |
public WCSRasterServerExplorerParameters() {
|
58 |
this(PARAMETERS_DEFINITION_NAME);
|
59 |
} |
60 |
|
61 |
protected WCSRasterServerExplorerParameters(String parametersDefinitionName) { |
62 |
this(parametersDefinitionName, WCSRasterProvider.NAME);
|
63 |
} |
64 |
|
65 |
|
66 |
/**
|
67 |
* Constructor
|
68 |
* @param parametersDefinitionName
|
69 |
* @param name
|
70 |
*/
|
71 |
public WCSRasterServerExplorerParameters(String parametersDefinitionName, String name) { |
72 |
super();
|
73 |
this.parameters = (DelegatedDynObject) FileHelper.newParameters(parametersDefinitionName);
|
74 |
this.setDynValue(DataStoreProviderServices.PROVIDER_PARAMTER_NAME, name);
|
75 |
} |
76 |
|
77 |
/**
|
78 |
* @return service parameter.
|
79 |
*/
|
80 |
public URL getService() { |
81 |
return (URL) this.getDynValue(WCS_SERVICE_PARAMETER_NAME); |
82 |
} |
83 |
|
84 |
/**
|
85 |
* @param service
|
86 |
*/
|
87 |
public void setService(URL service) { |
88 |
this.setDynValue(WCS_SERVICE_PARAMETER_NAME, service);
|
89 |
} |
90 |
|
91 |
@Override
|
92 |
protected DelegatedDynObject getDelegatedDynObject() {
|
93 |
return parameters;
|
94 |
} |
95 |
|
96 |
@Override
|
97 |
public String getExplorerName() { |
98 |
return (String) this.getDynValue(DataStoreProviderServices.PROVIDER_PARAMTER_NAME); |
99 |
} |
100 |
|
101 |
/**
|
102 |
* @return override cached capabilities file parameter.
|
103 |
*/
|
104 |
public URL getOverride() { |
105 |
return (URL) this.getDynValue(WCS_OVERRIDE_CAPABILITIES_PARAMETER_NAME); |
106 |
} |
107 |
|
108 |
/**
|
109 |
* @param service
|
110 |
*/
|
111 |
public void setOverride(boolean override) { |
112 |
this.setDynValue(WCS_OVERRIDE_CAPABILITIES_PARAMETER_NAME, override);
|
113 |
} |
114 |
|
115 |
|
116 |
|
117 |
} |