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
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
15 Clazz.makeConstructor (c$,
\r
17 this.setParent (parent);
\r
18 }, "org.xml.sax.XMLReader");
\r
19 Clazz.overrideMethod (c$, "setParent",
\r
21 this.parent = parent;
\r
22 }, "org.xml.sax.XMLReader");
\r
23 Clazz.overrideMethod (c$, "getParent",
\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
32 throw new org.xml.sax.SAXNotRecognizedException ("Feature: " + name);
\r
34 Clazz.defineMethod (c$, "getFeature",
\r
36 if (this.parent != null) {
\r
37 return this.parent.getFeature (name);
\r
39 throw new org.xml.sax.SAXNotRecognizedException ("Feature: " + name);
\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
46 throw new org.xml.sax.SAXNotRecognizedException ("Property: " + name);
\r
48 Clazz.defineMethod (c$, "getProperty",
\r
50 if (this.parent != null) {
\r
51 return this.parent.getProperty (name);
\r
53 throw new org.xml.sax.SAXNotRecognizedException ("Property: " + name);
\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
61 return this.entityResolver;
\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
69 return this.dtdHandler;
\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
77 return this.contentHandler;
\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
85 return this.errorHandler;
\r
87 Clazz.defineMethod (c$, "parse",
\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
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
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
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
121 if (this.contentHandler != null) {
\r
122 this.contentHandler.startDocument ();
\r
124 Clazz.defineMethod (c$, "endDocument",
\r
126 if (this.contentHandler != null) {
\r
127 this.contentHandler.endDocument ();
\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
134 Clazz.defineMethod (c$, "endPrefixMapping",
\r
135 function (prefix) {
\r
136 if (this.contentHandler != null) {
\r
137 this.contentHandler.endPrefixMapping (prefix);
\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
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
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
159 Clazz.defineMethod (c$, "processingInstruction",
\r
160 function (target, data) {
\r
161 if (this.contentHandler != null) {
\r
162 this.contentHandler.processingInstruction (target, data);
\r
164 Clazz.defineMethod (c$, "skippedEntity",
\r
166 if (this.contentHandler != null) {
\r
167 this.contentHandler.skippedEntity (name);
\r
169 Clazz.defineMethod (c$, "warning",
\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
176 if (this.errorHandler != null) {
\r
177 this.errorHandler.error (e);
\r
178 }}, "org.xml.sax.SAXParseException");
\r
179 Clazz.defineMethod (c$, "fatalError",
\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
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