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