JAL-1807 Bob's JalviewJS prototype first commit
[jalviewjs.git] / site / swingjs / j2s / org / xml / sax / helpers / XMLFilterImpl.js
1 Clazz.declarePackage ("org.xml.sax.helpers");\r
2 Clazz.load (["org.xml.sax.ContentHandler", "$.DTDHandler", "$.EntityResolver", "$.ErrorHandler", "$.XMLFilter"], "org.xml.sax.helpers.XMLFilterImpl", ["java.lang.NullPointerException", "org.xml.sax.InputSource", "$.SAXNotRecognizedException"], function () {\r
3 c$ = Clazz.decorateAsClass (function () {\r
4 this.parent = null;\r
5 this.locator = null;\r
6 this.entityResolver = null;\r
7 this.dtdHandler = null;\r
8 this.contentHandler = null;\r
9 this.errorHandler = null;\r
10 Clazz.instantialize (this, arguments);\r
11 }, org.xml.sax.helpers, "XMLFilterImpl", null, [org.xml.sax.XMLFilter, org.xml.sax.EntityResolver, org.xml.sax.DTDHandler, org.xml.sax.ContentHandler, org.xml.sax.ErrorHandler]);\r
12 Clazz.makeConstructor (c$, \r
13 function () {\r
14 });\r
15 Clazz.makeConstructor (c$, \r
16 function (parent) {\r
17 this.setParent (parent);\r
18 }, "org.xml.sax.XMLReader");\r
19 Clazz.overrideMethod (c$, "setParent", \r
20 function (parent) {\r
21 this.parent = parent;\r
22 }, "org.xml.sax.XMLReader");\r
23 Clazz.overrideMethod (c$, "getParent", \r
24 function () {\r
25 return this.parent;\r
26 });\r
27 Clazz.defineMethod (c$, "setFeature", \r
28 function (name, value) {\r
29 if (this.parent != null) {\r
30 this.parent.setFeature (name, value);\r
31 } else {\r
32 throw  new org.xml.sax.SAXNotRecognizedException ("Feature: " + name);\r
33 }}, "~S,~B");\r
34 Clazz.defineMethod (c$, "getFeature", \r
35 function (name) {\r
36 if (this.parent != null) {\r
37 return this.parent.getFeature (name);\r
38 } else {\r
39 throw  new org.xml.sax.SAXNotRecognizedException ("Feature: " + name);\r
40 }}, "~S");\r
41 Clazz.defineMethod (c$, "setProperty", \r
42 function (name, value) {\r
43 if (this.parent != null) {\r
44 this.parent.setProperty (name, value);\r
45 } else {\r
46 throw  new org.xml.sax.SAXNotRecognizedException ("Property: " + name);\r
47 }}, "~S,~O");\r
48 Clazz.defineMethod (c$, "getProperty", \r
49 function (name) {\r
50 if (this.parent != null) {\r
51 return this.parent.getProperty (name);\r
52 } else {\r
53 throw  new org.xml.sax.SAXNotRecognizedException ("Property: " + name);\r
54 }}, "~S");\r
55 Clazz.defineMethod (c$, "setEntityResolver", \r
56 function (resolver) {\r
57 this.entityResolver = resolver;\r
58 }, "org.xml.sax.EntityResolver");\r
59 Clazz.overrideMethod (c$, "getEntityResolver", \r
60 function () {\r
61 return this.entityResolver;\r
62 });\r
63 Clazz.defineMethod (c$, "setDTDHandler", \r
64 function (handler) {\r
65 this.dtdHandler = handler;\r
66 }, "org.xml.sax.DTDHandler");\r
67 Clazz.overrideMethod (c$, "getDTDHandler", \r
68 function () {\r
69 return this.dtdHandler;\r
70 });\r
71 Clazz.defineMethod (c$, "setContentHandler", \r
72 function (handler) {\r
73 this.contentHandler = handler;\r
74 }, "org.xml.sax.ContentHandler");\r
75 Clazz.overrideMethod (c$, "getContentHandler", \r
76 function () {\r
77 return this.contentHandler;\r
78 });\r
79 Clazz.defineMethod (c$, "setErrorHandler", \r
80 function (handler) {\r
81 this.errorHandler = handler;\r
82 }, "org.xml.sax.ErrorHandler");\r
83 Clazz.overrideMethod (c$, "getErrorHandler", \r
84 function () {\r
85 return this.errorHandler;\r
86 });\r
87 Clazz.defineMethod (c$, "parse", \r
88 function (input) {\r
89 this.setupParse ();\r
90 this.parent.parse (input);\r
91 }, "org.xml.sax.InputSource");\r
92 Clazz.defineMethod (c$, "parse", \r
93 function (systemId) {\r
94 this.parse ( new org.xml.sax.InputSource (systemId));\r
95 }, "~S");\r
96 Clazz.defineMethod (c$, "resolveEntity", \r
97 function (publicId, systemId) {\r
98 if (this.entityResolver != null) {\r
99 return this.entityResolver.resolveEntity (publicId, systemId);\r
100 } else {\r
101 return null;\r
102 }}, "~S,~S");\r
103 Clazz.defineMethod (c$, "notationDecl", \r
104 function (name, publicId, systemId) {\r
105 if (this.dtdHandler != null) {\r
106 this.dtdHandler.notationDecl (name, publicId, systemId);\r
107 }}, "~S,~S,~S");\r
108 Clazz.defineMethod (c$, "unparsedEntityDecl", \r
109 function (name, publicId, systemId, notationName) {\r
110 if (this.dtdHandler != null) {\r
111 this.dtdHandler.unparsedEntityDecl (name, publicId, systemId, notationName);\r
112 }}, "~S,~S,~S,~S");\r
113 Clazz.defineMethod (c$, "setDocumentLocator", \r
114 function (locator) {\r
115 this.locator = locator;\r
116 if (this.contentHandler != null) {\r
117 this.contentHandler.setDocumentLocator (locator);\r
118 }}, "org.xml.sax.Locator");\r
119 Clazz.defineMethod (c$, "startDocument", \r
120 function () {\r
121 if (this.contentHandler != null) {\r
122 this.contentHandler.startDocument ();\r
123 }});\r
124 Clazz.defineMethod (c$, "endDocument", \r
125 function () {\r
126 if (this.contentHandler != null) {\r
127 this.contentHandler.endDocument ();\r
128 }});\r
129 Clazz.defineMethod (c$, "startPrefixMapping", \r
130 function (prefix, uri) {\r
131 if (this.contentHandler != null) {\r
132 this.contentHandler.startPrefixMapping (prefix, uri);\r
133 }}, "~S,~S");\r
134 Clazz.defineMethod (c$, "endPrefixMapping", \r
135 function (prefix) {\r
136 if (this.contentHandler != null) {\r
137 this.contentHandler.endPrefixMapping (prefix);\r
138 }}, "~S");\r
139 Clazz.defineMethod (c$, "startElement", \r
140 function (uri, localName, qName, atts) {\r
141 if (this.contentHandler != null) {\r
142 this.contentHandler.startElement (uri, localName, qName, atts);\r
143 }}, "~S,~S,~S,org.xml.sax.Attributes");\r
144 Clazz.defineMethod (c$, "endElement", \r
145 function (uri, localName, qName) {\r
146 if (this.contentHandler != null) {\r
147 this.contentHandler.endElement (uri, localName, qName);\r
148 }}, "~S,~S,~S");\r
149 Clazz.defineMethod (c$, "characters", \r
150 function (ch, start, length) {\r
151 if (this.contentHandler != null) {\r
152 this.contentHandler.characters (ch, start, length);\r
153 }}, "~A,~N,~N");\r
154 Clazz.defineMethod (c$, "ignorableWhitespace", \r
155 function (ch, start, length) {\r
156 if (this.contentHandler != null) {\r
157 this.contentHandler.ignorableWhitespace (ch, start, length);\r
158 }}, "~A,~N,~N");\r
159 Clazz.defineMethod (c$, "processingInstruction", \r
160 function (target, data) {\r
161 if (this.contentHandler != null) {\r
162 this.contentHandler.processingInstruction (target, data);\r
163 }}, "~S,~S");\r
164 Clazz.defineMethod (c$, "skippedEntity", \r
165 function (name) {\r
166 if (this.contentHandler != null) {\r
167 this.contentHandler.skippedEntity (name);\r
168 }}, "~S");\r
169 Clazz.defineMethod (c$, "warning", \r
170 function (e) {\r
171 if (this.errorHandler != null) {\r
172 this.errorHandler.warning (e);\r
173 }}, "org.xml.sax.SAXParseException");\r
174 Clazz.defineMethod (c$, "error", \r
175 function (e) {\r
176 if (this.errorHandler != null) {\r
177 this.errorHandler.error (e);\r
178 }}, "org.xml.sax.SAXParseException");\r
179 Clazz.defineMethod (c$, "fatalError", \r
180 function (e) {\r
181 if (this.errorHandler != null) {\r
182 this.errorHandler.fatalError (e);\r
183 }}, "org.xml.sax.SAXParseException");\r
184 Clazz.defineMethod (c$, "setupParse", \r
185  function () {\r
186 if (this.parent == null) {\r
187 throw  new NullPointerException ("No parent for filter");\r
188 }this.parent.setEntityResolver (this);\r
189 this.parent.setDTDHandler (this);\r
190 this.parent.setContentHandler (this);\r
191 this.parent.setErrorHandler (this);\r
192 });\r
193 });\r