Revision 24296

View differences:

tags/tmp_build/applications/appCatalogAndGazetteerClient/build.number
1
#Build Number for ANT. Do not edit!
2
#Wed Oct 22 16:34:07 CEST 2008
3
build.number=1213
0 4

  
tags/tmp_build/applications/appCatalogAndGazetteerClient/src/es/gva/cit/catalog/csw/messages/CSWMessages0_9_0.java
1
package es.gva.cit.catalog.csw.messages;
2

  
3
import es.gva.cit.catalog.csw.drivers.profiles.CSWAbstractProfile;
4
import es.gva.cit.catalog.csw.parsers.CSWConstants;
5
import es.gva.cit.catalog.languages.FilterEncoding;
6
import es.gva.cit.catalog.utils.Strings;
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$
51
 * $Log$
52
 *
53
 */
54
/**
55
 * @author Jorge Piera LLodr? (jorge.piera@iver.es)
56
 */
57
public class CSWMessages0_9_0 extends CSWAbstractMessages{
58
	private static final String TYPENAMES = "Dataset";
59
	private static final String ESCAPECHAR = "escape";
60
	
61
	public CSWMessages0_9_0(CSWAbstractProfile profile) {
62
		super(profile);		
63
	}
64

  
65
	/*
66
	 * (non-Javadoc)
67
	 * @see es.gva.cit.catalog.csw.messages.CSWAbstractMessages#getContraintVersion()
68
	 */
69
	protected String getContraintVersion() {
70
		return CSWConstants.CONSTRAINT_VERSION_0_9_0;
71
	}
72
	
73
	/*
74
	 * (non-Javadoc)
75
	 * @see es.gva.cit.catalog.csw.messages.CSWAbstractMessages#createGetRecordsQuery()
76
	 */
77
	protected String createGetRecordsQuery(){
78
		StringBuffer buffer = new StringBuffer();
79
		buffer.append("<" + CSWConstants.CSW_NAMESPACE + ":" + CSWConstants.QUERY + " ");
80
		buffer.append(CSWConstants.TYPENAMES + "=\"" + TYPENAMES + "\"");
81
		buffer.append(">");
82
		buffer.append("<" + CSWConstants.CSW_NAMESPACE + ":" + CSWConstants.ELEMENTSETNAME + " ");
83
		buffer.append(CSWConstants.TYPENAMES + "=\"" + TYPENAMES + "\"");
84
		buffer.append(">");
85
		buffer.append(CSWConstants.FULL);
86
		buffer.append("</" + CSWConstants.CSW_NAMESPACE + ":" + CSWConstants.ELEMENTSETNAME + ">");
87
		buffer.append(createGetRecordsConstraint());
88
		buffer.append("</" + CSWConstants.CSW_NAMESPACE + ":" + CSWConstants.QUERY + ">");
89
		return buffer.toString();
90
	}
91
	
92
	/*
93
	 * (non-Javadoc)
94
	 * @see es.gva.cit.catalog.csw.messages.CSWAbstractMessages#getFilterEncoding()
95
	 */
96
	protected FilterEncoding getFilterEncoding(){
97
		FilterEncoding filter = super.getFilterEncoding();
98
		filter.setEscapeCharLabel(ESCAPECHAR);
99
		return filter;
100
	}
101

  
102
}
tags/tmp_build/applications/appCatalogAndGazetteerClient/src/es/gva/cit/catalog/csw/messages/CSWMessagesFactory.java
1
package es.gva.cit.catalog.csw.messages;
2

  
3
import java.lang.reflect.InvocationTargetException;
4
import java.util.HashMap;
5

  
6
import org.gvsig.i18n.Messages;
7

  
8
import es.gva.cit.catalog.csw.drivers.profiles.CSWAbstractProfile;
9
import es.gva.cit.catalog.csw.parsers.CSWConstants;
10
import es.gva.cit.catalog.exceptions.NotSupportedVersionException;
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$
54
 * $Log$
55
 *
56
 */
57
/**
58
 * @author Jorge Piera LLodr? (jorge.piera@iver.es)
59
 */
60
public class CSWMessagesFactory {
61
	private static HashMap messages = null;
62
	
63
	static{
64
		messages = new HashMap();
65
		messages.put(CSWConstants.VERSION_0_9_0, CSWMessages0_9_0.class);
66
		messages.put(CSWConstants.VERSION_2_0_0, CSWMessages2_0_0.class);
67
		messages.put(CSWConstants.VERSION_2_0_1, CSWMessages2_0_1.class);
68
	}
69
	
70
	/**
71
	 * Gets a messages class
72
	 * @param version
73
	 * The CSW version
74
	 * @param profile
75
	 * The CSW profile
76
	 * @return
77
	 * A CSWAbstractMessages class
78
	 * @throws NotSupportedVersionException 
79
	 */
80
	public static CSWAbstractMessages getMessages(String version, CSWAbstractProfile profile) throws NotSupportedVersionException{
81
		if ((version != null) && (messages.containsKey(version))){
82
			Class clazz = (Class)messages.get(version);
83
			Class[] parameters = {CSWAbstractProfile.class};
84
			Object[] args = {profile};
85
			try {
86
				return (CSWAbstractMessages)clazz.getConstructor(parameters).newInstance(args);
87
			} catch (Exception e) {
88
				throw new NotSupportedVersionException(e);
89
			} 
90
		}
91
		throw new NotSupportedVersionException();
92
	}
93
}
0 94

  
tags/tmp_build/applications/appCatalogAndGazetteerClient/src/es/gva/cit/catalog/csw/messages/CSWMessages2_0_0.java
1
package es.gva.cit.catalog.csw.messages;
2

  
3
import es.gva.cit.catalog.csw.drivers.profiles.CSWAbstractProfile;
4
import es.gva.cit.catalog.csw.parsers.CSWConstants;
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$
49
 * $Log$
50
 *
51
 */
52
/**
53
 * @author Jorge Piera LLodr? (jorge.piera@iver.es)
54
 */
55
public class CSWMessages2_0_0 extends CSWAbstractMessages {
56

  
57
	public CSWMessages2_0_0(CSWAbstractProfile profile) {
58
		super(profile);		
59
	}
60

  
61
	/*
62
	 * (non-Javadoc)
63
	 * @see es.gva.cit.catalog.csw.messages.CSWAbstractMessages#getContraintVersion()
64
	 */
65
	protected String getContraintVersion() {
66
		return CSWConstants.CONSTRAINT_VERSION_2_0_0;
67
	}
68

  
69
}
0 70

  
tags/tmp_build/applications/appCatalogAndGazetteerClient/src/es/gva/cit/catalog/csw/messages/CSWMessages2_0_1.java
1
package es.gva.cit.catalog.csw.messages;
2

  
3
import es.gva.cit.catalog.csw.drivers.profiles.CSWAbstractProfile;
4
import es.gva.cit.catalog.csw.parsers.CSWConstants;
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$
49
 * $Log$
50
 *
51
 */
52
/**
53
 * @author Jorge Piera LLodr? (jorge.piera@iver.es)
54
 */
55
public class CSWMessages2_0_1 extends CSWAbstractMessages{
56

  
57
	public CSWMessages2_0_1(CSWAbstractProfile profile) {
58
		super(profile);		
59
	}
60

  
61
	/*
62
	 * (non-Javadoc)
63
	 * @see es.gva.cit.catalog.csw.messages.CSWAbstractMessages#getContraintVersion()
64
	 */
65
	protected String getContraintVersion() {
66
		return CSWConstants.CONSTRAINT_VERSION_2_0_1;
67
	}
68

  
69

  
70
}
0 71

  
tags/tmp_build/applications/appCatalogAndGazetteerClient/src/es/gva/cit/catalog/csw/messages/CSWAbstractMessages.java
1
package es.gva.cit.catalog.csw.messages;
2

  
3
import org.apache.commons.httpclient.NameValuePair;
4
import org.gvsig.i18n.Messages;
5

  
6
import com.iver.utiles.swing.jcomboServer.ServerData;
7

  
8
import es.gva.cit.catalog.csw.drivers.CSWCapabilities;
9
import es.gva.cit.catalog.csw.drivers.profiles.CSWAbstractProfile;
10
import es.gva.cit.catalog.csw.parsers.CSWConstants;
11
import es.gva.cit.catalog.languages.FilterEncoding;
12
import es.gva.cit.catalog.querys.CatalogQuery;
13
import es.gva.cit.catalog.querys.Search;
14
import es.gva.cit.catalog.utils.CatalogConstants;
15
import es.gva.cit.catalog.utils.Strings;
16

  
17
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana
18
 *
19
 * Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
20
 *
21
 * This program is free software; you can redistribute it and/or
22
 * modify it under the terms of the GNU General Public License
23
 * as published by the Free Software Foundation; either version 2
24
 * of the License, or (at your option) any later version.
25
 *
26
 * This program is distributed in the hope that it will be useful,
27
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
28
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
29
 * GNU General Public License for more details.
30
 *
31
 * You should have received a copy of the GNU General Public License
32
 * along with this program; if not, write to the Free Software
33
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
34
 *
35
 * For more information, contact:
36
 *
37
 *  Generalitat Valenciana
38
 *   Conselleria d'Infraestructures i Transport
39
 *   Av. Blasco Ib??ez, 50
40
 *   46010 VALENCIA
41
 *   SPAIN
42
 *
43
 *      +34 963862235
44
 *   gvsig@gva.es
45
 *      www.gvsig.gva.es
46
 *
47
 *    or
48
 *
49
 *   IVER T.I. S.A
50
 *   Salamanca 50
51
 *   46005 Valencia
52
 *   Spain
53
 *
54
 *   +34 963163400
55
 *   dac@iver.es
56
 */
57
/* CVS MESSAGES:
58
 *
59
 * $Id$
60
 * $Log$
61
 *
62
 */
63
/**
64
 * @author Jorge Piera LLodr? (jorge.piera@iver.es)
65
 */
66
public abstract class CSWAbstractMessages {
67
	private CSWCapabilities capabilities = null;
68
	private CatalogQuery query = null;
69
	private CSWAbstractProfile profile = null;
70
	
71
	/**
72
	 * @param profile
73
	 * The profile to create the query
74
	 */
75
	public CSWAbstractMessages(CSWAbstractProfile profile) {
76
		super();
77
		this.profile = profile;		
78
	}
79

  
80
	public static NameValuePair[] getHTTPGETCapabilities() {        
81
		NameValuePair nvp1 = new NameValuePair("request", CSWConstants.OPERATION_GETCAPABILITIES);
82
		NameValuePair nvp2 = new NameValuePair("service", ServerData.SERVER_SUBTYPE_CATALOG_CSW);
83
		NameValuePair nvp3 = new NameValuePair("acceptFormats","text/xml");
84
		return new NameValuePair[] { nvp1, nvp2, nvp3 };
85
	} 
86
	
87
	/**
88
	 * The get capabilities operation started with lower case.
89
	 * There are some servers that has this bug 
90
	 * @return
91
	 */
92
	public static NameValuePair[] getHTTPGETCapabilitiesLower() {        
93
		NameValuePair nvp1 = new NameValuePair("request", CSWConstants.OPERATION_GETCAPABILITIESToLOWER);
94
		NameValuePair nvp2 = new NameValuePair("service", ServerData.SERVER_SUBTYPE_CATALOG_CSW);
95
		NameValuePair nvp3 = new NameValuePair("acceptFormats","text/xml");
96
		return new NameValuePair[] { nvp1, nvp2, nvp3 };
97
	}
98

  
99
	public static NameValuePair[] getHTTPGETDescribeRecord(String version) {        
100
		NameValuePair nvp1 = new NameValuePair("request", CSWConstants.OPERATION_DESCRIBERECORD);
101
		NameValuePair nvp2 = new NameValuePair("service", ServerData.SERVER_SUBTYPE_CATALOG_CSW);
102
		NameValuePair nvp3 = new NameValuePair("version", version);
103
		return new NameValuePair[] { nvp1, nvp2, nvp3 };
104
	} 	
105

  
106
	/**
107
	 * Creates and returns the GetRecords request
108
	 * @param query
109
	 * @param firstRecord
110
	 * @return
111
	 */	 
112
	public String getHTTPPostGetRecordsMessage(CSWCapabilities capabilities, CatalogQuery query, ServerData serverData, int firstRecord) {
113
		this.capabilities = capabilities;
114
		this.query = query;		
115
		profile.setServerData(serverData);
116
		StringBuffer buffer = new StringBuffer();
117
		buffer.append(createGetRecordsHeader(firstRecord));
118
		return buffer.toString();
119
	}
120

  
121
	/**
122
	 * Create the GetRecords header. 
123
	 * @param firstRecord
124
	 * @return
125
	 */
126
	protected String createGetRecordsHeader(int firstRecord){
127
		StringBuffer buffer = new StringBuffer();
128
		buffer.append(CatalogConstants.XML_HEADER_ENCODING); 
129
		buffer.append("<" + CSWConstants.CSW_NAMESPACE + 
130
				":" + CSWConstants.CSW_GET_RECORDS);
131
		buffer.append(" " + CSWConstants.CSW_SERVICE + "=\"" + ServerData.SERVER_SUBTYPE_CATALOG_CSW + "\" ");
132
		buffer.append(CSWConstants.CSW_VERSION + "=\"" + capabilities.getVersion() + "\" ");
133
		buffer.append(CatalogConstants.XML_NS + "=\"" +CSWConstants.CSW_NAMESPACE_URI + "\" ");
134
		buffer.append(CatalogConstants.XML_NS + ":" + CSWConstants.CSW_NAMESPACE + 
135
				"=\"" + CSWConstants.CSW_NAMESPACE_URI + "\" ");
136
		buffer.append(CatalogConstants.XML_NS + ":" + CSWConstants.OGC_NAMESPACE + 
137
				"=\"" + CSWConstants.OGC_NAMESPACE_URI + "\" ");
138
		buffer.append(CatalogConstants.XML_NS + ":" + CSWConstants.GML_NAMESPACE + 
139
				"=\"" + CSWConstants.GML_NAMESPACE_URI + "\" ");
140
		buffer.append(CSWConstants.CSW_START_POSITION + "='" +	firstRecord  + "' ");
141
		buffer.append(CSWConstants.CSW_MAX_RECORDS + "='10' ");
142
		if (capabilities.getOutputFormat() != null){
143
			buffer.append(CSWConstants.CSW_OUTPUTFORMAT + "=\"" + capabilities.getOutputFormat() + "\" ");
144
		}
145
		if (getOutputSchema(capabilities.getOutputSchema()) != null){
146
			buffer.append(CSWConstants.CSW_OUTPUTSCHEMA + "=\"" + getOutputSchema(capabilities.getOutputSchema()) + "\" ");
147
		}else{
148
			buffer.append(CSWConstants.CSW_OUTPUTSCHEMA + "=\"csw:IsoRecord\" ");
149
		}
150
		buffer.append("resultType=\"" +
151
				getResultType(capabilities.getResultType()) + "\">");
152
		buffer.append(createGetRecordsQuery());
153
		buffer.append("</" + CSWConstants.CSW_NAMESPACE + ":" + CSWConstants.OPERATION_GETRECORDS + ">");
154
		return buffer.toString();
155
	}
156

  
157
	/**
158
	 * Returns a common reslut type if the getCapabilities doesn't have
159
	 * one. Sometimes it works.
160
	 * 
161
	 * 
162
	 * @return Just one String
163
	 * @param resultType The array of result types parsed.
164
	 */
165
	protected String getResultType(String[] resultType) {        
166
		if (resultType == null)
167
			return "results";
168

  
169
		for (int i=0 ; i<resultType.length ; i++){
170

  
171
		}
172
		return resultType[0];
173
	} 
174

  
175
	/**
176
	 * Returns the OutputSchema. If the ISO19115 is supported,
177
	 * we prefer this
178
	 * @param OutputFormat The array of outputFormats parsed.
179
	 * @return Just one String
180
	 * @param outputSchemas 
181
	 */
182
	protected String getOutputSchema(String[] outputSchemas) {        
183
		if (outputSchemas == null){
184
			return null;
185
		}		    
186
		return outputSchemas[0];
187
	} 
188

  
189
	/**
190
	 * @return the Query xml sub tree of the GetRecords
191
	 * operation
192
	 */
193
	protected String createGetRecordsQuery(){
194
		StringBuffer buffer = new StringBuffer();
195
		buffer.append("<" + CSWConstants.CSW_NAMESPACE + ":" + CSWConstants.QUERY + " ");
196
		if (capabilities.getTypeNames() != null){
197
			buffer.append(CSWConstants.TYPENAMES + "=\"" +
198
					Strings.getBlankSeparated(capabilities.getTypeNames()) + "\"");
199
		}
200
		buffer.append(">");
201
		buffer.append(getElementSetNameLabel(query.getService()));
202
		buffer.append(createGetRecordsConstraint());
203
		buffer.append("</" + CSWConstants.CSW_NAMESPACE + ":" + CSWConstants.QUERY + ">");
204
		return buffer.toString();
205
	}
206

  
207
	/**
208
	 * Create and return the ElementName and the ElementSetName tags
209
	 * @param searchType
210
	 * @return
211
	 */
212
	protected String getElementSetNameLabel(Search searchType) {        
213
		StringBuffer buffer = new StringBuffer();
214
		buffer.append("<" + CSWConstants.CSW_NAMESPACE + ":" + CSWConstants.ELEMENTSETNAME + ">");
215
		buffer.append(CSWConstants.FULL);
216
		buffer.append("</" + CSWConstants.CSW_NAMESPACE + ":" + CSWConstants.ELEMENTSETNAME + ">");
217
		if (profile.getElementName() != null){
218
			buffer.append("<" + CSWConstants.CSW_NAMESPACE + ":" + CSWConstants.ELEMENTNAME + ">");
219
			buffer.append(profile.getElementName());
220
			buffer.append("</" + CSWConstants.CSW_NAMESPACE + ":" + CSWConstants.ELEMENTNAME + ">");
221
		}
222
		return buffer.toString();        
223
	} 	
224

  
225
	/**
226
	 * @return the Constarint xml sub tree of the GetRecords
227
	 * operation
228
	 */
229
	protected String createGetRecordsConstraint(){
230
		StringBuffer buffer = new StringBuffer();
231
		buffer.append("<" + CSWConstants.CSW_NAMESPACE + ":" + CSWConstants.CONSTRAINT);
232
		buffer.append(" " + CSWConstants.VERSION + "='" + getContraintVersion() + "'>");
233
		buffer.append(createFilterEncoding());
234
		buffer.append("</" + CSWConstants.CSW_NAMESPACE + ":" + CSWConstants.CONSTRAINT + ">");
235
		return buffer.toString();
236
	}	
237

  
238
	/**
239
	 * @return the constraint version
240
	 */
241
	protected abstract String getContraintVersion();
242

  
243
	/**
244
	 * Creates the filter encoding. It can be
245
	 * overridden by the children classes. 
246
	 * @return
247
	 * The filter encoding to use
248
	 */
249
	protected FilterEncoding getFilterEncoding(){
250
		return new FilterEncoding();
251
	}
252
	
253
	/**
254
	 * Creates the filter encoding query
255
	 * @param query
256
	 * @return
257
	 */
258
	protected String createFilterEncoding(){		
259
		FilterEncoding filter = getFilterEncoding();
260
		if (query.getTitle() != null){
261
			filter.addClauses(profile.getTitle(),
262
					query.getTitle(),
263
					query.getTitleFilter(),					
264
					FilterEncoding.PROPERTY_IS_LIKE, 
265
					FilterEncoding.TYPE_LITERAL,
266
					FilterEncoding.AND);
267
		}
268
		if (query.isMinimized()){
269
			if (query.getAbstract() != null) {
270
				filter.addClauses(profile.getAbstract(), 
271
						query.getAbstract(),
272
						FilterEncoding.ANY_WORDS,
273
						FilterEncoding.PROPERTY_IS_LIKE,
274
						FilterEncoding.TYPE_LITERAL,
275
						FilterEncoding.OR);
276
			}
277
		}else{
278
			if (query.getAbstract() != null) {
279
				filter.addClauses(profile.getAbstract(), 
280
						query.getAbstract(),
281
						FilterEncoding.ANY_WORDS);
282
			}
283
			if (query.getThemeKey() != null) {
284
				filter.addClauses(profile.getKeywords(), query.getThemeKey(),
285
						FilterEncoding.ANY_WORDS);
286

  
287
			}
288
			if ((query.getTopic() != null) && (!query.getTopic().equals(Messages.getText("cathegoryAny")))) {
289
				filter.addClauses(profile.getTopic(), profile.getTopicValue(query.getTopic()),
290
						FilterEncoding.EXACT_WORDS);
291
			}
292
			if (query.getScale() != null) {
293
				filter.addClauses(profile.getScale(), query.getScale(),
294
						FilterEncoding.EXACT_WORDS);
295
			}
296
			if (query.getProvider() != null) {
297
				filter.addClauses(profile.getProvider(), 
298
						filter.getWildCard() + query.getProvider() + filter.getWildCard(),
299
						FilterEncoding.EXACT_WORDS,
300
						FilterEncoding.PROPERTY_IS_EQUALS_TO,
301
						FilterEncoding.TYPE_LITERAL,
302
						FilterEncoding.AND);						
303
			}
304

  
305
			if (query.getDateFrom() != null) {
306
				filter.addClauses(profile.getDateFrom(), query.getDateFrom(), 
307
						FilterEncoding.EXACT_WORDS,
308
						FilterEncoding.PROPERTY_IS_GREATER_THAN,
309
						FilterEncoding.TYPE_LITERAL,
310
						FilterEncoding.AND);								
311
			}
312
			if (query.getDateTo() != null) {
313
				filter.addClauses(profile.getDateTo(), query.getDateTo(),
314
						FilterEncoding.EXACT_WORDS,
315
						FilterEncoding.PROPERTY_IS_LESS_THAN,
316
						FilterEncoding.TYPE_LITERAL,
317
						FilterEncoding.AND);					
318
			}
319
		}
320
		if ((query.getCoordenates() != null) && (query.isCoordinatesClicked())){
321
			filter.addBoundingBox(query.getCoordenates(), profile.getCoordinates(),
322
					getCoordinatesOption(query.getCoordenatesFilter()));
323

  
324
		}	
325
		return filter.toString();
326
	}
327

  
328
	/**
329
	 * This function returns true only when the user has choosen the
330
	 * "Fully Outside Of" of the coordinates option.
331
	 * @param coordinatesOption 
332
	 * @return
333
	 */
334
	protected boolean getCoordinatesOption(String coordinatesOption) {        
335
		if ((coordinatesOption.equals(Messages.getText("coordinatesEqual"))) ||
336
				(coordinatesOption.equals(Messages.getText("coordinatesContains"))) ||
337
				(coordinatesOption.equals(Messages.getText("coordinatesEnclose"))))
338
			return false;
339

  
340
		return true; 
341
	} 
342
}
0 343

  
tags/tmp_build/applications/appCatalogAndGazetteerClient/src/es/gva/cit/catalog/csw/drivers/CSWebRIMCatalogServiceDriver.java
1
package es.gva.cit.catalog.csw.drivers;
2

  
3
import java.net.MalformedURLException;
4
import java.net.URL;
5

  
6
import org.apache.commons.httpclient.NameValuePair;
7

  
8
import es.gva.cit.catalog.csw.drivers.profiles.CSWebRIMProfile;
9
import es.gva.cit.catalog.csw.parsers.CSWConstants;
10
import es.gva.cit.catalog.drivers.profiles.IProfile;
11
import es.gva.cit.catalog.metadataxml.XMLNode;
12
import es.gva.cit.catalog.protocols.HTTPGetProtocol;
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$
57
 * $Log$
58
 *
59
 */
60
/**
61
 * @author Jorge Piera LLodr? (jorge.piera@iver.es)
62
 */
63
public class CSWebRIMCatalogServiceDriver extends CSWCatalogServiceDriver{
64
	public static String SERVICE_NAME = "CSW/ebRIM";
65
	
66
	/*
67
	 * (non-Javadoc)
68
	 * @see es.gva.cit.catalogClient.drivers.ICatalogServiceDriver#getServiceName()
69
	 */
70
	public String getServiceName() {
71
		return SERVICE_NAME;
72
	}
73

  
74
	/*
75
	 * (non-Javadoc)
76
	 * @see es.gva.cit.catalog.drivers.AbstractCatalogServiceDriver#getProfile()
77
	 */
78
	public IProfile getProfile() {
79
		return new CSWebRIMProfile();
80
	}
81

  
82
	/*
83
	 * (non-Javadoc)
84
	 * @see es.gva.cit.catalog.csw.drivers.CSWCatalogServiceDriver#retrieveResults(es.gva.cit.catalog.metadataxml.XMLNode)
85
	 */
86
	protected XMLNode[] retrieveResults(XMLNode root) {
87
		XMLNode resultNode = root.searchNode(CSWConstants.SEARCH_RESULTS);
88
		if (resultNode == null){
89
			return new XMLNode[0];
90
		}
91
		XMLNode[] results = new XMLNode[resultNode.getNumSubNodes()];
92
		for (int i=0 ; i<resultNode.getNumSubNodes() ; i++){
93
			results[i] = resultNode.getSubNode(i);
94
		}
95
		return getEbRIMNodes(results);
96
	}
97
	
98
	/**
99
	 * This function retrieve the nodes for one ebRIM answer
100
	 * @return Medatada Nodes.
101
	 * @param nodes Server URL
102
	 * @param url 
103
	 */
104
	private XMLNode[] getEbRIMNodes(XMLNode[] nodes) {        
105
		//if the getExtrinsincContentOperation is not supported
106
		if (capabilities.getOperations().getGetExtrinsicContent().size() == 0){
107
			return nodes;			
108
		}
109
		XMLNode[] auxNodes = new XMLNode[nodes.length];
110
		for (int i = 0; i < nodes.length; i++) {
111
			String id = nodes[i].searchAtribute(CSWConstants.ID);
112
			URL url = (URL)capabilities.getOperations().getGetExtrinsicContent().get(CSWConstants.GET);
113
			auxNodes[i] = (XMLNode)new HTTPGetProtocol().doQuery(url,
114
				getEbRIMRequestParameters(id), 0).toArray()[0];						
115
		}
116
		return auxNodes;
117
	} 
118
	
119
	/**
120
	 * It Returns the parameters needed by getExtrinsicContent
121
	 * @return 
122
	 * @param id Record id
123
	 */
124
	private NameValuePair[] getEbRIMRequestParameters(String id) {        
125
		NameValuePair nvp1 = new NameValuePair(CSWConstants.REQUEST, CSWConstants.EXTRISIC_CONTENT);
126
		NameValuePair nvp2 = new NameValuePair(CSWConstants.ID, id);
127
		return new NameValuePair[] { nvp1, nvp2 };
128
	} 
129
}
0 130

  
tags/tmp_build/applications/appCatalogAndGazetteerClient/src/es/gva/cit/catalog/csw/drivers/profiles/CSWAbstractProfile.java
1
package es.gva.cit.catalog.csw.drivers.profiles;
2

  
3
import es.gva.cit.catalog.drivers.profiles.AbstractProfile;
4
import es.gva.cit.catalog.drivers.profiles.IProfile;
5

  
6

  
7
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana
8
 *
9
 * Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
10
 *
11
 * This program is free software; you can redistribute it and/or
12
 * modify it under the terms of the GNU General Public License
13
 * as published by the Free Software Foundation; either version 2
14
 * of the License, or (at your option) any later version.
15
 *
16
 * This program is distributed in the hope that it will be useful,
17
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
19
 * GNU General Public License for more details.
20
 *
21
 * You should have received a copy of the GNU General Public License
22
 * along with this program; if not, write to the Free Software
23
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
24
 *
25
 * For more information, contact:
26
 *
27
 *  Generalitat Valenciana
28
 *   Conselleria d'Infraestructures i Transport
29
 *   Av. Blasco Ib??ez, 50
30
 *   46010 VALENCIA
31
 *   SPAIN
32
 *
33
 *      +34 963862235
34
 *   gvsig@gva.es
35
 *      www.gvsig.gva.es
36
 *
37
 *    or
38
 *
39
 *   IVER T.I. S.A
40
 *   Salamanca 50
41
 *   46005 Valencia
42
 *   Spain
43
 *
44
 *   +34 963163400
45
 *   dac@iver.es
46
 */
47
/* CVS MESSAGES:
48
 *
49
 * $Id$
50
 * $Log$
51
 *
52
 */
53
/**
54
 * @author Jorge Piera LLodr? (jorge.piera@iver.es)
55
 */
56
public abstract class CSWAbstractProfile extends AbstractProfile {
57
	
58
	public CSWAbstractProfile() {
59
		super();		
60
	}
61
}
0 62

  
tags/tmp_build/applications/appCatalogAndGazetteerClient/src/es/gva/cit/catalog/csw/drivers/profiles/CSWISO19115Profile.java
1
package es.gva.cit.catalog.csw.drivers.profiles;
2

  
3

  
4
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana
5
 *
6
 * Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
7
 *
8
 * This program is free software; you can redistribute it and/or
9
 * modify it under the terms of the GNU General Public License
10
 * as published by the Free Software Foundation; either version 2
11
 * of the License, or (at your option) any later version.
12
 *
13
 * This program is distributed in the hope that it will be useful,
14
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
 * GNU General Public License for more details.
17
 *
18
 * You should have received a copy of the GNU General Public License
19
 * along with this program; if not, write to the Free Software
20
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
21
 *
22
 * For more information, contact:
23
 *
24
 *  Generalitat Valenciana
25
 *   Conselleria d'Infraestructures i Transport
26
 *   Av. Blasco Ib??ez, 50
27
 *   46010 VALENCIA
28
 *   SPAIN
29
 *
30
 *      +34 963862235
31
 *   gvsig@gva.es
32
 *      www.gvsig.gva.es
33
 *
34
 *    or
35
 *
36
 *   IVER T.I. S.A
37
 *   Salamanca 50
38
 *   46005 Valencia
39
 *   Spain
40
 *
41
 *   +34 963163400
42
 *   dac@iver.es
43
 */
44
/* CVS MESSAGES:
45
 *
46
 * $Id$
47
 * $Log$
48
 *
49
 */
50
/**
51
 * @author Jorge Piera LLodr? (jorge.piera@iver.es)
52
 */
53
public class CSWISO19115Profile extends CSWAbstractProfile{
54

  
55
	public CSWISO19115Profile() {
56
		super();		
57
	}
58
	
59
	/*
60
	 * (non-Javadoc)
61
	 * @see es.gva.cit.catalog.csw.drivers.profiles.ICSWProfile#getTitle()
62
	 */
63
	public String getTitleProperty() {
64
		return "title";
65
	}
66

  
67
	/*
68
	 * (non-Javadoc)
69
	 * @see es.gva.cit.catalog.csw.drivers.profiles.ICSWProfile#getAbstract()
70
	 */
71
	public String getAbstractProperty() {
72
		 return "abstract";
73
	}
74

  
75
	/*
76
	 * (non-Javadoc)
77
	 * @see es.gva.cit.catalog.csw.drivers.profiles.ICSWProfile#getCoordinates()
78
	 */
79
	public String getCoordinatesProperty() {
80
		 return "geom";
81
	}
82

  
83
	/*
84
	 * (non-Javadoc)
85
	 * @see es.gva.cit.catalog.csw.drivers.profiles.ICSWProfile#getDateFrom()
86
	 */
87
	public String getDateFromProperty() {
88
		 return "modified";
89
	}
90

  
91
	/*
92
	 * (non-Javadoc)
93
	 * @see es.gva.cit.catalog.csw.drivers.profiles.ICSWProfile#getDateTo()
94
	 */
95
	public String getDateToProperty() {
96
		return "modified";
97
	}
98

  
99
	/*
100
	 * (non-Javadoc)
101
	 * @see es.gva.cit.catalog.csw.drivers.profiles.ICSWProfile#getProvider()
102
	 */
103
	public String getProviderProperty() {
104
		return "publisher";
105
	}
106

  
107
	/*
108
	 * (non-Javadoc)
109
	 * @see es.gva.cit.catalog.csw.drivers.profiles.ICSWProfile#getScale()
110
	 */
111
	public String getScaleProperty() {
112
		  return "scale";
113
	}
114

  
115
	/*
116
	 * (non-Javadoc)
117
	 * @see es.gva.cit.catalog.csw.drivers.profiles.ICSWProfile#getThemeKey()
118
	 */
119
	public String getKeywordsProperty() {
120
		 return "keyword";
121
	}
122

  
123
	/*
124
	 * (non-Javadoc)
125
	 * @see es.gva.cit.catalog.csw.drivers.profiles.ICSWProfile#getTopic()
126
	 */
127
	public String getTopicProperty() {
128
		 return "topic";
129
	}
130

  
131
	/*
132
	 * (non-Javadoc)
133
	 * @see es.gva.cit.catalog.csw.drivers.profiles.ICSWProfile#getTopicValue(java.lang.String)
134
	 */
135
	public String getTopicValue(String topic) {
136
		return topic;
137
	}
138

  
139
	/*
140
	 * (non-Javadoc)
141
	 * @see es.gva.cit.catalog.drivers.profiles.IProfile#getElementNameProperty()
142
	 */
143
	public String getElementNameProperty() {
144
		return null;
145
	}	
146
	
147

  
148
}
0 149

  
tags/tmp_build/applications/appCatalogAndGazetteerClient/src/es/gva/cit/catalog/csw/drivers/profiles/CSWebRIMProfile.java
1
package es.gva.cit.catalog.csw.drivers.profiles;
2

  
3
import org.apache.commons.httpclient.NameValuePair;
4

  
5
import com.iver.utiles.swing.jcomboServer.ServerData;
6

  
7
import es.gva.cit.catalog.csw.drivers.CSWCapabilities;
8
import es.gva.cit.catalog.csw.parsers.CSWConstants;
9
import es.gva.cit.catalog.querys.CatalogQuery;
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$
54
 * $Log$
55
 *
56
 */
57
/**
58
 * @author Jorge Piera LLodr? (jorge.piera@iver.es)
59
 */
60
public class CSWebRIMProfile extends CSWAbstractProfile{
61

  
62
	public CSWebRIMProfile() {
63
		super();		
64
	}
65

  
66
	/*
67
	 * (non-Javadoc)
68
	 * @see es.gva.cit.catalog.csw.drivers.profiles.ICSWProfile#getTitle()
69
	 */
70
	public String getTitleProperty() {
71
		return "/DataGranule/instrumentShortName";
72
	}	
73
	
74
	/*
75
	 * (non-Javadoc)
76
	 * @see es.gva.cit.catalog.csw.drivers.profiles.ICSWProfile#getAbstract()
77
	 */
78
	public String getAbstractProperty() {
79
		 return "/Dataset/Description/LocalizedString/@value";
80
	}
81

  
82
	/*
83
	 * (non-Javadoc)
84
	 * @see es.gva.cit.catalog.csw.drivers.profiles.ICSWProfile#getCoordinates()
85
	 */
86
	public String getCoordinatesProperty() {
87
		// TODO Auto-generated method stub
88
		return null;
89
	}
90

  
91
	/*
92
	 * (non-Javadoc)
93
	 * @see es.gva.cit.catalog.csw.drivers.profiles.ICSWProfile#getDateFrom()
94
	 */
95
	public String getDateFromProperty() {
96
		// TODO Auto-generated method stub
97
		return null;
98
	}
99

  
100
	/*
101
	 * (non-Javadoc)
102
	 * @see es.gva.cit.catalog.csw.drivers.profiles.ICSWProfile#getDateTo()
103
	 */
104
	public String getDateToProperty() {
105
		// TODO Auto-generated method stub
106
		return null;
107
	}
108

  
109
	/*
110
	 * (non-Javadoc)
111
	 * @see es.gva.cit.catalog.csw.drivers.profiles.ICSWProfile#getProvider()
112
	 */
113
	public String getProviderProperty() {
114
		return "/Organization/Name/LocalizedString/@value";
115
	}
116

  
117
	/*
118
	 * (non-Javadoc)
119
	 * @see es.gva.cit.catalog.csw.drivers.profiles.ICSWProfile#getScale()
120
	 */
121
	public String getScaleProperty() {
122
		// TODO Auto-generated method stub
123
		return null;
124
	}
125

  
126
	/*
127
	 * (non-Javadoc)
128
	 * @see es.gva.cit.catalog.csw.drivers.profiles.ICSWProfile#getThemeKey()
129
	 */
130
	public String getKeywordsProperty() {
131
		 return "/Dataset/Slot:s2/ValueList/Value";
132
	}
133

  
134
	/*
135
	 * (non-Javadoc)
136
	 * @see es.gva.cit.catalog.csw.drivers.profiles.ICSWProfile#getTopic()
137
	 */
138
	public String getTopicProperty() {
139
		return "/Classification/@classificationNode";
140
	}
141

  
142
	/*
143
	 * (non-Javadoc)
144
	 * @see es.gva.cit.catalog.csw.drivers.profiles.ICSWProfile#getTopicValue(java.lang.String)
145
	 */
146
	public String getTopicValue(String topic) {
147
		 if (topic.equals("farming")) {
148
	            return "urn:x-iso-tc211:19119(2003)/scheme/services/scheme/topics:001";
149
	        }
150
	        if (topic.equals("biota")) {
151
	            return "urn:x-iso-tc211:19119(2003)/scheme/services/scheme/topics:002";
152
	        }
153
	        if (topic.equals("boundaries")) {
154
	            return "urn:x-iso-tc211:19119(2003)/scheme/services/scheme/topics:003";
155
	        }
156
	        if (topic.equals("climatologyMeteorologyAtmosphere")) {
157
	            return "urn:x-iso-tc211:19119(2003)/scheme/services/scheme/topics:004";
158
	        }
159
	        if (topic.equals("economy")) {
160
	            return "urn:x-iso-tc211:19119(2003)/scheme/services/scheme/topics:005";
161
	        }
162
	        if (topic.equals("elevation")) {
163
	            return "urn:x-iso-tc211:19119(2003)/scheme/services/scheme/topics:006";
164
	        }
165
	        if (topic.equals("environment")) {
166
	            return "urn:x-iso-tc211:19119(2003)/scheme/services/scheme/topics:007";
167
	        }
168
	        if (topic.equals("geoscientificInformation")) {
169
	            return "urn:x-iso-tc211:19119(2003)/scheme/services/scheme/topics:008";
170
	        }
171
	        if (topic.equals("health")) {
172
	            return "urn:x-iso-tc211:19119(2003)/scheme/services/scheme/topics:009";
173
	        }
174
	        if (topic.equals("imageryBaseMapsEarthCover")) {
175
	            return "urn:x-iso-tc211:19119(2003)/scheme/services/scheme/topics:010";
176
	        }
177
	        if (topic.equals("intelligenceMilitary")) {
178
	            return "urn:x-iso-tc211:19119(2003)/scheme/services/scheme/topics:011";
179
	        }
180
	        if (topic.equals("inlandWaters")) {
181
	            return "urn:x-iso-tc211:19119(2003)/scheme/services/scheme/topics:012";
182
	        }
183
	        if (topic.equals("location")) {
184
	            return "urn:x-iso-tc211:19119(2003)/scheme/services/scheme/topics:013";
185
	        }
186
	        if (topic.equals("oceans")) {
187
	            return "urn:x-iso-tc211:19119(2003)/scheme/services/scheme/topics:014";
188
	        }
189
	        if (topic.equals("planningCadastre")) {
190
	            return "urn:x-iso-tc211:19119(2003)/scheme/services/scheme/topics:015";
191
	        }
192
	        if (topic.equals("society")) {
193
	            return "urn:x-iso-tc211:19119(2003)/scheme/services/scheme/topics:016";
194
	        }
195
	        if (topic.equals("structure")) {
196
	            return "urn:x-iso-tc211:19119(2003)/scheme/services/scheme/topics:017";
197
	        }
198
	        if (topic.equals("transportation")) {
199
	            return "urn:x-iso-tc211:19119(2003)/scheme/services/scheme/topics:018";
200
	        }
201
	        if (topic.equals("utilitiesCommunication")) {
202
	            return "urn:x-iso-tc211:19119(2003)/scheme/services/scheme/topics:019";
203
	        }
204
	        return "";
205
	}
206

  
... This diff was truncated because it exceeds the maximum size that can be displayed.

Also available in: Unified diff