Statistics
| Revision:

svn-gvsig-desktop / trunk / org.gvsig.desktop / org.gvsig.desktop.compat.cdc / org.gvsig.remoteclient / src / main / java / org / gvsig / remoteclient / wmts / request / WMTSGetFeatureInfoRequest.java @ 40769

History | View | Annotate | Download (2.57 KB)

1
/**
2
 * gvSIG. Desktop Geographic Information System.
3
 *
4
 * Copyright (C) 2007-2013 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 3
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
package org.gvsig.remoteclient.wmts.request;
26

    
27
import java.net.MalformedURLException;
28
import java.net.URL;
29

    
30
import org.gvsig.remoteclient.utils.CapabilitiesTags;
31
import org.gvsig.remoteclient.wfs.WFSOperation;
32
import org.gvsig.remoteclient.wmts.WMTSProtocolHandler;
33
import org.gvsig.remoteclient.wmts.WMTSStatus;
34

    
35
/**
36
 * Base class for WMTS GetFeatureInfo
37
 * @author Nacho Brodin (nachobrodin@gmail.com)
38
 */
39
public abstract class WMTSGetFeatureInfoRequest extends WMTSRequest {
40
        protected int x;
41
        protected int y;
42
        
43
        public WMTSGetFeatureInfoRequest(WMTSStatus status, WMTSProtocolHandler protocolHandler, int x, int y) {
44
                super(status, protocolHandler);        
45
                this.x = x;
46
                this.y = y;
47
        }
48

    
49
        /*
50
         * (non-Javadoc)
51
         * @see org.gvsig.remoteclient.ogc.request.OGCRequest#getHttpPostRequest(java.lang.String)
52
         */
53
        protected String getHttpPostRequest(String onlineResource) {
54
                // TODO Auto-generated method stub
55
                return null;
56
        }
57

    
58
        /*
59
         * (non-Javadoc)
60
         * @see org.gvsig.remoteclient.ogc.request.OGCRequest#getOperationName()
61
         */
62
        protected String getOperationName() {
63
                return CapabilitiesTags.GETFEATUREINFO;
64
        }
65

    
66
        /*
67
         * (non-Javadoc)
68
         * @see org.gvsig.remoteClient.wfs.requests.WFSRequest#getTempFilePrefix()
69
         */
70
        protected String getTempFilePrefix() {
71
                return "wms_getFeatureInfo.xml";
72
        }
73
        
74
        /**
75
         * @return the URL used in the HTTP get operation
76
         * @throws MalformedURLException
77
         */
78
        public URL getURL() throws MalformedURLException {
79
                String onlineResource = protocolHandler.getHost();
80
                if (onlineResource != null) {
81
                        onlineResource = onlineResource + getSymbol(onlineResource);
82
                        return new URL(getHttpGetRequest(onlineResource));
83
                }
84
                return null;
85
        }
86
}
87

    
88