Revision 37975
tags/v2_0_0_Build_2045/applications/appCatalog/servers/CatalogServers.txt | ||
---|---|---|
1 |
http://inspire.cop.gva.es/geonetwork/srv/en/csw |
|
0 | 2 |
tags/v2_0_0_Build_2045/applications/appCatalog/pom.xml | ||
---|---|---|
1 |
<?xml version="1.0" encoding="UTF-8"?> |
|
2 |
|
|
3 |
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
|
4 |
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 |
|
5 |
http://maven.apache.org/maven-v4_0_0.xsd"> |
|
6 |
|
|
7 |
<modelVersion>4.0.0</modelVersion> |
|
8 |
<artifactId>org.gvsig.catalog</artifactId> |
|
9 |
<packaging>jar</packaging> |
|
10 |
<version>2.0-SNAPSHOT</version> |
|
11 |
<name>appCatalog</name> |
|
12 |
<description>Web Catalog Service client (geodata search)</description> |
|
13 |
<parent> |
|
14 |
<groupId>org.gvsig</groupId> |
|
15 |
<artifactId>gvsig-base-library-pom</artifactId> |
|
16 |
<version>2.0-SNAPSHOT</version> |
|
17 |
</parent> |
|
18 |
<dependencies> |
|
19 |
<dependency> |
|
20 |
<groupId>org.slf4j</groupId> |
|
21 |
<artifactId>slf4j-api</artifactId> |
|
22 |
<scope>compile</scope> |
|
23 |
</dependency> |
|
24 |
<dependency> |
|
25 |
<groupId>org.gvsig</groupId> |
|
26 |
<artifactId>org.gvsig.tools.lib</artifactId> |
|
27 |
<scope>compile</scope> |
|
28 |
</dependency> |
|
29 |
<dependency> |
|
30 |
<groupId>org.gvsig</groupId> |
|
31 |
<artifactId>org.gvsig.compat</artifactId> |
|
32 |
<scope>compile</scope> |
|
33 |
</dependency> |
|
34 |
<dependency> |
|
35 |
<groupId>org.gvsig</groupId> |
|
36 |
<artifactId>org.gvsig.i18n</artifactId> |
|
37 |
<scope>compile</scope> |
|
38 |
</dependency> |
|
39 |
<dependency> |
|
40 |
<groupId>org.gvsig</groupId> |
|
41 |
<artifactId>org.gvsig.utils</artifactId> |
|
42 |
<scope>compile</scope> |
|
43 |
</dependency> |
|
44 |
<dependency> |
|
45 |
<groupId>org.gvsig</groupId> |
|
46 |
<artifactId>org.gvsig.remoteclient</artifactId> |
|
47 |
<scope>compile</scope> |
|
48 |
</dependency> |
|
49 |
<dependency> |
|
50 |
<groupId>com.vividsolutions</groupId> |
|
51 |
<artifactId>jts</artifactId> |
|
52 |
</dependency> |
|
53 |
<dependency> |
|
54 |
<groupId>xerces</groupId> |
|
55 |
<artifactId>xercesImpl</artifactId> |
|
56 |
<scope>compile</scope> |
|
57 |
</dependency> |
|
58 |
<dependency> |
|
59 |
<groupId>org.dspace</groupId> |
|
60 |
<artifactId>cql-java</artifactId> |
|
61 |
</dependency> |
|
62 |
<dependency> |
|
63 |
<groupId>jdom</groupId> |
|
64 |
<artifactId>jdom</artifactId> |
|
65 |
</dependency> |
|
66 |
<dependency> |
|
67 |
<groupId>commons-beanutils</groupId> |
|
68 |
<artifactId>commons-beanutils</artifactId> |
|
69 |
<scope>compile</scope> |
|
70 |
</dependency> |
|
71 |
<dependency> |
|
72 |
<groupId>commons-httpclient</groupId> |
|
73 |
<artifactId>commons-httpclient</artifactId> |
|
74 |
<scope>compile</scope> |
|
75 |
</dependency> |
|
76 |
<dependency> |
|
77 |
<groupId>soap</groupId> |
|
78 |
<artifactId>soap</artifactId> |
|
79 |
<scope>compile</scope> |
|
80 |
</dependency> |
|
81 |
<dependency> |
|
82 |
<groupId>org.jzkit</groupId> |
|
83 |
<artifactId>jzkit2-core</artifactId> |
|
84 |
<scope>compile</scope> |
|
85 |
</dependency> |
|
86 |
<dependency> |
|
87 |
<groupId>org.jzkit</groupId> |
|
88 |
<artifactId>jzkit2-z3950</artifactId> |
|
89 |
<scope>compile</scope> |
|
90 |
</dependency> |
|
91 |
<dependency> |
|
92 |
<groupId>org.jzkit</groupId> |
|
93 |
<artifactId>jzkit2-origin</artifactId> |
|
94 |
</dependency> |
|
95 |
<dependency> |
|
96 |
<groupId>org.jzkit</groupId> |
|
97 |
<artifactId>a2j-runtime</artifactId> |
|
98 |
</dependency> |
|
99 |
<dependency> |
|
100 |
<groupId>org.jzkit</groupId> |
|
101 |
<artifactId>a2j</artifactId> |
|
102 |
<scope>compile</scope> |
|
103 |
</dependency> |
|
104 |
<dependency> |
|
105 |
<groupId>org.springframework</groupId> |
|
106 |
<artifactId>spring</artifactId> |
|
107 |
<scope>compile</scope> |
|
108 |
</dependency> |
|
109 |
<dependency> |
|
110 |
<groupId>net.swing</groupId> |
|
111 |
<artifactId>amic-util</artifactId> |
|
112 |
<scope>compile</scope> |
|
113 |
</dependency> |
|
114 |
</dependencies> |
|
115 |
<properties> |
|
116 |
<build-dir>${basedir}/../build</build-dir> |
|
117 |
<eclipse.project.name>appCatalog</eclipse.project.name> |
|
118 |
</properties> |
|
119 |
<build> |
|
120 |
<sourceDirectory>src</sourceDirectory> |
|
121 |
<testSourceDirectory>src-test</testSourceDirectory> |
|
122 |
<resources> |
|
123 |
<resource> |
|
124 |
<directory>${basedir}/resources</directory> |
|
125 |
</resource> |
|
126 |
</resources> |
|
127 |
|
|
128 |
<!-- TODO: MAKE TESTS WORK AND REMOVE THIS OPTION --> |
|
129 |
<plugins> |
|
130 |
<plugin> |
|
131 |
<groupId>org.apache.maven.plugins</groupId> |
|
132 |
<artifactId>maven-surefire-plugin</artifactId> |
|
133 |
<configuration> |
|
134 |
<skipTests>true</skipTests> |
|
135 |
</configuration> |
|
136 |
</plugin> |
|
137 |
</plugins> |
|
138 |
</build> |
|
139 |
</project> |
|
0 | 140 |
tags/v2_0_0_Build_2045/applications/appCatalog/resources/META-INF/services/org.gvsig.tools.library.Library | ||
---|---|---|
1 |
org.gvsig.catalog.CatalogLibrary |
|
2 |
org.gvsig.catalog.impl.DefaultCatalogLibrary |
tags/v2_0_0_Build_2045/applications/appCatalog/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_2045/applications/appCatalog/src-test/org/gvsig/catalog/catalog/drivers/ExampleNewDriver.java | ||
---|---|---|
1 |
package org.gvsig.catalog.catalog.drivers; |
|
2 |
|
|
3 |
import java.net.URI; |
|
4 |
|
|
5 |
import org.gvsig.catalog.CatalogLocator; |
|
6 |
import org.gvsig.catalog.CatalogManager; |
|
7 |
import org.gvsig.catalog.drivers.AbstractCatalogServiceDriver; |
|
8 |
import org.gvsig.catalog.drivers.CatalogCapabilities; |
|
9 |
import org.gvsig.catalog.drivers.DiscoveryServiceCapabilities; |
|
10 |
import org.gvsig.catalog.drivers.GetRecordsReply; |
|
11 |
import org.gvsig.catalog.querys.CatalogQuery; |
|
12 |
import org.gvsig.catalog.schemas.Record; |
|
13 |
import org.gvsig.catalog.ui.search.SearchAditionalPropertiesPanel; |
|
14 |
|
|
15 |
|
|
16 |
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana |
|
17 |
* |
|
18 |
* Copyright (C) 2004 IVER T.I. and Generalitat Valenciana. |
|
19 |
* |
|
20 |
* This program is free software; you can redistribute it and/or |
|
21 |
* modify it under the terms of the GNU General Public License |
|
22 |
* as published by the Free Software Foundation; either version 2 |
|
23 |
* of the License, or (at your option) any later version. |
|
24 |
* |
|
25 |
* This program is distributed in the hope that it will be useful, |
|
26 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
27 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
28 |
* GNU General Public License for more details. |
|
29 |
* |
|
30 |
* You should have received a copy of the GNU General Public License |
|
31 |
* along with this program; if not, write to the Free Software |
|
32 |
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,USA. |
|
33 |
* |
|
34 |
* For more information, contact: |
|
35 |
* |
|
36 |
* Generalitat Valenciana |
|
37 |
* Conselleria d'Infraestructures i Transport |
|
38 |
* Av. Blasco Ib??ez, 50 |
|
39 |
* 46010 VALENCIA |
|
40 |
* SPAIN |
|
41 |
* |
|
42 |
* +34 963862235 |
|
43 |
* gvsig@gva.es |
|
44 |
* www.gvsig.gva.es |
|
45 |
* |
|
46 |
* or |
|
47 |
* |
|
48 |
* IVER T.I. S.A |
|
49 |
* Salamanca 50 |
|
50 |
* 46005 Valencia |
|
51 |
* Spain |
|
52 |
* |
|
53 |
* +34 963163400 |
|
54 |
* dac@iver.es |
|
55 |
*/ |
|
56 |
/* CVS MESSAGES: |
|
57 |
* |
|
58 |
* $Id: ExampleNewDriver.java 537 2007-07-26 11:21:10Z jpiera $ |
|
59 |
* $Log$ |
|
60 |
* Revision 1.1.2.1 2007/07/13 12:00:35 jorpiell |
|
61 |
* Add the posibility to add a new panel |
|
62 |
* |
|
63 |
* |
|
64 |
*/ |
|
65 |
/** |
|
66 |
* @author Jorge Piera LLodr? (jorge.piera@iver.es) |
|
67 |
*/ |
|
68 |
public class ExampleNewDriver extends AbstractCatalogServiceDriver { |
|
69 |
private static final CatalogManager catalogManager = CatalogLocator.getCatalogManager(); |
|
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 |
return new CatalogCapabilities(); |
|
77 |
} |
|
78 |
|
|
79 |
/* |
|
80 |
* (non-Javadoc) |
|
81 |
* @see es.gva.cit.catalog.drivers.ICatalogServiceDriver#getRecords(java.net.URI, es.gva.cit.catalog.querys.CatalogQuery, int) |
|
82 |
*/ |
|
83 |
public GetRecordsReply getRecords(URI uri, CatalogQuery query, |
|
84 |
int firstRecord) { |
|
85 |
GetRecordsReply reply = new GetRecordsReply(1); |
|
86 |
Record record = catalogManager.createRecord(uri, null); |
|
87 |
record.setTitle("Record example"); |
|
88 |
record.setAbstract_("Just for testing"); |
|
89 |
reply.addRecord(record); |
|
90 |
return reply; |
|
91 |
} |
|
92 |
|
|
93 |
/* |
|
94 |
* (non-Javadoc) |
|
95 |
* @see es.gva.cit.catalog.drivers.IDiscoveryServiceDriver#getServiceName() |
|
96 |
*/ |
|
97 |
public String getServiceName() { |
|
98 |
return "My catalog service"; |
|
99 |
} |
|
100 |
|
|
101 |
/* |
|
102 |
* (non-Javadoc) |
|
103 |
* @see es.gva.cit.gazetteer.drivers.IGazetteerServiceDriver#getAditionalSearchPanel() |
|
104 |
*/ |
|
105 |
public SearchAditionalPropertiesPanel getAditionalSearchPanel(){ |
|
106 |
return new ExampleNewPanel(); |
|
107 |
} |
|
108 |
|
|
109 |
|
|
110 |
|
|
111 |
|
|
112 |
} |
|
0 | 113 |
tags/v2_0_0_Build_2045/applications/appCatalog/src-test/org/gvsig/catalog/catalog/drivers/ExampleNewDriverTest.java | ||
---|---|---|
1 |
package org.gvsig.catalog.catalog.drivers; |
|
2 |
|
|
3 |
import javax.swing.UIManager; |
|
4 |
import javax.swing.UnsupportedLookAndFeelException; |
|
5 |
|
|
6 |
import org.gvsig.catalog.CatalogLocator; |
|
7 |
import org.gvsig.catalog.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:43Z 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 |
// DefaultCatalogLibrary library = new DefaultCatalogLibrary(); |
|
74 |
// library.initialize(); |
|
75 |
// library.postInitialize(); |
|
76 |
|
|
77 |
CatalogLocator.getCatalogManager().register("My catalog service", ExampleNewDriver.class); |
|
78 |
//Get the currently installed look and feel |
|
79 |
UIManager.getLookAndFeel(); |
|
80 |
// Install a different look and feel; specifically, the Windows look and feel |
|
81 |
try { |
|
82 |
UIManager.setLookAndFeel( |
|
83 |
"com.sun.java.swing.plaf.windows.WindowsLookAndFeel"); |
|
84 |
} catch (InstantiationException e) { |
|
85 |
} catch (ClassNotFoundException e) { |
|
86 |
} catch (UnsupportedLookAndFeelException e) { |
|
87 |
} catch (IllegalAccessException e) { |
|
88 |
} |
|
89 |
|
|
90 |
new ServerConnectDialog(); |
|
91 |
} |
|
92 |
|
|
93 |
} |
|
0 | 94 |
tags/v2_0_0_Build_2045/applications/appCatalog/src-test/org/gvsig/catalog/catalog/drivers/ExampleNewPanel.java | ||
---|---|---|
1 |
package org.gvsig.catalog.catalog.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:10Z 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_2045/applications/appCatalog/src-test/org/gvsig/catalog/catalog/utils/URIUtilsTest.java | ||
---|---|---|
1 |
package org.gvsig.catalog.catalog.utils; |
|
2 |
|
|
3 |
import java.net.URI; |
|
4 |
import java.net.URISyntaxException; |
|
5 |
|
|
6 |
import junit.framework.TestCase; |
|
7 |
|
|
8 |
import org.gvsig.catalog.utils.URIUtils; |
|
9 |
|
|
10 |
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana |
|
11 |
* |
|
12 |
* Copyright (C) 2004 IVER T.I. and Generalitat Valenciana. |
|
13 |
* |
|
14 |
* This program is free software; you can redistribute it and/or |
|
15 |
* modify it under the terms of the GNU General Public License |
|
16 |
* as published by the Free Software Foundation; either version 2 |
|
17 |
* of the License, or (at your option) any later version. |
|
18 |
* |
|
19 |
* This program is distributed in the hope that it will be useful, |
|
20 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
21 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
22 |
* GNU General Public License for more details. |
|
23 |
* |
|
24 |
* You should have received a copy of the GNU General Public License |
|
25 |
* along with this program; if not, write to the Free Software |
|
26 |
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,USA. |
|
27 |
* |
|
28 |
* For more information, contact: |
|
29 |
* |
|
30 |
* Generalitat Valenciana |
|
31 |
* Conselleria d'Infraestructures i Transport |
|
32 |
* Av. Blasco Ib??ez, 50 |
|
33 |
* 46010 VALENCIA |
|
34 |
* SPAIN |
|
35 |
* |
|
36 |
* +34 963862235 |
|
37 |
* gvsig@gva.es |
|
38 |
* www.gvsig.gva.es |
|
39 |
* |
|
40 |
* or |
|
41 |
* |
|
42 |
* IVER T.I. S.A |
|
43 |
* Salamanca 50 |
|
44 |
* 46005 Valencia |
|
45 |
* Spain |
|
46 |
* |
|
47 |
* +34 963163400 |
|
48 |
* dac@iver.es |
|
49 |
*/ |
|
50 |
/* CVS MESSAGES: |
|
51 |
* |
|
52 |
* $Id: URIUtilsTest.java,v 1.1.2.1 2007/07/10 11:18:04 jorpiell Exp $ |
|
53 |
* $Log: URIUtilsTest.java,v $ |
|
54 |
* Revision 1.1.2.1 2007/07/10 11:18:04 jorpiell |
|
55 |
* Added the registers |
|
56 |
* |
|
57 |
* |
|
58 |
*/ |
|
59 |
/** |
|
60 |
* @author Jorge Piera LLodr? (jorge.piera@iver.es) |
|
61 |
*/ |
|
62 |
public class URIUtilsTest extends TestCase { |
|
63 |
|
|
64 |
public void test1() throws URISyntaxException{ |
|
65 |
URI uri = URIUtils.createUri("http://www.upv.es", "http", 80); |
|
66 |
assertEquals(uri.getHost(), "www.upv.es"); |
|
67 |
assertEquals(uri.getScheme(), "http"); |
|
68 |
assertEquals(uri.getPort(), 80); |
|
69 |
assertEquals(uri.getPath(), ""); |
|
70 |
} |
|
71 |
|
|
72 |
public void test2() throws URISyntaxException{ |
|
73 |
URI uri = URIUtils.createUri("www.upv.es", "http", 80); |
|
74 |
assertEquals(uri.getHost(), "www.upv.es"); |
|
75 |
assertEquals(uri.getScheme(), "http"); |
|
76 |
assertEquals(uri.getPort(), 80); |
|
77 |
assertEquals(uri.getPath(), ""); |
|
78 |
} |
|
79 |
|
|
80 |
public void test3() throws URISyntaxException{ |
|
81 |
URI uri = URIUtils.createUri("www.upv.es", "z3950", 2100); |
|
82 |
assertEquals(uri.getHost(), "www.upv.es"); |
|
83 |
assertEquals(uri.getScheme(), "z3950"); |
|
84 |
assertEquals(uri.getPort(), 2100); |
|
85 |
assertEquals(uri.getPath(), ""); |
|
86 |
} |
|
87 |
|
|
88 |
public void test4() throws URISyntaxException{ |
|
89 |
URI uri = URIUtils.createUri("http://193.144.250.29/webservices/services/IDEC_GeoServeisPort", "http", 80); |
|
90 |
assertEquals(uri.getHost(), "193.144.250.29"); |
|
91 |
assertEquals(uri.getScheme(), "http"); |
|
92 |
assertEquals(uri.getPort(), 80); |
|
93 |
assertEquals(uri.getPath(), "/webservices/services/IDEC_GeoServeisPort"); |
|
94 |
} |
|
95 |
} |
|
0 | 96 |
tags/v2_0_0_Build_2045/applications/appCatalog/config/ApplicationContextAlone.xml | ||
---|---|---|
1 |
<?xml version="1.0" encoding="UTF-8"?> |
|
2 |
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd"> |
|
3 |
|
|
4 |
<beans> |
|
5 |
|
|
6 |
<bean id="placeholderConfig" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"> |
|
7 |
<property name="location"><value>config/TestContext.properties</value></property> |
|
8 |
</bean> |
|
9 |
|
|
10 |
<!-- ========================= GENERAL DEFINITIONS ========================= --> |
|
11 |
|
|
12 |
<bean id="messageSource" class="org.springframework.context.support.ResourceBundleMessageSource"> |
|
13 |
<property name="basename"><value>messages</value></property> |
|
14 |
</bean> |
|
15 |
|
|
16 |
|
|
17 |
<!-- ========================= PERSISTENCE DEFINITIONS ========================= --> |
|
18 |
|
|
19 |
<!-- ========================= BUSINESS DEFINITIONS ========================= --> |
|
20 |
|
|
21 |
<bean id="OIDRegister" class="org.jzkit.a2j.codec.util.OIDRegister"> |
|
22 |
<constructor-arg index="0"><value>/es/gva/cit/catalog/protocols/context/a2j.properties</value></constructor-arg> |
|
23 |
</bean> |
|
24 |
|
|
25 |
<!-- conversion rules --> |
|
26 |
<bean id="RPNToInternalRules" class="org.jzkit.util.PropsHolder"> |
|
27 |
<constructor-arg index="0"><value>/es/gva/cit/catalog/protocols/context/InternalAttrTypes.properties</value></constructor-arg> |
|
28 |
</bean> |
|
29 |
|
|
30 |
<bean id="InternalToType1ConversionRules" class="org.jzkit.z3950.QueryModel.PropsBasedInternalToType1ConversionRules"> |
|
31 |
<constructor-arg index="0"><value>/es/gva/cit/catalog/protocols/context/InternalToType1Rules.properties</value></constructor-arg> |
|
32 |
</bean> |
|
33 |
|
|
34 |
</beans> |
tags/v2_0_0_Build_2045/applications/appCatalog/config/ApplicationContext.xml | ||
---|---|---|
1 |
<?xml version="1.0" encoding="UTF-8"?> |
|
2 |
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd"> |
|
3 |
<beans> |
|
4 |
<bean id="placeholderConfig" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"> |
|
5 |
<property name="location"><value>gvSIG/extensiones/es.gva.cit.gvsig.catalogClient/config/TestContext.properties</value></property> |
|
6 |
</bean> |
|
7 |
<!-- ========================= GENERAL DEFINITIONS ========================= --> |
|
8 |
<bean id="messageSource" class="org.springframework.context.support.ResourceBundleMessageSource"> |
|
9 |
<property name="basename"><value>messages</value></property> |
|
10 |
</bean> |
|
11 |
<!-- ========================= PERSISTENCE DEFINITIONS ========================= --> |
|
12 |
|
|
13 |
<!-- ========================= BUSINESS DEFINITIONS ========================= --> |
|
14 |
|
|
15 |
<bean id="OIDRegister" class="org.jzkit.a2j.codec.util.OIDRegister"> |
|
16 |
<constructor-arg index="0"><value>/es/gva/cit/catalog/protocols/context/a2j.properties</value></constructor-arg> |
|
17 |
</bean> |
|
18 |
|
|
19 |
<!-- conversion rules --> |
|
20 |
<bean id="RPNToInternalRules" class="org.jzkit.util.PropsHolder"> |
|
21 |
<constructor-arg index="0"><value>/es/gva/cit/catalog/protocols/context/InternalAttrTypes.properties</value></constructor-arg> |
|
22 |
</bean> |
|
23 |
|
|
24 |
<bean id="InternalToType1ConversionRules" class="org.jzkit.z3950.QueryModel.PropsBasedInternalToType1ConversionRules"> |
|
25 |
<constructor-arg index="0"><value>/es/gva/cit/catalog/protocols/context/InternalToType1Rules.properties</value></constructor-arg> |
|
26 |
</bean> |
|
27 |
</beans> |
tags/v2_0_0_Build_2045/applications/appCatalog/src/org/gvsig/catalog/CatalogLocator.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.catalog; |
|
29 |
|
|
30 |
import org.gvsig.tools.locator.AbstractLocator; |
|
31 |
import org.gvsig.tools.locator.Locator; |
|
32 |
import org.gvsig.tools.locator.LocatorException; |
|
33 |
|
|
34 |
/** |
|
35 |
* This Locator provides the entry point for the gvSIG |
|
36 |
* {@link CatalogManager} |
|
37 |
* @see Locator |
|
38 |
* @author <a href="mailto:jpiera@gvsig.org">Jorge Piera</a> |
|
39 |
*/ |
|
40 |
public class CatalogLocator extends AbstractLocator { |
|
41 |
private static final String LOCATOR_NAME = "CatalogLocator"; |
|
42 |
/** |
|
43 |
* CatalogManager name used by the locator to access the instance |
|
44 |
*/ |
|
45 |
public static final String CATALOG_MANAGER_NAME = "CatalogManager"; |
|
46 |
private static final String CATALOG_MANAGER_DESCRIPTION = "CatalogManager of gvSIG"; |
|
47 |
|
|
48 |
/** |
|
49 |
* Unique instance. |
|
50 |
*/ |
|
51 |
private static final CatalogLocator instance = new CatalogLocator(); |
|
52 |
|
|
53 |
/* (non-Javadoc) |
|
54 |
* @see org.gvsig.tools.locator.Locator#getLocatorName() |
|
55 |
*/ |
|
56 |
public String getLocatorName() { |
|
57 |
return LOCATOR_NAME; |
|
58 |
} |
|
59 |
|
|
60 |
/** |
|
61 |
* Return a reference to {@link CatalogManager}. |
|
62 |
* |
|
63 |
* @return a reference to CatalogManager |
|
64 |
* @throws LocatorException |
|
65 |
* if there is no access to the class or the class cannot be |
|
66 |
* instantiated |
|
67 |
* @see Locator#get(String) |
|
68 |
*/ |
|
69 |
public static CatalogManager getCatalogManager() throws LocatorException { |
|
70 |
return (CatalogManager) getInstance().get(CATALOG_MANAGER_NAME); |
|
71 |
} |
|
72 |
|
|
73 |
/** |
|
74 |
* Return the singleton instance. |
|
75 |
* |
|
76 |
* @return the singleton instance |
|
77 |
*/ |
|
78 |
public static CatalogLocator getInstance() { |
|
79 |
return instance; |
|
80 |
} |
|
81 |
|
|
82 |
/** |
|
83 |
* Registers the Class implementing the {@link CatalogManager} interface. |
|
84 |
* |
|
85 |
* @param clazz |
|
86 |
* implementing the ICatalogServiceDriver interface |
|
87 |
*/ |
|
88 |
public static void registerCatalogManager(Class clazz) { |
|
89 |
getInstance().register(CATALOG_MANAGER_NAME, |
|
90 |
CATALOG_MANAGER_DESCRIPTION, |
|
91 |
clazz); |
|
92 |
} |
|
93 |
} |
|
94 |
|
|
0 | 95 |
tags/v2_0_0_Build_2045/applications/appCatalog/src/org/gvsig/catalog/drivers/GetRecordsReply.java | ||
---|---|---|
1 |
package org.gvsig.catalog.drivers; |
|
2 |
|
|
3 |
import java.net.URI; |
|
4 |
import java.util.ArrayList; |
|
5 |
|
|
6 |
import org.gvsig.catalog.CatalogLocator; |
|
7 |
import org.gvsig.catalog.CatalogManager; |
|
8 |
import org.gvsig.catalog.metadataxml.XMLNode; |
|
9 |
import org.gvsig.catalog.schemas.Record; |
|
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: GetRecordsReply.java 600 2007-09-19 11:30:05 +0000 (Wed, 19 Sep 2007) jpiera $ |
|
54 |
* $Log$ |
|
55 |
* Revision 1.1.2.1 2007/07/23 07:14:25 jorpiell |
|
56 |
* Catalog refactoring |
|
57 |
* |
|
58 |
* |
|
59 |
*/ |
|
60 |
/** |
|
61 |
* @author Jorge Piera LLodr? (jorge.piera@iver.es) |
|
62 |
*/ |
|
63 |
public class GetRecordsReply { |
|
64 |
private static final CatalogManager catalogManager = CatalogLocator.getCatalogManager(); |
|
65 |
private ArrayList records = null; |
|
66 |
private int numRecords = 0; |
|
67 |
|
|
68 |
public GetRecordsReply(int numRecords){ |
|
69 |
this.numRecords = numRecords; |
|
70 |
records = new ArrayList(); |
|
71 |
} |
|
72 |
|
|
73 |
/** |
|
74 |
* Add a new record |
|
75 |
* @param record |
|
76 |
* rRecord to add |
|
77 |
*/ |
|
78 |
public void addRecord(Record record){ |
|
79 |
records.add(record); |
|
80 |
} |
|
81 |
|
|
82 |
/** |
|
83 |
* Add a new record |
|
84 |
* @param uri |
|
85 |
* Server uri |
|
86 |
* @param node |
|
87 |
* XML node |
|
88 |
*/ |
|
89 |
public void addRecord(URI uri, XMLNode node){ |
|
90 |
Record record = catalogManager.createRecord(uri, node); |
|
91 |
records.add(record); |
|
92 |
} |
|
93 |
|
|
94 |
/** |
|
95 |
* Gets a record that it is in a concrete position |
|
96 |
* @param index |
|
97 |
* Record position |
|
98 |
* @return |
|
99 |
* A record |
|
100 |
*/ |
|
101 |
public Record getRecordAt(int index){ |
|
102 |
if (index >= records.size()){ |
|
103 |
return null; |
|
104 |
} |
|
105 |
return (Record)records.get(index); |
|
106 |
} |
|
107 |
|
|
108 |
/** |
|
109 |
* @return the numRecords |
|
110 |
*/ |
|
111 |
public int getRecordsNumber() { |
|
112 |
return numRecords; |
|
113 |
} |
|
114 |
|
|
115 |
/** |
|
116 |
* @return the numRecords |
|
117 |
*/ |
|
118 |
public int getRetrievedRecordsNumber() { |
|
119 |
return records.size(); |
|
120 |
} |
|
121 |
|
|
122 |
/** |
|
123 |
* @param numRecords the numRecords to set |
|
124 |
*/ |
|
125 |
public void setNumRecords(int numRecords) { |
|
126 |
this.numRecords = numRecords; |
|
127 |
} |
|
128 |
|
|
129 |
} |
|
0 | 130 |
tags/v2_0_0_Build_2045/applications/appCatalog/src/org/gvsig/catalog/drivers/IDiscoveryServiceDriver.java | ||
---|---|---|
1 |
package org.gvsig.catalog.drivers; |
|
2 |
|
|
3 |
import java.net.URI; |
|
4 |
|
|
5 |
import org.gvsig.catalog.exceptions.DiscoveryServiceException; |
|
6 |
import org.gvsig.catalog.exceptions.NotSupportedProtocolException; |
|
7 |
import org.gvsig.catalog.querys.DiscoveryServiceQuery; |
|
8 |
import org.gvsig.catalog.ui.search.SearchAditionalPropertiesPanel; |
|
9 |
import org.gvsig.utils.swing.jcomboServer.ServerData; |
|
10 |
|
|
11 |
|
|
12 |
|
|
13 |
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana |
|
14 |
* |
|
15 |
* Copyright (C) 2004 IVER T.I. and Generalitat Valenciana. |
|
16 |
* |
|
17 |
* This program is free software; you can redistribute it and/or |
|
18 |
* modify it under the terms of the GNU General Public License |
|
19 |
* as published by the Free Software Foundation; either version 2 |
|
20 |
* of the License, or (at your option) any later version. |
|
21 |
* |
|
22 |
* This program is distributed in the hope that it will be useful, |
|
23 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
24 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
25 |
* GNU General Public License for more details. |
|
26 |
* |
|
27 |
* You should have received a copy of the GNU General Public License |
|
28 |
* along with this program; if not, write to the Free Software |
|
29 |
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,USA. |
|
30 |
* |
|
31 |
* For more information, contact: |
|
32 |
* |
|
33 |
* Generalitat Valenciana |
|
34 |
* Conselleria d'Infraestructures i Transport |
|
35 |
* Av. Blasco Ib??ez, 50 |
|
36 |
* 46010 VALENCIA |
|
37 |
* SPAIN |
|
38 |
* |
|
39 |
* +34 963862235 |
|
40 |
* gvsig@gva.es |
|
41 |
* www.gvsig.gva.es |
|
42 |
* |
|
43 |
* or |
|
44 |
* |
|
45 |
* IVER T.I. S.A |
|
46 |
* Salamanca 50 |
|
47 |
* 46005 Valencia |
|
48 |
* Spain |
|
49 |
* |
|
50 |
* +34 963163400 |
|
51 |
* dac@iver.es |
|
52 |
*/ |
|
53 |
/* CVS MESSAGES: |
|
54 |
* |
|
55 |
* $Id$ |
|
56 |
* $Log$ |
|
57 |
* |
|
58 |
*/ |
|
59 |
/** |
|
60 |
* @author Jorge Piera LLodr? (jorge.piera@iver.es) |
|
61 |
*/ |
|
62 |
public interface IDiscoveryServiceDriver { |
|
63 |
/** |
|
64 |
* It try to discover the server capabilities. |
|
65 |
* @return Node with the server answer. |
|
66 |
* @param uri Server URI |
|
67 |
*/ |
|
68 |
public DiscoveryServiceCapabilities getCapabilities(URI uri) throws DiscoveryServiceException; |
|
69 |
|
|
70 |
/** |
|
71 |
* It have to prove if the specified protocol is supported. |
|
72 |
* @return true if is supported, false if it isn't supported |
|
73 |
* @param uri Server URI |
|
74 |
*/ |
|
75 |
public boolean isProtocolSupported(URI uri) throws NotSupportedProtocolException; |
|
76 |
|
|
77 |
/** |
|
78 |
* It return a message to write in the server connection frame |
|
79 |
* @return It is/isn't the supported protocol |
|
80 |
*/ |
|
81 |
public String getServerAnswerReady(); |
|
82 |
|
|
83 |
/** |
|
84 |
* It sets an error message |
|
85 |
*/ |
|
86 |
public void setServerAnswerReady(String message); |
|
87 |
|
|
88 |
/** |
|
89 |
* @return the dafault port for an specific |
|
90 |
* service |
|
91 |
*/ |
|
92 |
public int getDefaultPort(); |
|
93 |
|
|
94 |
/** |
|
95 |
* @return the dafault schema for an specific |
|
96 |
* service |
|
97 |
*/ |
|
98 |
public String getDefaultSchema(); |
|
99 |
|
|
100 |
/** |
|
101 |
* @return the service name that will be showed |
|
102 |
* in the user interface |
|
103 |
*/ |
|
104 |
public String getServiceName(); |
|
105 |
|
|
106 |
/** |
|
107 |
* This message will be showed in the protocols combo |
|
108 |
* @return The message to show |
|
109 |
*/ |
|
110 |
public String toString(); |
|
111 |
|
|
112 |
/** |
|
113 |
* There are protocols that can support other attributes |
|
114 |
* to do the search. They have to provide its own |
|
115 |
* panel to do the search |
|
116 |
* @return |
|
117 |
* JPanel with a list of properties. |
|
118 |
*/ |
|
119 |
public SearchAditionalPropertiesPanel getAditionalSearchPanel(); |
|
120 |
|
|
121 |
/** |
|
122 |
* Create and return an empty query |
|
123 |
* @return |
|
124 |
*/ |
|
125 |
public DiscoveryServiceQuery createQuery(); |
|
126 |
|
|
127 |
/** |
|
128 |
* @return if the protocol always works with the |
|
129 |
* same server |
|
130 |
*/ |
|
131 |
public ServerData getOneServer(); |
|
132 |
} |
|
133 |
|
|
0 | 134 |
tags/v2_0_0_Build_2045/applications/appCatalog/src/org/gvsig/catalog/drivers/ICatalogServiceDriver.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.catalog.drivers; |
|
43 |
import java.net.URI; |
|
44 |
|
|
45 |
import org.gvsig.catalog.drivers.profiles.IProfile; |
|
46 |
import org.gvsig.catalog.querys.CatalogQuery; |
|
47 |
|
|
48 |
/** |
|
49 |
* This interface has to be implemented by all the classes that implement |
|
50 |
* a catalog protocol. It describes all the common operations. |
|
51 |
* |
|
52 |
* |
|
53 |
* @author Jorge Piera Llodra (piera_jor@gva.es) |
|
54 |
*/ |
|
55 |
public interface ICatalogServiceDriver extends IDiscoveryServiceDriver{ |
|
56 |
|
|
57 |
/** |
|
58 |
* It send a request with a query to retrieve the server records |
|
59 |
* @return RecordsAnswer Contains the records and additional info |
|
60 |
* @param uri |
|
61 |
* Server URI |
|
62 |
* @param query |
|
63 |
* It contains the values to do the query (title="XXX",abstract="YYY",...) |
|
64 |
* @param firstRecord |
|
65 |
* Number of the first record to retrieve |
|
66 |
*/ |
|
67 |
public GetRecordsReply getRecords(URI uri, CatalogQuery query, int firstRecord); |
|
68 |
|
|
69 |
/** |
|
70 |
* @return the server profile. A profile is a list of default |
|
71 |
* values for the properties used to create the queries |
|
72 |
*/ |
|
73 |
public IProfile getProfile(); |
|
74 |
|
|
75 |
} |
|
76 |
|
|
77 |
|
|
0 | 78 |
tags/v2_0_0_Build_2045/applications/appCatalog/src/org/gvsig/catalog/drivers/DiscoveryServiceCapabilities.java | ||
---|---|---|
1 |
package org.gvsig.catalog.drivers; |
|
2 |
|
|
3 |
import java.util.Properties; |
|
4 |
|
|
5 |
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana |
|
6 |
* |
|
7 |
* Copyright (C) 2004 IVER T.I. and Generalitat Valenciana. |
|
8 |
* |
|
9 |
* This program is free software; you can redistribute it and/or |
|
10 |
* modify it under the terms of the GNU General Public License |
|
11 |
* as published by the Free Software Foundation; either version 2 |
|
12 |
* of the License, or (at your option) any later version. |
|
13 |
* |
|
14 |
* This program is distributed in the hope that it will be useful, |
|
15 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
16 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
17 |
* GNU General Public License for more details. |
|
18 |
* |
|
19 |
* You should have received a copy of the GNU General Public License |
|
20 |
* along with this program; if not, write to the Free Software |
|
21 |
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,USA. |
|
22 |
* |
|
23 |
* For more information, contact: |
|
24 |
* |
|
25 |
* Generalitat Valenciana |
|
26 |
* Conselleria d'Infraestructures i Transport |
|
27 |
* Av. Blasco Ib??ez, 50 |
|
28 |
* 46010 VALENCIA |
|
29 |
* SPAIN |
|
30 |
* |
|
31 |
* +34 963862235 |
|
32 |
* gvsig@gva.es |
|
33 |
* www.gvsig.gva.es |
|
34 |
* |
|
35 |
* or |
|
36 |
* |
|
37 |
* IVER T.I. S.A |
|
38 |
* Salamanca 50 |
|
39 |
* 46005 Valencia |
|
40 |
* Spain |
|
41 |
* |
|
42 |
* +34 963163400 |
|
43 |
* dac@iver.es |
|
44 |
*/ |
|
45 |
/* CVS MESSAGES: |
|
46 |
* |
|
47 |
* $Id: DiscoveryServiceCapabilities.java 561 2007-07-27 06:49:30 +0000 (Fri, 27 Jul 2007) jpiera $ |
Also available in: Unified diff