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