Statistics
| Revision:

root / trunk / applications / appCatalogYNomenclatorClient / src / es / gva / cit / gazetteer / drivers / IGazetteerServiceDriver.java @ 3069

History | View | Annotate | Download (3.42 KB)

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

    
43
import java.net.URL;
44
import java.util.Vector;
45

    
46
import org.w3c.dom.Node;
47

    
48
import es.gva.cit.gazetteer.querys.Feature;
49
import es.gva.cit.gazetteer.querys.Query;
50
import es.gva.cit.gazetteer.querys.ThesaurusName;
51

    
52
/**
53
 * This interface contains the common methods that have to be
54
 * implemented by all the gazetteer drivers.
55
 * 
56
 * @author Jorge Piera Llodra (piera_jor@gva.es)
57
 */
58
public interface IGazetteerServiceDriver {
59
    /**
60
     * It have to prove if the specified protocol is supported.
61
     * @param url
62
     * Server URL
63
     * @return
64
     * true if is supported, false if it isn't supported
65
     */
66
    boolean isProtocolSupported(URL url);
67

    
68
    /**
69
     * It try to discover the server capabilities.
70
     * @param url
71
     * Server URL
72
     * @return
73
     * Node with the server answer.
74
     */
75
    Node[] getCapabilities(URL url);
76

    
77
    /**
78
     * It returns feature properties
79
     * @param url
80
     * Server URL
81
     * @param feature
82
     * Feature name
83
     * @return
84
     * Node with the server answer
85
     */
86
    Node[] describeFeatureType(URL url, String feature);
87

    
88
    /**
89
     * It returns the records finded
90
     * @param url
91
     * Server URL
92
     * @param query
93
     * Query with the search parameters
94
     * @return
95
     */
96
    Node[] getFeature(URL url,Query query);
97
   
98
    /**
99
     * This method is used to update the client parameters
100
     * @param nodes
101
     * Node with the parameters to update
102
     * @return
103
     * true if the it's possible to update the server
104
     */
105
     boolean setParameters(Node[] nodes);
106

    
107
     /**
108
      * It parses the getFeature opearation
109
      * @param node
110
      * XMLNode
111
      * @param currentFeature
112
      * The typename selected
113
      * @param attribute
114
      * The attribute to do the search
115
      * @return
116
      * Array of features
117
      */
118
     Feature[] parseFeatures(Node node, ThesaurusName currentFeature,String attribute);
119
     
120
    /**
121
     * It return a message to write in the server connection frame
122
     * @return
123
     * It is/isn't the supported protocol
124
     */
125
    String getServerAnswerReady();
126
    
127
    /**
128
     * This function returns a vector with the features retrieved from
129
     * the get Capabilities file
130
     *  
131
     * @return
132
     * A vector
133
     */
134
    Vector getVectorFeatures();
135
    
136

    
137
}