1 | |
package org.apache.maven.doxia.sink; |
2 | |
|
3 | |
|
4 | |
|
5 | |
|
6 | |
|
7 | |
|
8 | |
|
9 | |
|
10 | |
|
11 | |
|
12 | |
|
13 | |
|
14 | |
|
15 | |
|
16 | |
|
17 | |
|
18 | |
|
19 | |
|
20 | |
|
21 | |
|
22 | |
import javax.swing.text.MutableAttributeSet; |
23 | |
|
24 | |
|
25 | |
|
26 | |
|
27 | |
|
28 | |
|
29 | |
|
30 | |
|
31 | |
|
32 | 206 | public class SinkAdapter |
33 | |
extends AbstractSink |
34 | |
{ |
35 | |
|
36 | |
public void head() |
37 | |
{ |
38 | |
|
39 | 4 | } |
40 | |
|
41 | |
|
42 | |
public void head_() |
43 | |
{ |
44 | |
|
45 | 2 | } |
46 | |
|
47 | |
|
48 | |
public void body() |
49 | |
{ |
50 | |
|
51 | 4 | } |
52 | |
|
53 | |
|
54 | |
public void body_() |
55 | |
{ |
56 | |
|
57 | 2 | } |
58 | |
|
59 | |
|
60 | |
public void section1() |
61 | |
{ |
62 | |
|
63 | 22 | } |
64 | |
|
65 | |
|
66 | |
public void section1_() |
67 | |
{ |
68 | |
|
69 | 4 | } |
70 | |
|
71 | |
|
72 | |
public void section2() |
73 | |
{ |
74 | |
|
75 | 10 | } |
76 | |
|
77 | |
|
78 | |
public void section2_() |
79 | |
{ |
80 | |
|
81 | 4 | } |
82 | |
|
83 | |
|
84 | |
public void section3() |
85 | |
{ |
86 | |
|
87 | 10 | } |
88 | |
|
89 | |
|
90 | |
public void section3_() |
91 | |
{ |
92 | |
|
93 | 4 | } |
94 | |
|
95 | |
|
96 | |
public void section4() |
97 | |
{ |
98 | |
|
99 | 4 | } |
100 | |
|
101 | |
|
102 | |
public void section4_() |
103 | |
{ |
104 | |
|
105 | 4 | } |
106 | |
|
107 | |
|
108 | |
public void section5() |
109 | |
{ |
110 | |
|
111 | 4 | } |
112 | |
|
113 | |
|
114 | |
public void section5_() |
115 | |
{ |
116 | |
|
117 | 4 | } |
118 | |
|
119 | |
|
120 | |
public void list() |
121 | |
{ |
122 | |
|
123 | 4 | } |
124 | |
|
125 | |
|
126 | |
public void list_() |
127 | |
{ |
128 | |
|
129 | 2 | } |
130 | |
|
131 | |
|
132 | |
public void listItem() |
133 | |
{ |
134 | |
|
135 | 4 | } |
136 | |
|
137 | |
|
138 | |
public void listItem_() |
139 | |
{ |
140 | |
|
141 | 2 | } |
142 | |
|
143 | |
|
144 | |
public void numberedList( int numbering ) |
145 | |
{ |
146 | |
|
147 | 4 | } |
148 | |
|
149 | |
|
150 | |
public void numberedList_() |
151 | |
{ |
152 | |
|
153 | 2 | } |
154 | |
|
155 | |
|
156 | |
public void numberedListItem() |
157 | |
{ |
158 | |
|
159 | 4 | } |
160 | |
|
161 | |
|
162 | |
public void numberedListItem_() |
163 | |
{ |
164 | |
|
165 | 2 | } |
166 | |
|
167 | |
|
168 | |
public void definitionList() |
169 | |
{ |
170 | |
|
171 | 4 | } |
172 | |
|
173 | |
|
174 | |
public void definitionList_() |
175 | |
{ |
176 | |
|
177 | 2 | } |
178 | |
|
179 | |
|
180 | |
public void definitionListItem() |
181 | |
{ |
182 | |
|
183 | 4 | } |
184 | |
|
185 | |
|
186 | |
public void definitionListItem_() |
187 | |
{ |
188 | |
|
189 | 2 | } |
190 | |
|
191 | |
|
192 | |
public void definition() |
193 | |
{ |
194 | |
|
195 | 4 | } |
196 | |
|
197 | |
|
198 | |
public void definition_() |
199 | |
{ |
200 | |
|
201 | 2 | } |
202 | |
|
203 | |
|
204 | |
public void figure() |
205 | |
{ |
206 | |
|
207 | 4 | } |
208 | |
|
209 | |
|
210 | |
public void figure_() |
211 | |
{ |
212 | |
|
213 | 2 | } |
214 | |
|
215 | |
|
216 | |
public void table() |
217 | |
{ |
218 | |
|
219 | 4 | } |
220 | |
|
221 | |
|
222 | |
public void table_() |
223 | |
{ |
224 | |
|
225 | 2 | } |
226 | |
|
227 | |
|
228 | |
public void tableRows( int[] justification, boolean grid ) |
229 | |
{ |
230 | |
|
231 | 2 | } |
232 | |
|
233 | |
|
234 | |
public void tableRows_() |
235 | |
{ |
236 | |
|
237 | 2 | } |
238 | |
|
239 | |
|
240 | |
public void tableRow() |
241 | |
{ |
242 | |
|
243 | 4 | } |
244 | |
|
245 | |
|
246 | |
public void tableRow_() |
247 | |
{ |
248 | |
|
249 | 2 | } |
250 | |
|
251 | |
|
252 | |
public void title() |
253 | |
{ |
254 | |
|
255 | 4 | } |
256 | |
|
257 | |
|
258 | |
public void title_() |
259 | |
{ |
260 | |
|
261 | 2 | } |
262 | |
|
263 | |
|
264 | |
public void author() |
265 | |
{ |
266 | |
|
267 | 4 | } |
268 | |
|
269 | |
|
270 | |
public void author_() |
271 | |
{ |
272 | |
|
273 | 2 | } |
274 | |
|
275 | |
|
276 | |
public void date() |
277 | |
{ |
278 | |
|
279 | 4 | } |
280 | |
|
281 | |
|
282 | |
public void date_() |
283 | |
{ |
284 | |
|
285 | 2 | } |
286 | |
|
287 | |
|
288 | |
public void sectionTitle() |
289 | |
{ |
290 | |
|
291 | 2 | } |
292 | |
|
293 | |
|
294 | |
public void sectionTitle_() |
295 | |
{ |
296 | |
|
297 | 2 | } |
298 | |
|
299 | |
|
300 | |
public void sectionTitle1() |
301 | |
{ |
302 | |
|
303 | 6 | } |
304 | |
|
305 | |
|
306 | |
public void sectionTitle1_() |
307 | |
{ |
308 | |
|
309 | 6 | } |
310 | |
|
311 | |
|
312 | |
public void sectionTitle2() |
313 | |
{ |
314 | |
|
315 | 4 | } |
316 | |
|
317 | |
|
318 | |
public void sectionTitle2_() |
319 | |
{ |
320 | |
|
321 | 4 | } |
322 | |
|
323 | |
|
324 | |
public void sectionTitle3() |
325 | |
{ |
326 | |
|
327 | 4 | } |
328 | |
|
329 | |
|
330 | |
public void sectionTitle3_() |
331 | |
{ |
332 | |
|
333 | 4 | } |
334 | |
|
335 | |
|
336 | |
public void sectionTitle4() |
337 | |
{ |
338 | |
|
339 | 4 | } |
340 | |
|
341 | |
|
342 | |
public void sectionTitle4_() |
343 | |
{ |
344 | |
|
345 | 4 | } |
346 | |
|
347 | |
|
348 | |
public void sectionTitle5() |
349 | |
{ |
350 | |
|
351 | 4 | } |
352 | |
|
353 | |
|
354 | |
public void sectionTitle5_() |
355 | |
{ |
356 | |
|
357 | 4 | } |
358 | |
|
359 | |
|
360 | |
public void paragraph() |
361 | |
{ |
362 | |
|
363 | 4 | } |
364 | |
|
365 | |
|
366 | |
public void paragraph_() |
367 | |
{ |
368 | |
|
369 | 2 | } |
370 | |
|
371 | |
|
372 | |
public void verbatim( boolean boxed ) |
373 | |
{ |
374 | |
|
375 | 4 | } |
376 | |
|
377 | |
|
378 | |
public void verbatim_() |
379 | |
{ |
380 | |
|
381 | 2 | } |
382 | |
|
383 | |
|
384 | |
public void definedTerm() |
385 | |
{ |
386 | |
|
387 | 4 | } |
388 | |
|
389 | |
|
390 | |
public void definedTerm_() |
391 | |
{ |
392 | |
|
393 | 2 | } |
394 | |
|
395 | |
|
396 | |
public void figureCaption() |
397 | |
{ |
398 | |
|
399 | 4 | } |
400 | |
|
401 | |
|
402 | |
public void figureCaption_() |
403 | |
{ |
404 | |
|
405 | 2 | } |
406 | |
|
407 | |
|
408 | |
public void tableCell() |
409 | |
{ |
410 | |
|
411 | 4 | } |
412 | |
|
413 | |
|
414 | |
public void tableCell( String width ) |
415 | |
{ |
416 | |
|
417 | 2 | } |
418 | |
|
419 | |
|
420 | |
public void tableCell_() |
421 | |
{ |
422 | |
|
423 | 2 | } |
424 | |
|
425 | |
|
426 | |
public void tableHeaderCell() |
427 | |
{ |
428 | |
|
429 | 4 | } |
430 | |
|
431 | |
|
432 | |
public void tableHeaderCell( String width ) |
433 | |
{ |
434 | |
|
435 | 2 | } |
436 | |
|
437 | |
|
438 | |
public void tableHeaderCell_() |
439 | |
{ |
440 | |
|
441 | 2 | } |
442 | |
|
443 | |
|
444 | |
public void tableCaption() |
445 | |
{ |
446 | |
|
447 | 4 | } |
448 | |
|
449 | |
|
450 | |
public void tableCaption_() |
451 | |
{ |
452 | |
|
453 | 2 | } |
454 | |
|
455 | |
|
456 | |
public void figureGraphics( String name ) |
457 | |
{ |
458 | |
|
459 | 4 | } |
460 | |
|
461 | |
|
462 | |
public void horizontalRule() |
463 | |
{ |
464 | |
|
465 | 4 | } |
466 | |
|
467 | |
|
468 | |
public void pageBreak() |
469 | |
{ |
470 | |
|
471 | 2 | } |
472 | |
|
473 | |
|
474 | |
public void anchor( String name ) |
475 | |
{ |
476 | |
|
477 | 4 | } |
478 | |
|
479 | |
|
480 | |
public void anchor_() |
481 | |
{ |
482 | |
|
483 | 2 | } |
484 | |
|
485 | |
|
486 | |
public void link( String name ) |
487 | |
{ |
488 | |
|
489 | 4 | } |
490 | |
|
491 | |
|
492 | |
public void link_() |
493 | |
{ |
494 | |
|
495 | 2 | } |
496 | |
|
497 | |
|
498 | |
public void italic() |
499 | |
{ |
500 | |
|
501 | 4 | } |
502 | |
|
503 | |
|
504 | |
public void italic_() |
505 | |
{ |
506 | |
|
507 | 4 | } |
508 | |
|
509 | |
|
510 | |
public void bold() |
511 | |
{ |
512 | |
|
513 | 4 | } |
514 | |
|
515 | |
|
516 | |
public void bold_() |
517 | |
{ |
518 | |
|
519 | 4 | } |
520 | |
|
521 | |
|
522 | |
public void monospaced() |
523 | |
{ |
524 | |
|
525 | 4 | } |
526 | |
|
527 | |
|
528 | |
public void monospaced_() |
529 | |
{ |
530 | |
|
531 | 4 | } |
532 | |
|
533 | |
|
534 | |
public void lineBreak() |
535 | |
{ |
536 | |
|
537 | 4 | } |
538 | |
|
539 | |
|
540 | |
public void nonBreakingSpace() |
541 | |
{ |
542 | |
|
543 | 2 | } |
544 | |
|
545 | |
|
546 | |
public void text( String text ) |
547 | |
{ |
548 | |
|
549 | 4 | } |
550 | |
|
551 | |
|
552 | |
public void rawText( String text ) |
553 | |
{ |
554 | |
|
555 | 2 | } |
556 | |
|
557 | |
|
558 | |
public void comment( String comment ) |
559 | |
{ |
560 | |
|
561 | 2 | } |
562 | |
|
563 | |
|
564 | |
public void flush() |
565 | |
{ |
566 | |
|
567 | 2 | } |
568 | |
|
569 | |
|
570 | |
public void close() |
571 | |
{ |
572 | |
|
573 | 2 | } |
574 | |
|
575 | |
public void head( SinkEventAttributes attributes ) |
576 | |
{ |
577 | 2 | head(); |
578 | 2 | } |
579 | |
|
580 | |
|
581 | |
public void title( SinkEventAttributes attributes ) |
582 | |
{ |
583 | 2 | title(); |
584 | 2 | } |
585 | |
|
586 | |
|
587 | |
public void author( SinkEventAttributes attributes ) |
588 | |
{ |
589 | 2 | author(); |
590 | 2 | } |
591 | |
|
592 | |
|
593 | |
public void date( SinkEventAttributes attributes ) |
594 | |
{ |
595 | 2 | date(); |
596 | 2 | } |
597 | |
|
598 | |
|
599 | |
public void body( SinkEventAttributes attributes ) |
600 | |
{ |
601 | 2 | body(); |
602 | 2 | } |
603 | |
|
604 | |
|
605 | |
public void section( int level, SinkEventAttributes attributes ) |
606 | |
{ |
607 | 42 | if ( level == SECTION_LEVEL_1 ) |
608 | |
{ |
609 | 20 | section1(); |
610 | |
} |
611 | 22 | else if ( level == SECTION_LEVEL_2 ) |
612 | |
{ |
613 | 8 | section2(); |
614 | |
} |
615 | 14 | else if ( level == SECTION_LEVEL_3 ) |
616 | |
{ |
617 | 8 | section3(); |
618 | |
} |
619 | 6 | else if ( level == SECTION_LEVEL_4 ) |
620 | |
{ |
621 | 2 | section4(); |
622 | |
} |
623 | 4 | else if ( level == SECTION_LEVEL_5 ) |
624 | |
{ |
625 | 2 | section5(); |
626 | |
} |
627 | 42 | } |
628 | |
|
629 | |
|
630 | |
public void section_( int level ) |
631 | |
{ |
632 | 12 | if ( level == SECTION_LEVEL_1 ) |
633 | |
{ |
634 | 2 | section1_(); |
635 | |
} |
636 | 10 | else if ( level == SECTION_LEVEL_2 ) |
637 | |
{ |
638 | 2 | section2_(); |
639 | |
} |
640 | 8 | else if ( level == SECTION_LEVEL_3 ) |
641 | |
{ |
642 | 2 | section3_(); |
643 | |
} |
644 | 6 | else if ( level == SECTION_LEVEL_4 ) |
645 | |
{ |
646 | 2 | section4_(); |
647 | |
} |
648 | 4 | else if ( level == SECTION_LEVEL_5 ) |
649 | |
{ |
650 | 2 | section5_(); |
651 | |
} |
652 | 12 | } |
653 | |
|
654 | |
|
655 | |
public void sectionTitle( int level, SinkEventAttributes attributes ) |
656 | |
{ |
657 | 42 | if ( level == SECTION_LEVEL_1 ) |
658 | |
{ |
659 | 22 | sectionTitle1(); |
660 | |
} |
661 | 20 | else if ( level == SECTION_LEVEL_2 ) |
662 | |
{ |
663 | 8 | sectionTitle2(); |
664 | |
} |
665 | 12 | else if ( level == SECTION_LEVEL_3 ) |
666 | |
{ |
667 | 8 | sectionTitle3(); |
668 | |
} |
669 | 4 | else if ( level == SECTION_LEVEL_4 ) |
670 | |
{ |
671 | 2 | sectionTitle4(); |
672 | |
} |
673 | 2 | else if ( level == SECTION_LEVEL_5 ) |
674 | |
{ |
675 | 2 | sectionTitle5(); |
676 | |
} |
677 | 42 | } |
678 | |
|
679 | |
|
680 | |
public void sectionTitle_( int level ) |
681 | |
{ |
682 | 12 | if ( level == SECTION_LEVEL_1 ) |
683 | |
{ |
684 | 4 | sectionTitle1_(); |
685 | |
} |
686 | 8 | else if ( level == SECTION_LEVEL_2 ) |
687 | |
{ |
688 | 2 | sectionTitle2_(); |
689 | |
} |
690 | 6 | else if ( level == SECTION_LEVEL_3 ) |
691 | |
{ |
692 | 2 | sectionTitle3_(); |
693 | |
} |
694 | 4 | else if ( level == SECTION_LEVEL_4 ) |
695 | |
{ |
696 | 2 | sectionTitle4_(); |
697 | |
} |
698 | 2 | else if ( level == SECTION_LEVEL_5 ) |
699 | |
{ |
700 | 2 | sectionTitle5_(); |
701 | |
} |
702 | 12 | } |
703 | |
|
704 | |
|
705 | |
public void list( SinkEventAttributes attributes ) |
706 | |
{ |
707 | 2 | list(); |
708 | 2 | } |
709 | |
|
710 | |
|
711 | |
public void listItem( SinkEventAttributes attributes ) |
712 | |
{ |
713 | 2 | listItem(); |
714 | 2 | } |
715 | |
|
716 | |
|
717 | |
public void numberedList( int numbering, SinkEventAttributes attributes ) |
718 | |
{ |
719 | 2 | numberedList( numbering ); |
720 | 2 | } |
721 | |
|
722 | |
|
723 | |
public void numberedListItem( SinkEventAttributes attributes ) |
724 | |
{ |
725 | 2 | numberedListItem(); |
726 | 2 | } |
727 | |
|
728 | |
|
729 | |
public void definitionList( SinkEventAttributes attributes ) |
730 | |
{ |
731 | 2 | definitionList(); |
732 | 2 | } |
733 | |
|
734 | |
|
735 | |
public void definitionListItem( SinkEventAttributes attributes ) |
736 | |
{ |
737 | 2 | definitionListItem(); |
738 | 2 | } |
739 | |
|
740 | |
|
741 | |
public void definition( SinkEventAttributes attributes ) |
742 | |
{ |
743 | 2 | definition(); |
744 | 2 | } |
745 | |
|
746 | |
|
747 | |
public void definedTerm( SinkEventAttributes attributes ) |
748 | |
{ |
749 | 2 | definedTerm(); |
750 | 2 | } |
751 | |
|
752 | |
|
753 | |
public void figure( SinkEventAttributes attributes ) |
754 | |
{ |
755 | 2 | figure(); |
756 | 2 | } |
757 | |
|
758 | |
|
759 | |
public void figureCaption( SinkEventAttributes attributes ) |
760 | |
{ |
761 | 2 | figureCaption(); |
762 | 2 | } |
763 | |
|
764 | |
|
765 | |
public void figureGraphics( String src, SinkEventAttributes attributes ) |
766 | |
{ |
767 | 2 | figureGraphics( src ); |
768 | 2 | } |
769 | |
|
770 | |
|
771 | |
public void table( SinkEventAttributes attributes ) |
772 | |
{ |
773 | 2 | table(); |
774 | 2 | } |
775 | |
|
776 | |
|
777 | |
public void tableRow( SinkEventAttributes attributes ) |
778 | |
{ |
779 | 2 | tableRow(); |
780 | 2 | } |
781 | |
|
782 | |
|
783 | |
public void tableCell( SinkEventAttributes attributes ) |
784 | |
{ |
785 | 2 | tableCell(); |
786 | 2 | } |
787 | |
|
788 | |
|
789 | |
public void tableHeaderCell( SinkEventAttributes attributes ) |
790 | |
{ |
791 | 2 | tableHeaderCell(); |
792 | 2 | } |
793 | |
|
794 | |
|
795 | |
public void tableCaption( SinkEventAttributes attributes ) |
796 | |
{ |
797 | 2 | tableCaption(); |
798 | 2 | } |
799 | |
|
800 | |
|
801 | |
public void paragraph( SinkEventAttributes attributes ) |
802 | |
{ |
803 | 2 | paragraph(); |
804 | 2 | } |
805 | |
|
806 | |
|
807 | |
public void verbatim( SinkEventAttributes attributes ) |
808 | |
{ |
809 | 2 | MutableAttributeSet atts = SinkUtils.filterAttributes( attributes, SinkUtils.SINK_VERBATIM_ATTRIBUTES ); |
810 | |
|
811 | 2 | boolean boxed = false; |
812 | |
|
813 | 2 | if ( atts != null && atts.isDefined( SinkEventAttributes.DECORATION ) ) |
814 | |
{ |
815 | 0 | boxed = "boxed".equals( atts.getAttribute( SinkEventAttributes.DECORATION ).toString() ); |
816 | |
} |
817 | |
|
818 | 2 | verbatim( boxed ); |
819 | 2 | } |
820 | |
|
821 | |
|
822 | |
public void horizontalRule( SinkEventAttributes attributes ) |
823 | |
{ |
824 | 2 | horizontalRule(); |
825 | 2 | } |
826 | |
|
827 | |
|
828 | |
public void anchor( String name, SinkEventAttributes attributes ) |
829 | |
{ |
830 | 2 | anchor( name ); |
831 | 2 | } |
832 | |
|
833 | |
|
834 | |
public void link( String name, SinkEventAttributes attributes ) |
835 | |
{ |
836 | 2 | link( name ); |
837 | 2 | } |
838 | |
|
839 | |
|
840 | |
public void lineBreak( SinkEventAttributes attributes ) |
841 | |
{ |
842 | 2 | lineBreak(); |
843 | 2 | } |
844 | |
|
845 | |
|
846 | |
public void text( String text, SinkEventAttributes attributes ) |
847 | |
{ |
848 | 38 | text( text ); |
849 | 38 | } |
850 | |
|
851 | |
|
852 | |
public void unknown( String name, Object[] requiredParams, SinkEventAttributes attributes ) |
853 | |
{ |
854 | |
|
855 | 2 | } |
856 | |
} |