Revision 508
org.gvsig.catalog/tags/org.gvsig.catalog-2.0.89/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" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> |
|
4 |
|
|
5 |
<modelVersion>4.0.0</modelVersion> |
|
6 |
<artifactId>org.gvsig.catalog</artifactId> |
|
7 |
<packaging>pom</packaging> |
|
8 |
<name>${project.artifactId}</name> |
|
9 |
|
|
10 |
<version>2.0.89</version> |
|
11 |
|
|
12 |
<description>Web Catalog Service support</description> |
|
13 |
|
|
14 |
<parent> |
|
15 |
<groupId>org.gvsig</groupId> |
|
16 |
<artifactId>org.gvsig.desktop</artifactId> |
|
17 |
<version>2.0.265</version> |
|
18 |
</parent> |
|
19 |
|
|
20 |
<url>https://devel.gvsig.org/redmine/projects/gvsig-catalog</url> |
|
21 |
<scm> |
|
22 |
<connection>scm:svn:https://devel.gvsig.org/svn/gvsig-catalog/org.gvsig.catalog/tags/org.gvsig.catalog-2.0.89</connection> |
|
23 |
<developerConnection>scm:svn:https://devel.gvsig.org/svn/gvsig-catalog/org.gvsig.catalog/tags/org.gvsig.catalog-2.0.89</developerConnection> |
|
24 |
<url>scm:svn:https://devel.gvsig.org/svn/gvsig-catalog/org.gvsig.catalog/tags/org.gvsig.catalog-2.0.89</url> |
|
25 |
</scm> |
|
26 |
<repositories> |
|
27 |
<repository> |
|
28 |
<id>gvsig-public-http-repository</id> |
|
29 |
<name>gvSIG maven public HTTP repository</name> |
|
30 |
<url>http://devel.gvsig.org/m2repo/j2se</url> |
|
31 |
<releases> |
|
32 |
<enabled>true</enabled> |
|
33 |
<updatePolicy>daily</updatePolicy> |
|
34 |
<checksumPolicy>warn</checksumPolicy> |
|
35 |
</releases> |
|
36 |
<snapshots> |
|
37 |
<enabled>true</enabled> |
|
38 |
<updatePolicy>daily</updatePolicy> |
|
39 |
<checksumPolicy>warn</checksumPolicy> |
|
40 |
</snapshots> |
|
41 |
</repository> |
|
42 |
</repositories> |
|
43 |
<properties> |
|
44 |
<org.gvsig.raster.wcs.app.wcsclient.version>2.2.93</org.gvsig.raster.wcs.app.wcsclient.version> |
|
45 |
<org.gvsig.raster.wcs.io.version>2.2.93</org.gvsig.raster.wcs.io.version> |
|
46 |
</properties> |
|
47 |
<dependencyManagement> |
|
48 |
<dependencies> |
|
49 |
<dependency> |
|
50 |
<groupId>org.gvsig</groupId> |
|
51 |
<artifactId>org.gvsig.raster.wcs.app.wcsclient</artifactId> |
|
52 |
<version>${org.gvsig.raster.wcs.app.wcsclient.version}</version> |
|
53 |
<scope>compile</scope> |
|
54 |
</dependency> |
|
55 |
<dependency> |
|
56 |
<groupId>org.gvsig</groupId> |
|
57 |
<artifactId>org.gvsig.raster.wcs.io</artifactId> |
|
58 |
<version>${org.gvsig.raster.wcs.io.version}</version> |
|
59 |
<scope>compile</scope> |
|
60 |
</dependency> |
|
61 |
</dependencies> |
|
62 |
</dependencyManagement> |
|
63 |
|
|
64 |
<build> |
|
65 |
<plugins> |
|
66 |
<plugin> |
|
67 |
<groupId>org.apache.maven.plugins</groupId> |
|
68 |
<artifactId>maven-release-plugin</artifactId> |
|
69 |
<configuration> |
|
70 |
<tagBase>https://devel.gvsig.org/svn/gvsig-catalog/org.gvsig.catalog/tags</tagBase> |
|
71 |
</configuration> |
|
72 |
</plugin> |
|
73 |
</plugins> |
|
74 |
</build> |
|
75 |
|
|
76 |
<modules> |
|
77 |
<module>org.gvsig.catalog.extension</module> |
|
78 |
<module>org.gvsig.catalog.lib</module> |
|
79 |
</modules> |
|
80 |
|
|
81 |
</project> |
|
0 | 82 |
org.gvsig.catalog/tags/org.gvsig.catalog-2.0.89/org.gvsig.catalog.lib/src/test/java/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 |
org.gvsig.catalog/tags/org.gvsig.catalog-2.0.89/org.gvsig.catalog.lib/src/test/java/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 |
org.gvsig.catalog/tags/org.gvsig.catalog-2.0.89/org.gvsig.catalog.lib/src/test/java/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 |
org.gvsig.catalog/tags/org.gvsig.catalog-2.0.89/org.gvsig.catalog.lib/src/test/java/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 |
org.gvsig.catalog/tags/org.gvsig.catalog-2.0.89/org.gvsig.catalog.lib/src/main/resources/META-INF/services/org.gvsig.tools.library.Library | ||
---|---|---|
1 |
org.gvsig.catalog.CatalogLibrary |
|
2 |
org.gvsig.catalog.impl.DefaultCatalogLibrary |
org.gvsig.catalog/tags/org.gvsig.catalog-2.0.89/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/CatalogManager.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 java.lang.reflect.InvocationTargetException; |
|
31 |
import java.net.URI; |
|
32 |
import java.util.Map; |
|
33 |
|
|
34 |
import org.gvsig.catalog.drivers.ICatalogServiceDriver; |
|
35 |
import org.gvsig.catalog.loaders.LayerLoader; |
|
36 |
import org.gvsig.catalog.metadataxml.XMLNode; |
|
37 |
import org.gvsig.catalog.schemas.Record; |
|
38 |
import org.gvsig.catalog.schemas.Resource; |
|
39 |
import org.gvsig.utils.swing.jcomboServer.ServerData; |
|
40 |
|
|
41 |
/** |
|
42 |
* @author <a href="mailto:jpiera@gvsig.org">Jorge Piera</a> |
|
43 |
*/ |
|
44 |
public interface CatalogManager { |
|
45 |
/** |
|
46 |
* It is used to retrieve a driver that supports a concrete |
|
47 |
* protocol |
|
48 |
* @param protocol |
|
49 |
* Catalog protocol |
|
50 |
* @return |
|
51 |
* The concrete catalog service driver |
|
52 |
*/ |
|
53 |
public ICatalogServiceDriver getDriver(String protocol); |
|
54 |
|
|
55 |
/** |
|
56 |
* @return a list with all the catalog drivers |
|
57 |
*/ |
|
58 |
public ICatalogServiceDriver[] getDrivers(); |
|
59 |
|
|
60 |
/** |
|
61 |
* This method is used to register a new catalog driver |
|
62 |
* that manage a concrete protocol |
|
63 |
* @param driver |
|
64 |
* Catalog driver to register |
|
65 |
*/ |
|
66 |
public void register(String name, Class driver); |
|
67 |
|
|
68 |
/** |
|
69 |
* Adds a new record |
|
70 |
* @param record |
|
71 |
* New record to add |
|
72 |
*/ |
|
73 |
public void addRecord(Record record); |
|
74 |
|
|
75 |
/** |
|
76 |
* Try to identify the XML format and return a record |
|
77 |
* @param uri |
|
78 |
* Server URI (used to retrieve the images) |
|
79 |
* @param node |
|
80 |
* XML node |
|
81 |
* @return |
|
82 |
*/ |
|
83 |
public Record createRecord(URI uri, XMLNode node); |
|
84 |
|
|
85 |
public void addLayerLoader(String key, Class loader); |
|
86 |
|
|
87 |
public LayerLoader getLayerLoader(Resource resource) throws IllegalArgumentException, SecurityException, InstantiationException, IllegalAccessException, InvocationTargetException, NoSuchMethodException; |
|
88 |
|
|
89 |
/** |
|
90 |
* gets Map object to persist servers list |
|
91 |
* @return Map<String,ServerData> |
|
92 |
*/ |
|
93 |
public Map<String,ServerData> getServersPersistence(); |
|
94 |
|
|
95 |
/** |
|
96 |
* sets Map object to persist servers list |
|
97 |
* @param serversPersistence |
|
98 |
*/ |
|
99 |
public void setServersPersistence(Map<String,ServerData> serversPersistence); |
|
100 |
} |
|
101 |
|
|
0 | 102 |
org.gvsig.catalog/tags/org.gvsig.catalog-2.0.89/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/querys/Search.java | ||
---|---|---|
1 |
package org.gvsig.catalog.querys; |
|
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 |
/* CVS MESSAGES: |
|
43 |
* |
|
44 |
* $Id: Search.java 561 2007-07-27 06:49:30 +0000 (Fri, 27 Jul 2007) jpiera $ |
|
45 |
* $Log$ |
|
46 |
* Revision 1.1.2.1 2007/07/11 13:01:50 jorpiell |
|
47 |
* Catalog UI updated |
|
48 |
* |
|
49 |
* |
|
50 |
*/ |
|
51 |
/** |
|
52 |
* This class represents a search service (data or services) |
|
53 |
* @author Jorge Piera LLodr? (jorge.piera@iver.es) |
|
54 |
*/ |
|
55 |
public class Search { |
|
56 |
private String name = null; |
|
57 |
|
|
58 |
public Search(String name){ |
|
59 |
this.name = name; |
|
60 |
} |
|
61 |
|
|
62 |
/** |
|
63 |
* @return the name |
|
64 |
*/ |
|
65 |
public String getName() { |
|
66 |
return name; |
|
67 |
} |
|
68 |
|
|
69 |
/* |
|
70 |
* (non-Javadoc) |
|
71 |
* @see java.lang.Object#toString() |
|
72 |
*/ |
|
73 |
public String toString(){ |
|
74 |
return name; |
|
75 |
} |
|
76 |
} |
|
0 | 77 |
org.gvsig.catalog/tags/org.gvsig.catalog-2.0.89/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/querys/MetadataSearch.java | ||
---|---|---|
1 |
package org.gvsig.catalog.querys; |
|
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 |
/* CVS MESSAGES: |
|
43 |
* |
|
44 |
* $Id: MetadataSearch.java 561 2007-07-27 06:49:30 +0000 (Fri, 27 Jul 2007) jpiera $ |
|
45 |
* $Log$ |
|
46 |
* Revision 1.1.2.1 2007/07/11 13:01:50 jorpiell |
|
47 |
* Catalog UI updated |
|
48 |
* |
|
49 |
* |
|
50 |
*/ |
|
51 |
/** |
|
52 |
* @author Jorge Piera LLodr? (jorge.piera@iver.es) |
|
53 |
*/ |
|
54 |
public class MetadataSearch extends Search{ |
|
55 |
|
|
56 |
public MetadataSearch(String name) { |
|
57 |
super(name); |
|
58 |
} |
|
59 |
|
|
60 |
} |
|
0 | 61 |
org.gvsig.catalog/tags/org.gvsig.catalog-2.0.89/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/querys/ServicesSearch.java | ||
---|---|---|
1 |
package org.gvsig.catalog.querys; |
|
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 |
/* CVS MESSAGES: |
|
43 |
* |
|
44 |
* $Id: ServicesSearch.java 561 2007-07-27 06:49:30 +0000 (Fri, 27 Jul 2007) jpiera $ |
|
45 |
* $Log$ |
|
46 |
* Revision 1.1.2.1 2007/07/11 13:01:50 jorpiell |
|
47 |
* Catalog UI updated |
|
48 |
* |
|
49 |
* |
|
50 |
*/ |
|
51 |
/** |
|
52 |
* This class implements a services search |
|
53 |
* @author Jorge Piera LLodr? (jorge.piera@iver.es) |
|
54 |
*/ |
|
55 |
public class ServicesSearch extends Search { |
|
56 |
|
|
57 |
public ServicesSearch(String name) { |
|
58 |
super(name); |
|
59 |
} |
|
60 |
|
|
61 |
} |
|
0 | 62 |
org.gvsig.catalog/tags/org.gvsig.catalog-2.0.89/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/querys/Coordinates.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.querys; |
|
43 |
|
|
44 |
/** |
|
45 |
* This class represents a symple double pair of coordinates |
|
46 |
* |
|
47 |
* |
|
48 |
* @author Jorge Piera Llodra (piera_jor@gva.es) |
|
49 |
*/ |
|
50 |
public class Coordinates { |
|
51 |
public String ulx; |
|
52 |
public String uly; |
|
53 |
public String brx; |
|
54 |
public String bry; |
|
55 |
|
|
56 |
/** |
|
57 |
* @param ulx |
|
58 |
* @param uly |
|
59 |
* @param brx |
|
60 |
* @param bry |
|
61 |
*/ |
|
62 |
public Coordinates(String ulx, String uly, String brx, String bry) { |
|
63 |
this.ulx = ulx; |
|
64 |
this.uly = uly; |
|
65 |
this.brx = brx; |
|
66 |
this.bry = bry; |
|
67 |
} |
|
68 |
|
|
69 |
/** |
|
70 |
* |
|
71 |
* |
|
72 |
* |
|
73 |
* @param ulx |
|
74 |
* @param uly |
|
75 |
* @param brx |
|
76 |
* @param bry |
|
77 |
*/ |
|
78 |
public Coordinates(double ulx, double uly, double brx, double bry) { |
|
79 |
this.ulx = String.valueOf(ulx); |
|
80 |
this.uly = String.valueOf(uly); |
|
81 |
this.brx = String.valueOf(brx); |
|
82 |
this.bry = String.valueOf(bry); |
|
83 |
} |
|
84 |
|
|
85 |
/** |
|
86 |
* |
|
87 |
* |
|
88 |
* |
|
89 |
* @return Returns the brx. |
|
90 |
*/ |
|
91 |
public String getBrx() { |
|
92 |
return brx; |
|
93 |
} |
|
94 |
|
|
95 |
/** |
|
96 |
* |
|
97 |
* |
|
98 |
* |
|
99 |
* @return |
|
100 |
*/ |
|
101 |
public double getDoubleBrx() { |
|
102 |
return Double.valueOf(brx).doubleValue(); |
|
103 |
} |
|
104 |
|
|
105 |
/** |
|
106 |
* |
|
107 |
* |
|
108 |
* |
|
109 |
* @param brx The brx to set. |
|
110 |
*/ |
|
111 |
public void setBrx(String brx) { |
|
112 |
this.brx = brx; |
|
113 |
} |
|
114 |
|
|
115 |
/** |
|
116 |
* |
|
117 |
* |
|
118 |
* |
|
119 |
* @return Returns the bry. |
|
120 |
*/ |
|
121 |
public String getBry() { |
|
122 |
return bry; |
|
123 |
} |
|
124 |
|
|
125 |
/** |
|
126 |
* |
|
127 |
* |
|
128 |
* |
|
129 |
* @return |
|
130 |
*/ |
|
131 |
public double getDoubleBry() { |
|
132 |
return Double.valueOf(bry).doubleValue(); |
|
133 |
} |
|
134 |
|
|
135 |
/** |
|
136 |
* |
|
137 |
* |
|
138 |
* |
|
139 |
* @param bry The bry to set. |
|
140 |
*/ |
|
141 |
public void setBry(String bry) { |
|
142 |
this.bry = bry; |
|
143 |
} |
|
144 |
|
|
145 |
/** |
|
146 |
* |
|
147 |
* |
|
148 |
* |
|
149 |
* @return Returns the ulx. |
|
150 |
*/ |
|
151 |
public String getUlx() { |
|
152 |
return ulx; |
|
153 |
} |
|
154 |
|
|
155 |
/** |
|
156 |
* |
|
157 |
* |
|
158 |
* |
|
159 |
* @return |
|
160 |
*/ |
|
161 |
public double getDoubleUlx() { |
|
162 |
return Double.valueOf(ulx).doubleValue(); |
|
163 |
} |
|
164 |
|
|
165 |
/** |
|
166 |
* |
|
167 |
* |
|
168 |
* |
|
169 |
* @param ulx The ulx to set. |
|
170 |
*/ |
|
171 |
public void setUlx(String ulx) { |
|
172 |
this.ulx = ulx; |
|
173 |
} |
|
174 |
|
|
175 |
/** |
|
176 |
* |
|
177 |
* |
|
178 |
* |
|
179 |
* @return Returns the uly. |
|
180 |
*/ |
|
181 |
public String getUly() { |
|
182 |
return uly; |
|
183 |
} |
|
184 |
|
|
185 |
/** |
|
186 |
* |
|
187 |
* |
|
188 |
* |
|
189 |
* @return |
|
190 |
*/ |
|
191 |
public double getDoubleUly() { |
|
192 |
return Double.valueOf(uly).doubleValue(); |
|
193 |
} |
|
194 |
|
|
195 |
/** |
|
196 |
* |
|
197 |
* |
|
198 |
* |
|
199 |
* @param uly The uly to set. |
|
200 |
*/ |
|
201 |
public void setUly(String uly) { |
|
202 |
this.uly = uly; |
|
203 |
} |
|
204 |
} |
|
0 | 205 |
org.gvsig.catalog/tags/org.gvsig.catalog-2.0.89/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/querys/DiscoveryServiceQuery.java | ||
---|---|---|
1 |
package org.gvsig.catalog.querys; |
|
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$ |
|
48 |
* $Log$ |
|
49 |
* |
|
50 |
*/ |
|
51 |
/** |
|
52 |
* @author Jorge Piera LLodr? (jorge.piera@iver.es) |
|
53 |
*/ |
|
54 |
public class DiscoveryServiceQuery { |
|
55 |
private Properties properties = null; |
|
56 |
|
|
57 |
public DiscoveryServiceQuery(){ |
|
58 |
this.properties = new Properties(); |
|
59 |
} |
|
60 |
|
|
61 |
/** |
|
62 |
* @return a property |
|
63 |
*/ |
|
64 |
public Object getProperty(String propertyName) { |
|
65 |
return properties.get(propertyName); |
|
66 |
} |
|
67 |
|
|
68 |
/** |
|
69 |
* Set the properties |
|
70 |
* @param properties |
|
71 |
* The properties to set |
|
72 |
*/ |
|
73 |
public void setProperties(Properties properties) { |
|
74 |
this.properties = properties; |
|
75 |
} |
|
76 |
|
|
77 |
|
|
78 |
} |
|
0 | 79 |
org.gvsig.catalog/tags/org.gvsig.catalog-2.0.89/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/querys/CatalogQuery.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.querys; |
|
43 |
|
|
44 |
import org.gvsig.catalog.utils.CatalogConstants; |
|
45 |
|
|
46 |
/** |
|
47 |
* This class implements a general query. It contains an attribute |
|
48 |
* for each parameter that can be showed in the search form. |
|
49 |
* |
|
50 |
* |
|
51 |
* @author Jorge Piera Llodra (piera_jor@gva.es) |
|
52 |
*/ |
|
53 |
public class CatalogQuery extends DiscoveryServiceQuery{ |
|
54 |
private Search service = null; |
|
55 |
private String title; |
|
56 |
private String titleFilter; |
|
57 |
private String abstract_; |
|
58 |
private String themeKey; |
|
59 |
private String topic; |
|
60 |
private String scale; |
|
61 |
private String provider; |
|
62 |
private String DateFrom; |
|
63 |
private String DateTo; |
|
64 |
private Coordinates coordinates; |
|
65 |
private String coordinatesFilter; |
|
66 |
private boolean isMinimized; |
|
67 |
private boolean isCoordinatesClicked; |
|
68 |
|
|
69 |
public CatalogQuery() { |
|
70 |
super(); |
|
71 |
} |
|
72 |
|
|
73 |
/** |
|
74 |
* @param title |
|
75 |
* @param titleFilter |
|
76 |
* @param abstract_ |
|
77 |
* @param themeKey |
|
78 |
* @param topic |
|
79 |
* @param scale |
|
80 |
* @param provider |
|
81 |
* @param dateFrom |
|
82 |
* @param dateTo |
|
83 |
* @param coordinates |
|
84 |
* @param coordinatesFilter |
|
85 |
* @param translator |
|
86 |
*/ |
|
87 |
public CatalogQuery(String title, String titleFilter, String abstract_, String themeKey, String topic, String scale, String provider, String dateFrom, String dateTo, Coordinates coordinates, String coordinatesFilter) { |
|
88 |
super(); |
|
89 |
this.title = title; |
|
90 |
this.titleFilter = titleFilter; |
|
91 |
this.abstract_ = abstract_; |
|
92 |
this.themeKey = themeKey; |
|
93 |
this.topic = topic; |
|
94 |
this.scale = scale; |
|
95 |
this.provider = provider; |
|
96 |
//Date |
|
97 |
this.DateFrom = dateFrom; |
|
98 |
this.DateTo = dateTo; |
|
99 |
//Coordinates |
|
100 |
this.coordinates = coordinates; |
|
101 |
if (this.coordinates != null) { |
|
102 |
if (this.coordinates.getUlx().equals("") || |
|
103 |
this.coordinates.getUlx().equals("") || |
|
104 |
this.coordinates.getBrx().equals("") || |
|
105 |
this.coordinates.getBry().equals("")) { |
|
106 |
this.coordinates = null; |
|
107 |
} else { |
|
108 |
try { |
|
109 |
Double.parseDouble(this.coordinates.getUlx()); |
|
110 |
Double.parseDouble(this.coordinates.getUlx()); |
|
111 |
Double.parseDouble(this.coordinates.getBrx()); |
|
112 |
Double.parseDouble(this.coordinates.getBry()); |
|
113 |
this.coordinates = coordinates; |
|
114 |
} catch (Exception e) { |
|
115 |
this.coordinates = null; |
|
116 |
|
|
117 |
} |
|
118 |
} |
|
119 |
} |
|
120 |
this.coordinatesFilter = coordinatesFilter; |
|
121 |
|
|
122 |
setMinimized(false); |
|
123 |
} |
|
124 |
|
|
125 |
/** |
|
126 |
* Return logic operators |
|
127 |
* |
|
128 |
* @param titleKeys E,A o Y --> Exact, All, anY |
|
129 |
* |
|
130 |
* @return String |
|
131 |
* @param concordancia |
|
132 |
*/ |
|
133 |
public String getOperator(String concordancia) { |
|
134 |
if (concordancia.equals(CatalogConstants.ANY_WORD)) { |
|
135 |
return CatalogConstants.OR; |
|
136 |
} else { |
|
137 |
return CatalogConstants.OR; |
|
138 |
} |
|
139 |
} |
|
140 |
|
|
141 |
/** |
|
142 |
* |
|
143 |
* |
|
144 |
* |
|
145 |
* @return Returns the abstract_. |
|
146 |
*/ |
|
147 |
public String getAbstract() { |
|
148 |
return abstract_; |
|
149 |
} |
|
150 |
|
|
151 |
/** |
|
152 |
* |
|
153 |
* |
|
154 |
* |
|
155 |
* @param abstract_ The abstract_ to set. |
|
156 |
*/ |
|
157 |
public void setAbstract(String abstract_) { |
|
158 |
this.abstract_ = abstract_; |
|
159 |
} |
|
160 |
|
|
161 |
/** |
|
162 |
* |
|
163 |
* |
|
164 |
* |
|
165 |
* @return Returns the coordinates. |
|
166 |
*/ |
|
167 |
public Coordinates getCoordenates() { |
|
168 |
return coordinates; |
|
169 |
} |
|
170 |
|
|
171 |
/** |
|
172 |
* |
|
173 |
* |
|
174 |
* |
|
175 |
* @param coordenates The coordinates to set. |
|
176 |
*/ |
|
177 |
public void setCoordenates(Coordinates coordenates) { |
|
178 |
this.coordinates = coordenates; |
|
179 |
} |
|
180 |
|
|
181 |
/** |
|
182 |
* |
|
183 |
* |
|
184 |
* |
|
185 |
* @return Returns the coordinatesFilter. |
|
186 |
*/ |
|
187 |
public String getCoordenatesFilter() { |
|
188 |
return coordinatesFilter; |
|
189 |
} |
|
190 |
|
|
191 |
/** |
|
192 |
* |
|
193 |
* |
|
194 |
* |
|
195 |
* @param coordenatesFilter The coordenatesFilter to set. |
|
196 |
*/ |
|
197 |
public void setCoordenatesFilter(String coordenatesFilter) { |
|
198 |
this.coordinatesFilter = coordenatesFilter; |
|
199 |
} |
|
200 |
|
|
201 |
/** |
|
202 |
* |
|
203 |
* |
|
204 |
* |
|
205 |
* @return Returns the dateFrom. |
|
206 |
*/ |
|
207 |
public String getDateFrom() { |
|
208 |
return DateFrom; |
|
209 |
} |
|
210 |
|
|
211 |
/** |
|
212 |
* |
|
213 |
* |
|
214 |
* |
|
215 |
* @param dateFrom The dateFrom to set. |
|
216 |
*/ |
|
217 |
public void setDateFrom(String dateFrom) { |
|
218 |
DateFrom = dateFrom; |
|
219 |
} |
|
220 |
|
|
221 |
/** |
|
222 |
* |
|
223 |
* |
|
224 |
* |
|
225 |
* @return Returns the dateTo. |
|
226 |
*/ |
|
227 |
public String getDateTo() { |
|
228 |
return DateTo; |
|
229 |
} |
|
230 |
|
|
231 |
/** |
|
232 |
* |
|
233 |
* |
|
234 |
* |
|
235 |
* @param dateTo The dateTo to set. |
|
236 |
*/ |
|
237 |
public void setDateTo(String dateTo) { |
|
238 |
DateTo = dateTo; |
|
239 |
} |
|
240 |
|
|
241 |
/** |
|
242 |
* |
|
243 |
* |
|
244 |
* |
|
245 |
* @return Returns the provider. |
|
246 |
*/ |
|
247 |
public String getProvider() { |
|
248 |
return provider; |
|
249 |
} |
|
250 |
|
|
251 |
/** |
|
252 |
* |
|
253 |
* |
|
254 |
* |
|
255 |
* @param provider The provider to set. |
|
256 |
*/ |
|
257 |
public void setProvider(String provider) { |
|
258 |
this.provider = provider; |
|
259 |
} |
|
260 |
|
|
261 |
/** |
|
262 |
* |
|
263 |
* |
|
264 |
* |
|
265 |
* @return Returns the scale. |
|
266 |
*/ |
|
267 |
public String getScale() { |
|
268 |
return scale; |
|
269 |
} |
|
270 |
|
|
271 |
/** |
|
272 |
* |
|
273 |
* |
|
274 |
* |
|
275 |
* @param scale The scale to set. |
|
276 |
*/ |
|
277 |
public void setScale(String scale) { |
|
278 |
this.scale = scale; |
|
279 |
} |
|
280 |
|
|
281 |
/** |
|
282 |
* |
|
283 |
* |
|
284 |
* |
|
285 |
* @return Returns the themeKey. |
|
286 |
*/ |
|
287 |
public String getThemeKey() { |
|
288 |
return themeKey; |
|
289 |
} |
|
290 |
|
|
291 |
/** |
|
292 |
* |
|
293 |
* |
|
294 |
* |
|
295 |
* @param themeKey The themeKey to set. |
|
296 |
*/ |
|
297 |
public void setThemeKey(String themeKey) { |
|
298 |
this.themeKey = themeKey; |
|
299 |
} |
|
300 |
|
|
301 |
/** |
|
302 |
* |
|
303 |
* |
|
304 |
* |
|
305 |
* @return Returns the title. |
|
306 |
*/ |
|
307 |
public String getTitle() { |
|
308 |
return title; |
|
309 |
} |
|
310 |
|
|
311 |
/** |
|
312 |
* |
|
313 |
* |
|
314 |
* |
|
315 |
* @param title The title to set. |
|
316 |
*/ |
|
317 |
public void setTitle(String title) { |
|
318 |
this.title = title; |
|
319 |
} |
|
320 |
|
Also available in: Unified diff