001// ***************************************************************************************************************************
002// * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements.  See the NOTICE file *
003// * distributed with this work for additional information regarding copyright ownership.  The ASF licenses this file        *
004// * to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance            *
005// * with the License.  You may obtain a copy of the License at                                                              *
006// *                                                                                                                         *
007// *  http://www.apache.org/licenses/LICENSE-2.0                                                                             *
008// *                                                                                                                         *
009// * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an  *
010// * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the License for the        *
011// * specific language governing permissions and limitations under the License.                                              *
012// ***************************************************************************************************************************
013package org.apache.juneau.html;
014
015import java.util.*;
016
017import javax.xml.stream.*;
018import javax.xml.stream.util.*;
019
020import org.apache.juneau.*;
021import org.apache.juneau.http.*;
022import org.apache.juneau.parser.*;
023import org.apache.juneau.xml.*;
024
025/**
026 * Builder class for building instances of HTML parsers.
027 */
028public class HtmlParserBuilder extends XmlParserBuilder {
029
030   /**
031    * Constructor, default settings.
032    */
033   public HtmlParserBuilder() {
034      super();
035   }
036
037   /**
038    * Constructor.
039    * 
040    * @param ps The initial configuration settings for this builder.
041    */
042   public HtmlParserBuilder(PropertyStore ps) {
043      super(ps);
044   }
045
046   @Override /* ContextBuilder */
047   public HtmlParser build() {
048      return build(HtmlParser.class);
049   }
050
051
052   //--------------------------------------------------------------------------------
053   // Properties
054   //--------------------------------------------------------------------------------
055
056   @Override /* XmlParserBuilder */
057   public HtmlParserBuilder validating(boolean value) {
058      super.validating(value);
059      return this;
060   }
061
062   @Override /* XmlParserBuilder */
063   public HtmlParserBuilder validating() {
064      super.validating();
065      return this;
066   }
067
068   @Override /* XmlParserBuilder */
069   public HtmlParserBuilder reporter(XMLReporter value) {
070      super.reporter(value);
071      return this;
072   }
073
074   @Override /* XmlParserBuilder */
075   public HtmlParserBuilder resolver(XMLResolver value) {
076      super.resolver(value);
077      return this;
078   }
079
080   @Override /* XmlParserBuilder */
081   public HtmlParserBuilder eventAllocator(XMLEventAllocator value) {
082      super.eventAllocator(value);
083      return this;
084   }
085
086   @Override /* ParserBuilder */
087   public HtmlParserBuilder fileCharset(String value) {
088      super.fileCharset(value);
089      return this;
090   }
091
092   @Override /* ParserBuilder */
093   public HtmlParserBuilder inputStreamCharset(String value) {
094      super.inputStreamCharset(value);
095      return this;
096   }
097
098   @Override /* ParserBuilder */
099   public HtmlParserBuilder listener(Class<? extends ParserListener> value) {
100      super.listener(value);
101      return this;
102   }
103
104   @Override /* ParserBuilder */
105   public HtmlParserBuilder strict(boolean value) {
106      super.strict(value);
107      return this;
108   }
109
110   @Override /* ParserBuilder */
111   public HtmlParserBuilder strict() {
112      super.strict();
113      return this;
114   }
115
116   @Override /* ParserBuilder */
117   public HtmlParserBuilder trimStrings(boolean value) {
118      super.trimStrings(value);
119      return this;
120   }
121
122   @Override /* ParserBuilder */
123   public HtmlParserBuilder trimStrings() {
124      super.trimStrings();
125      return this;
126   }
127
128   @Override /* BeanContextBuilder */
129   public HtmlParserBuilder beansRequireDefaultConstructor(boolean value) {
130      super.beansRequireDefaultConstructor(value);
131      return this;
132   }
133
134   @Override /* BeanContextBuilder */
135   public HtmlParserBuilder beansRequireDefaultConstructor() {
136      super.beansRequireDefaultConstructor();
137      return this;
138   }
139
140   @Override /* BeanContextBuilder */
141   public HtmlParserBuilder beansRequireSerializable(boolean value) {
142      super.beansRequireSerializable(value);
143      return this;
144   }
145
146   @Override /* BeanContextBuilder */
147   public HtmlParserBuilder beansRequireSerializable() {
148      super.beansRequireSerializable();
149      return this;
150   }
151
152   @Override /* BeanContextBuilder */
153   public HtmlParserBuilder beansRequireSettersForGetters(boolean value) {
154      super.beansRequireSettersForGetters(value);
155      return this;
156   }
157
158   @Override /* BeanContextBuilder */
159   public HtmlParserBuilder beansRequireSettersForGetters() {
160      super.beansRequireSettersForGetters();
161      return this;
162   }
163
164   @Override /* BeanContextBuilder */
165   public HtmlParserBuilder beansRequireSomeProperties(boolean value) {
166      super.beansRequireSomeProperties(value);
167      return this;
168   }
169
170   @Override /* BeanContextBuilder */
171   public HtmlParserBuilder beanMapPutReturnsOldValue(boolean value) {
172      super.beanMapPutReturnsOldValue(value);
173      return this;
174   }
175
176   @Override /* BeanContextBuilder */
177   public HtmlParserBuilder beanMapPutReturnsOldValue() {
178      super.beanMapPutReturnsOldValue();
179      return this;
180   }
181
182   @Override /* BeanContextBuilder */
183   public HtmlParserBuilder beanConstructorVisibility(Visibility value) {
184      super.beanConstructorVisibility(value);
185      return this;
186   }
187
188   @Override /* BeanContextBuilder */
189   public HtmlParserBuilder beanClassVisibility(Visibility value) {
190      super.beanClassVisibility(value);
191      return this;
192   }
193
194   @Override /* BeanContextBuilder */
195   public HtmlParserBuilder beanFieldVisibility(Visibility value) {
196      super.beanFieldVisibility(value);
197      return this;
198   }
199
200   @Override /* BeanContextBuilder */
201   public HtmlParserBuilder beanMethodVisibility(Visibility value) {
202      super.beanMethodVisibility(value);
203      return this;
204   }
205
206   @Override /* BeanContextBuilder */
207   public HtmlParserBuilder useJavaBeanIntrospector(boolean value) {
208      super.useJavaBeanIntrospector(value);
209      return this;
210   }
211
212   @Override /* BeanContextBuilder */
213   public HtmlParserBuilder useJavaBeanIntrospector() {
214      super.useJavaBeanIntrospector();
215      return this;
216   }
217
218   @Override /* BeanContextBuilder */
219   public HtmlParserBuilder useInterfaceProxies(boolean value) {
220      super.useInterfaceProxies(value);
221      return this;
222   }
223
224   @Override /* BeanContextBuilder */
225   public HtmlParserBuilder ignoreUnknownBeanProperties(boolean value) {
226      super.ignoreUnknownBeanProperties(value);
227      return this;
228   }
229
230   @Override /* BeanContextBuilder */
231   public HtmlParserBuilder ignoreUnknownBeanProperties() {
232      super.ignoreUnknownBeanProperties();
233      return this;
234   }
235
236   @Override /* BeanContextBuilder */
237   public HtmlParserBuilder ignoreUnknownNullBeanProperties(boolean value) {
238      super.ignoreUnknownNullBeanProperties(value);
239      return this;
240   }
241
242   @Override /* BeanContextBuilder */
243   public HtmlParserBuilder ignorePropertiesWithoutSetters(boolean value) {
244      super.ignorePropertiesWithoutSetters(value);
245      return this;
246   }
247
248   @Override /* BeanContextBuilder */
249   public HtmlParserBuilder ignoreInvocationExceptionsOnGetters(boolean value) {
250      super.ignoreInvocationExceptionsOnGetters(value);
251      return this;
252   }
253
254   @Override /* BeanContextBuilder */
255   public HtmlParserBuilder ignoreInvocationExceptionsOnGetters() {
256      super.ignoreInvocationExceptionsOnGetters();
257      return this;
258   }
259
260   @Override /* BeanContextBuilder */
261   public HtmlParserBuilder ignoreInvocationExceptionsOnSetters(boolean value) {
262      super.ignoreInvocationExceptionsOnSetters(value);
263      return this;
264   }
265
266   @Override /* BeanContextBuilder */
267   public HtmlParserBuilder ignoreInvocationExceptionsOnSetters() {
268      super.ignoreInvocationExceptionsOnSetters();
269      return this;
270   }
271
272   @Override /* BeanContextBuilder */
273   public HtmlParserBuilder sortProperties(boolean value) {
274      super.sortProperties(value);
275      return this;
276   }
277
278   @Override /* BeanContextBuilder */
279   public HtmlParserBuilder sortProperties() {
280      super.sortProperties();
281      return this;
282   }
283
284   @Override /* BeanContextBuilder */
285   public HtmlParserBuilder notBeanPackages(Object...values) {
286      super.notBeanPackages(values);
287      return this;
288   }
289
290   @Override /* BeanContextBuilder */
291   public HtmlParserBuilder notBeanPackages(String...values) {
292      super.notBeanPackages(values);
293      return this;
294   }
295
296   @Override /* BeanContextBuilder */
297   public HtmlParserBuilder notBeanPackages(boolean append, Object...values) {
298      super.notBeanPackages(append, values);
299      return this;
300   }
301
302   @Override /* BeanContextBuilder */
303   public HtmlParserBuilder notBeanPackagesRemove(Object...values) {
304      super.notBeanPackagesRemove(values);
305      return this;
306   }
307
308   @Override /* BeanContextBuilder */
309   public HtmlParserBuilder notBeanClasses(Object...values) {
310      super.notBeanClasses(values);
311      return this;
312   }
313
314   @Override /* BeanContextBuilder */
315   public HtmlParserBuilder notBeanClasses(Class<?>...values) {
316      super.notBeanClasses(values);
317      return this;
318   }
319
320   @Override /* BeanContextBuilder */
321   public HtmlParserBuilder notBeanClasses(boolean append, Object...values) {
322      super.notBeanClasses(append, values);
323      return this;
324   }
325
326   @Override /* BeanContextBuilder */
327   public HtmlParserBuilder notBeanClassesRemove(Object...values) {
328      super.notBeanClassesRemove(values);
329      return this;
330   }
331
332   @Override /* BeanContextBuilder */
333   public HtmlParserBuilder beanFilters(Object...values) {
334      super.beanFilters(values);
335      return this;
336   }
337
338   @Override /* BeanContextBuilder */
339   public HtmlParserBuilder beanFilters(Class<?>...values) {
340      super.beanFilters(values);
341      return this;
342   }
343
344   @Override /* BeanContextBuilder */
345   public HtmlParserBuilder beanFilters(boolean append, Object...values) {
346      super.beanFilters(append, values);
347      return this;
348   }
349
350   @Override /* BeanContextBuilder */
351   public HtmlParserBuilder beanFiltersRemove(Object...values) {
352      super.beanFiltersRemove(values);
353      return this;
354   }
355
356   @Override /* BeanContextBuilder */
357   public HtmlParserBuilder pojoSwaps(Object...values) {
358      super.pojoSwaps(values);
359      return this;
360   }
361
362   @Override /* BeanContextBuilder */
363   public HtmlParserBuilder pojoSwaps(Class<?>...values) {
364      super.pojoSwaps(values);
365      return this;
366   }
367
368   @Override /* BeanContextBuilder */
369   public HtmlParserBuilder pojoSwaps(boolean append, Object...values) {
370      super.pojoSwaps(append, values);
371      return this;
372   }
373
374   @Override /* BeanContextBuilder */
375   public HtmlParserBuilder pojoSwapsRemove(Object...values) {
376      super.pojoSwapsRemove(values);
377      return this;
378   }
379
380   @Override /* BeanContextBuilder */
381   public HtmlParserBuilder implClasses(Map<String,Class<?>> values) {
382      super.implClasses(values);
383      return this;
384   }
385
386   @Override /* BeanContextBuilder */
387   public <T> HtmlParserBuilder implClass(Class<T> interfaceClass, Class<? extends T> implClass) {
388      super.implClass(interfaceClass, implClass);
389      return this;
390   }
391
392   @Override /* BeanContextBuilder */
393   public HtmlParserBuilder beanDictionary(Object...values) {
394      super.beanDictionary(values);
395      return this;
396   }
397
398   @Override /* BeanContextBuilder */
399   public HtmlParserBuilder beanDictionary(Class<?>...values) {
400      super.beanDictionary(values);
401      return this;
402   }
403
404   @Override /* BeanContextBuilder */
405   public HtmlParserBuilder beanDictionary(boolean append, Object...values) {
406      super.beanDictionary(append, values);
407      return this;
408   }
409
410   @Override /* BeanContextBuilder */
411   public HtmlParserBuilder beanDictionaryRemove(Object...values) {
412      super.beanDictionaryRemove(values);
413      return this;
414   }
415
416   @Override /* BeanContextBuilder */
417   public HtmlParserBuilder beanTypePropertyName(String value) {
418      super.beanTypePropertyName(value);
419      return this;
420   }
421
422   @Override /* BeanContextBuilder */
423   public HtmlParserBuilder locale(Locale value) {
424      super.locale(value);
425      return this;
426   }
427
428   @Override /* BeanContextBuilder */
429   public HtmlParserBuilder timeZone(TimeZone value) {
430      super.timeZone(value);
431      return this;
432   }
433
434   @Override /* BeanContextBuilder */
435   public HtmlParserBuilder mediaType(MediaType value) {
436      super.mediaType(value);
437      return this;
438   }
439
440   @Override /* BeanContextBuilder */
441   public HtmlParserBuilder debug() {
442      super.debug();
443      return this;
444   }
445
446   @Override /* ContextBuilder */
447   public HtmlParserBuilder set(String name, Object value) {
448      super.set(name, value);
449      return this;
450   }
451
452   @Override /* ContextBuilder */
453   public HtmlParserBuilder set(boolean append, String name, Object value) {
454      super.set(append, name, value);
455      return this;
456   }
457
458   @Override /* ContextBuilder */
459   public HtmlParserBuilder set(Map<String,Object> properties) {
460      super.set(properties);
461      return this;
462   }
463
464   @Override /* ContextBuilder */
465   public HtmlParserBuilder add(Map<String,Object> properties) {
466      super.add(properties);
467      return this;
468   }
469
470   @Override /* ContextBuilder */
471   public HtmlParserBuilder addTo(String name, Object value) {
472      super.addTo(name, value);
473      return this;
474   }
475
476   @Override /* ContextBuilder */
477   public HtmlParserBuilder addTo(String name, String key, Object value) {
478      super.addTo(name, key, value);
479      return this;
480   }
481
482   @Override /* ContextBuilder */
483   public HtmlParserBuilder removeFrom(String name, Object value) {
484      super.removeFrom(name, value);
485      return this;
486   }
487
488   @Override /* ContextBuilder */
489   public HtmlParserBuilder apply(PropertyStore copyFrom) {
490      super.apply(copyFrom);
491      return this;
492   }
493}