svn-gvsig-desktop / trunk / org.gvsig.desktop / org.gvsig.desktop.compat.cdc / org.gvsig.remoteclient / src / main / java / org / gvsig / remoteclient / wfs / wfs_1_0_0 / request / WFSDescribeFeatureTypeRequest1_0_0.java @ 40559
History | View | Annotate | Download (3.75 KB)
1 | 40559 | jjdelcerro | /**
|
---|---|---|---|
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 | 40435 | jjdelcerro | package org.gvsig.remoteclient.wfs.wfs_1_0_0.request; |
25 | |||
26 | import org.gvsig.compat.CompatLocator; |
||
27 | import org.gvsig.compat.lang.StringUtils; |
||
28 | import org.gvsig.remoteclient.wfs.WFSProtocolHandler; |
||
29 | import org.gvsig.remoteclient.wfs.WFSStatus; |
||
30 | import org.gvsig.remoteclient.wfs.request.WFSDescribeFeatureTypeRequest; |
||
31 | |||
32 | /* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana
|
||
33 | *
|
||
34 | * Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
|
||
35 | *
|
||
36 | * This program is free software; you can redistribute it and/or
|
||
37 | * modify it under the terms of the GNU General Public License
|
||
38 | * as published by the Free Software Foundation; either version 2
|
||
39 | * of the License, or (at your option) any later version.
|
||
40 | *
|
||
41 | * This program is distributed in the hope that it will be useful,
|
||
42 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||
43 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||
44 | * GNU General Public License for more details.
|
||
45 | *
|
||
46 | * You should have received a copy of the GNU General Public License
|
||
47 | * along with this program; if not, write to the Free Software
|
||
48 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,USA.
|
||
49 | *
|
||
50 | * For more information, contact:
|
||
51 | *
|
||
52 | * Generalitat Valenciana
|
||
53 | * Conselleria d'Infraestructures i Transport
|
||
54 | * Av. Blasco Ib??ez, 50
|
||
55 | * 46010 VALENCIA
|
||
56 | * SPAIN
|
||
57 | *
|
||
58 | * +34 963862235
|
||
59 | * gvsig@gva.es
|
||
60 | * www.gvsig.gva.es
|
||
61 | *
|
||
62 | * or
|
||
63 | *
|
||
64 | * IVER T.I. S.A
|
||
65 | * Salamanca 50
|
||
66 | * 46005 Valencia
|
||
67 | * Spain
|
||
68 | *
|
||
69 | * +34 963163400
|
||
70 | * dac@iver.es
|
||
71 | */
|
||
72 | /* CVS MESSAGES:
|
||
73 | *
|
||
74 | * $Id$
|
||
75 | * $Log$
|
||
76 | *
|
||
77 | */
|
||
78 | /**
|
||
79 | * @author Jorge Piera Llodr? (jorge.piera@iver.es)
|
||
80 | */
|
||
81 | public class WFSDescribeFeatureTypeRequest1_0_0 extends WFSDescribeFeatureTypeRequest { |
||
82 | |||
83 | private static final StringUtils stringUtils = CompatLocator.getStringUtils(); |
||
84 | |||
85 | public WFSDescribeFeatureTypeRequest1_0_0(WFSStatus status,
|
||
86 | WFSProtocolHandler protocolHandler) { |
||
87 | super(status, protocolHandler);
|
||
88 | } |
||
89 | |||
90 | /*
|
||
91 | * (non-Javadoc)
|
||
92 | * @see org.gvsig.remoteClient.wfs.requests.WFSRequest#getHttpGetRequest(java.lang.String)
|
||
93 | */
|
||
94 | protected String getHttpGetRequest(String onlineResource) { |
||
95 | StringBuffer req = new StringBuffer(); |
||
96 | req.append(onlineResource); |
||
97 | req.append("REQUEST=DescribeFeatureType&SERVICE=WFS&");
|
||
98 | //Typename
|
||
99 | String typeName = status.getFeatureFullName();
|
||
100 | if ((status.getNamespaceLocation() != null) && |
||
101 | (status.getNamespacePrefix() != null)){
|
||
102 | req.append("NAMESPACE=");
|
||
103 | req.append("xmlns(" + status.getNamespacePrefix() + "="); |
||
104 | req.append(status.getNamespaceLocation() + ")");
|
||
105 | req.append("&");
|
||
106 | } |
||
107 | req.append("TYPENAME=").append(typeName).append("&"); |
||
108 | req.append("VERSION=").append(protocolHandler.getVersion()).append("&EXCEPTIONS=XML"); |
||
109 | String request = stringUtils.replaceAll(req.toString(), "UEeRtKxB+ROJTlqYiWB3XQ==", "UEeRtKxB%2bROJTlqYiWB3XQ%3d%3d"); |
||
110 | return request;
|
||
111 | } |
||
112 | |||
113 | } |