Revision 29411
tags/gvsig_sextante-0.2.0-1231/applications/appCatalogAndGazetteerClient/.project | ||
---|---|---|
1 |
<?xml version="1.0" encoding="UTF-8"?> |
|
2 |
<projectDescription> |
|
3 |
<name>appCatalogAndGazetteerClient</name> |
|
4 |
<comment></comment> |
|
5 |
<projects> |
|
6 |
</projects> |
|
7 |
<buildSpec> |
|
8 |
<buildCommand> |
|
9 |
<name>org.eclipse.jdt.core.javabuilder</name> |
|
10 |
<arguments> |
|
11 |
</arguments> |
|
12 |
</buildCommand> |
|
13 |
</buildSpec> |
|
14 |
<natures> |
|
15 |
<nature>org.eclipse.jem.workbench.JavaEMFNature</nature> |
|
16 |
<nature>org.eclipse.jdt.core.javanature</nature> |
|
17 |
<nature>org.eclipse.jem.beaninfo.BeanInfoNature</nature> |
|
18 |
</natures> |
|
19 |
</projectDescription> |
|
0 | 20 |
tags/gvsig_sextante-0.2.0-1231/applications/appCatalogAndGazetteerClient/src-test/es/gva/cit/catalog/drivers/ExampleNewDriver.java | ||
---|---|---|
1 |
package es.gva.cit.catalog.drivers; |
|
2 |
|
|
3 |
import java.net.URI; |
|
4 |
|
|
5 |
import es.gva.cit.catalog.drivers.AbstractCatalogServiceDriver; |
|
6 |
import es.gva.cit.catalog.drivers.CatalogCapabilities; |
|
7 |
import es.gva.cit.catalog.drivers.DiscoveryServiceCapabilities; |
|
8 |
import es.gva.cit.catalog.drivers.GetRecordsReply; |
|
9 |
import es.gva.cit.catalog.querys.CatalogQuery; |
|
10 |
import es.gva.cit.catalog.schemas.Record; |
|
11 |
import es.gva.cit.catalog.schemas.RecordFactory; |
|
12 |
import es.gva.cit.catalog.ui.search.SearchAditionalPropertiesPanel; |
|
13 |
|
|
14 |
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana |
|
15 |
* |
|
16 |
* Copyright (C) 2004 IVER T.I. and Generalitat Valenciana. |
|
17 |
* |
|
18 |
* This program is free software; you can redistribute it and/or |
|
19 |
* modify it under the terms of the GNU General Public License |
|
20 |
* as published by the Free Software Foundation; either version 2 |
|
21 |
* of the License, or (at your option) any later version. |
|
22 |
* |
|
23 |
* This program is distributed in the hope that it will be useful, |
|
24 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
25 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
26 |
* GNU General Public License for more details. |
|
27 |
* |
|
28 |
* You should have received a copy of the GNU General Public License |
|
29 |
* along with this program; if not, write to the Free Software |
|
30 |
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,USA. |
|
31 |
* |
|
32 |
* For more information, contact: |
|
33 |
* |
|
34 |
* Generalitat Valenciana |
|
35 |
* Conselleria d'Infraestructures i Transport |
|
36 |
* Av. Blasco Ib??ez, 50 |
|
37 |
* 46010 VALENCIA |
|
38 |
* SPAIN |
|
39 |
* |
|
40 |
* +34 963862235 |
|
41 |
* gvsig@gva.es |
|
42 |
* www.gvsig.gva.es |
|
43 |
* |
|
44 |
* or |
|
45 |
* |
|
46 |
* IVER T.I. S.A |
|
47 |
* Salamanca 50 |
|
48 |
* 46005 Valencia |
|
49 |
* Spain |
|
50 |
* |
|
51 |
* +34 963163400 |
|
52 |
* dac@iver.es |
|
53 |
*/ |
|
54 |
/* CVS MESSAGES: |
|
55 |
* |
|
56 |
* $Id: ExampleNewDriver.java 537 2007-07-26 11:21:10Z jpiera $ |
|
57 |
* $Log$ |
|
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 ExampleNewDriver extends AbstractCatalogServiceDriver { |
|
67 |
|
|
68 |
/* |
|
69 |
* (non-Javadoc) |
|
70 |
* @see es.gva.cit.catalogClient.drivers.IDiscoveryServiceDriver#getCapabilities(java.net.URI) |
|
71 |
*/ |
|
72 |
public DiscoveryServiceCapabilities getCapabilities(URI uri) { |
|
73 |
return new CatalogCapabilities(); |
|
74 |
} |
|
75 |
|
|
76 |
/* |
|
77 |
* (non-Javadoc) |
|
78 |
* @see es.gva.cit.catalog.drivers.ICatalogServiceDriver#getRecords(java.net.URI, es.gva.cit.catalog.querys.CatalogQuery, int) |
|
79 |
*/ |
|
80 |
public GetRecordsReply getRecords(URI uri, CatalogQuery query, |
|
81 |
int firstRecord) { |
|
82 |
GetRecordsReply reply = new GetRecordsReply(1); |
|
83 |
Record record = RecordFactory.createRecord(uri, null); |
|
84 |
record.setTitle("Record example"); |
|
85 |
record.setAbstract_("Just for testing"); |
|
86 |
reply.addRecord(record); |
|
87 |
return reply; |
|
88 |
} |
|
89 |
|
|
90 |
/* |
|
91 |
* (non-Javadoc) |
|
92 |
* @see es.gva.cit.catalog.drivers.IDiscoveryServiceDriver#getServiceName() |
|
93 |
*/ |
|
94 |
public String getServiceName() { |
|
95 |
return "My catalog service"; |
|
96 |
} |
|
97 |
|
|
98 |
/* |
|
99 |
* (non-Javadoc) |
|
100 |
* @see es.gva.cit.gazetteer.drivers.IGazetteerServiceDriver#getAditionalSearchPanel() |
|
101 |
*/ |
|
102 |
public SearchAditionalPropertiesPanel getAditionalSearchPanel(){ |
|
103 |
return new ExampleNewPanel(); |
|
104 |
} |
|
105 |
|
|
106 |
|
|
107 |
|
|
108 |
|
|
109 |
} |
|
0 | 110 |
tags/gvsig_sextante-0.2.0-1231/applications/appCatalogAndGazetteerClient/src-test/es/gva/cit/catalog/drivers/ExampleNewDriverTest.java | ||
---|---|---|
1 |
package es.gva.cit.catalog.drivers; |
|
2 |
|
|
3 |
import javax.swing.UIManager; |
|
4 |
import javax.swing.UnsupportedLookAndFeelException; |
|
5 |
|
|
6 |
import es.gva.cit.catalog.ui.serverconnect.ServerConnectDialog; |
|
7 |
import es.gva.cit.catalog.utils.CatalogDriverRegister; |
|
8 |
|
|
9 |
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana |
|
10 |
* |
|
11 |
* Copyright (C) 2004 IVER T.I. and Generalitat Valenciana. |
|
12 |
* |
|
13 |
* This program is free software; you can redistribute it and/or |
|
14 |
* modify it under the terms of the GNU General Public License |
|
15 |
* as published by the Free Software Foundation; either version 2 |
|
16 |
* of the License, or (at your option) any later version. |
|
17 |
* |
|
18 |
* This program is distributed in the hope that it will be useful, |
|
19 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
20 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
21 |
* GNU General Public License for more details. |
|
22 |
* |
|
23 |
* You should have received a copy of the GNU General Public License |
|
24 |
* along with this program; if not, write to the Free Software |
|
25 |
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,USA. |
|
26 |
* |
|
27 |
* For more information, contact: |
|
28 |
* |
|
29 |
* Generalitat Valenciana |
|
30 |
* Conselleria d'Infraestructures i Transport |
|
31 |
* Av. Blasco Ib??ez, 50 |
|
32 |
* 46010 VALENCIA |
|
33 |
* SPAIN |
|
34 |
* |
|
35 |
* +34 963862235 |
|
36 |
* gvsig@gva.es |
|
37 |
* www.gvsig.gva.es |
|
38 |
* |
|
39 |
* or |
|
40 |
* |
|
41 |
* IVER T.I. S.A |
|
42 |
* Salamanca 50 |
|
43 |
* 46005 Valencia |
|
44 |
* Spain |
|
45 |
* |
|
46 |
* +34 963163400 |
|
47 |
* dac@iver.es |
|
48 |
*/ |
|
49 |
/* CVS MESSAGES: |
|
50 |
* |
|
51 |
* $Id: ExampleNewDriverTest.java 512 2007-07-24 11:25:43Z jorpiell $ |
|
52 |
* $Log$ |
|
53 |
* Revision 1.1.2.2 2007/07/24 11:25:42 jorpiell |
|
54 |
* The registers has been refactorized |
|
55 |
* |
|
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 ExampleNewDriverTest { |
|
65 |
|
|
66 |
/** |
|
67 |
* @param args |
|
68 |
*/ |
|
69 |
public static void main(String[] args) { |
|
70 |
CatalogDriverRegister register = CatalogDriverRegister.getInstance(); |
|
71 |
register.register(new ExampleNewDriver()); |
|
72 |
//Get the currently installed look and feel |
|
73 |
UIManager.getLookAndFeel(); |
|
74 |
// Install a different look and feel; specifically, the Windows look and feel |
|
75 |
try { |
|
76 |
UIManager.setLookAndFeel( |
|
77 |
"com.sun.java.swing.plaf.windows.WindowsLookAndFeel"); |
|
78 |
} catch (InstantiationException e) { |
|
79 |
} catch (ClassNotFoundException e) { |
|
80 |
} catch (UnsupportedLookAndFeelException e) { |
|
81 |
} catch (IllegalAccessException e) { |
|
82 |
} |
|
83 |
|
|
84 |
new ServerConnectDialog(); |
|
85 |
} |
|
86 |
|
|
87 |
} |
|
0 | 88 |
tags/gvsig_sextante-0.2.0-1231/applications/appCatalogAndGazetteerClient/src-test/es/gva/cit/catalog/drivers/ExampleNewPanel.java | ||
---|---|---|
1 |
package es.gva.cit.catalog.drivers; |
|
2 |
|
|
3 |
import java.util.Properties; |
|
4 |
|
|
5 |
import javax.swing.JLabel; |
|
6 |
import javax.swing.JTextField; |
|
7 |
|
|
8 |
import es.gva.cit.catalog.ui.search.SearchAditionalPropertiesPanel; |
|
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: ExampleNewPanel.java 537 2007-07-26 11:21:10Z jpiera $ |
|
53 |
* $Log$ |
|
54 |
* Revision 1.1.2.1 2007/07/13 12:00:35 jorpiell |
|
55 |
* Add the posibility to add a new panel |
|
56 |
* |
|
57 |
* |
|
58 |
*/ |
|
59 |
/** |
|
60 |
* @author Jorge Piera LLodr? (jorge.piera@iver.es) |
|
61 |
*/ |
|
62 |
public class ExampleNewPanel extends SearchAditionalPropertiesPanel{ |
|
63 |
JLabel label = null; |
|
64 |
JTextField text = null; |
|
65 |
|
|
66 |
public ExampleNewPanel(){ |
|
67 |
label = new JLabel(); |
|
68 |
text = new JTextField(); |
|
69 |
setLayout(new java.awt.BorderLayout()); |
|
70 |
label.setText("Label"); |
|
71 |
add(label, java.awt.BorderLayout.WEST); |
|
72 |
add(text, java.awt.BorderLayout.CENTER); |
|
73 |
} |
|
74 |
|
|
75 |
/* |
|
76 |
* (non-Javadoc) |
|
77 |
* @see es.gva.cit.gazetteer.ui.search.SearchAditionalPropertiesPanel#getProperties() |
|
78 |
*/ |
|
79 |
public Properties getProperties() { |
|
80 |
Properties properties = new Properties(); |
|
81 |
properties.put("PROP1", text.getText()); |
|
82 |
return properties; |
|
83 |
} |
|
84 |
|
|
85 |
} |
|
0 | 86 |
tags/gvsig_sextante-0.2.0-1231/applications/appCatalogAndGazetteerClient/src-test/es/gva/cit/catalog/utils/URIUtilsTest.java | ||
---|---|---|
1 |
package es.gva.cit.catalog.utils; |
|
2 |
|
|
3 |
import java.net.URI; |
|
4 |
import java.net.URISyntaxException; |
|
5 |
|
|
6 |
import junit.framework.TestCase; |
|
7 |
|
|
8 |
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana |
|
9 |
* |
|
10 |
* Copyright (C) 2004 IVER T.I. and Generalitat Valenciana. |
|
11 |
* |
|
12 |
* This program is free software; you can redistribute it and/or |
|
13 |
* modify it under the terms of the GNU General Public License |
|
14 |
* as published by the Free Software Foundation; either version 2 |
|
15 |
* of the License, or (at your option) any later version. |
|
16 |
* |
|
17 |
* This program is distributed in the hope that it will be useful, |
|
18 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
19 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
20 |
* GNU General Public License for more details. |
|
21 |
* |
|
22 |
* You should have received a copy of the GNU General Public License |
|
23 |
* along with this program; if not, write to the Free Software |
|
24 |
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,USA. |
|
25 |
* |
|
26 |
* For more information, contact: |
|
27 |
* |
|
28 |
* Generalitat Valenciana |
|
29 |
* Conselleria d'Infraestructures i Transport |
|
30 |
* Av. Blasco Ib??ez, 50 |
|
31 |
* 46010 VALENCIA |
|
32 |
* SPAIN |
|
33 |
* |
|
34 |
* +34 963862235 |
|
35 |
* gvsig@gva.es |
|
36 |
* www.gvsig.gva.es |
|
37 |
* |
|
38 |
* or |
|
39 |
* |
|
40 |
* IVER T.I. S.A |
|
41 |
* Salamanca 50 |
|
42 |
* 46005 Valencia |
|
43 |
* Spain |
|
44 |
* |
|
45 |
* +34 963163400 |
|
46 |
* dac@iver.es |
|
47 |
*/ |
|
48 |
/* CVS MESSAGES: |
|
49 |
* |
|
50 |
* $Id: URIUtilsTest.java,v 1.1.2.1 2007/07/10 11:18:04 jorpiell Exp $ |
|
51 |
* $Log: URIUtilsTest.java,v $ |
|
52 |
* Revision 1.1.2.1 2007/07/10 11:18:04 jorpiell |
|
53 |
* Added the registers |
|
54 |
* |
|
55 |
* |
|
56 |
*/ |
|
57 |
/** |
|
58 |
* @author Jorge Piera LLodr? (jorge.piera@iver.es) |
|
59 |
*/ |
|
60 |
public class URIUtilsTest extends TestCase { |
|
61 |
|
|
62 |
public void test1() throws URISyntaxException{ |
|
63 |
URI uri = URIUtils.createUri("http://www.upv.es", "http", 80); |
|
64 |
assertEquals(uri.getHost(), "www.upv.es"); |
|
65 |
assertEquals(uri.getScheme(), "http"); |
|
66 |
assertEquals(uri.getPort(), 80); |
|
67 |
assertEquals(uri.getPath(), ""); |
|
68 |
} |
|
69 |
|
|
70 |
public void test2() throws URISyntaxException{ |
|
71 |
URI uri = URIUtils.createUri("www.upv.es", "http", 80); |
|
72 |
assertEquals(uri.getHost(), "www.upv.es"); |
|
73 |
assertEquals(uri.getScheme(), "http"); |
|
74 |
assertEquals(uri.getPort(), 80); |
|
75 |
assertEquals(uri.getPath(), ""); |
|
76 |
} |
|
77 |
|
|
78 |
public void test3() throws URISyntaxException{ |
|
79 |
URI uri = URIUtils.createUri("www.upv.es", "z3950", 2100); |
|
80 |
assertEquals(uri.getHost(), "www.upv.es"); |
|
81 |
assertEquals(uri.getScheme(), "z3950"); |
|
82 |
assertEquals(uri.getPort(), 2100); |
|
83 |
assertEquals(uri.getPath(), ""); |
|
84 |
} |
|
85 |
|
|
86 |
public void test4() throws URISyntaxException{ |
|
87 |
URI uri = URIUtils.createUri("http://193.144.250.29/webservices/services/IDEC_GeoServeisPort", "http", 80); |
|
88 |
assertEquals(uri.getHost(), "193.144.250.29"); |
|
89 |
assertEquals(uri.getScheme(), "http"); |
|
90 |
assertEquals(uri.getPort(), 80); |
|
91 |
assertEquals(uri.getPath(), "/webservices/services/IDEC_GeoServeisPort"); |
|
92 |
} |
|
93 |
} |
|
0 | 94 |
tags/gvsig_sextante-0.2.0-1231/applications/appCatalogAndGazetteerClient/src-test/es/gva/cit/gazetteer/drivers/ExampleNewDriver.java | ||
---|---|---|
1 |
package es.gva.cit.gazetteer.drivers; |
|
2 |
|
|
3 |
import java.awt.geom.Point2D; |
|
4 |
import java.net.URI; |
|
5 |
|
|
6 |
import es.gva.cit.catalog.drivers.DiscoveryServiceCapabilities; |
|
7 |
import es.gva.cit.catalog.exceptions.NotSupportedProtocolException; |
|
8 |
import es.gva.cit.catalog.ui.search.SearchAditionalPropertiesPanel; |
|
9 |
import es.gva.cit.gazetteer.querys.Feature; |
|
10 |
import es.gva.cit.gazetteer.querys.GazetteerQuery; |
|
11 |
|
|
12 |
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana |
|
13 |
* |
|
14 |
* Copyright (C) 2004 IVER T.I. and Generalitat Valenciana. |
|
15 |
* |
|
16 |
* This program is free software; you can redistribute it and/or |
|
17 |
* modify it under the terms of the GNU General Public License |
|
18 |
* as published by the Free Software Foundation; either version 2 |
|
19 |
* of the License, or (at your option) any later version. |
|
20 |
* |
|
21 |
* This program is distributed in the hope that it will be useful, |
|
22 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
23 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
24 |
* GNU General Public License for more details. |
|
25 |
* |
|
26 |
* You should have received a copy of the GNU General Public License |
|
27 |
* along with this program; if not, write to the Free Software |
|
28 |
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,USA. |
|
29 |
* |
|
30 |
* For more information, contact: |
|
31 |
* |
|
32 |
* Generalitat Valenciana |
|
33 |
* Conselleria d'Infraestructures i Transport |
|
34 |
* Av. Blasco Ib??ez, 50 |
|
35 |
* 46010 VALENCIA |
|
36 |
* SPAIN |
|
37 |
* |
|
38 |
* +34 963862235 |
|
39 |
* gvsig@gva.es |
|
40 |
* www.gvsig.gva.es |
|
41 |
* |
|
42 |
* or |
|
43 |
* |
|
44 |
* IVER T.I. S.A |
|
45 |
* Salamanca 50 |
|
46 |
* 46005 Valencia |
|
47 |
* Spain |
|
48 |
* |
|
49 |
* +34 963163400 |
|
50 |
* dac@iver.es |
|
51 |
*/ |
|
52 |
/* CVS MESSAGES: |
|
53 |
* |
|
54 |
* $Id: ExampleNewDriver.java 537 2007-07-26 11:21:10 +0000 (Thu, 26 Jul 2007) jpiera $ |
|
55 |
* $Log$ |
|
56 |
* Revision 1.1.2.1 2007/07/13 12:00:35 jorpiell |
|
57 |
* Add the posibility to add a new panel |
|
58 |
* |
|
59 |
* |
|
60 |
*/ |
|
61 |
/** |
|
62 |
* @author Jorge Piera LLodr? (jorge.piera@iver.es) |
|
63 |
*/ |
|
64 |
public class ExampleNewDriver extends AbstractGazetteerServiceDriver { |
|
65 |
|
|
66 |
/* |
|
67 |
* (non-Javadoc) |
|
68 |
* @see es.gva.cit.catalogClient.drivers.IDiscoveryServiceDriver#getCapabilities(java.net.URI) |
|
69 |
*/ |
|
70 |
public DiscoveryServiceCapabilities getCapabilities(URI uri) { |
|
71 |
return new GazetteerCapabilities(); |
|
72 |
} |
|
73 |
|
|
74 |
/* |
|
75 |
* (non-Javadoc) |
|
76 |
* @see es.gva.cit.gazetteer.drivers.IGazetteerServiceDriver#getFeature(java.net.URI, es.gva.cit.gazetteer.querys.Query) |
|
77 |
*/ |
|
78 |
public Feature[] getFeature(URI uri, GazetteerQuery query) throws Exception { |
|
79 |
String prop = (String)query.getProperty("PROP1"); |
|
80 |
Feature[] features = new Feature[1]; |
|
81 |
features[0] = new Feature("1","Result 1","description 1",new Point2D.Double(0,0)); |
|
82 |
return features; |
|
83 |
} |
|
84 |
|
|
85 |
/* |
|
86 |
* (non-Javadoc) |
|
87 |
* @see es.gva.cit.gazetteer.drivers.IGazetteerServiceDriver#getServiceName() |
|
88 |
*/ |
|
89 |
public String getServiceName() { |
|
90 |
return "My service"; |
|
91 |
} |
|
92 |
|
|
93 |
/* |
|
94 |
* (non-Javadoc) |
|
95 |
* @see es.gva.cit.gazetteer.drivers.IGazetteerServiceDriver#getAditionalSearchPanel() |
|
96 |
*/ |
|
97 |
public SearchAditionalPropertiesPanel getAditionalSearchPanel(){ |
|
98 |
return new ExampleNewPanel(); |
|
99 |
} |
|
100 |
|
|
101 |
} |
|
0 | 102 |
tags/gvsig_sextante-0.2.0-1231/applications/appCatalogAndGazetteerClient/src-test/es/gva/cit/gazetteer/drivers/ExampleNewDriverTest.java | ||
---|---|---|
1 |
package es.gva.cit.gazetteer.drivers; |
|
2 |
|
|
3 |
import javax.swing.UIManager; |
|
4 |
import javax.swing.UnsupportedLookAndFeelException; |
|
5 |
|
|
6 |
import es.gva.cit.gazetteer.adl.drivers.ADLGazetteerServiceDriver; |
|
7 |
import es.gva.cit.gazetteer.idec.drivers.IDECGazetteerServiceDriver; |
|
8 |
import es.gva.cit.gazetteer.ui.serverconnect.ServerConnectDialog; |
|
9 |
import es.gva.cit.gazetteer.utils.GazetteerDriverRegister; |
|
10 |
import es.gva.cit.gazetteer.wfs.drivers.WFSServiceDriver; |
|
11 |
import es.gva.cit.gazetteer.wfsg.drivers.WFSGServiceDriver; |
|
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: ExampleNewDriverTest.java 512 2007-07-24 11:25:43 +0000 (Tue, 24 Jul 2007) jorpiell $ |
|
56 |
* $Log$ |
|
57 |
* Revision 1.1.2.2 2007/07/24 11:25:42 jorpiell |
|
58 |
* The registers has been refactorized |
|
59 |
* |
|
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 ExampleNewDriverTest { |
|
69 |
|
|
70 |
/** |
|
71 |
* @param args |
|
72 |
*/ |
|
73 |
public static void main(String[] args) { |
|
74 |
GazetteerDriverRegister register = GazetteerDriverRegister.getInstance(); |
|
75 |
register.register(new ExampleNewDriver()); |
|
76 |
//Get the currently installed look and feel |
|
77 |
UIManager.getLookAndFeel(); |
|
78 |
// Install a different look and feel; specifically, the Windows look and feel |
|
79 |
try { |
|
80 |
UIManager.setLookAndFeel( |
|
81 |
"com.sun.java.swing.plaf.windows.WindowsLookAndFeel"); |
|
82 |
} catch (InstantiationException e) { |
|
83 |
} catch (ClassNotFoundException e) { |
|
84 |
} catch (UnsupportedLookAndFeelException e) { |
|
85 |
} catch (IllegalAccessException e) { |
|
86 |
} |
|
87 |
|
|
88 |
new ServerConnectDialog(); |
|
89 |
} |
|
90 |
|
|
91 |
} |
|
0 | 92 |
tags/gvsig_sextante-0.2.0-1231/applications/appCatalogAndGazetteerClient/src-test/es/gva/cit/gazetteer/drivers/ExampleNewPanel.java | ||
---|---|---|
1 |
package es.gva.cit.gazetteer.drivers; |
|
2 |
|
|
3 |
import java.util.Properties; |
|
4 |
|
|
5 |
import javax.swing.JLabel; |
|
6 |
import javax.swing.JTextField; |
|
7 |
|
|
8 |
import es.gva.cit.catalog.ui.search.SearchAditionalPropertiesPanel; |
|
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: ExampleNewPanel.java 537 2007-07-26 11:21:10 +0000 (Thu, 26 Jul 2007) jpiera $ |
|
53 |
* $Log$ |
|
54 |
* Revision 1.1.2.1 2007/07/13 12:00:35 jorpiell |
|
55 |
* Add the posibility to add a new panel |
|
56 |
* |
|
57 |
* |
|
58 |
*/ |
|
59 |
/** |
|
60 |
* @author Jorge Piera LLodr? (jorge.piera@iver.es) |
|
61 |
*/ |
|
62 |
public class ExampleNewPanel extends SearchAditionalPropertiesPanel{ |
|
63 |
JLabel label = null; |
|
64 |
JTextField text = null; |
|
65 |
|
|
66 |
public ExampleNewPanel(){ |
|
67 |
label = new JLabel(); |
|
68 |
text = new JTextField(); |
|
69 |
setLayout(new java.awt.BorderLayout()); |
|
70 |
label.setText("Label"); |
|
71 |
add(label, java.awt.BorderLayout.WEST); |
|
72 |
add(text, java.awt.BorderLayout.CENTER); |
|
73 |
} |
|
74 |
|
|
75 |
/* |
|
76 |
* (non-Javadoc) |
|
77 |
* @see es.gva.cit.gazetteer.ui.search.SearchAditionalPropertiesPanel#getProperties() |
|
78 |
*/ |
|
79 |
public Properties getProperties() { |
|
80 |
Properties properties = new Properties(); |
|
81 |
properties.put("PROP1", text.getText()); |
|
82 |
return properties; |
|
83 |
} |
|
84 |
|
|
85 |
} |
|
0 | 86 |
tags/gvsig_sextante-0.2.0-1231/applications/appCatalogAndGazetteerClient/src-test/es/gva/cit/gazetteer/URIs.java | ||
---|---|---|
1 |
package es.gva.cit.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/gvsig_sextante-0.2.0-1231/applications/appCatalogAndGazetteerClient/config/cvs/Entries | ||
---|---|---|
1 |
/ApplicationContext.xml/1.1.2.1/Wed Sep 20 12:01:08 2006//TCatalogYNomenclator_v1_1_0_1005 |
|
2 |
/ApplicationContextAlone.xml/1.1.2.1/Wed Sep 20 12:01:08 2006//TCatalogYNomenclator_v1_1_0_1005 |
|
3 |
/TestContext.properties/1.1.2.1/Wed Sep 20 12:01:08 2006//TCatalogYNomenclator_v1_1_0_1005 |
|
0 | 4 |
tags/gvsig_sextante-0.2.0-1231/applications/appCatalogAndGazetteerClient/config/cvs/Tag | ||
---|---|---|
1 |
TCatalogYNomenclator_v1_1_0_1005 |
|
0 | 2 |
tags/gvsig_sextante-0.2.0-1231/applications/appCatalogAndGazetteerClient/config/cvs/Repository | ||
---|---|---|
1 |
gvSIG-project/applications/appCatalogYNomenclatorClient/config |
|
0 | 2 |
tags/gvsig_sextante-0.2.0-1231/applications/appCatalogAndGazetteerClient/config/cvs/Root | ||
---|---|---|
1 |
:extssh:jorpiell@www.gvsig.org:/var/lib/cvs-gvSIG |
|
0 | 2 |
tags/gvsig_sextante-0.2.0-1231/applications/appCatalogAndGazetteerClient/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> |
|
0 | 35 |
tags/gvsig_sextante-0.2.0-1231/applications/appCatalogAndGazetteerClient/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> |
|
0 | 28 |
tags/gvsig_sextante-0.2.0-1231/applications/appCatalogAndGazetteerClient/images/cvs/Root | ||
---|---|---|
1 |
:extssh:jorpiell@www.gvsig.org:/var/lib/cvs-gvSIG |
|
0 | 2 |
tags/gvsig_sextante-0.2.0-1231/applications/appCatalogAndGazetteerClient/images/cvs/Entries | ||
---|---|---|
1 |
/GazzButton.png/1.1/Wed Jan 25 08:14:29 2006/-kb/TCatalogYNomenclator_v1_1_0_1005 |
|
2 |
/IcoRecord.PNG/1.1/Tue May 31 08:23:45 2005/-kb/TCatalogYNomenclator_v1_1_0_1005 |
|
3 |
/SearchButton.bmp/1.1/Mon May 30 15:55:31 2005/-kb/TCatalogYNomenclator_v1_1_0_1005 |
|
4 |
/SearchButton.png/1.1/Mon May 30 15:55:31 2005/-kb/TCatalogYNomenclator_v1_1_0_1005 |
|
5 |
/delone.png/1.1/Thu Mar 9 12:30:36 2006/-kb/TCatalogYNomenclator_v1_1_0_1005 |
|
6 |
/down.png/1.1/Sat Oct 15 12:13:42 2005/-kb/TCatalogYNomenclator_v1_1_0_1005 |
|
7 |
/no_image.png/1.1/Wed Jan 25 08:14:29 2006/-kb/TCatalogYNomenclator_v1_1_0_1005 |
|
8 |
/up.png/1.1/Sat Oct 15 12:13:42 2005/-kb/TCatalogYNomenclator_v1_1_0_1005 |
|
0 | 9 |
tags/gvsig_sextante-0.2.0-1231/applications/appCatalogAndGazetteerClient/images/cvs/Tag | ||
---|---|---|
1 |
TCatalogYNomenclator_v1_1_0_1005 |
|
0 | 2 |
tags/gvsig_sextante-0.2.0-1231/applications/appCatalogAndGazetteerClient/images/cvs/Repository | ||
---|---|---|
1 |
gvSIG-project/applications/appCatalogYNomenclatorClient/images |
|
0 | 2 |
tags/gvsig_sextante-0.2.0-1231/applications/appCatalogAndGazetteerClient/build.number | ||
---|---|---|
1 |
#Build Number for ANT. Do not edit! |
|
2 |
#Fri Jun 05 12:56:00 CEST 2009 |
|
3 |
build.number=1236 |
|
0 | 4 |
tags/gvsig_sextante-0.2.0-1231/applications/appCatalogAndGazetteerClient/src/es/gva/cit/catalog/drivers/GetRecordsReply.java | ||
---|---|---|
1 |
package es.gva.cit.catalog.drivers; |
|
2 |
|
|
3 |
import java.net.URI; |
|
4 |
import java.util.ArrayList; |
|
5 |
|
|
6 |
import es.gva.cit.catalog.metadataxml.XMLNode; |
|
7 |
import es.gva.cit.catalog.schemas.Record; |
|
8 |
import es.gva.cit.catalog.schemas.RecordFactory; |
|
9 |
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana |
|
10 |
* |
|
11 |
* Copyright (C) 2004 IVER T.I. and Generalitat Valenciana. |
|
12 |
* |
|
13 |
* This program is free software; you can redistribute it and/or |
|
14 |
* modify it under the terms of the GNU General Public License |
|
15 |
* as published by the Free Software Foundation; either version 2 |
|
16 |
* of the License, or (at your option) any later version. |
|
17 |
* |
|
18 |
* This program is distributed in the hope that it will be useful, |
|
19 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
20 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
21 |
* GNU General Public License for more details. |
|
22 |
* |
|
23 |
* You should have received a copy of the GNU General Public License |
|
24 |
* along with this program; if not, write to the Free Software |
|
25 |
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,USA. |
|
26 |
* |
|
27 |
* For more information, contact: |
|
28 |
* |
|
29 |
* Generalitat Valenciana |
|
30 |
* Conselleria d'Infraestructures i Transport |
|
31 |
* Av. Blasco Ib??ez, 50 |
|
32 |
* 46010 VALENCIA |
|
33 |
* SPAIN |
|
34 |
* |
|
35 |
* +34 963862235 |
|
36 |
* gvsig@gva.es |
|
37 |
* www.gvsig.gva.es |
|
38 |
* |
|
39 |
* or |
|
40 |
* |
|
41 |
* IVER T.I. S.A |
|
42 |
* Salamanca 50 |
|
43 |
* 46005 Valencia |
|
44 |
* Spain |
|
45 |
* |
|
46 |
* +34 963163400 |
|
47 |
* dac@iver.es |
|
48 |
*/ |
|
49 |
/* CVS MESSAGES: |
|
50 |
* |
|
51 |
* $Id: GetRecordsReply.java 600 2007-09-19 11:30:05 +0000 (Wed, 19 Sep 2007) jpiera $ |
|
52 |
* $Log$ |
|
53 |
* Revision 1.1.2.1 2007/07/23 07:14:25 jorpiell |
|
54 |
* Catalog refactoring |
|
55 |
* |
|
56 |
* |
|
57 |
*/ |
|
58 |
/** |
|
59 |
* @author Jorge Piera LLodr? (jorge.piera@iver.es) |
|
60 |
*/ |
|
61 |
public class GetRecordsReply { |
|
62 |
private ArrayList records = null; |
|
63 |
private int numRecords = 0; |
|
64 |
|
|
65 |
public GetRecordsReply(int numRecords){ |
|
66 |
this.numRecords = numRecords; |
|
67 |
records = new ArrayList(); |
|
68 |
} |
|
69 |
|
|
70 |
/** |
|
71 |
* Add a new record |
|
72 |
* @param record |
|
73 |
* rRecord to add |
|
74 |
*/ |
|
75 |
public void addRecord(Record record){ |
|
76 |
records.add(record); |
|
77 |
} |
|
78 |
|
|
79 |
/** |
|
80 |
* Add a new record |
|
81 |
* @param uri |
|
82 |
* Server uri |
|
83 |
* @param node |
|
84 |
* XML node |
|
85 |
*/ |
|
86 |
public void addRecord(URI uri, XMLNode node){ |
|
87 |
Record record = RecordFactory.createRecord(uri, node); |
|
88 |
records.add(record); |
|
89 |
} |
|
90 |
|
|
91 |
/** |
|
92 |
* Gets a record that it is in a concrete position |
|
93 |
* @param index |
|
94 |
* Record position |
|
95 |
* @return |
|
96 |
* A record |
|
97 |
*/ |
|
98 |
public Record getRecordAt(int index){ |
|
99 |
if (index >= records.size()){ |
|
100 |
return null; |
|
101 |
} |
|
102 |
return (Record)records.get(index); |
|
103 |
} |
|
104 |
|
|
105 |
/** |
|
106 |
* @return the numRecords |
|
107 |
*/ |
|
108 |
public int getRecordsNumber() { |
|
109 |
return numRecords; |
|
110 |
} |
|
111 |
|
|
112 |
/** |
|
113 |
* @return the numRecords |
|
114 |
*/ |
|
115 |
public int getRetrievedRecordsNumber() { |
|
116 |
return records.size(); |
|
117 |
} |
|
118 |
|
|
119 |
/** |
|
120 |
* @param numRecords the numRecords to set |
|
121 |
*/ |
|
122 |
public void setNumRecords(int numRecords) { |
|
123 |
this.numRecords = numRecords; |
|
124 |
} |
|
125 |
|
|
126 |
} |
|
0 | 127 |
tags/gvsig_sextante-0.2.0-1231/applications/appCatalogAndGazetteerClient/src/es/gva/cit/catalog/drivers/IDiscoveryServiceDriver.java | ||
---|---|---|
1 |
package es.gva.cit.catalog.drivers; |
|
2 |
|
|
3 |
import java.net.URI; |
|
4 |
|
|
5 |
import com.iver.utiles.swing.jcomboServer.ServerData; |
Also available in: Unified diff