Statistics
| Revision:

svn-gvsig-desktop / branches / v2_0_0_prep / libraries / libRemoteServices / src / org / gvsig / remoteclient / wfs / WFSServiceInformation.java @ 34026

History | View | Annotate | Download (4.53 KB)

1
package org.gvsig.remoteclient.wfs;
2

    
3
import java.util.HashMap;
4
import java.util.Iterator;
5
import java.util.Vector;
6

    
7
import org.gvsig.remoteclient.ogc.OGCClientOperation;
8
import org.gvsig.remoteclient.ogc.OGCServiceInformation;
9

    
10
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana
11
 *
12
 * Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
13
 *
14
 * This program is free software; you can redistribute it and/or
15
 * modify it under the terms of the GNU General Public License
16
 * as published by the Free Software Foundation; either version 2
17
 * of the License, or (at your option) any later version.
18
 *
19
 * This program is distributed in the hope that it will be useful,
20
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
21
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
22
 * GNU General Public License for more details.
23
 *
24
 * You should have received a copy of the GNU General Public License
25
 * along with this program; if not, write to the Free Software
26
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
27
 *
28
 * For more information, contact:
29
 *
30
 *  Generalitat Valenciana
31
 *   Conselleria d'Infraestructures i Transport
32
 *   Av. Blasco Ib??ez, 50
33
 *   46010 VALENCIA
34
 *   SPAIN
35
 *
36
 *      +34 963862235
37
 *   gvsig@gva.es
38
 *      www.gvsig.gva.es
39
 *
40
 *    or
41
 *
42
 *   IVER T.I. S.A
43
 *   Salamanca 50
44
 *   46005 Valencia
45
 *   Spain
46
 *
47
 *   +34 963163400
48
 *   dac@iver.es
49
 */
50
/* CVS MESSAGES:
51
 *
52
 * $Id$
53
 * $Log$
54
 *
55
 */
56
/**
57
 * @author Jorge Piera LLodr? (jorge.piera@iver.es)
58
 */
59
public class WFSServiceInformation extends OGCServiceInformation{
60
        public String version;
61
        public String name;
62
        public String scope;
63
        public String title;
64
        public String abstr;
65
        public String keywords;
66
        public String fees;
67
        public String operationsInfo;
68
        public String personname;
69
        public String organization;
70
        public String function;
71
        public String addresstype;
72
        public String address;
73
        public String place;
74
        public String province;
75
        public String postcode;
76
        public String country;
77
        public String phone;
78
        public String fax;
79
        public String email;
80
        public Vector formats;
81
        private HashMap operationsGet; 
82
        private HashMap operationsPost; 
83
        private HashMap namespaces;
84
        private int maxFeatures = -1;
85

    
86
    public WFSServiceInformation() {          
87
                clear();     
88
        }
89

    
90
        public void clear() {
91
                version = new String();
92
                name = new String();
93
                scope = new String();
94
                title = new String();
95
                abstr = new String();
96
                keywords = new String();
97
                fees = new String();
98
                operationsInfo = new String();
99
                personname = new String();
100
                organization = new String();
101
                function = new String();
102
                addresstype = new String();
103
                address = new String();
104
                place = new String();
105
                province = new String();
106
                postcode = new String();
107
                country = new String();
108
                phone = new String();
109
                fax = new String();
110
                email = new String();
111
                formats = new Vector();               
112
                operationsGet = new HashMap();  
113
                operationsPost = new HashMap();   
114
                namespaces = new HashMap();
115
        }
116
        
117
        /**
118
         * Adds a new namespace
119
         * @param namespacePrefix
120
         * Namespace prefix
121
         * @param namespaceURI
122
         * Namespace URI
123
         */
124
        public void addNamespace(String namespacePrefix, String namespaceURI){
125
                namespaces.put(namespacePrefix, namespaceURI);
126
        }
127
        
128
        /**
129
         * Gest a namespace URI
130
         * @param namespaceprefix
131
         * Namespace prefix
132
         * @return
133
         * The namespace URI
134
         */
135
        public String getNamespace(String namespaceprefix){
136
                if (namespaces.containsKey(namespaceprefix)){
137
                        return (String)namespaces.get(namespaceprefix);
138
                }
139
                return null;
140
        }
141
        
142
        public String getNamespacePrefix(String namespace){
143
        Iterator it = namespaces.keySet().iterator();
144
        while (it.hasNext()){
145
            String prefix = (String)it.next();
146
            if (namespace.equals(namespaces.get(prefix))){
147
                return prefix;
148
            }
149
        }
150
        return null;
151
    }
152

    
153
        /* (non-Javadoc)
154
         * @see org.gvsig.remoteClient.ogc.OGCServiceInformation#createOperation(java.lang.String)
155
         */        
156
        public OGCClientOperation createOperation(String name) {
157
                return new WFSOperation(name); 
158
        }
159

    
160
        /* (non-Javadoc)
161
         * @see org.gvsig.remoteClient.ogc.OGCServiceInformation#createOperation(java.lang.String, java.lang.String)
162
         */        
163
        public OGCClientOperation createOperation(String name, String onlineResource) {
164
                return new WFSOperation(name, onlineResource);
165
        }        
166
        
167
   
168
    
169
    /**
170
     * @return the maxFeatures
171
     */
172
    public int getMaxFeatures() {
173
        return maxFeatures;
174
    }
175

    
176
    
177
    /**
178
     * @param maxFeatures the maxFeatures to set
179
     */
180
    public void setMaxFeatures(int maxFeatures) {
181
        this.maxFeatures = maxFeatures;
182
    }
183
}
184