svn-gvsig-desktop / tmp / trunk / servidor / WorkSpace_Servidor / ows-parsers / src / org / tigris / frogs / parser / ows / impl0_3_0 / OWSTest.java @ 26481
History | View | Annotate | Download (1.64 KB)
1 |
package org.tigris.frogs.parser.ows.impl0_3_0; |
---|---|
2 |
|
3 |
import java.io.*; |
4 |
|
5 |
|
6 |
public class OWSTest { |
7 |
|
8 |
/**
|
9 |
* Main Unit SLDTest wihout be invked by the FROGS Framework
|
10 |
*/
|
11 |
public static void main(String[] args) { |
12 |
System.out.println("OWS 0.3.0 Loader..."); |
13 |
|
14 |
try {
|
15 |
OWSXmlParser cswParser = new OWSXmlParser();
|
16 |
|
17 |
String filename = "Exception_0_3_0.xml"; |
18 |
System.out.println("Loading " + filename ); |
19 |
net.schema.ows.impl0_3_0.ExceptionReport reportError = |
20 |
(net.schema.ows.impl0_3_0.ExceptionReport)cswParser.load(new File(filename).toURL()); |
21 |
if ( reportError != null ) { |
22 |
System.out.println("Version:" + reportError.getVersion() ); |
23 |
System.out.println("Language:" + reportError.getLanguage() ); |
24 |
System.out.println("Count errors:" + reportError.getException().size() ); |
25 |
} |
26 |
System.out.println("Problem? " + cswParser.getDocumentErrors().toString()); |
27 |
|
28 |
|
29 |
} |
30 |
// Throw Error
|
31 |
catch (Throwable ex) { |
32 |
ex.printStackTrace(); |
33 |
} |
34 |
finally {
|
35 |
System.out.println("Done."); |
36 |
} |
37 |
|
38 |
System.out.println("Generator"); |
39 |
try {
|
40 |
|
41 |
// ready to produce XML
|
42 |
OWSXmlParser newsdParser = new OWSXmlParser();
|
43 |
//System.out.println("XML generated:\n" + newsdParser.serialize(execResp,org.tigris.frogs.commons.Constants.Charsets.getUTF_8()) + "\n");
|
44 |
|
45 |
} |
46 |
// Throw Error
|
47 |
catch (Throwable ex) { |
48 |
ex.printStackTrace(); |
49 |
} |
50 |
finally {
|
51 |
System.out.println("Done."); |
52 |
} |
53 |
|
54 |
} |
55 |
|
56 |
} |