svn-gvsig-desktop / trunk / org.gvsig.desktop / org.gvsig.desktop.compat.cdc / org.gvsig.remoteclient / src / main / java / org / gvsig / remoteclient / wfs / WFSServiceInformation.java @ 40559
History | View | Annotate | Download (5.53 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; |
25 | |||
26 | import java.util.HashMap; |
||
27 | import java.util.Iterator; |
||
28 | import java.util.Vector; |
||
29 | |||
30 | import org.gvsig.remoteclient.ogc.OGCClientOperation; |
||
31 | import org.gvsig.remoteclient.ogc.OGCServiceInformation; |
||
32 | |||
33 | /* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana
|
||
34 | *
|
||
35 | * Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
|
||
36 | *
|
||
37 | * This program is free software; you can redistribute it and/or
|
||
38 | * modify it under the terms of the GNU General Public License
|
||
39 | * as published by the Free Software Foundation; either version 2
|
||
40 | * of the License, or (at your option) any later version.
|
||
41 | *
|
||
42 | * This program is distributed in the hope that it will be useful,
|
||
43 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||
44 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||
45 | * GNU General Public License for more details.
|
||
46 | *
|
||
47 | * You should have received a copy of the GNU General Public License
|
||
48 | * along with this program; if not, write to the Free Software
|
||
49 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,USA.
|
||
50 | *
|
||
51 | * For more information, contact:
|
||
52 | *
|
||
53 | * Generalitat Valenciana
|
||
54 | * Conselleria d'Infraestructures i Transport
|
||
55 | * Av. Blasco Ib??ez, 50
|
||
56 | * 46010 VALENCIA
|
||
57 | * SPAIN
|
||
58 | *
|
||
59 | * +34 963862235
|
||
60 | * gvsig@gva.es
|
||
61 | * www.gvsig.gva.es
|
||
62 | *
|
||
63 | * or
|
||
64 | *
|
||
65 | * IVER T.I. S.A
|
||
66 | * Salamanca 50
|
||
67 | * 46005 Valencia
|
||
68 | * Spain
|
||
69 | *
|
||
70 | * +34 963163400
|
||
71 | * dac@iver.es
|
||
72 | */
|
||
73 | /* CVS MESSAGES:
|
||
74 | *
|
||
75 | * $Id$
|
||
76 | * $Log$
|
||
77 | *
|
||
78 | */
|
||
79 | /**
|
||
80 | * @author Jorge Piera LLodr? (jorge.piera@iver.es)
|
||
81 | */
|
||
82 | public class WFSServiceInformation extends OGCServiceInformation{ |
||
83 | public String version; |
||
84 | public String name; |
||
85 | public String scope; |
||
86 | public String title; |
||
87 | public String abstr; |
||
88 | public String keywords; |
||
89 | public String fees; |
||
90 | public String operationsInfo; |
||
91 | public String personname; |
||
92 | public String organization; |
||
93 | public String function; |
||
94 | public String addresstype; |
||
95 | public String address; |
||
96 | public String place; |
||
97 | public String province; |
||
98 | public String postcode; |
||
99 | public String country; |
||
100 | public String phone; |
||
101 | public String fax; |
||
102 | public String email; |
||
103 | public Vector formats; |
||
104 | private HashMap operationsGet; |
||
105 | private HashMap operationsPost; |
||
106 | private HashMap namespaces; |
||
107 | private int maxFeatures = -1; |
||
108 | |||
109 | public WFSServiceInformation() {
|
||
110 | clear(); |
||
111 | } |
||
112 | |||
113 | public void clear() { |
||
114 | version = new String(); |
||
115 | name = new String(); |
||
116 | scope = new String(); |
||
117 | title = new String(); |
||
118 | abstr = new String(); |
||
119 | keywords = new String(); |
||
120 | fees = new String(); |
||
121 | operationsInfo = new String(); |
||
122 | personname = new String(); |
||
123 | organization = new String(); |
||
124 | function = new String(); |
||
125 | addresstype = new String(); |
||
126 | address = new String(); |
||
127 | place = new String(); |
||
128 | province = new String(); |
||
129 | postcode = new String(); |
||
130 | country = new String(); |
||
131 | phone = new String(); |
||
132 | fax = new String(); |
||
133 | email = new String(); |
||
134 | formats = new Vector(); |
||
135 | operationsGet = new HashMap(); |
||
136 | operationsPost = new HashMap(); |
||
137 | namespaces = new HashMap(); |
||
138 | } |
||
139 | |||
140 | /**
|
||
141 | * Adds a new namespace
|
||
142 | * @param namespacePrefix
|
||
143 | * Namespace prefix
|
||
144 | * @param namespaceURI
|
||
145 | * Namespace URI
|
||
146 | */
|
||
147 | public void addNamespace(String namespacePrefix, String namespaceURI){ |
||
148 | namespaces.put(namespacePrefix, namespaceURI); |
||
149 | } |
||
150 | |||
151 | /**
|
||
152 | * Gest a namespace URI
|
||
153 | * @param namespaceprefix
|
||
154 | * Namespace prefix
|
||
155 | * @return
|
||
156 | * The namespace URI
|
||
157 | */
|
||
158 | public String getNamespace(String namespaceprefix){ |
||
159 | if (namespaces.containsKey(namespaceprefix)){
|
||
160 | return (String)namespaces.get(namespaceprefix); |
||
161 | } |
||
162 | return null; |
||
163 | } |
||
164 | |||
165 | public String getNamespacePrefix(String namespace){ |
||
166 | if (namespace == null){ |
||
167 | return null; |
||
168 | } |
||
169 | Iterator it = namespaces.keySet().iterator();
|
||
170 | while (it.hasNext()){
|
||
171 | String prefix = (String)it.next(); |
||
172 | if (namespace.equals(namespaces.get(prefix))){
|
||
173 | return prefix;
|
||
174 | } |
||
175 | } |
||
176 | return null; |
||
177 | } |
||
178 | |||
179 | /* (non-Javadoc)
|
||
180 | * @see org.gvsig.remoteClient.ogc.OGCServiceInformation#createOperation(java.lang.String)
|
||
181 | */
|
||
182 | public OGCClientOperation createOperation(String name) { |
||
183 | return new WFSOperation(name); |
||
184 | } |
||
185 | |||
186 | /* (non-Javadoc)
|
||
187 | * @see org.gvsig.remoteClient.ogc.OGCServiceInformation#createOperation(java.lang.String, java.lang.String)
|
||
188 | */
|
||
189 | public OGCClientOperation createOperation(String name, String onlineResource) { |
||
190 | return new WFSOperation(name, onlineResource); |
||
191 | } |
||
192 | |||
193 | |||
194 | |||
195 | /**
|
||
196 | * @return the maxFeatures
|
||
197 | */
|
||
198 | public int getMaxFeatures() { |
||
199 | return maxFeatures;
|
||
200 | } |
||
201 | |||
202 | |||
203 | /**
|
||
204 | * @param maxFeatures the maxFeatures to set
|
||
205 | */
|
||
206 | public void setMaxFeatures(int maxFeatures) { |
||
207 | this.maxFeatures = maxFeatures;
|
||
208 | } |
||
209 | } |