test/gs/javatest.html

Mon, 24 Apr 2023 20:54:38 +0200

author
Mike Becker <universe@uap-core.de>
date
Mon, 24 Apr 2023 20:54:38 +0200
changeset 66
1b12cf799fee
parent 41
test/v2-regression/javatest.html@c06ab07fd29d
permissions
-rw-r--r--

upgrade to ucx 3.0

41
c06ab07fd29d increases input buffer + adds regression tests
Mike Becker <universe@uap-core.de>
parents:
diff changeset
1 <!DOCTYPE html>
c06ab07fd29d increases input buffer + adds regression tests
Mike Becker <universe@uap-core.de>
parents:
diff changeset
2 <html>
c06ab07fd29d increases input buffer + adds regression tests
Mike Becker <universe@uap-core.de>
parents:
diff changeset
3 <head>
c06ab07fd29d increases input buffer + adds regression tests
Mike Becker <universe@uap-core.de>
parents:
diff changeset
4 <title>c2html</title>
c06ab07fd29d increases input buffer + adds regression tests
Mike Becker <universe@uap-core.de>
parents:
diff changeset
5 <style type="text/css">
66
1b12cf799fee upgrade to ucx 3.0
Mike Becker <universe@uap-core.de>
parents: 41
diff changeset
6 div.c2html-code {
1b12cf799fee upgrade to ucx 3.0
Mike Becker <universe@uap-core.de>
parents: 41
diff changeset
7 white-space: pre;
1b12cf799fee upgrade to ucx 3.0
Mike Becker <universe@uap-core.de>
parents: 41
diff changeset
8 font-family: monospace;
1b12cf799fee upgrade to ucx 3.0
Mike Becker <universe@uap-core.de>
parents: 41
diff changeset
9 }
1b12cf799fee upgrade to ucx 3.0
Mike Becker <universe@uap-core.de>
parents: 41
diff changeset
10 a.c2html-lineno {
1b12cf799fee upgrade to ucx 3.0
Mike Becker <universe@uap-core.de>
parents: 41
diff changeset
11 /* as long as user-select isn't widely spread, we throw the bomb */
1b12cf799fee upgrade to ucx 3.0
Mike Becker <universe@uap-core.de>
parents: 41
diff changeset
12 -webkit-user-select: none;
1b12cf799fee upgrade to ucx 3.0
Mike Becker <universe@uap-core.de>
parents: 41
diff changeset
13 -moz-user-select: none;
1b12cf799fee upgrade to ucx 3.0
Mike Becker <universe@uap-core.de>
parents: 41
diff changeset
14 -ms-user-select: none;
1b12cf799fee upgrade to ucx 3.0
Mike Becker <universe@uap-core.de>
parents: 41
diff changeset
15 user-select: none;
1b12cf799fee upgrade to ucx 3.0
Mike Becker <universe@uap-core.de>
parents: 41
diff changeset
16 display: inline-block;
41
c06ab07fd29d increases input buffer + adds regression tests
Mike Becker <universe@uap-core.de>
parents:
diff changeset
17 font-style: italic;
c06ab07fd29d increases input buffer + adds regression tests
Mike Becker <universe@uap-core.de>
parents:
diff changeset
18 text-decoration: none;
c06ab07fd29d increases input buffer + adds regression tests
Mike Becker <universe@uap-core.de>
parents:
diff changeset
19 color: grey;
c06ab07fd29d increases input buffer + adds regression tests
Mike Becker <universe@uap-core.de>
parents:
diff changeset
20 }
c06ab07fd29d increases input buffer + adds regression tests
Mike Becker <universe@uap-core.de>
parents:
diff changeset
21 span.c2html-keyword {
c06ab07fd29d increases input buffer + adds regression tests
Mike Becker <universe@uap-core.de>
parents:
diff changeset
22 color: blue;
c06ab07fd29d increases input buffer + adds regression tests
Mike Becker <universe@uap-core.de>
parents:
diff changeset
23 }
c06ab07fd29d increases input buffer + adds regression tests
Mike Becker <universe@uap-core.de>
parents:
diff changeset
24 span.c2html-macroconst {
c06ab07fd29d increases input buffer + adds regression tests
Mike Becker <universe@uap-core.de>
parents:
diff changeset
25 color: cornflowerblue;
c06ab07fd29d increases input buffer + adds regression tests
Mike Becker <universe@uap-core.de>
parents:
diff changeset
26 }
c06ab07fd29d increases input buffer + adds regression tests
Mike Becker <universe@uap-core.de>
parents:
diff changeset
27 span.c2html-type {
c06ab07fd29d increases input buffer + adds regression tests
Mike Becker <universe@uap-core.de>
parents:
diff changeset
28 color: teal;
c06ab07fd29d increases input buffer + adds regression tests
Mike Becker <universe@uap-core.de>
parents:
diff changeset
29 }
c06ab07fd29d increases input buffer + adds regression tests
Mike Becker <universe@uap-core.de>
parents:
diff changeset
30 span.c2html-directive {
c06ab07fd29d increases input buffer + adds regression tests
Mike Becker <universe@uap-core.de>
parents:
diff changeset
31 color: silver;
c06ab07fd29d increases input buffer + adds regression tests
Mike Becker <universe@uap-core.de>
parents:
diff changeset
32 }
c06ab07fd29d increases input buffer + adds regression tests
Mike Becker <universe@uap-core.de>
parents:
diff changeset
33 span.c2html-string {
c06ab07fd29d increases input buffer + adds regression tests
Mike Becker <universe@uap-core.de>
parents:
diff changeset
34 color: darkorange;
c06ab07fd29d increases input buffer + adds regression tests
Mike Becker <universe@uap-core.de>
parents:
diff changeset
35 }
c06ab07fd29d increases input buffer + adds regression tests
Mike Becker <universe@uap-core.de>
parents:
diff changeset
36 span.c2html-comment {
c06ab07fd29d increases input buffer + adds regression tests
Mike Becker <universe@uap-core.de>
parents:
diff changeset
37 color: grey;
c06ab07fd29d increases input buffer + adds regression tests
Mike Becker <universe@uap-core.de>
parents:
diff changeset
38 }
c06ab07fd29d increases input buffer + adds regression tests
Mike Becker <universe@uap-core.de>
parents:
diff changeset
39 span.c2html-stdinclude, span.c2html-userinclude, a.c2html-userinclude {
c06ab07fd29d increases input buffer + adds regression tests
Mike Becker <universe@uap-core.de>
parents:
diff changeset
40 }
c06ab07fd29d increases input buffer + adds regression tests
Mike Becker <universe@uap-core.de>
parents:
diff changeset
41 </style>
c06ab07fd29d increases input buffer + adds regression tests
Mike Becker <universe@uap-core.de>
parents:
diff changeset
42 </head>
c06ab07fd29d increases input buffer + adds regression tests
Mike Becker <universe@uap-core.de>
parents:
diff changeset
43 <body>
c06ab07fd29d increases input buffer + adds regression tests
Mike Becker <universe@uap-core.de>
parents:
diff changeset
44
66
1b12cf799fee upgrade to ucx 3.0
Mike Becker <universe@uap-core.de>
parents: 41
diff changeset
45 <div class="c2html-code">
1b12cf799fee upgrade to ucx 3.0
Mike Becker <universe@uap-core.de>
parents: 41
diff changeset
46 <a class="c2html-lineno" name="l1" href="#l1"> 1 </a><span class="c2html-comment">/*</span>
1b12cf799fee upgrade to ucx 3.0
Mike Becker <universe@uap-core.de>
parents: 41
diff changeset
47 <a class="c2html-lineno" name="l2" href="#l2"> 2 </a><span class="c2html-comment"> * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.</span>
1b12cf799fee upgrade to ucx 3.0
Mike Becker <universe@uap-core.de>
parents: 41
diff changeset
48 <a class="c2html-lineno" name="l3" href="#l3"> 3 </a><span class="c2html-comment"> *</span>
1b12cf799fee upgrade to ucx 3.0
Mike Becker <universe@uap-core.de>
parents: 41
diff changeset
49 <a class="c2html-lineno" name="l4" href="#l4"> 4 </a><span class="c2html-comment"> * Copyright 2014 Mike Becker. All rights reserved.</span>
1b12cf799fee upgrade to ucx 3.0
Mike Becker <universe@uap-core.de>
parents: 41
diff changeset
50 <a class="c2html-lineno" name="l5" href="#l5"> 5 </a><span class="c2html-comment"> *</span>
1b12cf799fee upgrade to ucx 3.0
Mike Becker <universe@uap-core.de>
parents: 41
diff changeset
51 <a class="c2html-lineno" name="l6" href="#l6"> 6 </a><span class="c2html-comment"> * Redistribution and use in source and binary forms, with or without</span>
1b12cf799fee upgrade to ucx 3.0
Mike Becker <universe@uap-core.de>
parents: 41
diff changeset
52 <a class="c2html-lineno" name="l7" href="#l7"> 7 </a><span class="c2html-comment"> * modification, are permitted provided that the following conditions are met:</span>
1b12cf799fee upgrade to ucx 3.0
Mike Becker <universe@uap-core.de>
parents: 41
diff changeset
53 <a class="c2html-lineno" name="l8" href="#l8"> 8 </a><span class="c2html-comment"> *</span>
1b12cf799fee upgrade to ucx 3.0
Mike Becker <universe@uap-core.de>
parents: 41
diff changeset
54 <a class="c2html-lineno" name="l9" href="#l9"> 9 </a><span class="c2html-comment"> * 1. Redistributions of source code must retain the above copyright</span>
1b12cf799fee upgrade to ucx 3.0
Mike Becker <universe@uap-core.de>
parents: 41
diff changeset
55 <a class="c2html-lineno" name="l10" href="#l10"> 10 </a><span class="c2html-comment"> * notice, this list of conditions and the following disclaimer.</span>
1b12cf799fee upgrade to ucx 3.0
Mike Becker <universe@uap-core.de>
parents: 41
diff changeset
56 <a class="c2html-lineno" name="l11" href="#l11"> 11 </a><span class="c2html-comment"> *</span>
1b12cf799fee upgrade to ucx 3.0
Mike Becker <universe@uap-core.de>
parents: 41
diff changeset
57 <a class="c2html-lineno" name="l12" href="#l12"> 12 </a><span class="c2html-comment"> * 2. Redistributions in binary form must reproduce the above copyright</span>
1b12cf799fee upgrade to ucx 3.0
Mike Becker <universe@uap-core.de>
parents: 41
diff changeset
58 <a class="c2html-lineno" name="l13" href="#l13"> 13 </a><span class="c2html-comment"> * notice, this list of conditions and the following disclaimer in the</span>
1b12cf799fee upgrade to ucx 3.0
Mike Becker <universe@uap-core.de>
parents: 41
diff changeset
59 <a class="c2html-lineno" name="l14" href="#l14"> 14 </a><span class="c2html-comment"> * documentation and/or other materials provided with the distribution.</span>
1b12cf799fee upgrade to ucx 3.0
Mike Becker <universe@uap-core.de>
parents: 41
diff changeset
60 <a class="c2html-lineno" name="l15" href="#l15"> 15 </a><span class="c2html-comment"> *</span>
1b12cf799fee upgrade to ucx 3.0
Mike Becker <universe@uap-core.de>
parents: 41
diff changeset
61 <a class="c2html-lineno" name="l16" href="#l16"> 16 </a><span class="c2html-comment"> * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"</span>
1b12cf799fee upgrade to ucx 3.0
Mike Becker <universe@uap-core.de>
parents: 41
diff changeset
62 <a class="c2html-lineno" name="l17" href="#l17"> 17 </a><span class="c2html-comment"> * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE</span>
1b12cf799fee upgrade to ucx 3.0
Mike Becker <universe@uap-core.de>
parents: 41
diff changeset
63 <a class="c2html-lineno" name="l18" href="#l18"> 18 </a><span class="c2html-comment"> * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE</span>
1b12cf799fee upgrade to ucx 3.0
Mike Becker <universe@uap-core.de>
parents: 41
diff changeset
64 <a class="c2html-lineno" name="l19" href="#l19"> 19 </a><span class="c2html-comment"> * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE</span>
1b12cf799fee upgrade to ucx 3.0
Mike Becker <universe@uap-core.de>
parents: 41
diff changeset
65 <a class="c2html-lineno" name="l20" href="#l20"> 20 </a><span class="c2html-comment"> * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR</span>
1b12cf799fee upgrade to ucx 3.0
Mike Becker <universe@uap-core.de>
parents: 41
diff changeset
66 <a class="c2html-lineno" name="l21" href="#l21"> 21 </a><span class="c2html-comment"> * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF</span>
1b12cf799fee upgrade to ucx 3.0
Mike Becker <universe@uap-core.de>
parents: 41
diff changeset
67 <a class="c2html-lineno" name="l22" href="#l22"> 22 </a><span class="c2html-comment"> * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS</span>
1b12cf799fee upgrade to ucx 3.0
Mike Becker <universe@uap-core.de>
parents: 41
diff changeset
68 <a class="c2html-lineno" name="l23" href="#l23"> 23 </a><span class="c2html-comment"> * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN</span>
1b12cf799fee upgrade to ucx 3.0
Mike Becker <universe@uap-core.de>
parents: 41
diff changeset
69 <a class="c2html-lineno" name="l24" href="#l24"> 24 </a><span class="c2html-comment"> * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)</span>
1b12cf799fee upgrade to ucx 3.0
Mike Becker <universe@uap-core.de>
parents: 41
diff changeset
70 <a class="c2html-lineno" name="l25" href="#l25"> 25 </a><span class="c2html-comment"> * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE</span>
1b12cf799fee upgrade to ucx 3.0
Mike Becker <universe@uap-core.de>
parents: 41
diff changeset
71 <a class="c2html-lineno" name="l26" href="#l26"> 26 </a><span class="c2html-comment"> * POSSIBILITY OF SUCH DAMAGE.</span>
1b12cf799fee upgrade to ucx 3.0
Mike Becker <universe@uap-core.de>
parents: 41
diff changeset
72 <a class="c2html-lineno" name="l27" href="#l27"> 27 </a><span class="c2html-comment"> *</span>
1b12cf799fee upgrade to ucx 3.0
Mike Becker <universe@uap-core.de>
parents: 41
diff changeset
73 <a class="c2html-lineno" name="l28" href="#l28"> 28 </a><span class="c2html-comment"> */</span>
1b12cf799fee upgrade to ucx 3.0
Mike Becker <universe@uap-core.de>
parents: 41
diff changeset
74 <a class="c2html-lineno" name="l29" href="#l29"> 29 </a>
1b12cf799fee upgrade to ucx 3.0
Mike Becker <universe@uap-core.de>
parents: 41
diff changeset
75 <a class="c2html-lineno" name="l30" href="#l30"> 30 </a><span class="c2html-keyword">package</span> de.uapcore.sigred.doc.base;
1b12cf799fee upgrade to ucx 3.0
Mike Becker <universe@uap-core.de>
parents: 41
diff changeset
76 <a class="c2html-lineno" name="l31" href="#l31"> 31 </a>
1b12cf799fee upgrade to ucx 3.0
Mike Becker <universe@uap-core.de>
parents: 41
diff changeset
77 <a class="c2html-lineno" name="l32" href="#l32"> 32 </a><span class="c2html-keyword">import</span> de.uapcore.sigred.doc.<span class="c2html-type">Resources</span>;
1b12cf799fee upgrade to ucx 3.0
Mike Becker <universe@uap-core.de>
parents: 41
diff changeset
78 <a class="c2html-lineno" name="l33" href="#l33"> 33 </a><span class="c2html-keyword">import</span> de.uapcore.sigrapi.impl.<span class="c2html-type">Digraph</span>;
1b12cf799fee upgrade to ucx 3.0
Mike Becker <universe@uap-core.de>
parents: 41
diff changeset
79 <a class="c2html-lineno" name="l34" href="#l34"> 34 </a><span class="c2html-keyword">import</span> de.uapcore.sigrapi.impl.<span class="c2html-type">Graph</span>;
1b12cf799fee upgrade to ucx 3.0
Mike Becker <universe@uap-core.de>
parents: 41
diff changeset
80 <a class="c2html-lineno" name="l35" href="#l35"> 35 </a><span class="c2html-keyword">import</span> de.uapcore.sigrapi.<span class="c2html-type">IGraph</span>;
1b12cf799fee upgrade to ucx 3.0
Mike Becker <universe@uap-core.de>
parents: 41
diff changeset
81 <a class="c2html-lineno" name="l36" href="#l36"> 36 </a><span class="c2html-keyword">import</span> java.io.<span class="c2html-type">IOException</span>;
1b12cf799fee upgrade to ucx 3.0
Mike Becker <universe@uap-core.de>
parents: 41
diff changeset
82 <a class="c2html-lineno" name="l37" href="#l37"> 37 </a><span class="c2html-keyword">import</span> java.io.<span class="c2html-type">InputStream</span>;
1b12cf799fee upgrade to ucx 3.0
Mike Becker <universe@uap-core.de>
parents: 41
diff changeset
83 <a class="c2html-lineno" name="l38" href="#l38"> 38 </a><span class="c2html-keyword">import</span> java.io.<span class="c2html-type">OutputStream</span>;
1b12cf799fee upgrade to ucx 3.0
Mike Becker <universe@uap-core.de>
parents: 41
diff changeset
84 <a class="c2html-lineno" name="l39" href="#l39"> 39 </a><span class="c2html-keyword">import</span> java.util.concurrent.atomic.<span class="c2html-type">AtomicBoolean</span>;
1b12cf799fee upgrade to ucx 3.0
Mike Becker <universe@uap-core.de>
parents: 41
diff changeset
85 <a class="c2html-lineno" name="l40" href="#l40"> 40 </a><span class="c2html-keyword">import</span> java.util.concurrent.atomic.<span class="c2html-type">AtomicReference</span>;
1b12cf799fee upgrade to ucx 3.0
Mike Becker <universe@uap-core.de>
parents: 41
diff changeset
86 <a class="c2html-lineno" name="l41" href="#l41"> 41 </a><span class="c2html-keyword">import</span> org.apache.xerces.impl.<span class="c2html-type">Constants</span>;
1b12cf799fee upgrade to ucx 3.0
Mike Becker <universe@uap-core.de>
parents: 41
diff changeset
87 <a class="c2html-lineno" name="l42" href="#l42"> 42 </a><span class="c2html-keyword">import</span> org.dom4j.<span class="c2html-type">Document</span>;
1b12cf799fee upgrade to ucx 3.0
Mike Becker <universe@uap-core.de>
parents: 41
diff changeset
88 <a class="c2html-lineno" name="l43" href="#l43"> 43 </a><span class="c2html-keyword">import</span> org.dom4j.<span class="c2html-type">DocumentException</span>;
1b12cf799fee upgrade to ucx 3.0
Mike Becker <universe@uap-core.de>
parents: 41
diff changeset
89 <a class="c2html-lineno" name="l44" href="#l44"> 44 </a><span class="c2html-keyword">import</span> org.dom4j.<span class="c2html-type">DocumentHelper</span>;
1b12cf799fee upgrade to ucx 3.0
Mike Becker <universe@uap-core.de>
parents: 41
diff changeset
90 <a class="c2html-lineno" name="l45" href="#l45"> 45 </a><span class="c2html-keyword">import</span> org.dom4j.<span class="c2html-type">Element</span>;
1b12cf799fee upgrade to ucx 3.0
Mike Becker <universe@uap-core.de>
parents: 41
diff changeset
91 <a class="c2html-lineno" name="l46" href="#l46"> 46 </a><span class="c2html-keyword">import</span> org.dom4j.<span class="c2html-type">Namespace</span>;
1b12cf799fee upgrade to ucx 3.0
Mike Becker <universe@uap-core.de>
parents: 41
diff changeset
92 <a class="c2html-lineno" name="l47" href="#l47"> 47 </a><span class="c2html-keyword">import</span> org.dom4j.<span class="c2html-type">QName</span>;
1b12cf799fee upgrade to ucx 3.0
Mike Becker <universe@uap-core.de>
parents: 41
diff changeset
93 <a class="c2html-lineno" name="l48" href="#l48"> 48 </a><span class="c2html-keyword">import</span> org.dom4j.io.<span class="c2html-type">OutputFormat</span>;
1b12cf799fee upgrade to ucx 3.0
Mike Becker <universe@uap-core.de>
parents: 41
diff changeset
94 <a class="c2html-lineno" name="l49" href="#l49"> 49 </a><span class="c2html-keyword">import</span> org.dom4j.io.<span class="c2html-type">SAXReader</span>;
1b12cf799fee upgrade to ucx 3.0
Mike Becker <universe@uap-core.de>
parents: 41
diff changeset
95 <a class="c2html-lineno" name="l50" href="#l50"> 50 </a><span class="c2html-keyword">import</span> org.dom4j.io.<span class="c2html-type">XMLWriter</span>;
1b12cf799fee upgrade to ucx 3.0
Mike Becker <universe@uap-core.de>
parents: 41
diff changeset
96 <a class="c2html-lineno" name="l51" href="#l51"> 51 </a><span class="c2html-keyword">import</span> org.xml.sax.<span class="c2html-type">ErrorHandler</span>;
1b12cf799fee upgrade to ucx 3.0
Mike Becker <universe@uap-core.de>
parents: 41
diff changeset
97 <a class="c2html-lineno" name="l52" href="#l52"> 52 </a><span class="c2html-keyword">import</span> org.xml.sax.<span class="c2html-type">SAXException</span>;
1b12cf799fee upgrade to ucx 3.0
Mike Becker <universe@uap-core.de>
parents: 41
diff changeset
98 <a class="c2html-lineno" name="l53" href="#l53"> 53 </a><span class="c2html-keyword">import</span> org.xml.sax.<span class="c2html-type">SAXParseException</span>;
1b12cf799fee upgrade to ucx 3.0
Mike Becker <universe@uap-core.de>
parents: 41
diff changeset
99 <a class="c2html-lineno" name="l54" href="#l54"> 54 </a>
1b12cf799fee upgrade to ucx 3.0
Mike Becker <universe@uap-core.de>
parents: 41
diff changeset
100 <a class="c2html-lineno" name="l55" href="#l55"> 55 </a><span class="c2html-keyword">public</span> <span class="c2html-keyword">abstract</span> <span class="c2html-keyword">class</span> <span class="c2html-type">AbstractGraphDocument</span>&lt;<span class="c2html-type">T</span> <span class="c2html-keyword">extends</span> <span class="c2html-type">IGraph</span>&gt;
1b12cf799fee upgrade to ucx 3.0
Mike Becker <universe@uap-core.de>
parents: 41
diff changeset
101 <a class="c2html-lineno" name="l56" href="#l56"> 56 </a> <span class="c2html-keyword">extends</span> <span class="c2html-type">FileBackedDocument</span> {
1b12cf799fee upgrade to ucx 3.0
Mike Becker <universe@uap-core.de>
parents: 41
diff changeset
102 <a class="c2html-lineno" name="l57" href="#l57"> 57 </a>
1b12cf799fee upgrade to ucx 3.0
Mike Becker <universe@uap-core.de>
parents: 41
diff changeset
103 <a class="c2html-lineno" name="l58" href="#l58"> 58 </a> <span class="c2html-keyword">protected</span> <span class="c2html-keyword">static</span> <span class="c2html-keyword">final</span> <span class="c2html-type">Namespace</span> <span class="c2html-type">NAMESPACE</span> = <span class="c2html-type">Namespace</span>.get(<span class="c2html-string">"sigred"</span>,
1b12cf799fee upgrade to ucx 3.0
Mike Becker <universe@uap-core.de>
parents: 41
diff changeset
104 <a class="c2html-lineno" name="l59" href="#l59"> 59 </a> <span class="c2html-string">"http://develop.uap-core.de/sigred/"</span>);
1b12cf799fee upgrade to ucx 3.0
Mike Becker <universe@uap-core.de>
parents: 41
diff changeset
105 <a class="c2html-lineno" name="l60" href="#l60"> 60 </a>
1b12cf799fee upgrade to ucx 3.0
Mike Becker <universe@uap-core.de>
parents: 41
diff changeset
106 <a class="c2html-lineno" name="l61" href="#l61"> 61 </a> <span class="c2html-keyword">private</span> <span class="c2html-keyword">static</span> <span class="c2html-keyword">final</span>
1b12cf799fee upgrade to ucx 3.0
Mike Becker <universe@uap-core.de>
parents: 41
diff changeset
107 <a class="c2html-lineno" name="l62" href="#l62"> 62 </a> <span class="c2html-type">QName</span> <span class="c2html-type">TAG_GRAPHDOC</span> = <span class="c2html-type">QName</span>.get(<span class="c2html-string">"graph-document"</span>, <span class="c2html-type">NAMESPACE</span>);
1b12cf799fee upgrade to ucx 3.0
Mike Becker <universe@uap-core.de>
parents: 41
diff changeset
108 <a class="c2html-lineno" name="l63" href="#l63"> 63 </a> <span class="c2html-keyword">private</span> <span class="c2html-keyword">static</span> <span class="c2html-keyword">final</span>
1b12cf799fee upgrade to ucx 3.0
Mike Becker <universe@uap-core.de>
parents: 41
diff changeset
109 <a class="c2html-lineno" name="l64" href="#l64"> 64 </a> <span class="c2html-type">QName</span> <span class="c2html-type">TAG_GRAPH</span> = <span class="c2html-type">QName</span>.get(<span class="c2html-string">"graph"</span>, <span class="c2html-type">NAMESPACE</span>);
1b12cf799fee upgrade to ucx 3.0
Mike Becker <universe@uap-core.de>
parents: 41
diff changeset
110 <a class="c2html-lineno" name="l65" href="#l65"> 65 </a> <span class="c2html-keyword">private</span> <span class="c2html-keyword">static</span> <span class="c2html-keyword">final</span>
1b12cf799fee upgrade to ucx 3.0
Mike Becker <universe@uap-core.de>
parents: 41
diff changeset
111 <a class="c2html-lineno" name="l66" href="#l66"> 66 </a> <span class="c2html-type">QName</span> <span class="c2html-type">TAG_DIGRAPH</span> = <span class="c2html-type">QName</span>.get(<span class="c2html-string">"digraph"</span>, <span class="c2html-type">NAMESPACE</span>);
1b12cf799fee upgrade to ucx 3.0
Mike Becker <universe@uap-core.de>
parents: 41
diff changeset
112 <a class="c2html-lineno" name="l67" href="#l67"> 67 </a> <span class="c2html-keyword">private</span> <span class="c2html-keyword">static</span> <span class="c2html-keyword">final</span>
1b12cf799fee upgrade to ucx 3.0
Mike Becker <universe@uap-core.de>
parents: 41
diff changeset
113 <a class="c2html-lineno" name="l68" href="#l68"> 68 </a> <span class="c2html-type">QName</span> <span class="c2html-type">TAG_METADATA</span> = <span class="c2html-type">QName</span>.get(<span class="c2html-string">"metadata"</span>, <span class="c2html-type">NAMESPACE</span>);
1b12cf799fee upgrade to ucx 3.0
Mike Becker <universe@uap-core.de>
parents: 41
diff changeset
114 <a class="c2html-lineno" name="l69" href="#l69"> 69 </a>
1b12cf799fee upgrade to ucx 3.0
Mike Becker <universe@uap-core.de>
parents: 41
diff changeset
115 <a class="c2html-lineno" name="l70" href="#l70"> 70 </a> <span class="c2html-keyword">protected</span> <span class="c2html-keyword">final</span> <span class="c2html-type">T</span> graph;
1b12cf799fee upgrade to ucx 3.0
Mike Becker <universe@uap-core.de>
parents: 41
diff changeset
116 <a class="c2html-lineno" name="l71" href="#l71"> 71 </a>
1b12cf799fee upgrade to ucx 3.0
Mike Becker <universe@uap-core.de>
parents: 41
diff changeset
117 <a class="c2html-lineno" name="l72" href="#l72"> 72 </a> <span class="c2html-keyword">private</span> <span class="c2html-keyword">final</span> <span class="c2html-type">GraphDocumentMetadata</span> metadata;
1b12cf799fee upgrade to ucx 3.0
Mike Becker <universe@uap-core.de>
parents: 41
diff changeset
118 <a class="c2html-lineno" name="l73" href="#l73"> 73 </a>
1b12cf799fee upgrade to ucx 3.0
Mike Becker <universe@uap-core.de>
parents: 41
diff changeset
119 <a class="c2html-lineno" name="l74" href="#l74"> 74 </a> <span class="c2html-keyword">public</span> <span class="c2html-type">AbstractGraphDocument</span>(<span class="c2html-type">Class</span>&lt;<span class="c2html-type">T</span>&gt; graphType) {
1b12cf799fee upgrade to ucx 3.0
Mike Becker <universe@uap-core.de>
parents: 41
diff changeset
120 <a class="c2html-lineno" name="l75" href="#l75"> 75 </a> <span class="c2html-type">T</span> g;
1b12cf799fee upgrade to ucx 3.0
Mike Becker <universe@uap-core.de>
parents: 41
diff changeset
121 <a class="c2html-lineno" name="l76" href="#l76"> 76 </a> <span class="c2html-keyword">try</span> {
1b12cf799fee upgrade to ucx 3.0
Mike Becker <universe@uap-core.de>
parents: 41
diff changeset
122 <a class="c2html-lineno" name="l77" href="#l77"> 77 </a> g = graphType.newInstance();
1b12cf799fee upgrade to ucx 3.0
Mike Becker <universe@uap-core.de>
parents: 41
diff changeset
123 <a class="c2html-lineno" name="l78" href="#l78"> 78 </a> } <span class="c2html-keyword">catch</span> (<span class="c2html-type">ReflectiveOperationException</span> e) {
1b12cf799fee upgrade to ucx 3.0
Mike Becker <universe@uap-core.de>
parents: 41
diff changeset
124 <a class="c2html-lineno" name="l79" href="#l79"> 79 </a> <span class="c2html-keyword">assert</span> false;
1b12cf799fee upgrade to ucx 3.0
Mike Becker <universe@uap-core.de>
parents: 41
diff changeset
125 <a class="c2html-lineno" name="l80" href="#l80"> 80 </a> g = null; <span class="c2html-comment">// for the compiler</span>
1b12cf799fee upgrade to ucx 3.0
Mike Becker <universe@uap-core.de>
parents: 41
diff changeset
126 <a class="c2html-lineno" name="l81" href="#l81"> 81 </a> }
1b12cf799fee upgrade to ucx 3.0
Mike Becker <universe@uap-core.de>
parents: 41
diff changeset
127 <a class="c2html-lineno" name="l82" href="#l82"> 82 </a> graph = g;
1b12cf799fee upgrade to ucx 3.0
Mike Becker <universe@uap-core.de>
parents: 41
diff changeset
128 <a class="c2html-lineno" name="l83" href="#l83"> 83 </a> metadata = <span class="c2html-keyword">new</span> <span class="c2html-type">GraphDocumentMetadata</span>();
1b12cf799fee upgrade to ucx 3.0
Mike Becker <universe@uap-core.de>
parents: 41
diff changeset
129 <a class="c2html-lineno" name="l84" href="#l84"> 84 </a> }
1b12cf799fee upgrade to ucx 3.0
Mike Becker <universe@uap-core.de>
parents: 41
diff changeset
130 <a class="c2html-lineno" name="l85" href="#l85"> 85 </a>
1b12cf799fee upgrade to ucx 3.0
Mike Becker <universe@uap-core.de>
parents: 41
diff changeset
131 <a class="c2html-lineno" name="l86" href="#l86"> 86 </a> <span class="c2html-keyword">public</span> <span class="c2html-type">T</span> getGraph() {
1b12cf799fee upgrade to ucx 3.0
Mike Becker <universe@uap-core.de>
parents: 41
diff changeset
132 <a class="c2html-lineno" name="l87" href="#l87"> 87 </a> <span class="c2html-keyword">return</span> graph;
1b12cf799fee upgrade to ucx 3.0
Mike Becker <universe@uap-core.de>
parents: 41
diff changeset
133 <a class="c2html-lineno" name="l88" href="#l88"> 88 </a> }
1b12cf799fee upgrade to ucx 3.0
Mike Becker <universe@uap-core.de>
parents: 41
diff changeset
134 <a class="c2html-lineno" name="l89" href="#l89"> 89 </a>
1b12cf799fee upgrade to ucx 3.0
Mike Becker <universe@uap-core.de>
parents: 41
diff changeset
135 <a class="c2html-lineno" name="l90" href="#l90"> 90 </a> <span class="c2html-keyword">public</span> <span class="c2html-type">GraphDocumentMetadata</span> getMetadata() {
1b12cf799fee upgrade to ucx 3.0
Mike Becker <universe@uap-core.de>
parents: 41
diff changeset
136 <a class="c2html-lineno" name="l91" href="#l91"> 91 </a> <span class="c2html-keyword">return</span> metadata;
1b12cf799fee upgrade to ucx 3.0
Mike Becker <universe@uap-core.de>
parents: 41
diff changeset
137 <a class="c2html-lineno" name="l92" href="#l92"> 92 </a> }
1b12cf799fee upgrade to ucx 3.0
Mike Becker <universe@uap-core.de>
parents: 41
diff changeset
138 <a class="c2html-lineno" name="l93" href="#l93"> 93 </a>
1b12cf799fee upgrade to ucx 3.0
Mike Becker <universe@uap-core.de>
parents: 41
diff changeset
139 <a class="c2html-lineno" name="l94" href="#l94"> 94 </a> <span class="c2html-keyword">protected</span> <span class="c2html-keyword">abstract</span> <span class="c2html-keyword">void</span> writeGraph(<span class="c2html-type">Element</span> rootNode) <span class="c2html-keyword">throws</span> <span class="c2html-type">IOException</span>;
1b12cf799fee upgrade to ucx 3.0
Mike Becker <universe@uap-core.de>
parents: 41
diff changeset
140 <a class="c2html-lineno" name="l95" href="#l95"> 95 </a> <span class="c2html-keyword">protected</span> <span class="c2html-keyword">abstract</span> <span class="c2html-keyword">void</span> readGraph(<span class="c2html-type">Element</span> rootNode) <span class="c2html-keyword">throws</span> <span class="c2html-type">IOException</span>;
1b12cf799fee upgrade to ucx 3.0
Mike Becker <universe@uap-core.de>
parents: 41
diff changeset
141 <a class="c2html-lineno" name="l96" href="#l96"> 96 </a>
1b12cf799fee upgrade to ucx 3.0
Mike Becker <universe@uap-core.de>
parents: 41
diff changeset
142 <a class="c2html-lineno" name="l97" href="#l97"> 97 </a> <span class="c2html-directive">@Override</span>
1b12cf799fee upgrade to ucx 3.0
Mike Becker <universe@uap-core.de>
parents: 41
diff changeset
143 <a class="c2html-lineno" name="l98" href="#l98"> 98 </a> <span class="c2html-keyword">public</span> <span class="c2html-keyword">void</span> writeTo(<span class="c2html-type">OutputStream</span> out) <span class="c2html-keyword">throws</span> <span class="c2html-type">IOException</span> {
1b12cf799fee upgrade to ucx 3.0
Mike Becker <universe@uap-core.de>
parents: 41
diff changeset
144 <a class="c2html-lineno" name="l99" href="#l99"> 99 </a> <span class="c2html-type">Document</span> doc = <span class="c2html-type">DocumentHelper</span>.createDocument();
1b12cf799fee upgrade to ucx 3.0
Mike Becker <universe@uap-core.de>
parents: 41
diff changeset
145 <a class="c2html-lineno" name="l100" href="#l100">100 </a>
1b12cf799fee upgrade to ucx 3.0
Mike Becker <universe@uap-core.de>
parents: 41
diff changeset
146 <a class="c2html-lineno" name="l101" href="#l101">101 </a> <span class="c2html-type">Element</span> rootNode = doc.addElement(<span class="c2html-type">TAG_GRAPHDOC</span>);
1b12cf799fee upgrade to ucx 3.0
Mike Becker <universe@uap-core.de>
parents: 41
diff changeset
147 <a class="c2html-lineno" name="l102" href="#l102">102 </a>
1b12cf799fee upgrade to ucx 3.0
Mike Becker <universe@uap-core.de>
parents: 41
diff changeset
148 <a class="c2html-lineno" name="l103" href="#l103">103 </a> <span class="c2html-type">Element</span> metadataNode = rootNode.addElement(<span class="c2html-type">TAG_METADATA</span>);
1b12cf799fee upgrade to ucx 3.0
Mike Becker <universe@uap-core.de>
parents: 41
diff changeset
149 <a class="c2html-lineno" name="l104" href="#l104">104 </a>
1b12cf799fee upgrade to ucx 3.0
Mike Becker <universe@uap-core.de>
parents: 41
diff changeset
150 <a class="c2html-lineno" name="l105" href="#l105">105 </a> metadata.write(metadataNode);
1b12cf799fee upgrade to ucx 3.0
Mike Becker <universe@uap-core.de>
parents: 41
diff changeset
151 <a class="c2html-lineno" name="l106" href="#l106">106 </a>
1b12cf799fee upgrade to ucx 3.0
Mike Becker <universe@uap-core.de>
parents: 41
diff changeset
152 <a class="c2html-lineno" name="l107" href="#l107">107 </a> <span class="c2html-keyword">if</span> (graph <span class="c2html-keyword">instanceof</span> <span class="c2html-type">Graph</span>) {
1b12cf799fee upgrade to ucx 3.0
Mike Becker <universe@uap-core.de>
parents: 41
diff changeset
153 <a class="c2html-lineno" name="l108" href="#l108">108 </a> writeGraph(rootNode.addElement(<span class="c2html-type">TAG_GRAPH</span>));
1b12cf799fee upgrade to ucx 3.0
Mike Becker <universe@uap-core.de>
parents: 41
diff changeset
154 <a class="c2html-lineno" name="l109" href="#l109">109 </a> } <span class="c2html-keyword">else</span> <span class="c2html-keyword">if</span> (graph <span class="c2html-keyword">instanceof</span> <span class="c2html-type">Digraph</span>) {
1b12cf799fee upgrade to ucx 3.0
Mike Becker <universe@uap-core.de>
parents: 41
diff changeset
155 <a class="c2html-lineno" name="l110" href="#l110">110 </a> writeGraph(rootNode.addElement(<span class="c2html-type">TAG_DIGRAPH</span>));
1b12cf799fee upgrade to ucx 3.0
Mike Becker <universe@uap-core.de>
parents: 41
diff changeset
156 <a class="c2html-lineno" name="l111" href="#l111">111 </a> } <span class="c2html-keyword">else</span> {
1b12cf799fee upgrade to ucx 3.0
Mike Becker <universe@uap-core.de>
parents: 41
diff changeset
157 <a class="c2html-lineno" name="l112" href="#l112">112 </a> <span class="c2html-keyword">throw</span> <span class="c2html-keyword">new</span> <span class="c2html-type">IOException</span>(<span class="c2html-string">"unsupported graph type"</span>);
1b12cf799fee upgrade to ucx 3.0
Mike Becker <universe@uap-core.de>
parents: 41
diff changeset
158 <a class="c2html-lineno" name="l113" href="#l113">113 </a> }
1b12cf799fee upgrade to ucx 3.0
Mike Becker <universe@uap-core.de>
parents: 41
diff changeset
159 <a class="c2html-lineno" name="l114" href="#l114">114 </a>
1b12cf799fee upgrade to ucx 3.0
Mike Becker <universe@uap-core.de>
parents: 41
diff changeset
160 <a class="c2html-lineno" name="l115" href="#l115">115 </a> <span class="c2html-type">XMLWriter</span> writer = <span class="c2html-keyword">new</span> <span class="c2html-type">XMLWriter</span>(out, <span class="c2html-type">OutputFormat</span>.createPrettyPrint());
1b12cf799fee upgrade to ucx 3.0
Mike Becker <universe@uap-core.de>
parents: 41
diff changeset
161 <a class="c2html-lineno" name="l116" href="#l116">116 </a> writer.write(doc);
1b12cf799fee upgrade to ucx 3.0
Mike Becker <universe@uap-core.de>
parents: 41
diff changeset
162 <a class="c2html-lineno" name="l117" href="#l117">117 </a> writer.flush();
1b12cf799fee upgrade to ucx 3.0
Mike Becker <universe@uap-core.de>
parents: 41
diff changeset
163 <a class="c2html-lineno" name="l118" href="#l118">118 </a> }
1b12cf799fee upgrade to ucx 3.0
Mike Becker <universe@uap-core.de>
parents: 41
diff changeset
164 <a class="c2html-lineno" name="l119" href="#l119">119 </a>
1b12cf799fee upgrade to ucx 3.0
Mike Becker <universe@uap-core.de>
parents: 41
diff changeset
165 <a class="c2html-lineno" name="l120" href="#l120">120 </a> <span class="c2html-directive">@Override</span>
1b12cf799fee upgrade to ucx 3.0
Mike Becker <universe@uap-core.de>
parents: 41
diff changeset
166 <a class="c2html-lineno" name="l121" href="#l121">121 </a> <span class="c2html-keyword">public</span> <span class="c2html-keyword">void</span> readFrom(<span class="c2html-type">InputStream</span> in) <span class="c2html-keyword">throws</span> <span class="c2html-type">IOException</span> {
1b12cf799fee upgrade to ucx 3.0
Mike Becker <universe@uap-core.de>
parents: 41
diff changeset
167 <a class="c2html-lineno" name="l122" href="#l122">122 </a> <span class="c2html-keyword">try</span> {
1b12cf799fee upgrade to ucx 3.0
Mike Becker <universe@uap-core.de>
parents: 41
diff changeset
168 <a class="c2html-lineno" name="l123" href="#l123">123 </a> <span class="c2html-type">SAXReader</span> reader = <span class="c2html-keyword">new</span> <span class="c2html-type">SAXReader</span>(true);
1b12cf799fee upgrade to ucx 3.0
Mike Becker <universe@uap-core.de>
parents: 41
diff changeset
169 <a class="c2html-lineno" name="l124" href="#l124">124 </a> reader.setStripWhitespaceText(true);
1b12cf799fee upgrade to ucx 3.0
Mike Becker <universe@uap-core.de>
parents: 41
diff changeset
170 <a class="c2html-lineno" name="l125" href="#l125">125 </a>
1b12cf799fee upgrade to ucx 3.0
Mike Becker <universe@uap-core.de>
parents: 41
diff changeset
171 <a class="c2html-lineno" name="l126" href="#l126">126 </a> reader.setFeature(<span class="c2html-type">Constants</span>.<span class="c2html-type">XERCES_FEATURE_PREFIX</span>+
1b12cf799fee upgrade to ucx 3.0
Mike Becker <universe@uap-core.de>
parents: 41
diff changeset
172 <a class="c2html-lineno" name="l127" href="#l127">127 </a> <span class="c2html-type">Constants</span>.<span class="c2html-type">SCHEMA_VALIDATION_FEATURE</span>, true);
1b12cf799fee upgrade to ucx 3.0
Mike Becker <universe@uap-core.de>
parents: 41
diff changeset
173 <a class="c2html-lineno" name="l128" href="#l128">128 </a> reader.setProperty(<span class="c2html-type">Constants</span>.<span class="c2html-type">XERCES_PROPERTY_PREFIX</span> +
1b12cf799fee upgrade to ucx 3.0
Mike Becker <universe@uap-core.de>
parents: 41
diff changeset
174 <a class="c2html-lineno" name="l129" href="#l129">129 </a> <span class="c2html-type">Constants</span>.<span class="c2html-type">SCHEMA_LOCATION</span>, <span class="c2html-type">String</span>.format(<span class="c2html-string">"%s %s"</span>,
1b12cf799fee upgrade to ucx 3.0
Mike Becker <universe@uap-core.de>
parents: 41
diff changeset
175 <a class="c2html-lineno" name="l130" href="#l130">130 </a> <span class="c2html-type">NAMESPACE</span>.getURI(), <span class="c2html-type">Resources</span>.<span class="c2html-keyword">class</span>.getResource(
1b12cf799fee upgrade to ucx 3.0
Mike Becker <universe@uap-core.de>
parents: 41
diff changeset
176 <a class="c2html-lineno" name="l131" href="#l131">131 </a> <span class="c2html-string">"graph-document.xsd"</span>).toExternalForm()));
1b12cf799fee upgrade to ucx 3.0
Mike Becker <universe@uap-core.de>
parents: 41
diff changeset
177 <a class="c2html-lineno" name="l132" href="#l132">132 </a>
1b12cf799fee upgrade to ucx 3.0
Mike Becker <universe@uap-core.de>
parents: 41
diff changeset
178 <a class="c2html-lineno" name="l133" href="#l133">133 </a> <span class="c2html-keyword">final</span> <span class="c2html-type">AtomicBoolean</span> passed = <span class="c2html-keyword">new</span> <span class="c2html-type">AtomicBoolean</span>(true);
1b12cf799fee upgrade to ucx 3.0
Mike Becker <universe@uap-core.de>
parents: 41
diff changeset
179 <a class="c2html-lineno" name="l134" href="#l134">134 </a> <span class="c2html-keyword">final</span> <span class="c2html-type">AtomicReference</span>&lt;<span class="c2html-type">SAXParseException</span>&gt; xmlerror = <span class="c2html-keyword">new</span> <span class="c2html-type">AtomicReference</span>&lt;&gt;();
1b12cf799fee upgrade to ucx 3.0
Mike Becker <universe@uap-core.de>
parents: 41
diff changeset
180 <a class="c2html-lineno" name="l135" href="#l135">135 </a> <span class="c2html-comment">// TODO: we should do more detailed error handling here</span>
1b12cf799fee upgrade to ucx 3.0
Mike Becker <universe@uap-core.de>
parents: 41
diff changeset
181 <a class="c2html-lineno" name="l136" href="#l136">136 </a> reader.setErrorHandler(<span class="c2html-keyword">new</span> <span class="c2html-type">ErrorHandler</span>() {
1b12cf799fee upgrade to ucx 3.0
Mike Becker <universe@uap-core.de>
parents: 41
diff changeset
182 <a class="c2html-lineno" name="l137" href="#l137">137 </a> <span class="c2html-directive">@Override</span>
1b12cf799fee upgrade to ucx 3.0
Mike Becker <universe@uap-core.de>
parents: 41
diff changeset
183 <a class="c2html-lineno" name="l138" href="#l138">138 </a> <span class="c2html-keyword">public</span> <span class="c2html-keyword">void</span> warning(<span class="c2html-type">SAXParseException</span> exception) <span class="c2html-keyword">throws</span> <span class="c2html-type">SAXException</span> {
1b12cf799fee upgrade to ucx 3.0
Mike Becker <universe@uap-core.de>
parents: 41
diff changeset
184 <a class="c2html-lineno" name="l139" href="#l139">139 </a> }
1b12cf799fee upgrade to ucx 3.0
Mike Becker <universe@uap-core.de>
parents: 41
diff changeset
185 <a class="c2html-lineno" name="l140" href="#l140">140 </a>
1b12cf799fee upgrade to ucx 3.0
Mike Becker <universe@uap-core.de>
parents: 41
diff changeset
186 <a class="c2html-lineno" name="l141" href="#l141">141 </a> <span class="c2html-directive">@Override</span>
1b12cf799fee upgrade to ucx 3.0
Mike Becker <universe@uap-core.de>
parents: 41
diff changeset
187 <a class="c2html-lineno" name="l142" href="#l142">142 </a> <span class="c2html-keyword">public</span> <span class="c2html-keyword">void</span> error(<span class="c2html-type">SAXParseException</span> exception) <span class="c2html-keyword">throws</span> <span class="c2html-type">SAXException</span> {
1b12cf799fee upgrade to ucx 3.0
Mike Becker <universe@uap-core.de>
parents: 41
diff changeset
188 <a class="c2html-lineno" name="l143" href="#l143">143 </a> xmlerror.set(exception);
1b12cf799fee upgrade to ucx 3.0
Mike Becker <universe@uap-core.de>
parents: 41
diff changeset
189 <a class="c2html-lineno" name="l144" href="#l144">144 </a> passed.set(false);
1b12cf799fee upgrade to ucx 3.0
Mike Becker <universe@uap-core.de>
parents: 41
diff changeset
190 <a class="c2html-lineno" name="l145" href="#l145">145 </a> }
1b12cf799fee upgrade to ucx 3.0
Mike Becker <universe@uap-core.de>
parents: 41
diff changeset
191 <a class="c2html-lineno" name="l146" href="#l146">146 </a>
1b12cf799fee upgrade to ucx 3.0
Mike Becker <universe@uap-core.de>
parents: 41
diff changeset
192 <a class="c2html-lineno" name="l147" href="#l147">147 </a> <span class="c2html-directive">@Override</span>
1b12cf799fee upgrade to ucx 3.0
Mike Becker <universe@uap-core.de>
parents: 41
diff changeset
193 <a class="c2html-lineno" name="l148" href="#l148">148 </a> <span class="c2html-keyword">public</span> <span class="c2html-keyword">void</span> fatalError(<span class="c2html-type">SAXParseException</span> exception) <span class="c2html-keyword">throws</span> <span class="c2html-type">SAXException</span> {
1b12cf799fee upgrade to ucx 3.0
Mike Becker <universe@uap-core.de>
parents: 41
diff changeset
194 <a class="c2html-lineno" name="l149" href="#l149">149 </a> xmlerror.set(exception);
1b12cf799fee upgrade to ucx 3.0
Mike Becker <universe@uap-core.de>
parents: 41
diff changeset
195 <a class="c2html-lineno" name="l150" href="#l150">150 </a> passed.set(false);
1b12cf799fee upgrade to ucx 3.0
Mike Becker <universe@uap-core.de>
parents: 41
diff changeset
196 <a class="c2html-lineno" name="l151" href="#l151">151 </a> }
1b12cf799fee upgrade to ucx 3.0
Mike Becker <universe@uap-core.de>
parents: 41
diff changeset
197 <a class="c2html-lineno" name="l152" href="#l152">152 </a>
1b12cf799fee upgrade to ucx 3.0
Mike Becker <universe@uap-core.de>
parents: 41
diff changeset
198 <a class="c2html-lineno" name="l153" href="#l153">153 </a> });
1b12cf799fee upgrade to ucx 3.0
Mike Becker <universe@uap-core.de>
parents: 41
diff changeset
199 <a class="c2html-lineno" name="l154" href="#l154">154 </a> <span class="c2html-type">Document</span> doc = reader.read(in);
1b12cf799fee upgrade to ucx 3.0
Mike Becker <universe@uap-core.de>
parents: 41
diff changeset
200 <a class="c2html-lineno" name="l155" href="#l155">155 </a> <span class="c2html-keyword">if</span> (!passed.get()) {
1b12cf799fee upgrade to ucx 3.0
Mike Becker <universe@uap-core.de>
parents: 41
diff changeset
201 <a class="c2html-lineno" name="l156" href="#l156">156 </a> <span class="c2html-comment">// TODO: provide details (maybe via separate error object?)</span>
1b12cf799fee upgrade to ucx 3.0
Mike Becker <universe@uap-core.de>
parents: 41
diff changeset
202 <a class="c2html-lineno" name="l157" href="#l157">157 </a> <span class="c2html-keyword">throw</span> xmlerror.get();
1b12cf799fee upgrade to ucx 3.0
Mike Becker <universe@uap-core.de>
parents: 41
diff changeset
203 <a class="c2html-lineno" name="l158" href="#l158">158 </a> }
1b12cf799fee upgrade to ucx 3.0
Mike Becker <universe@uap-core.de>
parents: 41
diff changeset
204 <a class="c2html-lineno" name="l159" href="#l159">159 </a>
1b12cf799fee upgrade to ucx 3.0
Mike Becker <universe@uap-core.de>
parents: 41
diff changeset
205 <a class="c2html-lineno" name="l160" href="#l160">160 </a> doc.normalize();
1b12cf799fee upgrade to ucx 3.0
Mike Becker <universe@uap-core.de>
parents: 41
diff changeset
206 <a class="c2html-lineno" name="l161" href="#l161">161 </a>
1b12cf799fee upgrade to ucx 3.0
Mike Becker <universe@uap-core.de>
parents: 41
diff changeset
207 <a class="c2html-lineno" name="l162" href="#l162">162 </a> <span class="c2html-type">Element</span> root = doc.getRootElement();
1b12cf799fee upgrade to ucx 3.0
Mike Becker <universe@uap-core.de>
parents: 41
diff changeset
208 <a class="c2html-lineno" name="l163" href="#l163">163 </a> metadata.read(root.element(<span class="c2html-type">TAG_METADATA</span>));
1b12cf799fee upgrade to ucx 3.0
Mike Becker <universe@uap-core.de>
parents: 41
diff changeset
209 <a class="c2html-lineno" name="l164" href="#l164">164 </a>
1b12cf799fee upgrade to ucx 3.0
Mike Becker <universe@uap-core.de>
parents: 41
diff changeset
210 <a class="c2html-lineno" name="l165" href="#l165">165 </a> <span class="c2html-keyword">if</span> (graph <span class="c2html-keyword">instanceof</span> <span class="c2html-type">Graph</span>) {
1b12cf799fee upgrade to ucx 3.0
Mike Becker <universe@uap-core.de>
parents: 41
diff changeset
211 <a class="c2html-lineno" name="l166" href="#l166">166 </a> readGraph(root.element(<span class="c2html-type">TAG_GRAPH</span>));
1b12cf799fee upgrade to ucx 3.0
Mike Becker <universe@uap-core.de>
parents: 41
diff changeset
212 <a class="c2html-lineno" name="l167" href="#l167">167 </a> } <span class="c2html-keyword">else</span> <span class="c2html-keyword">if</span> (graph <span class="c2html-keyword">instanceof</span> <span class="c2html-type">Digraph</span>) {
1b12cf799fee upgrade to ucx 3.0
Mike Becker <universe@uap-core.de>
parents: 41
diff changeset
213 <a class="c2html-lineno" name="l168" href="#l168">168 </a> readGraph(root.element(<span class="c2html-type">TAG_DIGRAPH</span>));
1b12cf799fee upgrade to ucx 3.0
Mike Becker <universe@uap-core.de>
parents: 41
diff changeset
214 <a class="c2html-lineno" name="l169" href="#l169">169 </a> } <span class="c2html-keyword">else</span> {
1b12cf799fee upgrade to ucx 3.0
Mike Becker <universe@uap-core.de>
parents: 41
diff changeset
215 <a class="c2html-lineno" name="l170" href="#l170">170 </a> <span class="c2html-keyword">throw</span> <span class="c2html-keyword">new</span> <span class="c2html-type">IOException</span>(<span class="c2html-string">"unsupported graph type"</span>);
1b12cf799fee upgrade to ucx 3.0
Mike Becker <universe@uap-core.de>
parents: 41
diff changeset
216 <a class="c2html-lineno" name="l171" href="#l171">171 </a> }
1b12cf799fee upgrade to ucx 3.0
Mike Becker <universe@uap-core.de>
parents: 41
diff changeset
217 <a class="c2html-lineno" name="l172" href="#l172">172 </a> } <span class="c2html-keyword">catch</span> (<span class="c2html-type">DocumentException</span> | <span class="c2html-type">SAXException</span> ex) {
1b12cf799fee upgrade to ucx 3.0
Mike Becker <universe@uap-core.de>
parents: 41
diff changeset
218 <a class="c2html-lineno" name="l173" href="#l173">173 </a> <span class="c2html-keyword">throw</span> <span class="c2html-keyword">new</span> <span class="c2html-type">IOException</span>(ex);
1b12cf799fee upgrade to ucx 3.0
Mike Becker <universe@uap-core.de>
parents: 41
diff changeset
219 <a class="c2html-lineno" name="l174" href="#l174">174 </a> }
1b12cf799fee upgrade to ucx 3.0
Mike Becker <universe@uap-core.de>
parents: 41
diff changeset
220 <a class="c2html-lineno" name="l175" href="#l175">175 </a> }
1b12cf799fee upgrade to ucx 3.0
Mike Becker <universe@uap-core.de>
parents: 41
diff changeset
221 <a class="c2html-lineno" name="l176" href="#l176">176 </a>}
1b12cf799fee upgrade to ucx 3.0
Mike Becker <universe@uap-core.de>
parents: 41
diff changeset
222 </div>
41
c06ab07fd29d increases input buffer + adds regression tests
Mike Becker <universe@uap-core.de>
parents:
diff changeset
223 </body>
c06ab07fd29d increases input buffer + adds regression tests
Mike Becker <universe@uap-core.de>
parents:
diff changeset
224 </html>
c06ab07fd29d increases input buffer + adds regression tests
Mike Becker <universe@uap-core.de>
parents:
diff changeset
225

mercurial