Statistics
| Revision:

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

    
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 is used to define the DublinCore fields that have to be
47
 * used to do a search.
48
 * 
49
 * 
50
 * @author Jorge Piera Llodra (piera_jor@gva.es)
51
 */
52
public class DublinCoreSchema implements ISchemas {
53
/* (non-Javadoc)
54
     * @see es.gva.cit.catalogClient.languages.cswProfiles.IProfiles#getCoordinates()
55
     */
56

    
57
/**
58
 * 
59
 * 
60
 * 
61
 * @return 
62
 */
63
    public String getTitle() {        
64
        return "title";
65
    } 
66
/* (non-Javadoc)
67
     * @see es.gva.cit.catalogClient.languages.cswProfiles.IProfiles#getCoordinates()
68
     */
69

    
70
/**
71
 * 
72
 * 
73
 * 
74
 * @return 
75
 */
76
    public String getAbstract() {        
77
        return "subject";
78
    } 
79
/* (non-Javadoc)
80
     * @see es.gva.cit.catalogClient.languages.cswProfiles.IProfiles#getCoordinates()
81
     */
82

    
83
/**
84
 * 
85
 * 
86
 * 
87
 * @return 
88
 */
89
    public String getThemeKey() {        
90
        return "key";
91
    } 
92
/* (non-Javadoc)
93
     * @see es.gva.cit.catalogClient.languages.cswProfiles.IProfiles#getCoordinates()
94
     */
95

    
96
/**
97
 * 
98
 * 
99
 * 
100
 * @return 
101
 */
102
    public String getScale() {        
103
        return "scale";
104
    } 
105
/* (non-Javadoc)
106
     * @see es.gva.cit.catalogClient.languages.cswProfiles.IProfiles#getCoordinates()
107
     */
108

    
109
/**
110
 * 
111
 * 
112
 * 
113
 * @return 
114
 */
115
    public String getProvider() {        
116
        return "publisher";
117
    } 
118
/* (non-Javadoc)
119
     * @see es.gva.cit.catalogClient.languages.cswProfiles.IProfiles#getCoordinates()
120
     */
121

    
122
/**
123
 * 
124
 * 
125
 * 
126
 * @return 
127
 */
128
    public String getDateFrom() {        
129
        return "date";
130
    } 
131
/* (non-Javadoc)
132
     * @see es.gva.cit.catalogClient.languages.cswProfiles.IProfiles#getCoordinates()
133
     */
134

    
135
/**
136
 * 
137
 * 
138
 * 
139
 * @return 
140
 */
141
    public String getDateTo() {        
142
        return "date";
143
    } 
144
/* (non-Javadoc)
145
     * @see es.gva.cit.catalogClient.languages.cswProfiles.IProfiles#getCoordinates()
146
     */
147

    
148
/**
149
 * 
150
 * 
151
 * 
152
 * @return 
153
 */
154
    public String getTopic() {        
155
        return "topic";
156
    } 
157
/* (non-Javadoc)
158
     * @see es.gva.cit.catalogClient.languages.cswProfiles.IProfiles#getCoordinates()
159
     */
160

    
161
/**
162
 * 
163
 * 
164
 * 
165
 * @return 
166
 */
167
    public String getCoordinates() {        
168
        return "spatial";
169
    } 
170
/* (non-Javadoc)
171
     * @see es.gva.cit.catalogClient.languages.cswProfiles.IProfiles#getCoordinates()
172
     */
173

    
174
/**
175
 * 
176
 * 
177
 * 
178
 * @return 
179
 * @param dataset 
180
 */
181
    public AdditionalClauses[] getAdditionalClauses(String[] dataset) {        
182
        return new AdditionalClauses[0];
183
    } 
184
/* (non-Javadoc)
185
     * @see es.gva.cit.catalogClient.languages.cswProfiles.IProfiles#getProviderValue(java.lang.String)
186
     */
187

    
188
/**
189
 * 
190
 * 
191
 * 
192
 * @return 
193
 * @param title 
194
 * @param filter 
195
 */
196
    public String getTitleValue(String title, String filter) {        
197
            return envolveWithJokers(title,filter);
198
    } 
199
/* (non-Javadoc)
200
     * @see es.gva.cit.catalogClient.languages.cswProfiles.IProfiles#getCoordinates()
201
     */
202

    
203
/**
204
 * 
205
 * 
206
 * 
207
 * @return 
208
 * @param topic 
209
 */
210
    public String getTopicValue(String topic) {        
211
        return topic;
212
    } 
213
/* (non-Javadoc)
214
     * @see es.gva.cit.catalogClient.languages.cswProfiles.IProfiles#getProviderValue(java.lang.String)
215
     */
216

    
217
/**
218
 * 
219
 * 
220
 * 
221
 * @return 
222
 * @param provider 
223
 */
224
    public String getProviderValue(String provider) {        
225
        return envolveWithJokers(provider,"E");
226
    } 
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
        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
    } 
247
 }