Statistics
| Revision:

root / branches / v2_0_0_prep / libraries / libRemoteServices / src / org / gvsig / remoteclient / wmts / request / WMTSGetFeatureInfoRequest.java @ 38531

History | View | Annotate | Download (2.57 KB)

1 34316 nbrodin
/* gvSIG. Geographic Information System of the Valencian Government
2
*
3
* Copyright (C) 2007-2008 Infrastructures and Transports Department
4
* of the Valencian Government (CIT)
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
23
/*
24
* AUTHORS (In addition to CIT):
25
* 2009 Iver T.I.  {{Task}}
26
*/
27
28
package org.gvsig.remoteclient.wmts.request;
29
30 34391 nbrodin
import java.net.MalformedURLException;
31
import java.net.URL;
32
33 34316 nbrodin
import org.gvsig.remoteclient.utils.CapabilitiesTags;
34 34391 nbrodin
import org.gvsig.remoteclient.wfs.WFSOperation;
35 34316 nbrodin
import org.gvsig.remoteclient.wmts.WMTSProtocolHandler;
36
import org.gvsig.remoteclient.wmts.WMTSStatus;
37
38
/**
39
 * Base class for WMTS GetFeatureInfo
40
 * @author Nacho Brodin (nachobrodin@gmail.com)
41
 */
42
public abstract class WMTSGetFeatureInfoRequest extends WMTSRequest {
43
        protected int x;
44
        protected int y;
45
46
        public WMTSGetFeatureInfoRequest(WMTSStatus status, WMTSProtocolHandler protocolHandler, int x, int y) {
47
                super(status, protocolHandler);
48
                this.x = x;
49
                this.y = y;
50
        }
51
52
        /*
53
         * (non-Javadoc)
54
         * @see org.gvsig.remoteclient.ogc.request.OGCRequest#getHttpPostRequest(java.lang.String)
55
         */
56
        protected String getHttpPostRequest(String onlineResource) {
57
                // TODO Auto-generated method stub
58
                return null;
59
        }
60
61
        /*
62
         * (non-Javadoc)
63
         * @see org.gvsig.remoteclient.ogc.request.OGCRequest#getOperationName()
64
         */
65
        protected String getOperationName() {
66
                return CapabilitiesTags.GETFEATUREINFO;
67
        }
68
69
        /*
70
         * (non-Javadoc)
71
         * @see org.gvsig.remoteClient.wfs.requests.WFSRequest#getTempFilePrefix()
72
         */
73
        protected String getTempFilePrefix() {
74
                return "wms_getFeatureInfo.xml";
75
        }
76 34391 nbrodin
77
        /**
78
         * @return the URL used in the HTTP get operation
79
         * @throws MalformedURLException
80
         */
81
        public URL getURL() throws MalformedURLException {
82
                String onlineResource = protocolHandler.getHost();
83
                if (onlineResource != null) {
84
                        onlineResource = onlineResource + getSymbol(onlineResource);
85
                        return new URL(getHttpGetRequest(onlineResource));
86
                }
87
                return null;
88
        }
89 34316 nbrodin
}
90