svn-gvsig-desktop / branches / v2_0_0_prep / applications / appCatalog / src / org / gvsig / catalog / CatalogClient.java @ 30754
History | View | Annotate | Download (2.82 KB)
1 | 15558 | 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 | 28329 | jpiera | package org.gvsig.catalog; |
43 | import org.gvsig.catalog.drivers.AbstractCatalogServiceDriver; |
||
44 | import org.gvsig.catalog.drivers.GetRecordsReply; |
||
45 | import org.gvsig.catalog.drivers.ICatalogServiceDriver; |
||
46 | import org.gvsig.catalog.querys.CatalogQuery; |
||
47 | 29594 | jpiera | import org.gvsig.utils.swing.jcomboServer.ServerData; |
48 | 28329 | jpiera | |
49 | 15558 | jpiera | |
50 | |||
51 | /**
|
||
52 | * This class represents a catalogClient. It must be created to
|
||
53 | * use the catalog service
|
||
54 | * @author Jorge Piera Llodra (piera_jor@gva.es)
|
||
55 | */
|
||
56 | public class CatalogClient extends DiscoveryServiceClient{ |
||
57 | |||
58 | /**
|
||
59 | * Constructor
|
||
60 | * @param sUri
|
||
61 | * The URI typed by the user
|
||
62 | * @param database
|
||
63 | * The selected database
|
||
64 | * @param driver
|
||
65 | * The selected catalog driver
|
||
66 | */
|
||
67 | public CatalogClient(String sUri, String database, ICatalogServiceDriver driver) { |
||
68 | super(sUri,driver);
|
||
69 | } |
||
70 | |||
71 | /**
|
||
72 | * @return Node array with the retrieved records
|
||
73 | * @param query It contains the values to do the query (title="XXX",abstract="YYY",...)
|
||
74 | * @param firstRecord Number of the first record to retrieve
|
||
75 | */
|
||
76 | public GetRecordsReply getRecords(CatalogQuery query, int firstRecord) { |
||
77 | return ((ICatalogServiceDriver)getDriver()).getRecords(getUri(),query,firstRecord);
|
||
78 | } |
||
79 | |||
80 | /**
|
||
81 | * This method is used to create a new Query
|
||
82 | * @return
|
||
83 | */
|
||
84 | public CatalogQuery createNewQuery() {
|
||
85 | return new CatalogQuery(); |
||
86 | } |
||
87 | |||
88 | /**
|
||
89 | * @return the serverData
|
||
90 | */
|
||
91 | public ServerData getServerData() {
|
||
92 | return ((AbstractCatalogServiceDriver)getDriver()).getServerData();
|
||
93 | } |
||
94 | |||
95 | /**
|
||
96 | * @param serverData the serverData to set
|
||
97 | */
|
||
98 | public void setServerData(ServerData serverData) { |
||
99 | ((AbstractCatalogServiceDriver)getDriver()).setServerData(serverData); |
||
100 | } |
||
101 | } |