Revision 3486
trunk/applications/appCatalogYNomenclatorClient/text.properties | ||
---|---|---|
104 | 104 |
mantainold=Eliminar las busquedas anteriores |
105 | 105 |
goto=Hacer un zoom a la b?squeda |
106 | 106 |
aspect=Configuracion de aspecto |
107 |
unknown=Desconocido |
|
107 | 108 |
|
trunk/applications/appCatalogYNomenclatorClient/src/es/gva/cit/catalogClient/profiles/Profile.java | ||
---|---|---|
1 |
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana |
|
2 |
* |
|
3 |
* Copyright (C) 2004 IVER T.I. and Generalitat Valenciana. |
|
4 |
* |
|
5 |
* This program is free software; you can redistribute it and/or |
|
6 |
* modify it under the terms of the GNU General Public License |
|
7 |
* as published by the Free Software Foundation; either version 2 |
|
8 |
* of the License, or (at your option) any later version. |
|
9 |
* |
|
10 |
* This program is distributed in the hope that it will be useful, |
|
11 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
13 |
* GNU General Public License for more details. |
|
14 |
* |
|
15 |
* You should have received a copy of the GNU General Public License |
|
16 |
* along with this program; if not, write to the Free Software |
|
17 |
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,USA. |
|
18 |
* |
|
19 |
* For more information, contact: |
|
20 |
* |
|
21 |
* Generalitat Valenciana |
|
22 |
* Conselleria d'Infraestructures i Transport |
|
23 |
* Av. Blasco Ib??ez, 50 |
|
24 |
* 46010 VALENCIA |
|
25 |
* SPAIN |
|
26 |
* |
|
27 |
* +34 963862235 |
|
28 |
* gvsig@gva.es |
|
29 |
* www.gvsig.gva.es |
|
30 |
* |
|
31 |
* or |
|
32 |
* |
|
33 |
* IVER T.I. S.A |
|
34 |
* Salamanca 50 |
|
35 |
* 46005 Valencia |
|
36 |
* Spain |
|
37 |
* |
|
38 |
* +34 963163400 |
|
39 |
* dac@iver.es |
|
40 |
*/ |
|
41 |
/* |
|
42 |
* CVS MESSAGES: |
|
43 |
* |
|
44 |
* $Id$ |
|
45 |
* $Log$ |
|
46 |
* Revision 1.1 2005-12-20 09:04:21 jorpiell |
|
47 |
* Hay muchas clases cambiadas porque se han definido algunas constantes |
|
48 |
* en la clase profile y el la clase resource. Antes usabamos variables y |
|
49 |
* juro por snoopy que nunca m?s volver? a cometer este error. Adem?s se ha |
|
50 |
* cambiado el paquete csw.profiles de sitio. Realmente, este paquete no sirve solo |
|
51 |
* para el CSW, sino que tambi?n se usa en el SRW. |
|
52 |
* |
|
53 |
* |
|
54 |
*/ |
|
55 |
|
|
56 |
|
|
57 |
package es.gva.cit.catalogClient.profiles; |
|
58 |
|
|
59 |
/** |
|
60 |
* This class is used to define the profiles |
|
61 |
* @author Jorge Piera Llodra (piera_jor@gva.es) |
|
62 |
*/ |
|
63 |
public class Profile { |
|
64 |
public static final String ISO19115 = "ISO19115"; |
|
65 |
public static final String DUBLINCORE = "DUBLINCORE"; |
|
66 |
public static final String EBRIM = "EBRIM"; |
|
67 |
|
|
68 |
} |
|
0 | 69 |
trunk/applications/appCatalogYNomenclatorClient/src/es/gva/cit/catalogClient/profiles/DublinCoreProfile.java | ||
---|---|---|
1 |
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana |
|
2 |
* |
|
3 |
* Copyright (C) 2004 IVER T.I. and Generalitat Valenciana. |
|
4 |
* |
|
5 |
* This program is free software; you can redistribute it and/or |
|
6 |
* modify it under the terms of the GNU General Public License |
|
7 |
* as published by the Free Software Foundation; either version 2 |
|
8 |
* of the License, or (at your option) any later version. |
|
9 |
* |
|
10 |
* This program is distributed in the hope that it will be useful, |
|
11 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
13 |
* GNU General Public License for more details. |
|
14 |
* |
|
15 |
* You should have received a copy of the GNU General Public License |
|
16 |
* along with this program; if not, write to the Free Software |
|
17 |
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,USA. |
|
18 |
* |
|
19 |
* For more information, contact: |
|
20 |
* |
|
21 |
* Generalitat Valenciana |
|
22 |
* Conselleria d'Infraestructures i Transport |
|
23 |
* Av. Blasco Ib??ez, 50 |
|
24 |
* 46010 VALENCIA |
|
25 |
* SPAIN |
|
26 |
* |
|
27 |
* +34 963862235 |
|
28 |
* gvsig@gva.es |
|
29 |
* www.gvsig.gva.es |
|
30 |
* |
|
31 |
* or |
|
32 |
* |
|
33 |
* IVER T.I. S.A |
|
34 |
* Salamanca 50 |
|
35 |
* 46005 Valencia |
|
36 |
* Spain |
|
37 |
* |
|
38 |
* +34 963163400 |
|
39 |
* dac@iver.es |
|
40 |
*/ |
|
41 |
package es.gva.cit.catalogClient.profiles; |
|
42 |
|
|
43 |
|
|
44 |
/** |
|
45 |
* This class is used to define the DublinCore fields that have to be |
|
46 |
* used to do a search. |
|
47 |
* @author Jorge Piera Llodra (piera_jor@gva.es) |
|
48 |
*/ |
|
49 |
public class DublinCoreProfile implements IProfiles{ |
|
50 |
|
|
51 |
/* (non-Javadoc) |
|
52 |
* @see es.gva.cit.catalogClient.languages.cswProfiles.IProfiles#getCoordinates() |
|
53 |
*/ |
|
54 |
public String getTitle() { |
|
55 |
return "title"; |
|
56 |
} |
|
57 |
|
|
58 |
/* (non-Javadoc) |
|
59 |
* @see es.gva.cit.catalogClient.languages.cswProfiles.IProfiles#getCoordinates() |
|
60 |
*/ |
|
61 |
public String getAbstract() { |
|
62 |
return "subject"; |
|
63 |
} |
|
64 |
|
|
65 |
/* (non-Javadoc) |
|
66 |
* @see es.gva.cit.catalogClient.languages.cswProfiles.IProfiles#getCoordinates() |
|
67 |
*/ |
|
68 |
public String getThemeKey() { |
|
69 |
return "key"; |
|
70 |
} |
|
71 |
|
|
72 |
/* (non-Javadoc) |
|
73 |
* @see es.gva.cit.catalogClient.languages.cswProfiles.IProfiles#getCoordinates() |
|
74 |
*/ |
|
75 |
public String getScale() { |
|
76 |
return "scale"; |
|
77 |
} |
|
78 |
|
|
79 |
/* (non-Javadoc) |
|
80 |
* @see es.gva.cit.catalogClient.languages.cswProfiles.IProfiles#getCoordinates() |
|
81 |
*/ |
|
82 |
public String getProvider() { |
|
83 |
return "publisher"; |
|
84 |
} |
|
85 |
|
|
86 |
/* (non-Javadoc) |
|
87 |
* @see es.gva.cit.catalogClient.languages.cswProfiles.IProfiles#getCoordinates() |
|
88 |
*/ |
|
89 |
public String getDateFrom() { |
|
90 |
return "date"; |
|
91 |
} |
|
92 |
|
|
93 |
/* (non-Javadoc) |
|
94 |
* @see es.gva.cit.catalogClient.languages.cswProfiles.IProfiles#getCoordinates() |
|
95 |
*/ |
|
96 |
public String getDateTo() { |
|
97 |
return "date"; |
|
98 |
} |
|
99 |
|
|
100 |
/* (non-Javadoc) |
|
101 |
* @see es.gva.cit.catalogClient.languages.cswProfiles.IProfiles#getCoordinates() |
|
102 |
*/ |
|
103 |
public String getTopic() { |
|
104 |
return "topic"; |
|
105 |
} |
|
106 |
|
|
107 |
/* (non-Javadoc) |
|
108 |
* @see es.gva.cit.catalogClient.languages.cswProfiles.IProfiles#getCoordinates() |
|
109 |
*/ |
|
110 |
public String getCoordinates() { |
|
111 |
return "spatial"; |
|
112 |
} |
|
113 |
|
|
114 |
/* (non-Javadoc) |
|
115 |
* @see es.gva.cit.catalogClient.languages.cswProfiles.IProfiles#getCoordinates() |
|
116 |
*/ |
|
117 |
public AdditionalClauses[] getAdditionalClauses(String[] dataset) { |
|
118 |
return new AdditionalClauses[0]; |
|
119 |
} |
|
120 |
|
|
121 |
/* (non-Javadoc) |
|
122 |
* @see es.gva.cit.catalogClient.languages.cswProfiles.IProfiles#getProviderValue(java.lang.String) |
|
123 |
*/ |
|
124 |
public String getTitleValue(String title, String filter) { |
|
125 |
return envolveWithJokers(title,filter); |
|
126 |
} |
|
127 |
|
|
128 |
/* (non-Javadoc) |
|
129 |
* @see es.gva.cit.catalogClient.languages.cswProfiles.IProfiles#getCoordinates() |
|
130 |
*/ |
|
131 |
public String getTopicValue(String topic) { |
|
132 |
return topic; |
|
133 |
} |
|
134 |
|
|
135 |
|
|
136 |
/* (non-Javadoc) |
|
137 |
* @see es.gva.cit.catalogClient.languages.cswProfiles.IProfiles#getProviderValue(java.lang.String) |
|
138 |
*/ |
|
139 |
public String getProviderValue(String provider) { |
|
140 |
return envolveWithJokers(provider,"E"); |
|
141 |
} |
|
142 |
|
|
143 |
/** |
|
144 |
* This funcion envolves the array with an spacial char like * |
|
145 |
* @param array |
|
146 |
* @param filter |
|
147 |
* @return |
|
148 |
*/ |
|
149 |
public String envolveWithJokers(String array, String filter){ |
|
150 |
if (!(filter.equals("E"))){ |
|
151 |
String[] split = array.split(" "); |
|
152 |
String aux = ""; |
|
153 |
for (int i=0 ; i<split.length ; i++){ |
|
154 |
aux = aux + "*" + split[i] + "* "; |
|
155 |
} |
|
156 |
return aux; |
|
157 |
} |
|
158 |
return "*" + array + "*"; |
|
159 |
} |
|
160 |
|
|
161 |
|
|
162 |
|
|
163 |
} |
|
0 | 164 |
trunk/applications/appCatalogYNomenclatorClient/src/es/gva/cit/catalogClient/profiles/AdditionalClauses.java | ||
---|---|---|
1 |
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana |
|
2 |
* |
|
3 |
* Copyright (C) 2004 IVER T.I. and Generalitat Valenciana. |
|
4 |
* |
|
5 |
* This program is free software; you can redistribute it and/or |
|
6 |
* modify it under the terms of the GNU General Public License |
|
7 |
* as published by the Free Software Foundation; either version 2 |
|
8 |
* of the License, or (at your option) any later version. |
|
9 |
* |
|
10 |
* This program is distributed in the hope that it will be useful, |
|
11 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
13 |
* GNU General Public License for more details. |
|
14 |
* |
|
15 |
* You should have received a copy of the GNU General Public License |
|
16 |
* along with this program; if not, write to the Free Software |
|
17 |
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,USA. |
|
18 |
* |
|
19 |
* For more information, contact: |
|
20 |
* |
|
21 |
* Generalitat Valenciana |
|
22 |
* Conselleria d'Infraestructures i Transport |
|
23 |
* Av. Blasco Ib??ez, 50 |
|
24 |
* 46010 VALENCIA |
|
25 |
* SPAIN |
|
26 |
* |
|
27 |
* +34 963862235 |
|
28 |
* gvsig@gva.es |
|
29 |
* www.gvsig.gva.es |
|
30 |
* |
|
31 |
* or |
|
32 |
* |
|
33 |
* IVER T.I. S.A |
|
34 |
* Salamanca 50 |
|
35 |
* 46005 Valencia |
|
36 |
* Spain |
|
37 |
* |
|
38 |
* +34 963163400 |
|
39 |
* dac@iver.es |
|
40 |
*/ |
|
41 |
package es.gva.cit.catalogClient.profiles; |
|
42 |
|
|
43 |
|
|
44 |
|
|
45 |
/** |
|
46 |
* This class is used like an structure. It contains the fields needed to add a new |
|
47 |
* operation to the query language. |
|
48 |
* |
|
49 |
* @author Jorge Piera Llodra (piera_jor@gva.es) |
|
50 |
*/ |
|
51 |
public class AdditionalClauses { |
|
52 |
String property; |
|
53 |
String value; |
|
54 |
String concorancia; |
|
55 |
String relationship; |
|
56 |
String type; |
|
57 |
|
|
58 |
/** |
|
59 |
* @param property |
|
60 |
* @param value |
|
61 |
* @param concorancia |
|
62 |
* @param relationship |
|
63 |
* @param type |
|
64 |
*/ |
|
65 |
public AdditionalClauses(String property, String value, String concorancia, |
|
66 |
String relationship, String type) { |
|
67 |
super(); |
|
68 |
this.property = property; |
|
69 |
this.value = value; |
|
70 |
this.concorancia = concorancia; |
|
71 |
this.relationship = relationship; |
|
72 |
this.type = type; |
|
73 |
} |
|
74 |
|
|
75 |
/** |
|
76 |
* @return Returns the concorancia. |
|
77 |
*/ |
|
78 |
public String getConcorancia() { |
|
79 |
return concorancia; |
|
80 |
} |
|
81 |
|
|
82 |
/** |
|
83 |
* @return Returns the property. |
|
84 |
*/ |
|
85 |
public String getProperty() { |
|
86 |
return property; |
|
87 |
} |
|
88 |
|
|
89 |
/** |
|
90 |
* @return Returns the relationship. |
|
91 |
*/ |
|
92 |
public String getRelationship() { |
|
93 |
return relationship; |
|
94 |
} |
|
95 |
|
|
96 |
/** |
|
97 |
* @return Returns the type. |
|
98 |
*/ |
|
99 |
public String getType() { |
|
100 |
return type; |
|
101 |
} |
|
102 |
|
|
103 |
/** |
|
104 |
* @return Returns the value. |
|
105 |
*/ |
|
106 |
public String getValue() { |
|
107 |
return value; |
|
108 |
} |
|
109 |
} |
|
0 | 110 |
trunk/applications/appCatalogYNomenclatorClient/src/es/gva/cit/catalogClient/profiles/IProfiles.java | ||
---|---|---|
1 |
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana |
|
2 |
* |
|
3 |
* Copyright (C) 2004 IVER T.I. and Generalitat Valenciana. |
|
4 |
* |
|
5 |
* This program is free software; you can redistribute it and/or |
|
6 |
* modify it under the terms of the GNU General Public License |
|
7 |
* as published by the Free Software Foundation; either version 2 |
|
8 |
* of the License, or (at your option) any later version. |
|
9 |
* |
|
10 |
* This program is distributed in the hope that it will be useful, |
|
11 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
13 |
* GNU General Public License for more details. |
|
14 |
* |
|
15 |
* You should have received a copy of the GNU General Public License |
|
16 |
* along with this program; if not, write to the Free Software |
|
17 |
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,USA. |
|
18 |
* |
|
19 |
* For more information, contact: |
|
20 |
* |
|
21 |
* Generalitat Valenciana |
|
22 |
* Conselleria d'Infraestructures i Transport |
|
23 |
* Av. Blasco Ib??ez, 50 |
|
24 |
* 46010 VALENCIA |
|
25 |
* SPAIN |
|
26 |
* |
|
27 |
* +34 963862235 |
|
28 |
* gvsig@gva.es |
|
29 |
* www.gvsig.gva.es |
|
30 |
* |
|
31 |
* or |
|
32 |
* |
|
33 |
* IVER T.I. S.A |
|
34 |
* Salamanca 50 |
|
35 |
* 46005 Valencia |
|
36 |
* Spain |
|
37 |
* |
|
38 |
* +34 963163400 |
|
39 |
* dac@iver.es |
|
40 |
*/ |
|
41 |
package es.gva.cit.catalogClient.profiles; |
|
42 |
|
|
43 |
|
|
44 |
|
|
45 |
|
|
46 |
|
|
47 |
/** |
|
48 |
* @author Jorge Piera Llodra (piera_jor@gva.es) |
|
49 |
*/ |
|
50 |
public interface IProfiles { |
|
51 |
public String getTitle(); |
|
52 |
|
|
53 |
public String getAbstract(); |
|
54 |
|
|
55 |
public String getThemeKey(); |
|
56 |
|
|
57 |
public String getTopic(); |
|
58 |
|
|
59 |
public String getScale(); |
|
60 |
|
|
61 |
public String getProvider(); |
|
62 |
|
|
63 |
public String getDateFrom(); |
|
64 |
|
|
65 |
public String getDateTo(); |
|
66 |
|
|
67 |
public String getCoordinates(); |
|
68 |
|
|
69 |
public String getTopicValue(String topic); |
|
70 |
|
|
71 |
public String getProviderValue(String value); |
|
72 |
|
|
73 |
/** |
|
74 |
* It returns the Title value. We need extra characters (like *,?,....), because |
|
75 |
* this profile has different behaviour to find strings |
|
76 |
* @param title |
|
77 |
* The String to find |
|
78 |
* @param filter |
|
79 |
* E (Exact), A (All words), Y (anY word) |
|
80 |
* @return |
|
81 |
*/ |
|
82 |
public String getTitleValue(String title,String filter); |
|
83 |
|
|
84 |
/** |
|
85 |
* This function must return a Vector of AddionalClauses to add to the query. |
|
86 |
* @param dataset |
|
87 |
* @return |
|
88 |
*/ |
|
89 |
public AdditionalClauses[] getAdditionalClauses(String[] dataset); |
|
90 |
|
|
91 |
|
|
92 |
} |
|
0 | 93 |
trunk/applications/appCatalogYNomenclatorClient/src/es/gva/cit/catalogClient/profiles/ISO19115Profile.java | ||
---|---|---|
1 |
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana |
|
2 |
* |
|
3 |
* Copyright (C) 2004 IVER T.I. and Generalitat Valenciana. |
|
4 |
* |
|
5 |
* This program is free software; you can redistribute it and/or |
|
6 |
* modify it under the terms of the GNU General Public License |
|
7 |
* as published by the Free Software Foundation; either version 2 |
|
8 |
* of the License, or (at your option) any later version. |
|
9 |
* |
|
10 |
* This program is distributed in the hope that it will be useful, |
|
11 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
13 |
* GNU General Public License for more details. |
|
14 |
* |
|
15 |
* You should have received a copy of the GNU General Public License |
|
16 |
* along with this program; if not, write to the Free Software |
|
17 |
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,USA. |
|
18 |
* |
|
19 |
* For more information, contact: |
|
20 |
* |
|
21 |
* Generalitat Valenciana |
|
22 |
* Conselleria d'Infraestructures i Transport |
|
23 |
* Av. Blasco Ib??ez, 50 |
|
24 |
* 46010 VALENCIA |
|
25 |
* SPAIN |
|
26 |
* |
|
27 |
* +34 963862235 |
|
28 |
* gvsig@gva.es |
|
29 |
* www.gvsig.gva.es |
|
30 |
* |
|
31 |
* or |
|
32 |
* |
|
33 |
* IVER T.I. S.A |
|
34 |
* Salamanca 50 |
|
35 |
* 46005 Valencia |
|
36 |
* Spain |
|
37 |
* |
|
38 |
* +34 963163400 |
|
39 |
* dac@iver.es |
|
40 |
*/ |
|
41 |
package es.gva.cit.catalogClient.profiles; |
|
42 |
|
|
43 |
|
|
44 |
|
|
45 |
|
|
46 |
/** |
|
47 |
* This class defines the labels for the ISO19115/19119 CSW Profile |
|
48 |
* @author Jorge Piera Llodra (piera_jor@gva.es) |
|
49 |
*/ |
|
50 |
public class ISO19115Profile implements IProfiles { |
|
51 |
/* (non-Javadoc) |
|
52 |
* @see es.gva.cit.catalogClient.languages.cswProfiles.IProfiles#getCoordinates() |
|
53 |
*/ |
|
54 |
public String getTitle() { |
|
55 |
return "Title"; |
|
56 |
} |
|
57 |
|
|
58 |
/* (non-Javadoc) |
|
59 |
* @see es.gva.cit.catalogClient.languages.cswProfiles.IProfiles#getCoordinates() |
|
60 |
*/ |
|
61 |
public String getAbstract() { |
|
62 |
return "Abstract"; |
|
63 |
} |
|
64 |
|
|
65 |
/* (non-Javadoc) |
|
66 |
* @see es.gva.cit.catalogClient.languages.cswProfiles.IProfiles#getCoordinates() |
|
67 |
*/ |
|
68 |
public String getThemeKey() { |
|
69 |
return "Identifier"; |
|
70 |
} |
|
71 |
|
|
72 |
/* (non-Javadoc) |
|
73 |
* @see es.gva.cit.catalogClient.languages.cswProfiles.IProfiles#getCoordinates() |
|
74 |
*/ |
|
75 |
public String getScale() { |
|
76 |
return "Scale"; |
|
77 |
} |
|
78 |
|
|
79 |
/* (non-Javadoc) |
|
80 |
* @see es.gva.cit.catalogClient.languages.cswProfiles.IProfiles#getCoordinates() |
|
81 |
*/ |
|
82 |
public String getProvider() { |
|
83 |
return "Publisher"; |
|
84 |
} |
|
85 |
|
|
86 |
/* (non-Javadoc) |
|
87 |
* @see es.gva.cit.catalogClient.languages.cswProfiles.IProfiles#getCoordinates() |
|
88 |
*/ |
|
89 |
public String getDateFrom() { |
|
90 |
return "Modified"; |
|
91 |
} |
|
92 |
|
|
93 |
/* (non-Javadoc) |
|
94 |
* @see es.gva.cit.catalogClient.languages.cswProfiles.IProfiles#getCoordinates() |
|
95 |
*/ |
|
96 |
public String getDateTo() { |
|
97 |
return "Modified"; |
|
98 |
} |
|
99 |
|
|
100 |
/* (non-Javadoc) |
|
101 |
* @see es.gva.cit.catalogClient.languages.cswProfiles.IProfiles#getCoordinates() |
|
102 |
*/ |
|
103 |
public String getTopic() { |
|
104 |
return "Topic"; |
|
105 |
} |
|
106 |
|
|
107 |
/* (non-Javadoc) |
|
108 |
* @see es.gva.cit.catalogClient.languages.cswProfiles.IProfiles#getCoordinates() |
|
109 |
*/ |
|
110 |
public String getCoordinates() { |
|
111 |
return "Geom"; |
|
112 |
} |
|
113 |
|
|
114 |
/* (non-Javadoc) |
|
115 |
* @see es.gva.cit.catalogClient.languages.cswProfiles.IProfiles#getCoordinates() |
|
116 |
*/ |
|
117 |
public AdditionalClauses[] getAdditionalClauses(String[] dataset) { |
|
118 |
return new AdditionalClauses[0]; |
|
119 |
} |
|
120 |
|
|
121 |
/* (non-Javadoc) |
|
122 |
* @see es.gva.cit.catalogClient.languages.cswProfiles.IProfiles#getProviderValue(java.lang.String) |
|
123 |
*/ |
|
124 |
public String getTitleValue(String title, String filter) { |
|
125 |
return envolveWithJokers(title,filter); |
|
126 |
} |
|
127 |
|
|
128 |
/* (non-Javadoc) |
|
129 |
* @see es.gva.cit.catalogClient.languages.cswProfiles.IProfiles#getCoordinates() |
|
130 |
*/ |
|
131 |
public String getTopicValue(String topic) { |
|
132 |
return topic; |
|
133 |
} |
|
134 |
|
|
135 |
|
|
136 |
/* (non-Javadoc) |
|
137 |
* @see es.gva.cit.catalogClient.languages.cswProfiles.IProfiles#getProviderValue(java.lang.String) |
|
138 |
*/ |
|
139 |
public String getProviderValue(String provider) { |
|
140 |
return envolveWithJokers(provider,"E"); |
|
141 |
} |
|
142 |
|
|
143 |
/** |
|
144 |
* This funcion envolves the array with an spacial char like * |
|
145 |
* @param array |
|
146 |
* @param filter |
|
147 |
* @return |
|
148 |
*/ |
|
149 |
public String envolveWithJokers(String array, String filter){ |
|
150 |
if (!(filter.equals("E"))){ |
|
151 |
String[] split = array.split(" "); |
|
152 |
String aux = ""; |
|
153 |
for (int i=0 ; i<split.length ; i++){ |
|
154 |
aux = aux + "*" + split[i] + "* "; |
|
155 |
} |
|
156 |
return aux; |
|
157 |
} |
|
158 |
return "*" + array + "*"; |
|
159 |
} |
|
160 |
|
|
161 |
|
|
162 |
|
|
163 |
|
|
164 |
} |
|
0 | 165 |
trunk/applications/appCatalogYNomenclatorClient/src/es/gva/cit/catalogClient/profiles/EbRIMProfile.java | ||
---|---|---|
1 |
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana |
|
2 |
* |
|
3 |
* Copyright (C) 2004 IVER T.I. and Generalitat Valenciana. |
|
4 |
* |
|
5 |
* This program is free software; you can redistribute it and/or |
|
6 |
* modify it under the terms of the GNU General Public License |
|
7 |
* as published by the Free Software Foundation; either version 2 |
|
8 |
* of the License, or (at your option) any later version. |
|
9 |
* |
|
10 |
* This program is distributed in the hope that it will be useful, |
|
11 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
13 |
* GNU General Public License for more details. |
|
14 |
* |
|
15 |
* You should have received a copy of the GNU General Public License |
|
16 |
* along with this program; if not, write to the Free Software |
|
17 |
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,USA. |
|
18 |
* |
|
19 |
* For more information, contact: |
|
20 |
* |
|
21 |
* Generalitat Valenciana |
|
22 |
* Conselleria d'Infraestructures i Transport |
|
23 |
* Av. Blasco Ib??ez, 50 |
|
24 |
* 46010 VALENCIA |
|
25 |
* SPAIN |
|
26 |
* |
|
27 |
* +34 963862235 |
|
28 |
* gvsig@gva.es |
|
29 |
* www.gvsig.gva.es |
|
30 |
* |
|
31 |
* or |
|
32 |
* |
|
33 |
* IVER T.I. S.A |
|
34 |
* Salamanca 50 |
|
35 |
* 46005 Valencia |
|
36 |
* Spain |
|
37 |
* |
|
38 |
* +34 963163400 |
|
39 |
* dac@iver.es |
|
40 |
*/ |
|
41 |
package es.gva.cit.catalogClient.profiles; |
|
42 |
|
|
43 |
import java.util.StringTokenizer; |
|
44 |
|
|
45 |
|
|
46 |
|
|
47 |
|
|
48 |
/** |
|
49 |
* This class defines the labels for the ebXML CSW Profile. |
|
50 |
* |
|
51 |
* @author Jorge Piera Llodra (piera_jor@gva.es) |
|
52 |
*/ |
|
53 |
public class EbRIMProfile implements IProfiles { |
|
54 |
public String getTitle() { |
|
55 |
return "/Dataset/Name/LocalizedString/@value"; |
|
56 |
} |
|
57 |
|
|
58 |
public String getAbstract() { |
|
59 |
return "/Dataset/Description/LocalizedString/@value"; |
|
60 |
} |
|
61 |
|
|
62 |
public String getThemeKey() { |
|
63 |
return "/Dataset/Slot:s2/ValueList/Value"; |
|
64 |
} |
|
65 |
|
|
66 |
public String getTopic() { |
|
67 |
return "/Classification/@classificationNode"; |
|
68 |
} |
|
69 |
|
|
70 |
public String getScale() { |
|
71 |
return null; |
|
72 |
} |
|
73 |
|
|
74 |
public String getProvider() { |
|
75 |
return "/Organization/Name/LocalizedString/@value"; |
|
76 |
} |
|
77 |
|
|
78 |
public String getDateFrom() { |
|
79 |
return null; |
|
80 |
} |
|
81 |
|
|
82 |
public String getDateTo() { |
|
83 |
return null; |
|
84 |
} |
|
85 |
|
|
86 |
public String getTopicValue(String topic) { |
|
87 |
if (topic.equals("farming")) { |
|
88 |
return "urn:x-iso-tc211:19119(2003)/scheme/services/scheme/topics:001"; |
|
89 |
} |
|
90 |
|
|
91 |
if (topic.equals("biota")) { |
|
92 |
return "urn:x-iso-tc211:19119(2003)/scheme/services/scheme/topics:002"; |
|
93 |
} |
|
94 |
|
|
95 |
if (topic.equals("boundaries")) { |
|
96 |
return "urn:x-iso-tc211:19119(2003)/scheme/services/scheme/topics:003"; |
|
97 |
} |
|
98 |
|
|
99 |
if (topic.equals("climatologyMeteorologyAtmosphere")) { |
|
100 |
return "urn:x-iso-tc211:19119(2003)/scheme/services/scheme/topics:004"; |
|
101 |
} |
|
102 |
|
|
103 |
if (topic.equals("economy")) { |
|
104 |
return "urn:x-iso-tc211:19119(2003)/scheme/services/scheme/topics:005"; |
|
105 |
} |
|
106 |
|
|
107 |
if (topic.equals("elevation")) { |
|
108 |
return "urn:x-iso-tc211:19119(2003)/scheme/services/scheme/topics:006"; |
|
109 |
} |
|
110 |
|
|
111 |
if (topic.equals("environment")) { |
|
112 |
return "urn:x-iso-tc211:19119(2003)/scheme/services/scheme/topics:007"; |
|
113 |
} |
|
114 |
|
|
115 |
if (topic.equals("geoscientificInformation")) { |
|
116 |
return "urn:x-iso-tc211:19119(2003)/scheme/services/scheme/topics:008"; |
|
117 |
} |
|
118 |
|
|
119 |
if (topic.equals("health")) { |
|
120 |
return "urn:x-iso-tc211:19119(2003)/scheme/services/scheme/topics:009"; |
|
121 |
} |
|
122 |
|
|
123 |
if (topic.equals("imageryBaseMapsEarthCover")) { |
|
124 |
return "urn:x-iso-tc211:19119(2003)/scheme/services/scheme/topics:010"; |
|
125 |
} |
|
126 |
|
|
127 |
if (topic.equals("intelligenceMilitary")) { |
|
128 |
return "urn:x-iso-tc211:19119(2003)/scheme/services/scheme/topics:011"; |
|
129 |
} |
|
130 |
|
|
131 |
if (topic.equals("inlandWaters")) { |
|
132 |
return "urn:x-iso-tc211:19119(2003)/scheme/services/scheme/topics:012"; |
|
133 |
} |
|
134 |
|
|
135 |
if (topic.equals("location")) { |
|
136 |
return "urn:x-iso-tc211:19119(2003)/scheme/services/scheme/topics:013"; |
|
137 |
} |
|
138 |
|
|
139 |
if (topic.equals("oceans")) { |
|
140 |
return "urn:x-iso-tc211:19119(2003)/scheme/services/scheme/topics:014"; |
|
141 |
} |
|
142 |
|
|
143 |
if (topic.equals("planningCadastre")) { |
|
144 |
return "urn:x-iso-tc211:19119(2003)/scheme/services/scheme/topics:015"; |
|
145 |
} |
|
146 |
|
|
147 |
if (topic.equals("society")) { |
|
148 |
return "urn:x-iso-tc211:19119(2003)/scheme/services/scheme/topics:016"; |
|
149 |
} |
|
150 |
|
|
151 |
if (topic.equals("structure")) { |
|
152 |
return "urn:x-iso-tc211:19119(2003)/scheme/services/scheme/topics:017"; |
|
153 |
} |
|
154 |
|
|
155 |
if (topic.equals("transportation")) { |
|
156 |
return "urn:x-iso-tc211:19119(2003)/scheme/services/scheme/topics:018"; |
|
157 |
} |
|
158 |
|
|
159 |
if (topic.equals("utilitiesCommunication")) { |
|
160 |
return "urn:x-iso-tc211:19119(2003)/scheme/services/scheme/topics:019"; |
|
161 |
} |
|
162 |
|
|
163 |
return ""; |
|
164 |
} |
|
165 |
|
|
166 |
public AdditionalClauses[] getAdditionalClauses(String[] dataset) { |
|
167 |
AdditionalClauses[] ac = new AdditionalClauses[3]; |
|
168 |
|
|
169 |
//Classification |
|
170 |
ac[0] = new AdditionalClauses("/Dataset/@id", |
|
171 |
"/Classification/@classifiedObject", "E", "PropertyIsEqualTo", |
|
172 |
"P"); |
|
173 |
|
|
174 |
//Association |
|
175 |
ac[1] = new AdditionalClauses("/Dataset/@id", |
|
176 |
"/Association/@sourceObject", "E", "PropertyIsEqualTo", "P"); |
|
177 |
|
|
178 |
//Geometry |
|
179 |
ac[2] = new AdditionalClauses("/Geometry/@id", |
|
180 |
"/Association/@targetObject", "E", "PropertyIsEqualTo", "P"); |
|
181 |
|
|
182 |
return ac; |
|
183 |
} |
|
184 |
|
|
185 |
public String getTitleValue(String title, String filter) { |
|
186 |
if (filter.equals("E")) |
|
187 |
return "*" + title + "*"; |
|
188 |
|
|
189 |
StringTokenizer sti = new StringTokenizer(title); |
|
190 |
String pattern = ""; |
|
191 |
|
|
192 |
while (sti.hasMoreElements()) |
|
193 |
pattern = pattern + "*" + sti.nextToken() + "* "; |
|
194 |
|
|
195 |
|
|
196 |
return pattern; |
|
197 |
} |
|
198 |
|
|
199 |
/* (non-Javadoc) |
|
200 |
* @see es.gva.cit.catalogClient.languages.cswProfiles.IProfiles#getProviderValue(java.lang.String) |
|
201 |
*/ |
|
202 |
public String getProviderValue(String value) { |
|
203 |
// TODO Auto-generated method stub |
|
204 |
return null; |
|
205 |
} |
|
206 |
|
|
207 |
/* (non-Javadoc) |
|
208 |
* @see es.gva.cit.catalogClient.languages.cswProfiles.IProfiles#getCoordinates() |
|
209 |
*/ |
|
210 |
public String getCoordinates() { |
|
211 |
return "/Geometry/content"; |
|
212 |
} |
|
213 |
|
|
214 |
|
|
215 |
|
|
216 |
} |
|
0 | 217 |
trunk/applications/appCatalogYNomenclatorClient/src/es/gva/cit/catalogClient/CatalogClient.java | ||
---|---|---|
43 | 43 |
import es.gva.cit.catalogClient.csw.drivers.CSWCatalogServiceDriver; |
44 | 44 |
import es.gva.cit.catalogClient.drivers.ICatalogServiceDriver; |
45 | 45 |
import es.gva.cit.catalogClient.srw.drivers.SRWCatalogServiceDriver; |
46 |
import es.gva.cit.catalogClient.utils.comboServer.ServerData; |
|
46 | 47 |
import es.gva.cit.catalogClient.z3950.drivers.Z3950CatalogServiceDriver; |
47 | 48 |
|
48 | 49 |
import java.io.IOException; |
... | ... | |
86 | 87 |
this.setUrl(new URL(url)); |
87 | 88 |
|
88 | 89 |
//if protocol is z39.50 we have to add the database to the URL |
89 |
if (!(protocol.equals(new String("Z3950")))) {
|
|
90 |
if (!(protocol.equals(new String(ServerData.SERVER_SUBTYPE_CATALOG_Z3950)))) {
|
|
90 | 91 |
database = getUrl().getPath(); |
91 | 92 |
} |
92 | 93 |
|
... | ... | |
103 | 104 |
} |
104 | 105 |
|
105 | 106 |
//Casting to the respective driver |
106 |
if (protocol.equals(new String("SRW"))) {
|
|
107 |
if (protocol.equals(new String(ServerData.SERVER_SUBTYPE_CATALOG_SRW))) {
|
|
107 | 108 |
lnkICatalogServerDriver = new SRWCatalogServiceDriver(); |
108 | 109 |
} |
109 | 110 |
|
110 |
if (protocol.equals(new String("CSW"))) {
|
|
111 |
if (protocol.equals(new String(ServerData.SERVER_SUBTYPE_CATALOG_CSW))) {
|
|
111 | 112 |
lnkICatalogServerDriver = new CSWCatalogServiceDriver(); |
112 | 113 |
} |
113 | 114 |
|
114 |
if (protocol.equals(new String("Z3950"))) {
|
|
115 |
if (protocol.equals(new String(ServerData.SERVER_SUBTYPE_CATALOG_Z3950))) {
|
|
115 | 116 |
lnkICatalogServerDriver = new Z3950CatalogServiceDriver(); |
116 | 117 |
} |
117 | 118 |
} |
trunk/applications/appCatalogYNomenclatorClient/src/es/gva/cit/catalogClient/csw/queries/CSWQuery.java | ||
---|---|---|
40 | 40 |
*/ |
41 | 41 |
package es.gva.cit.catalogClient.csw.queries; |
42 | 42 |
|
43 |
import es.gva.cit.catalogClient.csw.profiles.AdditionalClauses; |
|
44 |
import es.gva.cit.catalogClient.csw.profiles.DublinCoreProfile; |
|
45 |
import es.gva.cit.catalogClient.csw.profiles.EbRIMProfile; |
|
46 |
import es.gva.cit.catalogClient.csw.profiles.IProfiles; |
|
47 |
import es.gva.cit.catalogClient.csw.profiles.ISO19115Profile; |
|
48 | 43 |
import es.gva.cit.catalogClient.languages.FilterEncoding; |
44 |
import es.gva.cit.catalogClient.profiles.AdditionalClauses; |
|
45 |
import es.gva.cit.catalogClient.profiles.DublinCoreProfile; |
|
46 |
import es.gva.cit.catalogClient.profiles.EbRIMProfile; |
|
47 |
import es.gva.cit.catalogClient.profiles.IProfiles; |
|
48 |
import es.gva.cit.catalogClient.profiles.ISO19115Profile; |
|
49 |
import es.gva.cit.catalogClient.profiles.Profile; |
|
49 | 50 |
import es.gva.cit.catalogClient.querys.IQuery; |
50 | 51 |
import es.gva.cit.catalogClient.querys.Query; |
51 | 52 |
import es.gva.cit.catalogClient.utils.Strings; |
... | ... | |
158 | 159 |
* @param profile |
159 | 160 |
*/ |
160 | 161 |
public void setProfile(String profile) { |
161 |
if (profile.equals("ISO19115")) {
|
|
162 |
if (profile.equals(Profile.ISO19115)) {
|
|
162 | 163 |
setEquiv(new ISO19115Profile()); |
163 |
} else if (profile.equals("DUBLINCORE"))
|
|
164 |
} else if (profile.equals(Profile.DUBLINCORE))
|
|
164 | 165 |
setEquiv(new DublinCoreProfile()); |
165 | 166 |
else{ |
166 | 167 |
setEquiv(new EbRIMProfile()); |
trunk/applications/appCatalogYNomenclatorClient/src/es/gva/cit/catalogClient/csw/drivers/CSWCatalogServiceDriver.java | ||
---|---|---|
46 | 46 |
import es.gva.cit.catalogClient.metadataXML.XMLNode; |
47 | 47 |
import es.gva.cit.catalogClient.metadataXML.XMLTree; |
48 | 48 |
import es.gva.cit.catalogClient.metadataXML.XMLTreeNumberOfRecordsAnswer; |
49 |
import es.gva.cit.catalogClient.profiles.Profile; |
|
49 | 50 |
import es.gva.cit.catalogClient.protocols.HTTPGetProtocol; |
50 | 51 |
import es.gva.cit.catalogClient.protocols.HTTPPostProtocol; |
51 | 52 |
import es.gva.cit.catalogClient.protocols.SOAPProtocol; |
... | ... | |
141 | 142 |
if (getOperations().getGetRecords()==null) |
142 | 143 |
return null; |
143 | 144 |
|
144 |
if (getServerProfile().equals("ISO19115")){
|
|
145 |
if (getServerProfile().equals(Profile.ISO19115)){
|
|
145 | 146 |
firstRecord = firstRecord - 1; |
146 | 147 |
} |
147 | 148 |
|
... | ... | |
227 | 228 |
|
228 | 229 |
XMLNode[] auxNodes = cutMetadata(node); |
229 | 230 |
|
230 |
if (getServerProfile().equals("ebRIM")) {
|
|
231 |
if (getServerProfile().equals(Profile.EBRIM)) {
|
|
231 | 232 |
auxNodes = getEbRIMNodes(auxNodes, url); |
232 | 233 |
} |
233 | 234 |
|
trunk/applications/appCatalogYNomenclatorClient/src/es/gva/cit/catalogClient/csw/drivers/CSWMessages.java | ||
---|---|---|
46 | 46 |
|
47 | 47 |
import es.gva.cit.catalogClient.csw.queries.CSWQuery; |
48 | 48 |
import es.gva.cit.catalogClient.drivers.IProtocolMessages; |
49 |
import es.gva.cit.catalogClient.profiles.Profile; |
|
49 | 50 |
import es.gva.cit.catalogClient.protocols.SOAPProtocol; |
50 | 51 |
import es.gva.cit.catalogClient.querys.Query; |
51 | 52 |
import es.gva.cit.catalogClient.utils.Strings; |
... | ... | |
187 | 188 |
* @return |
188 | 189 |
*/ |
189 | 190 |
private String getElementSetNameLabel(){ |
190 |
if (driver.getServerProfile().equals("ebRIM")){
|
|
191 |
if (driver.getServerProfile().equals(Profile.EBRIM)){
|
|
191 | 192 |
return "<ElementSetName typeNames='Dataset'>"; |
192 | 193 |
}else{ |
193 | 194 |
return "<ElementSetName>"; |
... | ... | |
239 | 240 |
*/ |
240 | 241 |
private String getOutputSchema(String[] outputSchemas){ |
241 | 242 |
for (int i=0 ; i<outputSchemas.length ; i++){ |
242 |
if (outputSchemas[i].equals("ISO19115"))
|
|
243 |
if (outputSchemas[i].equals(Profile.ISO19115))
|
|
243 | 244 |
return outputSchemas[i]; |
244 | 245 |
} |
245 | 246 |
return outputSchemas[0]; |
trunk/applications/appCatalogYNomenclatorClient/src/es/gva/cit/catalogClient/csw/parsers/CswCapabilitiesParser.java | ||
---|---|---|
47 | 47 |
import es.gva.cit.catalogClient.metadataXML.XMLNode; |
48 | 48 |
import es.gva.cit.catalogClient.metadataXML.XMLTree; |
49 | 49 |
import es.gva.cit.catalogClient.parsers.SOAPMessageParser; |
50 |
import es.gva.cit.catalogClient.profiles.Profile; |
|
50 | 51 |
import es.gva.cit.catalogClient.utils.Strings; |
51 | 52 |
|
52 | 53 |
|
... | ... | |
89 | 90 |
|
90 | 91 |
discoverServerProfile(node); |
91 | 92 |
|
92 |
if (driver.getServerProfile().equals("ebRIM")){
|
|
93 |
if (driver.getServerProfile().equals(Profile.EBRIM)){
|
|
93 | 94 |
boolean b = new CswIDECCapabilitiesParser(driver).parse(); |
94 | 95 |
if (b){ |
95 | 96 |
setWelcomeMessage(node,""); |
... | ... | |
229 | 230 |
private void discoverServerProfile(XMLNode node){ |
230 | 231 |
if ((url.getHost().equals("delta.icc.es")) || |
231 | 232 |
(url.getHost().equals("indicio.demo.galdosinc.com"))){ |
232 |
driver.setServerProfile("ebRIM");
|
|
233 |
driver.setServerProfile(Profile.EBRIM);
|
|
233 | 234 |
}else{ |
234 |
driver.setServerProfile("ISO19115");
|
|
235 |
driver.setServerProfile(Profile.ISO19115);
|
|
235 | 236 |
} |
236 | 237 |
|
237 | 238 |
} |
... | ... | |
313 | 314 |
|
314 | 315 |
if (sParameter.equals("outputSchema")) { |
315 | 316 |
driver.setOutputSchema(Strings.join(defaultValue, values)); |
316 |
driver.setServerProfile("DUBLINCORE");
|
|
317 |
driver.setServerProfile(Profile.DUBLINCORE);
|
|
317 | 318 |
for (int i=0 ; i<driver.getOutputSchema().length ; i++){ |
318 |
if (driver.getOutputSchema()[i].equals("ISO19115"))
|
|
319 |
driver.setServerProfile("ISO19115");
|
|
319 |
if (driver.getOutputSchema()[i].equals(Profile.ISO19115))
|
|
320 |
driver.setServerProfile(Profile.ISO19115);
|
|
320 | 321 |
break; |
321 | 322 |
} |
322 | 323 |
} |
trunk/applications/appCatalogYNomenclatorClient/src/es/gva/cit/catalogClient/csw/parsers/CswRecordsParser.java | ||
---|---|---|
89 | 89 |
String sName = XMLTree.searchNodeValue(nodes[i], "orName"); |
90 | 90 |
|
91 | 91 |
if (sProtocol == null){ |
92 |
sProtocol = "www:link";
|
|
92 |
sProtocol = Resource.WEBSITE;
|
|
93 | 93 |
sName = "orName"; |
94 | 94 |
} |
95 | 95 |
|
trunk/applications/appCatalogYNomenclatorClient/src/es/gva/cit/catalogClient/ui/showResults/ShowResultsDialogPanel.java | ||
---|---|---|
105 | 105 |
String protocol = resources[i].getProtocol(); |
106 | 106 |
|
107 | 107 |
if (protocol != null){ |
108 |
if ((protocol.toLowerCase().indexOf("ogc:wcs") >= 0) ||
|
|
109 |
(protocol.toLowerCase().indexOf("ogc:wms") >=0) ||
|
|
110 |
(protocol.toLowerCase().indexOf("ogc:wfs") >=0) ||
|
|
111 |
(protocol.toLowerCase().indexOf("postgis") >=0) ||
|
|
112 |
(protocol.toLowerCase().indexOf("www:link") >=0) ||
|
|
113 |
(protocol.toLowerCase().indexOf("www:download") >=0)){
|
|
108 |
if ((protocol.toUpperCase().indexOf(Resource.WMS) >= 0) ||
|
|
109 |
(protocol.toUpperCase().indexOf(Resource.WFS) >=0) ||
|
|
110 |
(protocol.toUpperCase().indexOf(Resource.WCS) >=0) ||
|
|
111 |
(protocol.toUpperCase().indexOf(Resource.POSTGIS) >=0) ||
|
|
112 |
(protocol.toUpperCase().indexOf(Resource.WEBSITE) >=0) ||
|
|
113 |
(protocol.toUpperCase().indexOf(Resource.DOWNLOAD) >=0)){
|
|
114 | 114 |
getMapButton().setEnabled(true); |
115 | 115 |
return; |
116 | 116 |
} |
trunk/applications/appCatalogYNomenclatorClient/src/es/gva/cit/catalogClient/ui/search/SearchLowerPanel.java | ||
---|---|---|
40 | 40 |
*/ |
41 | 41 |
package es.gva.cit.catalogClient.ui.search; |
42 | 42 |
|
43 |
import es.gva.cit.catalogClient.profiles.Profile; |
|
43 | 44 |
import es.gva.cit.catalogClient.querys.Coordinates; |
44 | 45 |
import es.gva.cit.catalogClient.traductor.ITranslator; |
45 | 46 |
import es.gva.cit.catalogClient.traductor.Translator; |
46 | 47 |
import es.gva.cit.catalogClient.utils.Doubles; |
48 |
import es.gva.cit.catalogClient.utils.comboServer.ServerData; |
|
47 | 49 |
|
48 | 50 |
import java.awt.Color; |
49 | 51 |
import java.awt.FlowLayout; |
... | ... | |
809 | 811 |
private JComboBox getCoordenadasCombo() { |
810 | 812 |
if (coordenadasCombo == null) { |
811 | 813 |
String[] coordenadas; |
812 |
if (serverType.equals("Z3950")){
|
|
814 |
if (serverType.equals(ServerData.SERVER_SUBTYPE_CATALOG_Z3950)){
|
|
813 | 815 |
coordenadas = new String[4]; |
814 | 816 |
coordenadas[0] = Translator.getText(translator,"coordinatesContains"); |
815 | 817 |
coordenadas[1] = Translator.getText(translator,"coordinatesEqual"); |
... | ... | |
1044 | 1046 |
//System.out.println("TYPE: " + type); |
1045 | 1047 |
//System.out.println("SUBTYPE: " + profile); |
1046 | 1048 |
|
1047 |
if (type.equals("Z3950")){
|
|
1049 |
if (type.equals(ServerData.SERVER_SUBTYPE_CATALOG_Z3950)){
|
|
1048 | 1050 |
getCategoriaCombo().setEnabled(false); |
1049 | 1051 |
} |
1050 | 1052 |
|
1051 |
if (type.equals("SRW") || profile.equals("DUBLINCORE")){
|
|
1053 |
if (type.equals(ServerData.SERVER_SUBTYPE_CATALOG_SRW) || profile.equals(Profile.DUBLINCORE)){
|
|
1052 | 1054 |
getKeyWordText().setEnabled(false); |
1053 | 1055 |
getCategoriaCombo().setEnabled(false); |
1054 | 1056 |
getEscalaCombo().setEnabled(false); |
... | ... | |
1061 | 1063 |
getToText().setEnabled(false); |
1062 | 1064 |
} |
1063 | 1065 |
|
1064 |
if (profile.equals("ebRIM")){
|
|
1066 |
if (profile.equals(Profile.EBRIM)){
|
|
1065 | 1067 |
getEscalaCombo().setEnabled(false); |
1066 | 1068 |
getProviderText().setEnabled(false); |
1067 | 1069 |
getFromText().setEnabled(false); |
1068 | 1070 |
getToText().setEnabled(false); |
1069 | 1071 |
} |
1070 | 1072 |
|
1071 |
if (profile.equals("ISO19115")){
|
|
1073 |
if (profile.equals(Profile.ISO19115)){
|
|
1072 | 1074 |
getKeyWordText().setEnabled(false); |
1073 | 1075 |
getCategoriaCombo().setEnabled(false); |
1074 | 1076 |
getEscalaCombo().setEnabled(false); |
trunk/applications/appCatalogYNomenclatorClient/src/es/gva/cit/catalogClient/ui/search/SearchUpperPanel.java | ||
---|---|---|
54 | 54 |
import javax.swing.JButton; |
55 | 55 |
import javax.swing.ImageIcon; |
56 | 56 |
|
57 |
import es.gva.cit.catalogClient.profiles.Profile; |
|
57 | 58 |
import es.gva.cit.catalogClient.traductor.ITranslator; |
58 | 59 |
import es.gva.cit.catalogClient.traductor.Translator; |
60 |
import es.gva.cit.catalogClient.utils.comboServer.ServerData; |
|
59 | 61 |
/** |
60 | 62 |
* @author Jorge Piera Llodra (piera_jor@gva.es) |
61 | 63 |
*/ |
... | ... | |
314 | 316 |
//System.out.println("TYPE: " + type); |
315 | 317 |
//System.out.println("SUBTYPE: " + profile); |
316 | 318 |
|
317 |
if (type.equals("SRW") ||
|
|
318 |
profile.equals("ISO19115") ||
|
|
319 |
profile.equals("DUBLINCORE")){
|
|
319 |
if (type.equals(ServerData.SERVER_SUBTYPE_CATALOG_SRW) ||
|
|
320 |
profile.equals(Profile.ISO19115) ||
|
|
321 |
profile.equals(Profile.DUBLINCORE)){
|
|
320 | 322 |
getCoordinatesCheckBox().setEnabled(false); |
321 | 323 |
} |
322 | 324 |
} |
trunk/applications/appCatalogYNomenclatorClient/src/es/gva/cit/catalogClient/ui/chooseResource/ChooseResourcePanel.java | ||
---|---|---|
89 | 89 |
} |
90 | 90 |
|
91 | 91 |
private String getNameButton(String protocol){ |
92 |
if (protocol.toLowerCase().indexOf("ogc:wcs") >= 0)
|
|
92 |
if (protocol.toUpperCase().indexOf(Resource.WCS) >= 0)
|
|
93 | 93 |
return Translator.getText(translator,"wcsColumn"); |
94 | 94 |
|
95 |
if (protocol.toLowerCase().indexOf("ogc:wms") >= 0)
|
|
95 |
if (protocol.toUpperCase().indexOf(Resource.WMS) >= 0)
|
|
96 | 96 |
return Translator.getText(translator,"wmsColumn"); |
97 | 97 |
|
98 |
if (protocol.toLowerCase().indexOf("ogc:wfs") >= 0)
|
|
98 |
if (protocol.toUpperCase().indexOf(Resource.WFS) >= 0)
|
|
99 | 99 |
return Translator.getText(translator,"wfsColumn"); |
100 | 100 |
|
101 |
if (protocol.toLowerCase().indexOf("postgis") >= 0)
|
|
101 |
if (protocol.toUpperCase().indexOf(Resource.POSTGIS) >= 0)
|
|
102 | 102 |
return Translator.getText(translator,"postgisColumn"); |
103 | 103 |
|
104 |
if (protocol.toLowerCase().indexOf("www:link") >= 0)
|
|
104 |
if (protocol.toUpperCase().indexOf(Resource.WEBSITE) >= 0)
|
|
105 | 105 |
return Translator.getText(translator,"linkColumn"); |
106 | 106 |
|
107 |
if (protocol.toLowerCase().indexOf("www:download") >= 0)
|
|
108 |
return Translator.getText(translator,"downloadColumn");;
|
|
107 |
if (protocol.toUpperCase().indexOf(Resource.DOWNLOAD) >= 0)
|
|
108 |
return Translator.getText(translator,"downloadColumn"); |
|
109 | 109 |
|
110 |
return "Desconocido";
|
|
110 |
return Translator.getText(translator,"unknown");
|
|
111 | 111 |
} |
112 | 112 |
|
113 | 113 |
private void initialize() { |
trunk/applications/appCatalogYNomenclatorClient/src/es/gva/cit/catalogClient/drivers/ICatalogServiceDriver.java | ||
---|---|---|
105 | 105 |
* It returns the profile to create the query. Examples of profiles are: |
106 | 106 |
* ISO19115 |
107 | 107 |
* DUBLINCORE |
108 |
* ebRIM
|
|
108 |
* EBRIM
|
|
109 | 109 |
* @return |
110 | 110 |
* String |
111 | 111 |
*/ |
trunk/applications/appCatalogYNomenclatorClient/src/es/gva/cit/catalogClient/parsers/DiscovererFormat.java | ||
---|---|---|
47 | 47 |
import es.gva.cit.catalogClient.parsers.ISO19115Deegree.DeegreeRecordsParser; |
48 | 48 |
import es.gva.cit.catalogClient.parsers.dublinCore.DublinCoreRecordsParser; |
49 | 49 |
import es.gva.cit.catalogClient.srw.parsers.SrwRecordsParser; |
50 |
import es.gva.cit.catalogClient.utils.comboServer.ServerData; |
|
50 | 51 |
import es.gva.cit.catalogClient.z3950.parsers.Z3959RecordsParser; |
51 | 52 |
|
52 | 53 |
/** |
... | ... | |
85 | 86 |
return new DeegreeRecordsParser(node); |
86 | 87 |
} |
87 | 88 |
|
88 |
if (protocol.equals("Z3950")) {
|
|
89 |
if (protocol.equals(ServerData.SERVER_SUBTYPE_CATALOG_Z3950)) {
|
|
89 | 90 |
return new Z3959RecordsParser(node,url); |
90 |
} else if (protocol.equals("SRW")) {
|
|
91 |
} else if (protocol.equals(ServerData.SERVER_SUBTYPE_CATALOG_SRW)) {
|
|
91 | 92 |
return new SrwRecordsParser(node); |
92 | 93 |
} else { |
93 | 94 |
if (node.getName().equals("dc:metadata")){ |
trunk/applications/appCatalogYNomenclatorClient/src/es/gva/cit/catalogClient/parsers/dublinCore/DublinCoreRecordsParser.java | ||
---|---|---|
78 | 78 |
} |
79 | 79 |
|
80 | 80 |
if (format.toLowerCase().equals("shapefile")) |
81 |
format = "www:download";
|
|
81 |
format = Resource.DOWNLOAD;
|
|
82 | 82 |
|
83 | 83 |
if (format.toLowerCase().trim().equals("web page")) |
84 |
format = "www:link";
|
|
84 |
format = Resource.WEBSITE;
|
|
85 | 85 |
|
86 | 86 |
Resource[] resources = new Resource[1]; |
87 | 87 |
resources[0] = new Resource(source,format,"","","","",coordinates); |
trunk/applications/appCatalogYNomenclatorClient/src/es/gva/cit/catalogClient/parsers/Resource.java | ||
---|---|---|
50 | 50 |
* @author Jorge Piera Llodra (piera_jor@gva.es) |
51 | 51 |
*/ |
52 | 52 |
public class Resource { |
53 |
public static final String WMS = "OGC:WMS"; |
|
54 |
public static final String WFS = "OGC:WFS"; |
|
55 |
public static final String WCS = "OGC:WCS"; |
|
56 |
public static final String POSTGIS = "POSTGIS"; |
|
57 |
public static final String WEBSITE = "WWW:LINK"; |
|
58 |
public static final String DOWNLOAD = "WWW:DOWNLOAD"; |
|
59 |
|
|
53 | 60 |
private String linkage = null; |
54 | 61 |
private String protocol = null; |
55 | 62 |
private String name = null; |
trunk/applications/appCatalogYNomenclatorClient/src/es/gva/cit/gazetteer/GazetteerClient.java | ||
---|---|---|
40 | 40 |
*/ |
41 | 41 |
package es.gva.cit.gazetteer; |
42 | 42 |
|
43 |
import es.gva.cit.catalogClient.utils.comboServer.ServerData; |
|
43 | 44 |
import es.gva.cit.gazetteer.adl.drivers.ADLGazetteerServiceDriver; |
44 | 45 |
import es.gva.cit.gazetteer.drivers.IGazetteerServiceDriver; |
45 | 46 |
import es.gva.cit.gazetteer.idec.drivers.IDECGazetteerServiceDriver; |
... | ... | |
86 | 87 |
} |
87 | 88 |
|
88 | 89 |
//Casting to the respective driver |
89 |
if (protocol.equals(new String("WFS-G")) ||
|
|
90 |
protocol.equals(new String("WFS"))) {
|
|
90 |
if (protocol.equals(new String(ServerData.SERVER_SUBTYPE_GAZETTEER_WFSG)) ||
|
|
91 |
protocol.equals(new String(ServerData.SERVER_SUBTYPE_GAZETTEER_WFS))) {
|
|
91 | 92 |
lnkIGazetteerDriver = new WFSGazetteerServiceDriver(); |
92 | 93 |
} |
93 | 94 |
|
94 |
if (protocol.equals(new String("ADL"))) {
|
|
95 |
if (protocol.equals(new String(ServerData.SERVER_SUBTYPE_GAZETTEER_ADL))) {
|
|
95 | 96 |
lnkIGazetteerDriver = new ADLGazetteerServiceDriver(); |
96 | 97 |
} |
97 | 98 |
|
98 |
if (protocol.equals(new String("IDEC"))) {
|
|
99 |
if (protocol.equals(new String(ServerData.SERVER_SUBTYPE_GAZETTEER_IDEC))) {
|
|
99 | 100 |
lnkIGazetteerDriver = new IDECGazetteerServiceDriver(); |
100 | 101 |
} |
101 | 102 |
|
Also available in: Unified diff