Statistics
| Revision:

root / tags / v2_0_0_Build_2020 / libraries / libRemoteServices / src / org / gvsig / remoteclient / wfs / wfs_1_0_0 / request / WFSDescribeFeatureTypeRequest1_0_0.java @ 33910

History | View | Annotate | Download (2.79 KB)

1
package org.gvsig.remoteclient.wfs.wfs_1_0_0.request;
2

    
3
import org.gvsig.compat.CompatLocator;
4
import org.gvsig.compat.lang.StringUtils;
5
import org.gvsig.remoteclient.wfs.WFSProtocolHandler;
6
import org.gvsig.remoteclient.wfs.WFSStatus;
7
import org.gvsig.remoteclient.wfs.request.WFSDescribeFeatureTypeRequest;
8

    
9
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana
10
 *
11
 * Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
12
 *
13
 * This program is free software; you can redistribute it and/or
14
 * modify it under the terms of the GNU General Public License
15
 * as published by the Free Software Foundation; either version 2
16
 * of the License, or (at your option) any later version.
17
 *
18
 * This program is distributed in the hope that it will be useful,
19
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
21
 * GNU General Public License for more details.
22
 *
23
 * You should have received a copy of the GNU General Public License
24
 * along with this program; if not, write to the Free Software
25
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
26
 *
27
 * For more information, contact:
28
 *
29
 *  Generalitat Valenciana
30
 *   Conselleria d'Infraestructures i Transport
31
 *   Av. Blasco Ib??ez, 50
32
 *   46010 VALENCIA
33
 *   SPAIN
34
 *
35
 *      +34 963862235
36
 *   gvsig@gva.es
37
 *      www.gvsig.gva.es
38
 *
39
 *    or
40
 *
41
 *   IVER T.I. S.A
42
 *   Salamanca 50
43
 *   46005 Valencia
44
 *   Spain
45
 *
46
 *   +34 963163400
47
 *   dac@iver.es
48
 */
49
/* CVS MESSAGES:
50
 *
51
 * $Id$
52
 * $Log$
53
 *
54
 */
55
/**
56
 * @author Jorge Piera Llodr? (jorge.piera@iver.es)
57
 */
58
public class WFSDescribeFeatureTypeRequest1_0_0 extends WFSDescribeFeatureTypeRequest {
59

    
60
    private static final StringUtils stringUtils = CompatLocator.getStringUtils();
61
    
62
        public WFSDescribeFeatureTypeRequest1_0_0(WFSStatus status,
63
                        WFSProtocolHandler protocolHandler) {
64
                super(status, protocolHandler);                
65
        }
66

    
67
        /*
68
         * (non-Javadoc)
69
         * @see org.gvsig.remoteClient.wfs.requests.WFSRequest#getHttpGetRequest(java.lang.String)
70
         */
71
        protected String getHttpGetRequest(String onlineResource) {
72
                StringBuffer req = new StringBuffer();
73
                req.append(onlineResource);
74
                req.append("REQUEST=DescribeFeatureType&SERVICE=WFS&");
75
                //Typename
76
                String typeName = status.getFeatureName();
77
                if ((status.getNamespace() != null) && 
78
                                (status.getNamespacePrefix() != null)){
79
                        req.append("NAMESPACE=");
80
                        req.append("xmlns(" + status.getNamespacePrefix() + "=");
81
                        req.append(status.getNamespace() + ")");
82
                        req.append("&");                                
83
                }
84
                req.append("TYPENAME=").append(typeName).append("&");
85
                req.append("VERSION=").append(protocolHandler.getVersion()).append("&EXCEPTIONS=XML");
86
                String request = stringUtils.replaceAll(req.toString(), "UEeRtKxB+ROJTlqYiWB3XQ==", "UEeRtKxB%2bROJTlqYiWB3XQ%3d%3d");
87
                return request;
88
        }
89

    
90
}