Revision 33148
tags/v2_0_0_Build_2010/applications/appGazetteer/text.properties | ||
---|---|---|
1 |
catalog_search=B\u00fasqueda de Geodatos |
|
2 |
gazetteer_search=Localizar por Nomencl\u00e1tor |
|
3 |
gazetteer_connect=Localizar por Nomencl\u00e1tor |
|
4 |
metadata_catalog=B\u00fasqueda de Geodatos - Conexi\u00f3n |
|
5 |
metadata_tree=\u00c1rbol del Metadato |
|
6 |
search_results=Resultados de la b\u00fasqueda |
|
7 |
resourceTypeColumn=Tipo |
|
8 |
resourceLinkColumn=Enlace |
|
9 |
resourceShowColumn=Ver |
|
10 |
concordancia=Concordancia |
|
11 |
exactSentence=Frase Exacta |
|
12 |
anyWord=Cualquier Palabra |
|
13 |
allWords=Todas las Palabras |
|
14 |
cathegoryAny=cualquiera |
|
15 |
cathegoryBiota=biota |
|
16 |
cathegoryBoundaries=boundaries |
|
17 |
cathegoryClimatologyMeteorologyAtmosphere=climatologyMeteorologyAtmosphere |
|
18 |
cathegoryEconomy=economy |
|
19 |
cathegoryElevation=elevation |
|
20 |
cathegoryEnvironment=environment |
|
21 |
cathegoryFarming=farming |
|
22 |
cathegoryGeoscientificInformation=geoscientificInformation |
|
23 |
cathegoryHealth=health |
|
24 |
cathegoryImageryBaseMapsEarthCover=imageryBaseMapsEarthCover |
|
25 |
cathegoryInlandWaters=inlandWaters |
|
26 |
cathegoryIntelligenceMilitary=intelligenceMilitary |
|
27 |
cathegoryLocation=location |
|
28 |
cathegoryOceans=oceans |
|
29 |
cathegoryPlanningCadastre=planningCadastre |
|
30 |
cathegorySociety=society |
|
31 |
cathegoryStructure=structure |
|
32 |
cathegoryTransportation=transportation |
|
33 |
cathegoryUtilitiesCommunication=utilitiesCommunication |
|
34 |
scaleAny=qualquiera |
|
35 |
scaleI=>1.000.000 |
|
36 |
scaleII=1.000.000 - 250.000 |
|
37 |
scaleIII=250.000 - 50.000 |
|
38 |
scaleIV=50.000 - 10.000 |
|
39 |
scaleV=10.000 - 5000 |
|
40 |
scaleVI=<5.000 |
|
41 |
scale=Escala |
|
42 |
provider=Proveedor |
|
43 |
from=De: |
|
44 |
to=A: |
|
45 |
upperCoordinates=Superiores |
|
46 |
lowerCoordinates=Inferiores |
|
47 |
ULX=ULX: |
|
48 |
ULY=ULY: |
|
49 |
BRX=BRX: |
|
50 |
BRY=BRY: |
|
51 |
abstract=Resumen |
|
52 |
coordinates=Coordenadas |
|
53 |
coordinatesEqual=igual |
|
54 |
coordinatesContains=contiene |
|
55 |
coordinatesEnclose=incluye |
|
56 |
coordinatesFullyOutsideOf=est\u00e1 totalmente fuera de |
|
57 |
title=Titulo |
|
58 |
restrictArea=Restringir el area de B\u00fasqueda |
|
59 |
protocolsGroup=Protocolos |
|
60 |
serverReply=Respuesta del servidor |
|
61 |
serverURL=Introduzca la direcci\u00f3n donde se encuentra el servidor de cat\u00e1logo |
|
62 |
serverURLCat=Introduzca la direcci\u00f3n donde se encuentra el servidor de nomencl\u00e1tor |
|
63 |
database=Nombre de la base de datos |
|
64 |
connectButton=Conectar |
|
65 |
searchButton=Buscar |
|
66 |
results=Resultados |
|
67 |
of=de |
|
68 |
description=Descripcion |
|
69 |
layer=A\u00f1adir Capa |
|
70 |
next=Siquiente |
|
71 |
last=Anterior |
|
72 |
close=Cerrar |
|
73 |
value=Valor |
|
74 |
attributes=Atributos |
|
75 |
keyWords=Palabras Clave |
|
76 |
cathegory=Categor\u00eda |
|
77 |
lastUpdateDate=Fecha de \u00faltima actualizaci\u00f3n |
|
78 |
purpose=Prop\u00f3sito |
|
79 |
errorServerNotFound=No se encuentra el servidor |
|
80 |
errorNotSupportedProtocol=El servidor no soporta el protocolo especificado |
|
81 |
errorNotSupportedCapabilities=Error al hacer un GetCapabilities.Esto puede ser debido a dos razones: O bien ha habido un error al intentar hacer la operaci\u00f3n, o bien el servidor no soporta el protocolo especificado |
|
82 |
errorNotParsedReply=Error al procesar la respuesta. Se ha encontrado el servidor, pero posiblemente no soporta el protocolo especificado |
|
83 |
name=Nombre |
|
84 |
resutsByPage=Resultados por p\u00e1gina |
|
85 |
type=Tipo |
|
86 |
localize=Localizar |
|
87 |
page=P\u00e1gina |
|
88 |
errorNotThesaurusSelected=El protocolo WFS no permite hacer b\u00fasquedas si no se elige un elemento del tesauro |
|
89 |
chooseAttribute=Elige un atributo para hacer la b\u00fasqueda |
|
90 |
errorGetRecords=Se ha producido un error al hacer el getRecords |
|
91 |
anyResult=La b\u00fasqueda no ha producido ning\u00fan resultado |
|
92 |
rootName=Ra\u00edz |
|
93 |
wcsColumn=Cobertura |
|
94 |
wmsColumn=Mapa |
|
95 |
wfsColumn=Feature |
|
96 |
postgisColumn=Postgis |
|
97 |
linkColumn=P\u00e1gina Web |
|
98 |
downloadColumn=Descarga |
|
99 |
errorNotCSWSupportedProtocol=Se ha encontrado el servidor, pero parece ser que no soporta el protocolo CS-W |
|
100 |
errorIsASRWServer=Es un servidor SRW! |
|
101 |
errorServerException=El servidor ha devuelto una excepci\u00f3n |
|
102 |
errorSOAPProtocol=Error en el protocolo SOAP |
|
103 |
errorFENotSupported=De momento solo se pueden hacer querys usando la codificaci\u00f3n FILTER ENCODING que no est\u00e1 soportada por el servidor |
|
104 |
mantainold=Eliminar las busquedas anteriores |
|
105 |
goto=Hacer un zoom a la b\u00fasqueda |
|
106 |
paint=Dibujar el resultado |
|
107 |
aspect=Configuracion de aspecto |
|
108 |
unknown=Desconocido |
|
109 |
cancelSearchButton=Cancelar |
|
110 |
wmsError=Ha ocurrido un error al cargar el mapa |
|
111 |
loadWMS=Carga de WMS |
|
112 |
wfsError=Ha ocurrido un error al cargar la feature |
|
113 |
wfsLoad=Carga de WFS |
|
114 |
wcsError=Ha ocurrido un error al cargar la cobertura |
|
115 |
wcsLoad=Carga de WCS |
|
116 |
postgisError=Ha ocurrido un error al cargar la base de datos |
|
117 |
postgisLoad=Carga de Postgis |
|
118 |
linkError=Ha ocurrido un error al cargar el enlace |
|
119 |
linkLoad=carga de un recurso web |
|
120 |
link=Enlace |
|
121 |
server=Servidor |
|
122 |
layer=Capa |
|
123 |
parameters=Par\u00e1metros |
|
124 |
pluginNotFound=No tienes ninguna extensi\u00f3n para cargar recursos de este tipo |
|
125 |
pluginNotFoundTitle=Carga de capas |
|
126 |
inteligentSearch=B\u00fasqueda inteligente |
|
127 |
inteligentSearchAscii=Todas las formas de la palabra |
|
128 |
reproyectar_aviso=La proyecci\u00F3n de la capa no es igual que la de la vista.\nAVISO\: Puede ser inexacto con algunas transformaciones.\nPor favor, lea la documentaci\u00F3n. |
|
129 |
reproyectar_pregunta=\u00BFDesea reproyectar? |
|
130 |
elementName=ElementName |
|
131 |
propertiesNameWindow=Ventana de propiedades |
tags/v2_0_0_Build_2010/applications/appGazetteer/src-test/org/gvsig/gazetteer/drivers/ExampleNewDriver.java | ||
---|---|---|
1 |
package org.gvsig.gazetteer.drivers; |
|
2 |
|
|
3 |
import java.awt.geom.Point2D; |
|
4 |
import java.net.URI; |
|
5 |
|
|
6 |
import org.gvsig.catalog.drivers.DiscoveryServiceCapabilities; |
|
7 |
import org.gvsig.catalog.ui.search.SearchAditionalPropertiesPanel; |
|
8 |
import org.gvsig.gazetteer.querys.Feature; |
|
9 |
import org.gvsig.gazetteer.querys.GazetteerQuery; |
|
10 |
|
|
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 |
} |
|
0 | 102 |
tags/v2_0_0_Build_2010/applications/appGazetteer/src-test/org/gvsig/gazetteer/drivers/ExampleNewDriverTest.java | ||
---|---|---|
1 |
package org.gvsig.gazetteer.drivers; |
|
2 |
|
|
3 |
import javax.swing.UIManager; |
|
4 |
import javax.swing.UnsupportedLookAndFeelException; |
|
5 |
|
|
6 |
import org.gvsig.gazetteer.GazetteerLocator; |
|
7 |
import org.gvsig.gazetteer.ui.serverconnect.ServerConnectDialog; |
|
8 |
import org.gvsig.tools.library.impl.DefaultLibrariesInitializer; |
|
9 |
|
|
10 |
|
|
11 |
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana |
|
12 |
* |
|
13 |
* Copyright (C) 2004 IVER T.I. and Generalitat Valenciana. |
|
14 |
* |
|
15 |
* This program is free software; you can redistribute it and/or |
|
16 |
* modify it under the terms of the GNU General Public License |
|
17 |
* as published by the Free Software Foundation; either version 2 |
|
18 |
* of the License, or (at your option) any later version. |
|
19 |
* |
|
20 |
* This program is distributed in the hope that it will be useful, |
|
21 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
22 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
23 |
* GNU General Public License for more details. |
|
24 |
* |
|
25 |
* You should have received a copy of the GNU General Public License |
|
26 |
* along with this program; if not, write to the Free Software |
|
27 |
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,USA. |
|
28 |
* |
|
29 |
* For more information, contact: |
|
30 |
* |
|
31 |
* Generalitat Valenciana |
|
32 |
* Conselleria d'Infraestructures i Transport |
|
33 |
* Av. Blasco Ib??ez, 50 |
|
34 |
* 46010 VALENCIA |
|
35 |
* SPAIN |
|
36 |
* |
|
37 |
* +34 963862235 |
|
38 |
* gvsig@gva.es |
|
39 |
* www.gvsig.gva.es |
|
40 |
* |
|
41 |
* or |
|
42 |
* |
|
43 |
* IVER T.I. S.A |
|
44 |
* Salamanca 50 |
|
45 |
* 46005 Valencia |
|
46 |
* Spain |
|
47 |
* |
|
48 |
* +34 963163400 |
|
49 |
* dac@iver.es |
|
50 |
*/ |
|
51 |
/* CVS MESSAGES: |
|
52 |
* |
|
53 |
* $Id: ExampleNewDriverTest.java 512 2007-07-24 11:25:43 +0000 (Tue, 24 Jul 2007) jorpiell $ |
|
54 |
* $Log$ |
|
55 |
* Revision 1.1.2.2 2007/07/24 11:25:42 jorpiell |
|
56 |
* The registers has been refactorized |
|
57 |
* |
|
58 |
* Revision 1.1.2.1 2007/07/13 12:00:35 jorpiell |
|
59 |
* Add the posibility to add a new panel |
|
60 |
* |
|
61 |
* |
|
62 |
*/ |
|
63 |
/** |
|
64 |
* @author Jorge Piera LLodr? (jorge.piera@iver.es) |
|
65 |
*/ |
|
66 |
public class ExampleNewDriverTest { |
|
67 |
|
|
68 |
/** |
|
69 |
* @param args |
|
70 |
*/ |
|
71 |
public static void main(String[] args) { |
|
72 |
new DefaultLibrariesInitializer().fullInitialize(); |
|
73 |
|
|
74 |
GazetteerLocator.getGazetteerManager().register("example", ExampleNewDriver.class); |
|
75 |
//Get the currently installed look and feel |
|
76 |
UIManager.getLookAndFeel(); |
|
77 |
// Install a different look and feel; specifically, the Windows look and feel |
|
78 |
try { |
|
79 |
UIManager.setLookAndFeel( |
|
80 |
"com.sun.java.swing.plaf.windows.WindowsLookAndFeel"); |
|
81 |
} catch (InstantiationException e) { |
|
82 |
} catch (ClassNotFoundException e) { |
|
83 |
} catch (UnsupportedLookAndFeelException e) { |
|
84 |
} catch (IllegalAccessException e) { |
|
85 |
} |
|
86 |
|
|
87 |
new ServerConnectDialog(); |
|
88 |
} |
|
89 |
|
|
90 |
} |
|
0 | 91 |
tags/v2_0_0_Build_2010/applications/appGazetteer/src-test/org/gvsig/gazetteer/drivers/ExampleNewPanel.java | ||
---|---|---|
1 |
package org.gvsig.gazetteer.drivers; |
|
2 |
|
|
3 |
import java.util.Properties; |
|
4 |
|
|
5 |
import javax.swing.JLabel; |
|
6 |
import javax.swing.JTextField; |
|
7 |
|
|
8 |
import org.gvsig.catalog.ui.search.SearchAditionalPropertiesPanel; |
|
9 |
|
|
10 |
|
|
11 |
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana |
|
12 |
* |
|
13 |
* Copyright (C) 2004 IVER T.I. and Generalitat Valenciana. |
|
14 |
* |
|
15 |
* This program is free software; you can redistribute it and/or |
|
16 |
* modify it under the terms of the GNU General Public License |
|
17 |
* as published by the Free Software Foundation; either version 2 |
|
18 |
* of the License, or (at your option) any later version. |
|
19 |
* |
|
20 |
* This program is distributed in the hope that it will be useful, |
|
21 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
22 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
23 |
* GNU General Public License for more details. |
|
24 |
* |
|
25 |
* You should have received a copy of the GNU General Public License |
|
26 |
* along with this program; if not, write to the Free Software |
|
27 |
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,USA. |
|
28 |
* |
|
29 |
* For more information, contact: |
|
30 |
* |
|
31 |
* Generalitat Valenciana |
|
32 |
* Conselleria d'Infraestructures i Transport |
|
33 |
* Av. Blasco Ib??ez, 50 |
|
34 |
* 46010 VALENCIA |
|
35 |
* SPAIN |
|
36 |
* |
|
37 |
* +34 963862235 |
|
38 |
* gvsig@gva.es |
|
39 |
* www.gvsig.gva.es |
|
40 |
* |
|
41 |
* or |
|
42 |
* |
|
43 |
* IVER T.I. S.A |
|
44 |
* Salamanca 50 |
|
45 |
* 46005 Valencia |
|
46 |
* Spain |
|
47 |
* |
|
48 |
* +34 963163400 |
|
49 |
* dac@iver.es |
|
50 |
*/ |
|
51 |
/* CVS MESSAGES: |
|
52 |
* |
|
53 |
* $Id: ExampleNewPanel.java 537 2007-07-26 11:21:10 +0000 (Thu, 26 Jul 2007) jpiera $ |
|
54 |
* $Log$ |
|
55 |
* Revision 1.1.2.1 2007/07/13 12:00:35 jorpiell |
|
56 |
* Add the posibility to add a new panel |
|
57 |
* |
|
58 |
* |
|
59 |
*/ |
|
60 |
/** |
|
61 |
* @author Jorge Piera LLodr? (jorge.piera@iver.es) |
|
62 |
*/ |
|
63 |
public class ExampleNewPanel extends SearchAditionalPropertiesPanel{ |
|
64 |
JLabel label = null; |
|
65 |
JTextField text = null; |
|
66 |
|
|
67 |
public ExampleNewPanel(){ |
|
68 |
label = new JLabel(); |
|
69 |
text = new JTextField(); |
|
70 |
setLayout(new java.awt.BorderLayout()); |
|
71 |
label.setText("Label"); |
|
72 |
add(label, java.awt.BorderLayout.WEST); |
|
73 |
add(text, java.awt.BorderLayout.CENTER); |
|
74 |
} |
|
75 |
|
|
76 |
/* |
|
77 |
* (non-Javadoc) |
|
78 |
* @see es.gva.cit.gazetteer.ui.search.SearchAditionalPropertiesPanel#getProperties() |
|
79 |
*/ |
|
80 |
public Properties getProperties() { |
|
81 |
Properties properties = new Properties(); |
|
82 |
properties.put("PROP1", text.getText()); |
|
83 |
return properties; |
|
84 |
} |
|
85 |
|
|
86 |
} |
|
0 | 87 |
tags/v2_0_0_Build_2010/applications/appGazetteer/src-test/org/gvsig/gazetteer/URIs.java | ||
---|---|---|
1 |
package org.gvsig.gazetteer; |
|
2 |
|
|
3 |
import java.net.URISyntaxException; |
|
4 |
|
|
5 |
|
|
6 |
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana |
|
7 |
* |
|
8 |
* Copyright (C) 2004 IVER T.I. and Generalitat Valenciana. |
|
9 |
* |
|
10 |
* This program is free software; you can redistribute it and/or |
|
11 |
* modify it under the terms of the GNU General Public License |
|
12 |
* as published by the Free Software Foundation; either version 2 |
|
13 |
* of the License, or (at your option) any later version. |
|
14 |
* |
|
15 |
* This program is distributed in the hope that it will be useful, |
|
16 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
17 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
18 |
* GNU General Public License for more details. |
|
19 |
* |
|
20 |
* You should have received a copy of the GNU General Public License |
|
21 |
* along with this program; if not, write to the Free Software |
|
22 |
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,USA. |
|
23 |
* |
|
24 |
* For more information, contact: |
|
25 |
* |
|
26 |
* Generalitat Valenciana |
|
27 |
* Conselleria d'Infraestructures i Transport |
|
28 |
* Av. Blasco Ib??ez, 50 |
|
29 |
* 46010 VALENCIA |
|
30 |
* SPAIN |
|
31 |
* |
|
32 |
* +34 963862235 |
|
33 |
* gvsig@gva.es |
|
34 |
* www.gvsig.gva.es |
|
35 |
* |
|
36 |
* or |
|
37 |
* |
|
38 |
* IVER T.I. S.A |
|
39 |
* Salamanca 50 |
|
40 |
* 46005 Valencia |
|
41 |
* Spain |
|
42 |
* |
|
43 |
* +34 963163400 |
|
44 |
* dac@iver.es |
|
45 |
*/ |
|
46 |
/* CVS MESSAGES: |
|
47 |
* |
|
48 |
* $Id: URIs.java 499 2007-07-10 11:18:10 +0000 (Tue, 10 Jul 2007) jorpiell $ |
|
49 |
* $Log$ |
|
50 |
* Revision 1.1.2.1 2007/07/10 11:18:03 jorpiell |
|
51 |
* Added the registers |
|
52 |
* |
|
53 |
* |
|
54 |
*/ |
|
55 |
/** |
|
56 |
* @author Jorge Piera LLodr? (jorge.piera@iver.es) |
|
57 |
*/ |
|
58 |
public class URIs { |
|
59 |
|
|
60 |
/** |
|
61 |
* @param args |
|
62 |
* @throws URISyntaxException |
|
63 |
*/ |
|
64 |
public static void main(String[] args) throws URISyntaxException { |
|
65 |
java.net.URI uri = new java.net.URI("www.upv.es"); |
|
66 |
System.out.println(uri.getHost()); |
|
67 |
System.out.println(uri.getPort()); |
|
68 |
System.out.println(uri.getScheme()); |
|
69 |
java.net.URI uri1 = new java.net.URI("z3950://www.upv.es"); |
|
70 |
System.out.println(uri1.getHost()); |
|
71 |
System.out.println(uri1.getPort()); |
|
72 |
System.out.println(uri1.getScheme()); |
|
73 |
} |
|
74 |
|
|
75 |
} |
|
0 | 76 |
tags/v2_0_0_Build_2010/applications/appGazetteer/build.number | ||
---|---|---|
1 |
#Build Number for ANT. Do not edit! |
|
2 |
#Fri Apr 24 13:12:16 CEST 2009 |
|
3 |
build.number=1231 |
|
0 | 4 |
tags/v2_0_0_Build_2010/applications/appGazetteer/src/org/gvsig/gazetteer/idec/drivers/IDECGazetteerServiceDriver.java | ||
---|---|---|
1 |
|
|
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 org.gvsig.gazetteer.idec.drivers; |
|
43 |
import java.net.MalformedURLException; |
|
44 |
import java.net.URI; |
|
45 |
import java.net.URL; |
|
46 |
import java.util.Collection; |
|
47 |
|
|
48 |
import org.apache.commons.httpclient.NameValuePair; |
|
49 |
import org.gvsig.catalog.drivers.DiscoveryServiceCapabilities; |
|
50 |
import org.gvsig.catalog.metadataxml.XMLNode; |
|
51 |
import org.gvsig.catalog.protocols.HTTPGetProtocol; |
|
52 |
import org.gvsig.catalog.protocols.HTTPPostProtocol; |
|
53 |
import org.gvsig.catalog.utils.Strings; |
|
54 |
import org.gvsig.gazetteer.drivers.AbstractGazetteerServiceDriver; |
|
55 |
import org.gvsig.gazetteer.idec.parsers.IdecCapabilitiesParser; |
|
56 |
import org.gvsig.gazetteer.idec.parsers.IdecFeatureParser; |
|
57 |
import org.gvsig.gazetteer.querys.Feature; |
|
58 |
import org.gvsig.gazetteer.querys.GazetteerQuery; |
|
59 |
import org.gvsig.utils.swing.jcomboServer.ServerData; |
|
60 |
|
|
61 |
|
|
62 |
|
|
63 |
/** |
|
64 |
* This class connects with the IDEC gazetteer service |
|
65 |
* |
|
66 |
* |
|
67 |
* @author Jorge Piera Llodra (piera_jor@gva.es) |
|
68 |
*/ |
|
69 |
public class IDECGazetteerServiceDriver extends AbstractGazetteerServiceDriver { |
|
70 |
|
|
71 |
/* |
|
72 |
* (non-Javadoc) |
|
73 |
* @see es.gva.cit.catalogClient.drivers.IDiscoveryServiceDriver#getCapabilities(java.net.URI) |
|
74 |
*/ |
|
75 |
public DiscoveryServiceCapabilities getCapabilities(URI uri) { |
|
76 |
Collection nodes = new java.util.ArrayList(); |
|
77 |
URL url = null; |
|
78 |
try { |
|
79 |
url = uri.toURL(); |
|
80 |
} catch (MalformedURLException e) { |
|
81 |
setServerAnswerReady("errorServerNotFound"); |
|
82 |
return null; |
|
83 |
} |
|
84 |
nodes = new HTTPGetProtocol().doQuery(url, getMessageCapabilities(), 0); |
|
85 |
IdecCapabilitiesParser parser = new IdecCapabilitiesParser(this); |
|
86 |
parser.parse(nodes); |
|
87 |
return parser.getCapabilities(); |
|
88 |
} |
|
89 |
|
|
90 |
/** |
|
91 |
* It creates the name-value pairs for the getCapabilities request |
|
92 |
* @return Name-Value pair array |
|
93 |
*/ |
|
94 |
private NameValuePair[] getMessageCapabilities() { |
|
95 |
NameValuePair nvp1 = new NameValuePair("wsdl", ""); |
|
96 |
return new NameValuePair[] { nvp1 }; |
|
97 |
} |
|
98 |
|
|
99 |
/* |
|
100 |
* (non-Javadoc) |
|
101 |
* @see es.gva.cit.gazetteer.drivers.IGazetteerServiceDriver#getFeature(java.net.URI, es.gva.cit.gazetteer.querys.Query) |
|
102 |
*/ |
|
103 |
public Feature[] getFeature(URI uri, GazetteerQuery query) { |
|
104 |
Collection nodes = new java.util.ArrayList(); |
|
105 |
URL url = null; |
|
106 |
try { |
|
107 |
url = uri.toURL(); |
|
108 |
} catch (MalformedURLException e) { |
|
109 |
setServerAnswerReady("errorServerNotFound"); |
|
110 |
return null; |
|
111 |
} |
|
112 |
setQuery(query); |
|
113 |
System.out.println(getPOSTGetFeature(query)); |
|
114 |
nodes = new HTTPPostProtocol().doQuery(url,getPOSTGetFeature(query),0); |
|
115 |
if ((nodes != null) && (nodes.size() == 1)){ |
|
116 |
return IdecFeatureParser.parse((XMLNode)nodes.toArray()[0]); |
|
117 |
}else{ |
|
118 |
return null; |
|
119 |
} |
|
120 |
} |
|
121 |
|
|
122 |
/** |
|
123 |
* It creates the XML for the getFeature request |
|
124 |
* @return Name-value pair with a XML request |
|
125 |
* @param query |
|
126 |
*/ |
|
127 |
private String getPOSTGetFeature(GazetteerQuery query) { |
|
128 |
String name = query.getName(); |
|
129 |
if (query.getOptions().getSearch().isWithAccents()){ |
|
130 |
name = Strings.removeAccents(name); |
|
131 |
} |
|
132 |
return "<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>" + |
|
133 |
"<SOAP-ENV:Envelope SOAP-ENV:encodingStyle=\"http://schemas.xmlsoap.org/soap/encoding/\" xmlns:SOAP-ENV=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:SOAP-ENC=\"http://schemas.xmlsoap.org/soap/encoding/\" xmlns:si=\"http://soapinterop.org/xsd\" xmlns:tns=\"urn:idecwsdl\">" + |
|
134 |
"<SOAP-ENV:Body><tns:getCoordenadesUTM xmlns:tns=\"urn:idecwsdl\">" + |
|
135 |
"<key xsi:type=\"xsd:string\">CV81HP6</key>" + |
|
136 |
"<toponim xsi:type=\"xsd:string\">" + name + "</toponim>" + |
|
137 |
"</tns:getCoordenadesUTM>" + |
|
138 |
"</SOAP-ENV:Body>" + |
|
139 |
"</SOAP-ENV:Envelope>"; |
|
140 |
} |
|
141 |
|
|
142 |
/* |
|
143 |
* (non-Javadoc) |
|
144 |
* @see es.gva.cit.gazetteer.drivers.IGazetteerServiceDriver#isProtocolSupported(java.net.URI) |
|
145 |
*/ |
|
146 |
public boolean isProtocolSupported(URI uri) { |
|
147 |
// TODO Auto-generated method stub |
|
148 |
return true; |
|
149 |
} |
|
150 |
|
|
151 |
/* |
|
152 |
* (non-Javadoc) |
|
153 |
* @see es.gva.cit.gazetteer.drivers.IGazetteerServiceDriver#getDefaultPort() |
|
154 |
*/ |
|
155 |
public int getDefaultPort() { |
|
156 |
return 80; |
|
157 |
} |
|
158 |
|
|
159 |
/* |
|
160 |
* (non-Javadoc) |
|
161 |
* @see es.gva.cit.gazetteer.drivers.IGazetteerServiceDriver#getDefaultSchema() |
|
162 |
*/ |
|
163 |
public String getDefaultSchema() { |
|
164 |
return "http"; |
|
165 |
} |
|
166 |
|
|
167 |
/* |
|
168 |
* (non-Javadoc) |
|
169 |
* @see es.gva.cit.gazetteer.drivers.IGazetteerServiceDriver#getServiceName() |
|
170 |
*/ |
|
171 |
public String getServiceName() { |
|
172 |
return ServerData.SERVER_SUBTYPE_GAZETTEER_IDEC; |
|
173 |
} |
|
174 |
} |
|
0 | 175 |
tags/v2_0_0_Build_2010/applications/appGazetteer/src/org/gvsig/gazetteer/idec/parsers/IdecCapabilitiesParser.java | ||
---|---|---|
1 |
|
|
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 org.gvsig.gazetteer.idec.parsers; |
|
43 |
import org.gvsig.catalog.metadataxml.XMLNode; |
|
44 |
import org.gvsig.catalog.metadataxml.XMLTree; |
|
45 |
import org.gvsig.gazetteer.drivers.GazetteerCapabilitiesParser; |
|
46 |
import org.gvsig.gazetteer.drivers.IGazetteerServiceDriver; |
|
47 |
import org.gvsig.i18n.Messages; |
|
48 |
|
|
49 |
|
|
50 |
/** |
|
51 |
* @author Jorge Piera Llodra (piera_jor@gva.es) |
|
52 |
*/ |
|
53 |
public class IdecCapabilitiesParser extends GazetteerCapabilitiesParser{ |
|
54 |
|
|
55 |
public IdecCapabilitiesParser(IGazetteerServiceDriver driver) { |
|
56 |
super(driver); |
|
57 |
} |
|
58 |
|
|
59 |
/* |
|
60 |
* (non-Javadoc) |
|
61 |
* @see es.gva.cit.gazetteer.drivers.GazeteerCapabilitiesParser#parseCapabilities(es.gva.cit.catalog.metadataxml.XMLNode) |
|
62 |
*/ |
|
63 |
protected void parseCapabilities(XMLNode node) { |
|
64 |
String prefix = ""; |
|
65 |
if (node.getName().equals("wsdl:definitions")){ |
|
66 |
prefix = "wsdl:"; |
|
67 |
} |
|
68 |
|
|
69 |
if (!(node.getName().equals(prefix + "definitions"))){ |
|
70 |
capabilities.setServerMessage(Messages.getText("errorNotSupportedProtocol")); |
|
71 |
capabilities.setAvailable(false); |
|
72 |
return; |
|
73 |
} |
|
74 |
|
|
75 |
XMLNode[] nodes = XMLTree.searchMultipleNode(node,prefix + "message"); |
|
76 |
|
|
77 |
if (nodes.length == 0){ |
|
78 |
capabilities.setServerMessage(Messages.getText("El servidor no timplementa ninguna " + |
|
79 |
"operaci?n")); |
|
80 |
capabilities.setAvailable(false); |
|
81 |
return; |
|
82 |
} |
|
83 |
|
|
84 |
String msg = "El servidor soporta las operaciones: "; |
|
85 |
|
|
86 |
msg = msg + XMLTree.searchAtribute(nodes[0],"name"); |
|
87 |
|
|
88 |
for (int i=1 ; i<nodes.length ; i++){ |
|
89 |
msg = msg + ", " + XMLTree.searchAtribute(nodes[i],"name"); |
|
90 |
} |
|
91 |
|
|
92 |
driver.setServerAnswerReady(msg); |
|
93 |
|
|
94 |
driver.setProjection("EPSG:23031"); |
|
95 |
} |
|
96 |
} |
|
0 | 97 |
tags/v2_0_0_Build_2010/applications/appGazetteer/src/org/gvsig/gazetteer/idec/parsers/IdecFeatureParser.java | ||
---|---|---|
1 |
|
|
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 org.gvsig.gazetteer.idec.parsers; |
|
43 |
import java.awt.geom.Point2D; |
|
44 |
|
|
45 |
import org.gvsig.catalog.metadataxml.XMLNode; |
|
46 |
import org.gvsig.catalog.metadataxml.XMLTree; |
|
47 |
import org.gvsig.gazetteer.querys.Feature; |
|
48 |
|
|
49 |
|
|
50 |
/** |
|
51 |
* |
|
52 |
* |
|
53 |
* |
|
54 |
* @author Jorge Piera Llodra (piera_jor@gva.es) |
|
55 |
*/ |
|
56 |
public class IdecFeatureParser { |
|
57 |
|
|
58 |
/** |
|
59 |
* @return |
|
60 |
* @param node |
|
61 |
*/ |
|
62 |
public static Feature[] parse(XMLNode node) { |
|
63 |
|
|
64 |
XMLNode[] nodeFeatures = XMLTree.searchMultipleNode(node,"SOAP-ENV:Body->ns1:getCoordenadesUTMResponse->return->item"); |
|
65 |
Feature[] features = new Feature[nodeFeatures.length]; |
|
66 |
|
|
67 |
//New Version |
|
68 |
if (features.length == 0){ |
|
69 |
nodeFeatures = XMLTree.searchMultipleNode(node,"soapenv:Body->multiRef"); |
|
70 |
features = new Feature[nodeFeatures.length]; |
|
71 |
} |
|
72 |
|
|
73 |
for (int i=0 ; i<nodeFeatures.length ; i++){ |
|
74 |
String id = XMLTree.searchNodeValue(nodeFeatures[i],"NOM"); |
|
75 |
String name = id; |
|
76 |
String description = id; |
|
77 |
Point2D.Double point = new Point2D.Double(Double.parseDouble(XMLTree.searchNodeValue(nodeFeatures[i],"X")), |
|
78 |
Double.parseDouble(XMLTree.searchNodeValue(nodeFeatures[i],"Y"))); |
|
79 |
features[i] = new Feature(id,name,description,point); |
|
80 |
} |
|
81 |
|
|
82 |
|
|
83 |
return features; |
|
84 |
} |
|
85 |
} |
|
0 | 86 |
tags/v2_0_0_Build_2010/applications/appGazetteer/src/org/gvsig/gazetteer/GazetteerManager.java | ||
---|---|---|
1 |
/* gvSIG. Geographic Information System of the Valencian Government |
|
2 |
* |
|
3 |
* Copyright (C) 2007-2008 Infrastructures and Transports Department |
|
4 |
* of the Valencian Government (CIT) |
|
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., 51 Franklin Street, Fifth Floor, Boston, |
|
19 |
* MA 02110-1301, USA. |
|
20 |
* |
|
21 |
*/ |
|
22 |
|
|
23 |
/* |
|
24 |
* AUTHORS (In addition to CIT): |
|
25 |
* 2009 {Iver T.I.} {Task} |
|
26 |
*/ |
|
27 |
|
|
28 |
package org.gvsig.gazetteer; |
|
29 |
|
|
30 |
import org.gvsig.gazetteer.drivers.IGazetteerServiceDriver; |
|
31 |
|
|
32 |
/** |
|
33 |
* @author <a href="mailto:jpiera@gvsig.org">Jorge Piera</a> |
|
34 |
*/ |
|
35 |
public interface GazetteerManager { |
|
36 |
|
|
37 |
/** |
|
38 |
* It is used to retrieve a driver that supports a concrete |
|
39 |
* protocol |
|
40 |
* @param protocol |
|
41 |
* Gazetteer protocol |
|
42 |
* @return |
|
43 |
* The concrete gazatteer service driver |
|
44 |
*/ |
|
45 |
public IGazetteerServiceDriver getDriver(String protocol); |
|
46 |
|
|
47 |
/** |
|
48 |
* @return a list with all the gazetteer drivers |
|
49 |
*/ |
|
50 |
public IGazetteerServiceDriver[] getDrivers(); |
|
51 |
|
|
52 |
/** |
|
53 |
* This method is used to register a new gazetter driver |
|
54 |
* that manage a concrete protocol |
|
55 |
* @param driver |
|
56 |
* Gazetteer driver to register |
|
57 |
*/ |
|
58 |
public void register(String name, Class driver); |
|
59 |
} |
|
60 |
|
|
0 | 61 |
tags/v2_0_0_Build_2010/applications/appGazetteer/src/org/gvsig/gazetteer/wfsg/filters/WFSGFilter.java | ||
---|---|---|
1 |
|
|
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 org.gvsig.gazetteer.wfsg.filters; |
|
43 |
import java.util.Vector; |
|
44 |
|
|
45 |
import org.gvsig.catalog.languages.FilterEncoding; |
|
46 |
import org.gvsig.catalog.utils.Strings; |
|
47 |
import org.gvsig.gazetteer.filters.AbstractFilter; |
|
48 |
import org.gvsig.gazetteer.querys.GazetteerQuery; |
|
49 |
import org.gvsig.i18n.Messages; |
|
50 |
|
|
51 |
|
|
52 |
/** |
|
53 |
* |
|
54 |
* |
|
55 |
* |
|
56 |
* @author Jorge Piera Llodra (piera_jor@gva.es) |
|
57 |
*/ |
|
58 |
public class WFSGFilter extends AbstractFilter { |
|
59 |
|
|
60 |
public WFSGFilter() { |
|
61 |
super(); |
|
62 |
} |
|
63 |
|
|
64 |
|
|
65 |
/** |
|
66 |
* @return |
|
67 |
* @param query |
|
68 |
*/ |
|
69 |
public String getQuery(GazetteerQuery query) { |
|
70 |
String pregunta = null; |
|
71 |
FilterEncoding filter = new FilterEncoding(); |
|
72 |
filter.setEscapeCharLabel("escape"); |
|
73 |
|
|
74 |
if (query.getName() != null) { |
|
75 |
if (query.getOptions().getSearch().isWithAccents()){ |
|
76 |
Vector v = Strings.allWordForms(query.getName(),true); |
|
77 |
for (int i=0 ; i<v.size() ; i++){ |
|
78 |
String str = (String)v.get(i); |
|
79 |
filter.addClauses( query.getFieldAttribute(), formatName(str,query.getNameFilter()), query.getNameFilter(), |
|
80 |
FilterEncoding.PROPERTY_IS_LIKE, |
|
81 |
FilterEncoding.TYPE_LITERAL, |
|
82 |
FilterEncoding.OR); |
|
83 |
} |
|
84 |
}else{ |
|
85 |
filter.addClauses( query.getFieldAttribute(), formatName(query.getName(),query.getNameFilter()), query.getNameFilter(), |
|
86 |
FilterEncoding.PROPERTY_IS_LIKE, |
|
87 |
FilterEncoding.TYPE_LITERAL, |
|
88 |
FilterEncoding.AND); |
|
89 |
} |
|
90 |
|
|
91 |
|
|
92 |
} |
|
93 |
|
|
94 |
/* |
|
95 |
if (this.getFeature() != null) { |
|
96 |
query.addClauses(equiv.getAbstract(), "*" + getAbstract() + "*", |
|
97 |
"Y", "PropertyIsLike", "L"); |
|
98 |
} |
|
99 |
*/ |
|
100 |
|
|
101 |
if ((query.getCoordinates() != null) && (query.isCoordinatesClicked())){ |
|
102 |
filter.addBoundingBox(query.getCoordinates(), "position" , getCoordinatesOption(query.getCoordinatesFilter())); |
|
103 |
} |
|
104 |
|
|
105 |
pregunta = filter.toString(); |
|
106 |
return pregunta; |
|
107 |
} |
|
108 |
|
|
109 |
/** |
|
110 |
* This function returns true only when the user has choosen the |
|
111 |
* "Fully Outside Of" of the coordinates option. |
|
112 |
* |
|
113 |
* |
|
114 |
* @return |
|
115 |
* @param translator |
|
116 |
* @param coordinatesOption |
|
117 |
*/ |
|
118 |
public boolean getCoordinatesOption(String coordinatesOption) { |
|
119 |
if (coordinatesOption.equals(Messages.getText("coordinatesContains"))) |
|
120 |
return false; |
|
121 |
|
|
122 |
return true; |
|
123 |
} |
|
124 |
} |
|
0 | 125 |
tags/v2_0_0_Build_2010/applications/appGazetteer/src/org/gvsig/gazetteer/wfsg/drivers/WFSGServiceDriver.java | ||
---|---|---|
1 |
package org.gvsig.gazetteer.wfsg.drivers; |
|
2 |
|
|
3 |
import java.net.MalformedURLException; |
|
4 |
import java.net.URI; |
|
5 |
import java.net.URL; |
|
6 |
import java.util.Collection; |
|
7 |
|
|
8 |
import org.gvsig.catalog.drivers.DiscoveryServiceCapabilities; |
|
9 |
import org.gvsig.catalog.metadataxml.XMLNode; |
|
10 |
import org.gvsig.catalog.protocols.HTTPPostProtocol; |
|
11 |
import org.gvsig.gazetteer.querys.Feature; |
|
12 |
import org.gvsig.gazetteer.querys.GazetteerQuery; |
|
13 |
import org.gvsig.gazetteer.wfs.drivers.WFSServiceDriver; |
|
14 |
import org.gvsig.gazetteer.wfsg.parsers.WfsgCapabilitiesParser; |
|
15 |
import org.gvsig.gazetteer.wfsg.parsers.WfsgFeatureParser; |
|
16 |
import org.gvsig.utils.swing.jcomboServer.ServerData; |
|
17 |
|
|
18 |
|
|
19 |
|
|
20 |
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana |
|
21 |
* |
|
22 |
* Copyright (C) 2004 IVER T.I. and Generalitat Valenciana. |
|
23 |
* |
|
24 |
* This program is free software; you can redistribute it and/or |
|
25 |
* modify it under the terms of the GNU General Public License |
|
26 |
* as published by the Free Software Foundation; either version 2 |
|
27 |
* of the License, or (at your option) any later version. |
|
28 |
* |
|
29 |
* This program is distributed in the hope that it will be useful, |
|
30 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
31 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
32 |
* GNU General Public License for more details. |
|
33 |
* |
|
34 |
* You should have received a copy of the GNU General Public License |
|
35 |
* along with this program; if not, write to the Free Software |
|
36 |
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,USA. |
|
37 |
* |
|
38 |
* For more information, contact: |
|
39 |
* |
|
40 |
* Generalitat Valenciana |
|
41 |
* Conselleria d'Infraestructures i Transport |
|
42 |
* Av. Blasco Ib??ez, 50 |
|
43 |
* 46010 VALENCIA |
|
44 |
* SPAIN |
|
45 |
* |
|
46 |
* +34 963862235 |
|
47 |
* gvsig@gva.es |
|
48 |
* www.gvsig.gva.es |
|
49 |
* |
|
50 |
* or |
|
51 |
* |
|
52 |
* IVER T.I. S.A |
|
53 |
* Salamanca 50 |
|
54 |
* 46005 Valencia |
|
55 |
* Spain |
|
56 |
* |
|
57 |
* +34 963163400 |
|
58 |
* dac@iver.es |
|
59 |
*/ |
|
60 |
/* CVS MESSAGES: |
|
61 |
* |
|
62 |
* $Id: WFSGServiceDriver.java 539 2007-07-26 11:21:38 +0000 (Thu, 26 Jul 2007) jpiera $ |
|
63 |
* $Log$ |
|
64 |
* Revision 1.1.2.2 2007/07/13 12:00:35 jorpiell |
|
65 |
* Add the posibility to add a new panel |
|
66 |
* |
|
67 |
* Revision 1.1.2.1 2007/07/10 11:18:04 jorpiell |
|
68 |
* Added the registers |
|
69 |
* |
|
70 |
* |
|
71 |
*/ |
|
72 |
/** |
|
73 |
* @author Jorge Piera LLodr? (jorge.piera@iver.es) |
|
74 |
*/ |
|
75 |
public class WFSGServiceDriver extends WFSServiceDriver { |
|
76 |
//TODO use the download manager instead of this |
|
77 |
private static final String tempDirectoryPath = System.getProperty("java.io.tmpdir")+"/tmp-andami"; |
|
78 |
|
|
79 |
/* |
|
80 |
* (non-Javadoc) |
|
81 |
* @see es.gva.cit.gazetteer.wfs.drivers.WFSServiceDriver#getCapabilities(java.net.URI) |
|
82 |
*/ |
|
83 |
public DiscoveryServiceCapabilities getCapabilities(URI uri) { |
|
84 |
URL url = null; |
|
85 |
try { |
|
86 |
url = uri.toURL(); |
|
87 |
} catch (MalformedURLException e) { |
|
88 |
setServerAnswerReady("errorServerNotFound"); |
|
89 |
return null; |
|
90 |
} |
|
91 |
Collection nodes = new HTTPPostProtocol().doQuery(url, |
|
92 |
WFSGMessages.getHTTPPOSTCapabilities(), 0); |
|
93 |
|
|
94 |
WfsgCapabilitiesParser parser = new WfsgCapabilitiesParser(this); |
|
95 |
parser.parse(nodes); |
|
96 |
return parser.getCapabilities(); |
|
97 |
} |
|
98 |
|
|
99 |
/* |
|
100 |
* (non-Javadoc) |
|
101 |
* @see es.gva.cit.gazetteer.wfs.drivers.WFSServiceDriver#getFeature(java.net.URI, es.gva.cit.gazetteer.querys.Query) |
|
102 |
*/ |
|
103 |
public Feature[] getFeature(URI uri, GazetteerQuery query) { |
|
104 |
URL url = null; |
|
105 |
try { |
|
106 |
url = uri.toURL(); |
|
107 |
} catch (MalformedURLException e) { |
|
108 |
setServerAnswerReady("errorServerNotFound"); |
|
109 |
return null; |
|
110 |
} |
|
111 |
query.setFieldAttribute("geographicIdentifier"); |
|
112 |
Collection nodes = new HTTPPostProtocol().doQuery(url, |
|
113 |
WFSGMessages.getHTTPPOSTFeature(query,0), |
|
114 |
0); |
|
115 |
|
|
116 |
return new WfsgFeatureParser().parse((XMLNode)nodes.toArray()[0]); |
|
117 |
|
|
118 |
} |
|
119 |
|
|
120 |
/* |
|
121 |
* (non-Javadoc) |
|
122 |
* @see es.gva.cit.gazetteer.drivers.AsbtractGazetteerServiceDriver#isDescribeFeatureTypeNeeded() |
|
123 |
*/ |
|
124 |
public boolean isDescribeFeatureTypeNeeded(){ |
|
125 |
return false; |
|
126 |
} |
|
127 |
|
|
128 |
/* |
|
129 |
* (non-Javadoc) |
|
130 |
* @see es.gva.cit.gazetteer.drivers.IGazetteerServiceDriver#getServiceName() |
|
131 |
*/ |
|
132 |
public String getServiceName() { |
|
133 |
return ServerData.SERVER_SUBTYPE_GAZETTEER_WFSG; |
|
134 |
} |
|
135 |
} |
|
0 | 136 |
tags/v2_0_0_Build_2010/applications/appGazetteer/src/org/gvsig/gazetteer/wfsg/drivers/WFSGMessages.java | ||
---|---|---|
1 |
|
|
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 org.gvsig.gazetteer.wfsg.drivers; |
|
43 |
import org.gvsig.gazetteer.querys.GazetteerQuery; |
|
44 |
import org.gvsig.gazetteer.wfsg.filters.WFSGFilter; |
|
45 |
|
|
46 |
/** |
|
47 |
* This class has methods that return the WFSG operations messages. |
|
48 |
* @author Jorge Piera Llodra (piera_jor@gva.es) |
|
49 |
*/ |
|
50 |
public class WFSGMessages { |
|
51 |
|
|
52 |
public static String getHTTPPOSTCapabilities() { |
|
53 |
return "<?xml version=\"1.0\" ?>" + |
|
54 |
"<GetCapabilities " + |
|
55 |
"service=\"WFS\" " + |
|
56 |
"xmlns:csw=\"http://www.opengis.net/wfs\" " + |
|
57 |
"xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" " + |
|
58 |
"xsi:schemaLocation=\"http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.0.0/WFS-basic.xsd\">" + |
|
59 |
"</GetCapabilities>"; |
|
60 |
} |
Also available in: Unified diff