Revision 29340
tags/tmp_build/applications/appCatalog/.project | ||
---|---|---|
1 |
<?xml version="1.0" encoding="UTF-8"?> |
|
2 |
<projectDescription> |
|
3 |
<name>appCatalog</name> |
|
4 |
<comment>Base POM for all GvSIG extension projects. This pom knows |
|
5 |
how to build and made an extension for GvSIG. The property |
|
6 |
"gvsig-path" must be set up correctly.</comment> |
|
7 |
<projects> |
|
8 |
<project>libIverUtiles</project> |
|
9 |
<project>libCompat</project> |
|
10 |
<project>libGPE</project> |
|
11 |
<project>libGPE-GML</project> |
|
12 |
<project>libGPE-XML</project> |
|
13 |
<project>libInternationalization</project> |
|
14 |
<project>libRemoteServices</project> |
|
15 |
<project>libTools</project> |
|
16 |
</projects> |
|
17 |
<buildSpec> |
|
18 |
<buildCommand> |
|
19 |
<name>org.eclipse.jdt.core.javabuilder</name> |
|
20 |
<arguments> |
|
21 |
</arguments> |
|
22 |
</buildCommand> |
|
23 |
</buildSpec> |
|
24 |
<natures> |
|
25 |
<nature>org.eclipse.jem.workbench.JavaEMFNature</nature> |
|
26 |
<nature>org.eclipse.jdt.core.javanature</nature> |
|
27 |
<nature>org.eclipse.jem.beaninfo.BeanInfoNature</nature> |
|
28 |
</natures> |
|
29 |
</projectDescription> |
|
0 | 30 |
tags/tmp_build/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/tmp_build/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.impl.DefaultCatalogLibrary; |
|
8 |
import org.gvsig.catalog.ui.serverconnect.ServerConnectDialog; |
|
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 |
DefaultCatalogLibrary library = new DefaultCatalogLibrary(); |
|
73 |
library.initialize(); |
|
74 |
library.postInitialize(); |
|
75 |
|
|
76 |
CatalogLocator.getCatalogManager().register("My catalog service", ExampleNewDriver.class); |
|
77 |
//Get the currently installed look and feel |
|
78 |
UIManager.getLookAndFeel(); |
|
79 |
// Install a different look and feel; specifically, the Windows look and feel |
|
80 |
try { |
|
81 |
UIManager.setLookAndFeel( |
|
82 |
"com.sun.java.swing.plaf.windows.WindowsLookAndFeel"); |
|
83 |
} catch (InstantiationException e) { |
|
84 |
} catch (ClassNotFoundException e) { |
|
85 |
} catch (UnsupportedLookAndFeelException e) { |
|
86 |
} catch (IllegalAccessException e) { |
|
87 |
} |
|
88 |
|
|
89 |
new ServerConnectDialog(); |
|
90 |
} |
|
91 |
|
|
92 |
} |
|
0 | 93 |
tags/tmp_build/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/tmp_build/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/tmp_build/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/tmp_build/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/tmp_build/applications/appCatalog/build.number | ||
---|---|---|
1 |
#Build Number for ANT. Do not edit! |
|
2 |
#Fri Apr 24 13:12:16 CEST 2009 |
|
3 |
build.number=1231 |
|
0 | 4 |
tags/tmp_build/applications/appCatalog/src/org/gvsig/catalog/CatalogLibrary.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.BaseLibrary; |
|
31 |
import org.gvsig.tools.locator.ReferenceNotRegisteredException; |
|
32 |
|
|
33 |
/** |
|
34 |
* @author <a href="mailto:jpiera@gvsig.org">Jorge Piera</a> |
|
35 |
*/ |
|
36 |
public class CatalogLibrary extends BaseLibrary { |
|
37 |
|
|
38 |
/* |
|
39 |
* (non-Javadoc) |
|
40 |
* @see org.gvsig.tools.locator.BaseLibrary#initialize() |
|
41 |
*/ |
|
42 |
public void initialize() throws ReferenceNotRegisteredException { |
|
43 |
super.initialize(); |
|
44 |
} |
|
45 |
|
|
46 |
/* |
|
47 |
* (non-Javadoc) |
|
48 |
* @see org.gvsig.tools.locator.BaseLibrary#postInitialize() |
|
49 |
*/ |
|
50 |
public void postInitialize() { |
|
51 |
super.postInitialize(); |
|
52 |
|
|
53 |
// Validate there is any implementation registered of CatalogManager. |
|
54 |
CatalogManager catalogManager = CatalogLocator.getCatalogManager(); |
|
55 |
if (catalogManager == null) { |
|
56 |
throw new ReferenceNotRegisteredException( |
|
57 |
CatalogLocator.CATALOG_MANAGER_NAME, |
|
58 |
CatalogLocator.getInstance()); |
|
59 |
} |
|
60 |
} |
|
61 |
} |
|
0 | 62 |
tags/tmp_build/applications/appCatalog/src/org/gvsig/catalog/exceptions/NotSupportedProtocolException.java | ||
---|---|---|
1 |
package org.gvsig.catalog.exceptions; |
|
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: NotSupportedProtocolException.java 561 2007-07-27 06:49:30 +0000 (Fri, 27 Jul 2007) jpiera $ |
|
45 |
* $Log$ |
|
46 |
* Revision 1.1.2.1 2007/07/10 11:18:04 jorpiell |
|
47 |
* Added the registers |
|
48 |
* |
|
49 |
* |
|
50 |
*/ |
|
51 |
/** |
|
52 |
* @author Jorge Piera LLodr? (jorge.piera@iver.es) |
|
53 |
*/ |
|
54 |
public class NotSupportedProtocolException extends Exception { |
|
55 |
|
|
56 |
public NotSupportedProtocolException(Throwable cause) { |
|
57 |
super(cause); |
|
58 |
} |
|
59 |
|
|
60 |
/* |
|
61 |
* (non-Javadoc) |
|
62 |
* @see java.lang.Throwable#toString() |
|
63 |
*/ |
|
64 |
public String toString(){ |
|
65 |
return "errorNotSupportedProtocol"; |
|
66 |
} |
|
67 |
} |
|
0 | 68 |
tags/tmp_build/applications/appCatalog/src/org/gvsig/catalog/exceptions/ServerIsNotReadyException.java | ||
---|---|---|
1 |
package org.gvsig.catalog.exceptions; |
|
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: ServerIsNotReadyException.java 561 2007-07-27 06:49:30 +0000 (Fri, 27 Jul 2007) jpiera $ |
|
45 |
* $Log$ |
|
46 |
* Revision 1.1.2.1 2007/07/10 11:18:04 jorpiell |
|
47 |
* Added the registers |
|
48 |
* |
|
49 |
* |
|
50 |
*/ |
|
51 |
/** |
|
52 |
* This exception indicates that the server is not ready |
|
53 |
* @author Jorge Piera LLodr? (jorge.piera@iver.es) |
|
54 |
*/ |
|
55 |
public class ServerIsNotReadyException extends Exception { |
|
56 |
private static final long serialVersionUID = 397526568003318327L; |
|
57 |
|
|
58 |
public ServerIsNotReadyException(Throwable cause) { |
|
59 |
super(cause); |
|
60 |
} |
|
61 |
|
|
62 |
/* |
|
63 |
* (non-Javadoc) |
|
64 |
* @see java.lang.Throwable#toString() |
|
65 |
*/ |
|
66 |
public String toString(){ |
|
67 |
return "errorServerNotFound"; |
|
68 |
} |
|
69 |
} |
|
0 | 70 |
tags/tmp_build/applications/appCatalog/src/org/gvsig/catalog/exceptions/NotSupportedVersionException.java | ||
---|---|---|
1 |
package org.gvsig.catalog.exceptions; |
|
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$ |
|
45 |
* $Log$ |
|
46 |
* |
|
47 |
*/ |
|
48 |
/** |
|
49 |
* @author Jorge Piera LLodr? (jorge.piera@iver.es) |
|
50 |
*/ |
|
51 |
public class NotSupportedVersionException extends Exception{ |
|
52 |
|
|
53 |
public NotSupportedVersionException(Throwable cause) { |
|
54 |
super(cause); |
|
55 |
} |
|
56 |
|
|
57 |
public NotSupportedVersionException() { |
|
58 |
super(); |
|
59 |
} |
|
60 |
|
|
61 |
/* |
|
62 |
* (non-Javadoc) |
|
63 |
* @see java.lang.Throwable#toString() |
|
64 |
*/ |
|
65 |
public String toString(){ |
|
66 |
return "errorNotSupportedVersion"; |
|
67 |
} |
|
68 |
} |
|
0 | 69 |
tags/tmp_build/applications/appCatalog/src/org/gvsig/catalog/schemas/LaitsGmuEbRIMRecord.java | ||
---|---|---|
1 |
package org.gvsig.catalog.schemas; |
|
2 |
|
|
3 |
import java.net.URI; |
|
4 |
|
|
5 |
import org.gvsig.catalog.metadataxml.XMLNode; |
|
6 |
import org.gvsig.catalog.metadataxml.XMLTree; |
|
7 |
import org.gvsig.catalog.querys.Coordinates; |
|
8 |
|
|
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$ |
|
53 |
* $Log$ |
|
54 |
* |
|
55 |
*/ |
|
56 |
/** |
|
57 |
* @author Jorge Piera LLodr? (jorge.piera@iver.es) |
|
58 |
*/ |
|
59 |
public class LaitsGmuEbRIMRecord extends Record{ |
|
60 |
private static final String ROOT = "laitscsw:DataGranule"; |
|
61 |
|
|
62 |
public LaitsGmuEbRIMRecord() { |
|
63 |
|
|
64 |
} |
|
65 |
|
|
66 |
public LaitsGmuEbRIMRecord(URI uri, XMLNode node) { |
|
67 |
super(uri,node); |
|
68 |
setTitle(node.searchNodeValue("name")); |
|
69 |
setAbstract_(node.searchNodeValue("description")); |
|
70 |
setPurpose(null); |
|
71 |
setKeyWords(null); |
|
72 |
setResources(getResources("OnlineAccessURLs->OnlineAccessURL")); |
|
73 |
setFileID(node.getAttribute("id")); |
|
74 |
setImageURL(node.searchNodeValue("previewURL")); |
|
75 |
} |
|
76 |
|
|
77 |
private Resource[] getResources(String label) { |
|
78 |
XMLNode[] nodes = XMLTree.searchMultipleNode(getNode(), label); |
|
79 |
|
|
80 |
if (nodes == null) { |
|
81 |
return null; |
|
82 |
} |
|
83 |
|
|
84 |
Coordinates coordinates = null; |
|
85 |
String srs = XMLTree.searchNodeValue(getNode(),"ogc:BBOX->referenceSystemNameCode"); |
|
86 |
coordinates = new Coordinates(XMLTree.searchNodeValue(getNode(),"ogc:BBOX->westBoundingCoordinate"), |
|
87 |
XMLTree.searchNodeValue(getNode(),"ogc:BBOX->northBoundingCoordinate"), |
|
88 |
XMLTree.searchNodeValue(getNode(),"ogc:BBOX->eastBoundingCoordinate"), |
|
89 |
XMLTree.searchNodeValue(getNode(),"ogc:BBOX->southBoundingCoordinate")); |
|
90 |
|
|
91 |
Resource[] resources = new Resource[nodes.length]; |
|
92 |
|
|
93 |
for (int i = 0; i < resources.length; i++){ |
|
94 |
resources[i] = new Resource(nodes[i].searchNodeValue("URL"), |
|
95 |
Resource.DOWNLOAD, |
|
96 |
null, |
|
97 |
null, |
|
98 |
null, |
|
99 |
srs, |
|
100 |
coordinates); |
|
101 |
if (resources[i].getLinkage() == null){ |
|
102 |
resources[i].setLinkage(""); |
|
103 |
} |
|
104 |
|
|
105 |
} |
|
106 |
return resources; |
|
107 |
} |
|
108 |
|
|
109 |
|
|
110 |
/* |
|
111 |
* (non-Javadoc) |
|
112 |
* @see es.gva.cit.catalogClient.schemas.discoverer.Record#accept(java.net.URI, es.gva.cit.catalogClient.metadataxml.XMLNode) |
|
113 |
*/ |
|
114 |
public boolean accept(URI uri, XMLNode node) { |
|
115 |
System.out.println(node.getName()); |
|
116 |
if (node.getName().equals(ROOT)){ |
|
117 |
return true; |
|
118 |
} |
|
119 |
return false; |
|
120 |
} |
|
121 |
} |
|
0 | 122 |
tags/tmp_build/applications/appCatalog/src/org/gvsig/catalog/schemas/DublinCoreRecord.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.schemas; |
|
43 |
import java.net.URI; |
|
44 |
|
|
45 |
import org.gvsig.catalog.metadataxml.XMLNode; |
|
46 |
import org.gvsig.catalog.metadataxml.XMLTree; |
|
47 |
import org.gvsig.catalog.querys.Coordinates; |
|
48 |
|
|
49 |
|
|
50 |
/** |
|
51 |
* This class parses a XMLNode that contains a DublinCore tree |
|
52 |
* |
|
53 |
* |
|
54 |
* @author Jorge Piera Llodra (piera_jor@gva.es) |
|
55 |
*/ |
|
56 |
public class DublinCoreRecord extends Record { |
|
57 |
|
|
58 |
public DublinCoreRecord() { |
|
59 |
|
|
60 |
} |
|
61 |
|
|
62 |
/** |
|
63 |
* @param node |
|
64 |
*/ |
|
65 |
public DublinCoreRecord(URI uri,XMLNode node) { |
|
66 |
super(uri,node); |
|
67 |
setTitle(XMLTree.searchNodeValue(node,"dc:title")); |
|
68 |
setAbstract_(XMLTree.searchNodeValue(node, "dc:subject")); |
|
69 |
setPurpose(XMLTree.searchNodeValue(node, "dc:description")); |
|
70 |
setResources(getResources(node)); |
|
71 |
} |
|
72 |
|
|
73 |
/** |
|
74 |
* It parses the resource tags |
|
75 |
* |
|
76 |
* |
|
77 |
* @return |
|
78 |
* @param node |
|
79 |
*/ |
|
80 |
public Resource[] getResources(XMLNode node) { |
|
81 |
String format = XMLTree.searchNodeValue(node, "dc:format"); |
|
82 |
String source = XMLTree.searchNodeValue(node, "dc:source"); |
|
83 |
Coordinates coordinates = new Coordinates(XMLTree.searchNodeValue(getNode(),"dc:spatial->dcmiBox:Box->dcmiBox:westlimit"), |
|
84 |
XMLTree.searchNodeValue(getNode(),"dc:spatial->dcmiBox:Box->dcmiBox:northlimit"), |
|
85 |
XMLTree.searchNodeValue(getNode(),"dc:spatial->dcmiBox:Box->dcmiBox:eastlimit"), |
|
86 |
XMLTree.searchNodeValue(getNode(),"dc:spatial->dcmiBox:Box->dcmiBox:southlimit")); |
|
87 |
|
|
88 |
if ((source == null) || (format == null)){ |
|
89 |
return null; |
|
90 |
} |
|
91 |
|
|
92 |
if (format.toLowerCase().equals("shapefile")) |
|
93 |
format = Resource.DOWNLOAD; |
|
94 |
|
|
95 |
if (format.toLowerCase().trim().equals("web page")) |
|
96 |
format = Resource.WEBSITE; |
|
97 |
|
|
98 |
Resource[] resources = new Resource[1]; |
|
99 |
resources[0] = new Resource(source,format,"","","","",coordinates); |
|
100 |
|
|
101 |
return resources; |
|
102 |
} |
|
103 |
|
|
104 |
/* |
|
105 |
* (non-Javadoc) |
|
106 |
* @see es.gva.cit.catalogClient.schemas.discoverer.Record#accept(java.net.URI, es.gva.cit.catalogClient.metadataxml.XMLNode) |
|
107 |
*/ |
|
108 |
public boolean accept(URI uri, XMLNode node) { |
|
109 |
if ((node.getName().equals("dc:metadata")) || |
|
110 |
(node.getName().equals("simpledc")) || |
|
111 |
(node.getName().equals("csw:SummaryRecord")) || |
|
112 |
(node.getName().equals("csw:Record"))){ |
|
113 |
return true; |
|
114 |
} |
|
115 |
return false; |
|
116 |
} |
|
117 |
} |
|
0 | 118 |
tags/tmp_build/applications/appCatalog/src/org/gvsig/catalog/schemas/Resource.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.schemas; |
|
43 |
import org.gvsig.catalog.querys.Coordinates; |
|
44 |
|
|
45 |
/** |
|
46 |
* This class implements a geodata linked by a metadata |
|
47 |
* |
|
48 |
* |
|
49 |
* @author Jorge Piera Llodra (piera_jor@gva.es) |
|
50 |
*/ |
|
51 |
public class Resource { |
|
52 |
|
|
53 |
/** |
|
54 |
* |
|
55 |
* |
|
56 |
*/ |
|
57 |
public static final String WMS = "OGC:WMS"; |
|
58 |
|
|
59 |
/** |
|
60 |
* |
|
61 |
* |
|
62 |
*/ |
|
63 |
public static final String WFS = "OGC:WFS"; |
|
64 |
|
|
65 |
/** |
|
66 |
* |
|
67 |
* |
|
68 |
*/ |
|
69 |
public static final String WCS = "OGC:WCS"; |
|
70 |
|
|
71 |
/** |
|
72 |
* |
|
73 |
* |
|
74 |
*/ |
|
75 |
public static final String POSTGIS = "POSTGIS"; |
|
76 |
|
|
77 |
/** |
|
78 |
* |
|
79 |
* |
|
80 |
*/ |
|
81 |
public static final String ARCIMS_IMAGE = "ESRI:AIMS--HTTP-GET-IMAGE"; |
|
82 |
|
|
83 |
/** |
|
84 |
* |
|
85 |
* |
|
86 |
*/ |
|
87 |
public static final String ARCIMS_VECTORIAL = "ESRI:AIMS--HTTP-GET-FEATURE"; |
|
88 |
|
|
89 |
/** |
|
90 |
* |
|
91 |
* |
|
92 |
*/ |
|
93 |
public static final String WEBSITE = "WWW:LINK"; |
|
94 |
|
|
95 |
/** |
|
96 |
* |
|
97 |
* |
|
98 |
*/ |
|
99 |
public static final String DOWNLOAD = "WWW:DOWNLOAD"; |
|
100 |
/** |
|
101 |
* |
|
102 |
* |
|
103 |
*/ |
|
104 |
public static final String UNKNOWN = "UNKNOWN"; |
|
105 |
|
|
106 |
/** |
|
107 |
* |
|
108 |
* |
|
109 |
*/ |
|
110 |
private String linkage = null; |
|
111 |
|
|
112 |
/** |
|
113 |
* |
|
114 |
* |
|
115 |
*/ |
|
116 |
private String protocol = null; |
|
117 |
|
|
118 |
/** |
|
119 |
* |
|
120 |
* |
|
121 |
*/ |
|
122 |
private String name = null; |
|
123 |
|
|
124 |
/** |
|
125 |
* |
|
126 |
* |
|
127 |
*/ |
|
128 |
private String description = null; |
|
129 |
|
|
130 |
/** |
|
131 |
* |
|
132 |
* |
|
133 |
*/ |
|
134 |
private String function = null; |
|
135 |
|
|
136 |
/** |
|
137 |
* |
|
138 |
* |
|
139 |
*/ |
|
140 |
private String srs = null; |
|
141 |
/** |
|
142 |
* |
|
143 |
* |
|
144 |
*/ |
|
145 |
private Coordinates coordinates = null; |
|
146 |
/** |
|
147 |
* |
|
148 |
* |
|
149 |
*/ |
|
150 |
private String Type = null; |
|
151 |
|
|
152 |
/** |
|
153 |
* |
|
154 |
* |
|
155 |
* |
|
156 |
* @param linkage |
|
157 |
* @param protocol |
|
158 |
* @param name |
|
159 |
* @param description |
|
160 |
* @param function |
|
161 |
* @param srs |
|
162 |
* @param coordinates |
|
163 |
*/ |
|
164 |
public Resource(String linkage, String protocol, String name, String description, String function, String srs, Coordinates coordinates) { |
|
165 |
super(); |
|
166 |
this.linkage = linkage; |
|
167 |
this.protocol = protocol; |
|
168 |
this.name = name; |
|
169 |
this.description = description; |
|
170 |
this.function = function; |
|
171 |
this.srs = srs; |
|
172 |
this.coordinates = coordinates; |
|
173 |
setResourceType(); |
|
174 |
} |
|
175 |
|
|
176 |
/** |
|
177 |
* |
|
178 |
* |
|
179 |
* |
|
180 |
* @return Returns the description. |
|
181 |
*/ |
|
182 |
public String getDescription() { |
|
183 |
return description; |
|
184 |
} |
|
185 |
|
|
186 |
/** |
|
187 |
* |
|
188 |
* |
|
189 |
* |
|
190 |
* @param description The description to set. |
|
191 |
*/ |
|
192 |
public void setDescription(String description) { |
|
193 |
this.description = description; |
|
194 |
} |
|
195 |
|
|
196 |
/** |
|
197 |
* |
|
198 |
* |
|
199 |
* |
|
200 |
* @return Returns the function. |
|
201 |
*/ |
|
202 |
public String getFunction() { |
|
203 |
return function; |
|
204 |
} |
|
205 |
|
|
206 |
/** |
|
207 |
* |
|
208 |
* |
|
209 |
* |
|
210 |
* @param function The function to set. |
|
211 |
*/ |
|
212 |
public void setFunction(String function) { |
|
213 |
this.function = function; |
|
214 |
} |
|
215 |
|
|
216 |
/** |
|
217 |
* |
|
218 |
* |
|
219 |
* |
|
220 |
* @return Returns the linkage. |
|
221 |
*/ |
|
222 |
public String getLinkage() { |
|
223 |
return linkage; |
|
224 |
} |
Also available in: Unified diff