Revision 8680
trunk/applications/appCatalogYNomenclatorClient/.classpath | ||
---|---|---|
24 | 24 |
<classpathentry sourcepath="E:/classpath/jzkit2/jzkit2_core/src/java" kind="lib" path="lib/jzkit2_core-2.0.0.jar"/> |
25 | 25 |
<classpathentry sourcepath="E:/classpath/jzkit2/jzkit2_z3950_plugin/src/java" kind="lib" path="lib/jzkit2_z3950_plugin-2.0.0.jar"/> |
26 | 26 |
<classpathentry kind="lib" path="lib/spring.jar"/> |
27 |
<classpathentry kind="lib" path="lib/origin_MODIFIED.jar"/> |
|
27 | 28 |
<classpathentry kind="output" path="bin"/> |
28 | 29 |
</classpath> |
trunk/applications/appCatalogYNomenclatorClient/src/es/gva/cit/catalogClient/ui/showResults/ShowResultsDialogPanel.java | ||
---|---|---|
158 | 158 |
(protocol.toUpperCase().indexOf(Resource.WCS) >=0) || |
159 | 159 |
(protocol.toUpperCase().indexOf(Resource.POSTGIS) >=0) || |
160 | 160 |
(protocol.toUpperCase().indexOf(Resource.WEBSITE) >=0) || |
161 |
(protocol.toUpperCase().indexOf(Resource.ARCIMS_IMAGE) >=0) || |
|
162 |
(protocol.toUpperCase().indexOf(Resource.ARCIMS_VECTORIAL) >=0) || |
|
161 | 163 |
(protocol.toUpperCase().indexOf(Resource.DOWNLOAD) >=0)){ |
162 | 164 |
getMapButton().setEnabled(true); |
163 | 165 |
return; |
trunk/applications/appCatalogYNomenclatorClient/src/es/gva/cit/catalogClient/metadataXML/XMLTree.java | ||
---|---|---|
40 | 40 |
* dac@iver.es |
41 | 41 |
*/ |
42 | 42 |
package es.gva.cit.catalogClient.metadataXML; |
43 |
import java.io.ByteArrayInputStream; |
|
43 | 44 |
import java.io.File; |
44 | 45 |
import java.io.FileWriter; |
45 | 46 |
import java.io.IOException; |
... | ... | |
50 | 51 |
import org.apache.xml.serialize.OutputFormat; |
51 | 52 |
import org.apache.xml.serialize.XMLSerializer; |
52 | 53 |
import org.w3c.dom.Document; |
54 |
|
|
55 |
import es.gva.cit.catalogClient.utils.Strings; |
|
53 | 56 |
/* |
54 | 57 |
* Created on 15-abr-2005 |
55 | 58 |
* |
... | ... | |
98 | 101 |
return null; |
99 | 102 |
} |
100 | 103 |
} |
104 |
|
|
105 |
/** |
|
106 |
* Create a XML node from a String |
|
107 |
* |
|
108 |
* |
|
109 |
* @return XML node |
|
110 |
* @param stream InputStream |
|
111 |
*/ |
|
112 |
public static XMLNode xmlToTree(String string) { |
|
113 |
try { |
|
114 |
return new XMLNode(new ByteArrayInputStream(string.getBytes())); |
|
115 |
} catch (Exception e) { |
|
116 |
// Unconvertible UTF-8 character |
|
117 |
string = Strings.replace(string, |
|
118 |
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>", |
|
119 |
"<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>"); |
|
120 |
try { |
|
121 |
return new XMLNode(new ByteArrayInputStream(string.getBytes())); |
|
122 |
} catch (Exception e1) { |
|
123 |
// TODO Auto-generated catch block |
|
124 |
e1.printStackTrace(); |
|
125 |
return null; |
|
126 |
} |
|
127 |
} |
|
128 |
} |
|
101 | 129 |
|
102 | 130 |
/** |
103 | 131 |
* Devuelve un fichero que crea a partir de un arbol XML |
trunk/applications/appCatalogYNomenclatorClient/src/es/gva/cit/catalogClient/protocols/Z3950Connection.java | ||
---|---|---|
44 | 44 |
* |
45 | 45 |
* $Id$ |
46 | 46 |
* $Log$ |
47 |
* Revision 1.3 2006-10-02 08:29:07 jorpiell |
|
47 |
* Revision 1.4 2006-11-13 07:52:58 jorpiell |
|
48 |
* Se han incluido los cambios que se hicieron para Chile: cambio de la librer?a jzKit, carga de ArcIms y WCS |
|
49 |
* |
|
50 |
* Revision 1.3 2006/10/02 08:29:07 jorpiell |
|
48 | 51 |
* Modificados los cambios del Branch 10 al head |
49 | 52 |
* |
50 | 53 |
* Revision 1.1.2.3 2006/10/02 07:13:43 jorpiell |
... | ... | |
195 | 198 |
for (int i=0 ; i<fragment.length ; i++){ |
196 | 199 |
try { |
197 | 200 |
String answer = ""; |
201 |
|
|
198 | 202 |
if (fragment[i] instanceof XMLRecord){ |
199 |
XMLRecord xml = (XMLRecord)fragment[i]; |
|
200 |
answer = Strings.replace(xml.toString(), |
|
201 |
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>", |
|
202 |
"<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>"); |
|
203 |
|
|
204 |
XMLRecord xml = (XMLRecord)fragment[i]; |
|
205 |
answer = xml.toString(); |
|
203 | 206 |
}else { |
204 | 207 |
SUTRS sutr = (SUTRS)fragment[i]; |
205 |
answer = "<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>" +
|
|
208 |
answer = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" +
|
|
206 | 209 |
"<" + XMLNode.ISNOTXML + ">" + |
207 | 210 |
sutr.toString() + |
208 | 211 |
"</" + XMLNode.ISNOTXML + ">"; |
209 |
} |
|
212 |
}
|
|
210 | 213 |
|
211 |
InputStream buffer = new ByteArrayInputStream(answer.getBytes()); |
|
212 |
nodes[i + 1] = XMLTree.xmlToTree(buffer); |
|
214 |
nodes[i + 1] = XMLTree.xmlToTree(answer); |
|
213 | 215 |
} catch (Exception e1) { |
214 | 216 |
// TODO Auto-generated catch block |
215 | 217 |
e1.printStackTrace(); |
Also available in: Unified diff