svn-gvsig-desktop / trunk / applications / appCatalogYNomenclatorClient / src / es / gva / cit / catalogClient / schemas / ISO19115Schema.java @ 3566
History | View | Annotate | Download (4.98 KB)
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 es.gva.cit.catalogClient.schemas; |
43 |
import es.gva.cit.catalogClient.filters.AdditionalClauses; |
44 |
|
45 |
/**
|
46 |
* This class defines the labels for the ISO19115/19119 CSW Profile
|
47 |
*
|
48 |
*
|
49 |
* @author Jorge Piera Llodra (piera_jor@gva.es)
|
50 |
*/
|
51 |
public class ISO19115Schema implements ISchemas { |
52 |
/* (non-Javadoc)
|
53 |
* @see es.gva.cit.catalogClient.languages.cswProfiles.IProfiles#getCoordinates()
|
54 |
*/
|
55 |
|
56 |
/**
|
57 |
*
|
58 |
*
|
59 |
*
|
60 |
* @return
|
61 |
*/
|
62 |
public String getTitle() { |
63 |
return "Title"; |
64 |
} |
65 |
/* (non-Javadoc)
|
66 |
* @see es.gva.cit.catalogClient.languages.cswProfiles.IProfiles#getCoordinates()
|
67 |
*/
|
68 |
|
69 |
/**
|
70 |
*
|
71 |
*
|
72 |
*
|
73 |
* @return
|
74 |
*/
|
75 |
public String getAbstract() { |
76 |
return "Abstract"; |
77 |
} |
78 |
/* (non-Javadoc)
|
79 |
* @see es.gva.cit.catalogClient.languages.cswProfiles.IProfiles#getCoordinates()
|
80 |
*/
|
81 |
|
82 |
/**
|
83 |
*
|
84 |
*
|
85 |
*
|
86 |
* @return
|
87 |
*/
|
88 |
public String getThemeKey() { |
89 |
return "Identifier"; |
90 |
} |
91 |
/* (non-Javadoc)
|
92 |
* @see es.gva.cit.catalogClient.languages.cswProfiles.IProfiles#getCoordinates()
|
93 |
*/
|
94 |
|
95 |
/**
|
96 |
*
|
97 |
*
|
98 |
*
|
99 |
* @return
|
100 |
*/
|
101 |
public String getScale() { |
102 |
return "Scale"; |
103 |
} |
104 |
/* (non-Javadoc)
|
105 |
* @see es.gva.cit.catalogClient.languages.cswProfiles.IProfiles#getCoordinates()
|
106 |
*/
|
107 |
|
108 |
/**
|
109 |
*
|
110 |
*
|
111 |
*
|
112 |
* @return
|
113 |
*/
|
114 |
public String getProvider() { |
115 |
return "Publisher"; |
116 |
} |
117 |
/* (non-Javadoc)
|
118 |
* @see es.gva.cit.catalogClient.languages.cswProfiles.IProfiles#getCoordinates()
|
119 |
*/
|
120 |
|
121 |
/**
|
122 |
*
|
123 |
*
|
124 |
*
|
125 |
* @return
|
126 |
*/
|
127 |
public String getDateFrom() { |
128 |
return "Modified"; |
129 |
} |
130 |
/* (non-Javadoc)
|
131 |
* @see es.gva.cit.catalogClient.languages.cswProfiles.IProfiles#getCoordinates()
|
132 |
*/
|
133 |
|
134 |
/**
|
135 |
*
|
136 |
*
|
137 |
*
|
138 |
* @return
|
139 |
*/
|
140 |
public String getDateTo() { |
141 |
return "Modified"; |
142 |
} |
143 |
/* (non-Javadoc)
|
144 |
* @see es.gva.cit.catalogClient.languages.cswProfiles.IProfiles#getCoordinates()
|
145 |
*/
|
146 |
|
147 |
/**
|
148 |
*
|
149 |
*
|
150 |
*
|
151 |
* @return
|
152 |
*/
|
153 |
public String getTopic() { |
154 |
return "Topic"; |
155 |
} |
156 |
/* (non-Javadoc)
|
157 |
* @see es.gva.cit.catalogClient.languages.cswProfiles.IProfiles#getCoordinates()
|
158 |
*/
|
159 |
|
160 |
/**
|
161 |
*
|
162 |
*
|
163 |
*
|
164 |
* @return
|
165 |
*/
|
166 |
public String getCoordinates() { |
167 |
return "Geom"; |
168 |
} |
169 |
/* (non-Javadoc)
|
170 |
* @see es.gva.cit.catalogClient.languages.cswProfiles.IProfiles#getCoordinates()
|
171 |
*/
|
172 |
|
173 |
/**
|
174 |
*
|
175 |
*
|
176 |
*
|
177 |
* @return
|
178 |
* @param dataset
|
179 |
*/
|
180 |
public AdditionalClauses[] getAdditionalClauses(String[] dataset) { |
181 |
return new AdditionalClauses[0]; |
182 |
} |
183 |
/* (non-Javadoc)
|
184 |
* @see es.gva.cit.catalogClient.languages.cswProfiles.IProfiles#getProviderValue(java.lang.String)
|
185 |
*/
|
186 |
|
187 |
/**
|
188 |
*
|
189 |
*
|
190 |
*
|
191 |
* @return
|
192 |
* @param title
|
193 |
* @param filter
|
194 |
*/
|
195 |
public String getTitleValue(String title, String filter) { |
196 |
return envolveWithJokers(title,filter);
|
197 |
} |
198 |
/* (non-Javadoc)
|
199 |
* @see es.gva.cit.catalogClient.languages.cswProfiles.IProfiles#getCoordinates()
|
200 |
*/
|
201 |
|
202 |
/**
|
203 |
*
|
204 |
*
|
205 |
*
|
206 |
* @return
|
207 |
* @param topic
|
208 |
*/
|
209 |
public String getTopicValue(String topic) { |
210 |
return topic;
|
211 |
} |
212 |
/* (non-Javadoc)
|
213 |
* @see es.gva.cit.catalogClient.languages.cswProfiles.IProfiles#getProviderValue(java.lang.String)
|
214 |
*/
|
215 |
|
216 |
/**
|
217 |
*
|
218 |
*
|
219 |
*
|
220 |
* @return
|
221 |
* @param provider
|
222 |
*/
|
223 |
public String getProviderValue(String provider) { |
224 |
return envolveWithJokers(provider,"E"); |
225 |
} |
226 |
|
227 |
/**
|
228 |
* This funcion envolves the array with an spacial char like *
|
229 |
*
|
230 |
*
|
231 |
* @return
|
232 |
* @param array
|
233 |
* @param filter
|
234 |
*/
|
235 |
public String envolveWithJokers(String array, String filter) { |
236 |
if (!(filter.equals("E"))){ |
237 |
String[] split = array.split(" "); |
238 |
String aux = ""; |
239 |
for (int i=0 ; i<split.length ; i++){ |
240 |
aux = aux + "*" + split[i] + "* "; |
241 |
} |
242 |
return aux;
|
243 |
} |
244 |
return "*" + array + "*"; |
245 |
} |
246 |
} |