Statistics
| Revision:

svn-gvsig-desktop / branches / v10 / applications / appCatalogAndGazetteerClient / src / es / gva / cit / catalog / CatalogClient.java @ 18617

History | View | Annotate | Download (2.83 KB)

1 16004 jpiera
2
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana
3
 *
4
 * Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
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 2
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., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
19
 *
20
 * For more information, contact:
21
 *
22
 *  Generalitat Valenciana
23
 *   Conselleria d'Infraestructures i Transport
24
 *   Av. Blasco Ib??ez, 50
25
 *   46010 VALENCIA
26
 *   SPAIN
27
 *
28
 *      +34 963862235
29
 *   gvsig@gva.es
30
 *      www.gvsig.gva.es
31
 *
32
 *    or
33
 *
34
 *   IVER T.I. S.A
35
 *   Salamanca 50
36
 *   46005 Valencia
37
 *   Spain
38
 *
39
 *   +34 963163400
40
 *   dac@iver.es
41
 */
42
package es.gva.cit.catalog;
43
import com.iver.utiles.swing.jcomboServer.ServerData;
44
45
import es.gva.cit.catalog.drivers.AbstractCatalogServiceDriver;
46
import es.gva.cit.catalog.drivers.GetRecordsReply;
47
import es.gva.cit.catalog.drivers.ICatalogServiceDriver;
48
import es.gva.cit.catalog.querys.CatalogQuery;
49
50
/**
51
 * This class represents a catalogClient. It must be created to
52
 * use the catalog service
53
 * @author Jorge Piera Llodra (piera_jor@gva.es)
54
 */
55
public class CatalogClient extends DiscoveryServiceClient{
56
57
        /**
58
         * Constructor
59
         * @param sUri
60
         * The URI typed by the user
61
         * @param database
62
         * The selected database
63
         * @param driver
64
         * The selected catalog driver
65
         */
66
        public CatalogClient(String sUri, String database, ICatalogServiceDriver driver) {
67
                super(sUri,driver);
68
        }
69
70
        /**
71
         * @return Node array with the retrieved records
72
         * @param query It contains the values to do the query (title="XXX",abstract="YYY",...)
73
         * @param firstRecord Number of the first record to retrieve
74
         */
75
        public GetRecordsReply getRecords(CatalogQuery query, int firstRecord) {
76
                return ((ICatalogServiceDriver)getDriver()).getRecords(getUri(),query,firstRecord);
77
        }
78
79
        /**
80
         * This method is used to create a new Query
81
         * @return
82
         */
83
        public CatalogQuery createNewQuery() {
84
                return new CatalogQuery();
85
        }
86
87
        /**
88
         * @return the serverData
89
         */
90
        public ServerData getServerData() {
91
                return ((AbstractCatalogServiceDriver)getDriver()).getServerData();
92
        }
93
94
        /**
95
         * @param serverData the serverData to set
96
         */
97
        public void setServerData(ServerData serverData) {
98
                ((AbstractCatalogServiceDriver)getDriver()).setServerData(serverData);
99
        }
100
}