root / trunk / applications / appCatalogAndGazetteerClient / src-test / es / gva / cit / gazetteer / drivers / ExampleNewDriver.java @ 15558
History | View | Annotate | Download (2.93 KB)
1 |
package es.gva.cit.gazetteer.drivers; |
---|---|
2 |
|
3 |
import java.awt.geom.Point2D; |
4 |
import java.net.URI; |
5 |
|
6 |
import es.gva.cit.catalog.drivers.DiscoveryServiceCapabilities; |
7 |
import es.gva.cit.catalog.exceptions.NotSupportedProtocolException; |
8 |
import es.gva.cit.catalog.ui.search.SearchAditionalPropertiesPanel; |
9 |
import es.gva.cit.gazetteer.querys.Feature; |
10 |
import es.gva.cit.gazetteer.querys.GazetteerQuery; |
11 |
|
12 |
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana
|
13 |
*
|
14 |
* Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
|
15 |
*
|
16 |
* This program is free software; you can redistribute it and/or
|
17 |
* modify it under the terms of the GNU General Public License
|
18 |
* as published by the Free Software Foundation; either version 2
|
19 |
* of the License, or (at your option) any later version.
|
20 |
*
|
21 |
* This program is distributed in the hope that it will be useful,
|
22 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
23 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
24 |
* GNU General Public License for more details.
|
25 |
*
|
26 |
* You should have received a copy of the GNU General Public License
|
27 |
* along with this program; if not, write to the Free Software
|
28 |
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,USA.
|
29 |
*
|
30 |
* For more information, contact:
|
31 |
*
|
32 |
* Generalitat Valenciana
|
33 |
* Conselleria d'Infraestructures i Transport
|
34 |
* Av. Blasco Ib??ez, 50
|
35 |
* 46010 VALENCIA
|
36 |
* SPAIN
|
37 |
*
|
38 |
* +34 963862235
|
39 |
* gvsig@gva.es
|
40 |
* www.gvsig.gva.es
|
41 |
*
|
42 |
* or
|
43 |
*
|
44 |
* IVER T.I. S.A
|
45 |
* Salamanca 50
|
46 |
* 46005 Valencia
|
47 |
* Spain
|
48 |
*
|
49 |
* +34 963163400
|
50 |
* dac@iver.es
|
51 |
*/
|
52 |
/* CVS MESSAGES:
|
53 |
*
|
54 |
* $Id: ExampleNewDriver.java 537 2007-07-26 11:21:10 +0000 (Thu, 26 Jul 2007) jpiera $
|
55 |
* $Log$
|
56 |
* Revision 1.1.2.1 2007/07/13 12:00:35 jorpiell
|
57 |
* Add the posibility to add a new panel
|
58 |
*
|
59 |
*
|
60 |
*/
|
61 |
/**
|
62 |
* @author Jorge Piera LLodr? (jorge.piera@iver.es)
|
63 |
*/
|
64 |
public class ExampleNewDriver extends AbstractGazetteerServiceDriver { |
65 |
|
66 |
/*
|
67 |
* (non-Javadoc)
|
68 |
* @see es.gva.cit.catalogClient.drivers.IDiscoveryServiceDriver#getCapabilities(java.net.URI)
|
69 |
*/
|
70 |
public DiscoveryServiceCapabilities getCapabilities(URI uri) { |
71 |
return new GazetteerCapabilities(); |
72 |
} |
73 |
|
74 |
/*
|
75 |
* (non-Javadoc)
|
76 |
* @see es.gva.cit.gazetteer.drivers.IGazetteerServiceDriver#getFeature(java.net.URI, es.gva.cit.gazetteer.querys.Query)
|
77 |
*/
|
78 |
public Feature[] getFeature(URI uri, GazetteerQuery query) throws Exception { |
79 |
String prop = (String)query.getProperty("PROP1"); |
80 |
Feature[] features = new Feature[1]; |
81 |
features[0] = new Feature("1","Result 1","description 1",new Point2D.Double(0,0)); |
82 |
return features;
|
83 |
} |
84 |
|
85 |
/*
|
86 |
* (non-Javadoc)
|
87 |
* @see es.gva.cit.gazetteer.drivers.IGazetteerServiceDriver#getServiceName()
|
88 |
*/
|
89 |
public String getServiceName() { |
90 |
return "My service"; |
91 |
} |
92 |
|
93 |
/*
|
94 |
* (non-Javadoc)
|
95 |
* @see es.gva.cit.gazetteer.drivers.IGazetteerServiceDriver#getAditionalSearchPanel()
|
96 |
*/
|
97 |
public SearchAditionalPropertiesPanel getAditionalSearchPanel(){
|
98 |
return new ExampleNewPanel(); |
99 |
} |
100 |
|
101 |
} |