View Javadoc
1   /*
2    * Licensed to the Apache Software Foundation (ASF) under one
3    * or more contributor license agreements.  See the NOTICE file
4    * distributed with this work for additional information
5    * regarding copyright ownership.  The ASF licenses this file
6    * to you under the Apache License, Version 2.0 (the
7    * "License"); you may not use this file except in compliance
8    * with the License.  You may obtain a copy of the License at
9    *
10   *   http://www.apache.org/licenses/LICENSE-2.0
11   *
12   * Unless required by applicable law or agreed to in writing,
13   * software distributed under the License is distributed on an
14   * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15   * KIND, either express or implied.  See the License for the
16   * specific language governing permissions and limitations
17   * under the License.
18   */
19  package org.apache.maven.doxia.sink.impl;
20  
21  import org.apache.maven.doxia.sink.SinkEventAttributes;
22  
23  /**
24   * Empty implementation of the <code>Sink</code> interface. Useful for testing purposes.
25   *
26   * @since 1.0
27   * @author <a href="mailto:jason@maven.org">Jason van Zyl</a>
28   * @author <a href="mailto:vincent.siveton@gmail.com">Vincent Siveton</a>
29   */
30  public class SinkAdapter extends AbstractSink {
31      /** {@inheritDoc} */
32      @Override
33      public void head() {
34          // nop
35      }
36  
37      /** {@inheritDoc} */
38      @Override
39      public void head_() {
40          // nop
41      }
42  
43      /** {@inheritDoc} */
44      @Override
45      public void body() {
46          // nop
47      }
48  
49      /** {@inheritDoc} */
50      @Override
51      public void body_() {
52          // nop
53      }
54  
55      /** {@inheritDoc} */
56      @Override
57      public void article() {
58          // nop
59      }
60  
61      /** {@inheritDoc} */
62      @Override
63      public void article_() {
64          // nop
65      }
66  
67      /** {@inheritDoc} */
68      @Override
69      public void navigation() {
70          // nop
71      }
72  
73      /** {@inheritDoc} */
74      @Override
75      public void navigation_() {
76          // nop
77      }
78  
79      /** {@inheritDoc} */
80      @Override
81      public void sidebar() {
82          // nop
83      }
84  
85      /** {@inheritDoc} */
86      @Override
87      public void sidebar_() {
88          // nop
89      }
90  
91      /** {@inheritDoc} */
92      @Override
93      public void section1() {
94          // nop
95      }
96  
97      /** {@inheritDoc} */
98      @Override
99      public void section1_() {
100         // nop
101     }
102 
103     /** {@inheritDoc} */
104     @Override
105     public void section2() {
106         // nop
107     }
108 
109     /** {@inheritDoc} */
110     @Override
111     public void section2_() {
112         // nop
113     }
114 
115     /** {@inheritDoc} */
116     @Override
117     public void section3() {
118         // nop
119     }
120 
121     /** {@inheritDoc} */
122     @Override
123     public void section3_() {
124         // nop
125     }
126 
127     /** {@inheritDoc} */
128     @Override
129     public void section4() {
130         // nop
131     }
132 
133     /** {@inheritDoc} */
134     @Override
135     public void section4_() {
136         // nop
137     }
138 
139     /** {@inheritDoc} */
140     @Override
141     public void section5() {
142         // nop
143     }
144 
145     /** {@inheritDoc} */
146     @Override
147     public void section5_() {
148         // nop
149     }
150 
151     /** {@inheritDoc} */
152     @Override
153     public void list() {
154         // nop
155     }
156 
157     /** {@inheritDoc} */
158     @Override
159     public void list_() {
160         // nop
161     }
162 
163     /** {@inheritDoc} */
164     @Override
165     public void listItem() {
166         // nop
167     }
168 
169     /** {@inheritDoc} */
170     @Override
171     public void listItem_() {
172         // nop
173     }
174 
175     /** {@inheritDoc} */
176     @Override
177     public void numberedList(int numbering) {
178         // nop
179     }
180 
181     /** {@inheritDoc} */
182     @Override
183     public void numberedList_() {
184         // nop
185     }
186 
187     /** {@inheritDoc} */
188     @Override
189     public void numberedListItem() {
190         // nop
191     }
192 
193     /** {@inheritDoc} */
194     @Override
195     public void numberedListItem_() {
196         // nop
197     }
198 
199     /** {@inheritDoc} */
200     @Override
201     public void definitionList() {
202         // nop
203     }
204 
205     /** {@inheritDoc} */
206     @Override
207     public void definitionList_() {
208         // nop
209     }
210 
211     /** {@inheritDoc} */
212     @Override
213     public void definitionListItem() {
214         // nop
215     }
216 
217     /** {@inheritDoc} */
218     @Override
219     public void definitionListItem_() {
220         // nop
221     }
222 
223     /** {@inheritDoc} */
224     @Override
225     public void definition() {
226         // nop
227     }
228 
229     /** {@inheritDoc} */
230     @Override
231     public void definition_() {
232         // nop
233     }
234 
235     /** {@inheritDoc} */
236     @Override
237     public void figure() {
238         // nop
239     }
240 
241     /** {@inheritDoc} */
242     @Override
243     public void figure_() {
244         // nop
245     }
246 
247     /** {@inheritDoc} */
248     @Override
249     public void table() {
250         // nop
251     }
252 
253     /** {@inheritDoc} */
254     @Override
255     public void table_() {
256         // nop
257     }
258 
259     /** {@inheritDoc} */
260     @Override
261     public void tableRows() {
262         // nop
263     }
264 
265     /** {@inheritDoc} */
266     @Override
267     public void tableRows_() {
268         // nop
269     }
270 
271     /** {@inheritDoc} */
272     @Override
273     public void tableRow() {
274         // nop
275     }
276 
277     /** {@inheritDoc} */
278     @Override
279     public void tableRow_() {
280         // nop
281     }
282 
283     /** {@inheritDoc} */
284     @Override
285     public void title() {
286         // nop
287     }
288 
289     /** {@inheritDoc} */
290     @Override
291     public void title_() {
292         // nop
293     }
294 
295     /** {@inheritDoc} */
296     @Override
297     public void author() {
298         // nop
299     }
300 
301     /** {@inheritDoc} */
302     @Override
303     public void author_() {
304         // nop
305     }
306 
307     /** {@inheritDoc} */
308     @Override
309     public void date() {
310         // nop
311     }
312 
313     /** {@inheritDoc} */
314     @Override
315     public void date_() {
316         // nop
317     }
318 
319     /** {@inheritDoc} */
320     @Override
321     public void sectionTitle() {
322         // nop
323     }
324 
325     /** {@inheritDoc} */
326     @Override
327     public void sectionTitle_() {
328         // nop
329     }
330 
331     /** {@inheritDoc} */
332     @Override
333     public void sectionTitle1() {
334         // nop
335     }
336 
337     /** {@inheritDoc} */
338     @Override
339     public void sectionTitle1_() {
340         // nop
341     }
342 
343     /** {@inheritDoc} */
344     @Override
345     public void sectionTitle2() {
346         // nop
347     }
348 
349     /** {@inheritDoc} */
350     @Override
351     public void sectionTitle2_() {
352         // nop
353     }
354 
355     /** {@inheritDoc} */
356     @Override
357     public void sectionTitle3() {
358         // nop
359     }
360 
361     /** {@inheritDoc} */
362     @Override
363     public void sectionTitle3_() {
364         // nop
365     }
366 
367     /** {@inheritDoc} */
368     @Override
369     public void sectionTitle4() {
370         // nop
371     }
372 
373     /** {@inheritDoc} */
374     @Override
375     public void sectionTitle4_() {
376         // nop
377     }
378 
379     /** {@inheritDoc} */
380     @Override
381     public void sectionTitle5() {
382         // nop
383     }
384 
385     /** {@inheritDoc} */
386     @Override
387     public void sectionTitle5_() {
388         // nop
389     }
390 
391     /** {@inheritDoc} */
392     @Override
393     public void header() {
394         // nop
395     }
396 
397     /** {@inheritDoc} */
398     @Override
399     public void header_() {
400         // nop
401     }
402 
403     /** {@inheritDoc} */
404     @Override
405     public void content() {
406         // nop
407     }
408 
409     /** {@inheritDoc} */
410     @Override
411     public void content_() {
412         // nop
413     }
414 
415     /** {@inheritDoc} */
416     @Override
417     public void footer() {
418         // nop
419     }
420 
421     /** {@inheritDoc} */
422     @Override
423     public void footer_() {
424         // nop
425     }
426 
427     /** {@inheritDoc} */
428     @Override
429     public void paragraph() {
430         // nop
431     }
432 
433     /** {@inheritDoc} */
434     @Override
435     public void paragraph_() {
436         // nop
437     }
438 
439     /** {@inheritDoc} */
440     @Override
441     public void data(String value) {
442         // nop
443     }
444 
445     /** {@inheritDoc} */
446     @Override
447     public void data_() {
448         // nop
449     }
450 
451     /** {@inheritDoc} */
452     @Override
453     public void time(String datetime) {
454         // nop
455     }
456 
457     /** {@inheritDoc} */
458     @Override
459     public void time_() {
460         // nop
461     }
462 
463     /** {@inheritDoc} */
464     @Override
465     public void address() {
466         // nop
467     }
468 
469     /** {@inheritDoc} */
470     @Override
471     public void address_() {
472         // nop
473     }
474 
475     /** {@inheritDoc} */
476     @Override
477     public void blockquote() {
478         // nop
479     }
480 
481     /** {@inheritDoc} */
482     @Override
483     public void blockquote_() {
484         // nop
485     }
486 
487     /** {@inheritDoc} */
488     @Override
489     public void division() {
490         // nop
491     }
492 
493     /** {@inheritDoc} */
494     @Override
495     public void division_() {
496         // nop
497     }
498 
499     /** {@inheritDoc} */
500     @Override
501     public void verbatim_() {
502         // nop
503     }
504 
505     /** {@inheritDoc} */
506     @Override
507     public void definedTerm() {
508         // nop
509     }
510 
511     /** {@inheritDoc} */
512     @Override
513     public void definedTerm_() {
514         // nop
515     }
516 
517     /** {@inheritDoc} */
518     @Override
519     public void figureCaption() {
520         // nop
521     }
522 
523     /** {@inheritDoc} */
524     @Override
525     public void figureCaption_() {
526         // nop
527     }
528 
529     /** {@inheritDoc} */
530     @Override
531     public void tableCell() {
532         // nop
533     }
534 
535     /** {@inheritDoc} */
536     @Override
537     public void tableCell_() {
538         // nop
539     }
540 
541     /** {@inheritDoc} */
542     @Override
543     public void tableHeaderCell() {
544         // nop
545     }
546 
547     /** {@inheritDoc} */
548     @Override
549     public void tableHeaderCell_() {
550         // nop
551     }
552 
553     /** {@inheritDoc} */
554     @Override
555     public void tableCaption() {
556         // nop
557     }
558 
559     /** {@inheritDoc} */
560     @Override
561     public void tableCaption_() {
562         // nop
563     }
564 
565     /** {@inheritDoc} */
566     @Override
567     public void figureGraphics(String name) {
568         // nop
569     }
570 
571     /** {@inheritDoc} */
572     @Override
573     public void horizontalRule() {
574         // nop
575     }
576 
577     /** {@inheritDoc} */
578     @Override
579     public void pageBreak() {
580         // nop
581     }
582 
583     /** {@inheritDoc} */
584     @Override
585     public void anchor(String name) {
586         // nop
587     }
588 
589     /** {@inheritDoc} */
590     @Override
591     public void anchor_() {
592         // nop
593     }
594 
595     /** {@inheritDoc} */
596     @Override
597     public void link(String name) {
598         // nop
599     }
600 
601     /** {@inheritDoc} */
602     @Override
603     public void link_() {
604         // nop
605     }
606 
607     /** {@inheritDoc} */
608     @Override
609     public void inline() {
610         // nop
611     }
612 
613     /** {@inheritDoc} */
614     @Override
615     public void inline_() {
616         // nop
617     }
618 
619     /** {@inheritDoc} */
620     @Override
621     public void italic() {
622         // nop
623     }
624 
625     /** {@inheritDoc} */
626     @Override
627     public void italic_() {
628         // nop
629     }
630 
631     /** {@inheritDoc} */
632     @Override
633     public void bold() {
634         // nop
635     }
636 
637     /** {@inheritDoc} */
638     @Override
639     public void bold_() {
640         // nop
641     }
642 
643     /** {@inheritDoc} */
644     @Override
645     public void monospaced() {
646         // nop
647     }
648 
649     /** {@inheritDoc} */
650     @Override
651     public void monospaced_() {
652         // nop
653     }
654 
655     /** {@inheritDoc} */
656     @Override
657     public void lineBreak() {
658         // nop
659     }
660 
661     /** {@inheritDoc} */
662     @Override
663     public void lineBreakOpportunity() {
664         // nop
665     }
666 
667     /** {@inheritDoc} */
668     @Override
669     public void nonBreakingSpace() {
670         // nop
671     }
672 
673     /** {@inheritDoc} */
674     @Override
675     public void text(String text) {
676         // nop
677     }
678 
679     /** {@inheritDoc} */
680     @Override
681     public void rawText(String text) {
682         // nop
683     }
684 
685     /** {@inheritDoc} */
686     @Override
687     public void comment(String comment) {
688         // nop
689     }
690 
691     /** {@inheritDoc} */
692     @Override
693     public void flush() {
694         // nop
695     }
696 
697     /** {@inheritDoc} */
698     @Override
699     public void close() {
700         // nop
701     }
702 
703     /** {@inheritDoc} */
704     @Override
705     public void verbatim() {
706         // nop
707     }
708 
709     /** {@inheritDoc} */
710     @Override
711     public void head(SinkEventAttributes attributes) {
712         head();
713     }
714 
715     /** {@inheritDoc} */
716     @Override
717     public void title(SinkEventAttributes attributes) {
718         title();
719     }
720 
721     /** {@inheritDoc} */
722     @Override
723     public void author(SinkEventAttributes attributes) {
724         author();
725     }
726 
727     /** {@inheritDoc} */
728     @Override
729     public void date(SinkEventAttributes attributes) {
730         date();
731     }
732 
733     /** {@inheritDoc} */
734     @Override
735     public void body(SinkEventAttributes attributes) {
736         body();
737     }
738 
739     /** {@inheritDoc} */
740     @Override
741     public void article(SinkEventAttributes attributes) {
742         article();
743     }
744 
745     /** {@inheritDoc} */
746     @Override
747     public void navigation(SinkEventAttributes attributes) {
748         navigation();
749     }
750 
751     /** {@inheritDoc} */
752     @Override
753     public void sidebar(SinkEventAttributes attributes) {
754         sidebar();
755     }
756 
757     /** {@inheritDoc} */
758     @Override
759     public void section(int level, SinkEventAttributes attributes) {
760         if (level == SECTION_LEVEL_1) {
761             section1();
762         } else if (level == SECTION_LEVEL_2) {
763             section2();
764         } else if (level == SECTION_LEVEL_3) {
765             section3();
766         } else if (level == SECTION_LEVEL_4) {
767             section4();
768         } else if (level == SECTION_LEVEL_5) {
769             section5();
770         }
771     }
772 
773     /** {@inheritDoc} */
774     @Override
775     public void section_(int level) {
776         if (level == SECTION_LEVEL_1) {
777             section1_();
778         } else if (level == SECTION_LEVEL_2) {
779             section2_();
780         } else if (level == SECTION_LEVEL_3) {
781             section3_();
782         } else if (level == SECTION_LEVEL_4) {
783             section4_();
784         } else if (level == SECTION_LEVEL_5) {
785             section5_();
786         }
787     }
788 
789     /** {@inheritDoc} */
790     @Override
791     public void sectionTitle(int level, SinkEventAttributes attributes) {
792         if (level == SECTION_LEVEL_1) {
793             sectionTitle1();
794         } else if (level == SECTION_LEVEL_2) {
795             sectionTitle2();
796         } else if (level == SECTION_LEVEL_3) {
797             sectionTitle3();
798         } else if (level == SECTION_LEVEL_4) {
799             sectionTitle4();
800         } else if (level == SECTION_LEVEL_5) {
801             sectionTitle5();
802         }
803     }
804 
805     /** {@inheritDoc} */
806     @Override
807     public void sectionTitle_(int level) {
808         if (level == SECTION_LEVEL_1) {
809             sectionTitle1_();
810         } else if (level == SECTION_LEVEL_2) {
811             sectionTitle2_();
812         } else if (level == SECTION_LEVEL_3) {
813             sectionTitle3_();
814         } else if (level == SECTION_LEVEL_4) {
815             sectionTitle4_();
816         } else if (level == SECTION_LEVEL_5) {
817             sectionTitle5_();
818         }
819     }
820 
821     /** {@inheritDoc} */
822     @Override
823     public void header(SinkEventAttributes attributes) {
824         header();
825     }
826 
827     /** {@inheritDoc} */
828     @Override
829     public void content(SinkEventAttributes attributes) {
830         content();
831     }
832 
833     /** {@inheritDoc} */
834     @Override
835     public void footer(SinkEventAttributes attributes) {
836         footer();
837     }
838 
839     /** {@inheritDoc} */
840     @Override
841     public void list(SinkEventAttributes attributes) {
842         list();
843     }
844 
845     /** {@inheritDoc} */
846     @Override
847     public void listItem(SinkEventAttributes attributes) {
848         listItem();
849     }
850 
851     /** {@inheritDoc} */
852     @Override
853     public void numberedList(int numbering, SinkEventAttributes attributes) {
854         numberedList(numbering);
855     }
856 
857     /** {@inheritDoc} */
858     @Override
859     public void numberedListItem(SinkEventAttributes attributes) {
860         numberedListItem();
861     }
862 
863     /** {@inheritDoc} */
864     @Override
865     public void definitionList(SinkEventAttributes attributes) {
866         definitionList();
867     }
868 
869     /** {@inheritDoc} */
870     @Override
871     public void definitionListItem(SinkEventAttributes attributes) {
872         definitionListItem();
873     }
874 
875     /** {@inheritDoc} */
876     @Override
877     public void definition(SinkEventAttributes attributes) {
878         definition();
879     }
880 
881     /** {@inheritDoc} */
882     @Override
883     public void definedTerm(SinkEventAttributes attributes) {
884         definedTerm();
885     }
886 
887     /** {@inheritDoc} */
888     @Override
889     public void figure(SinkEventAttributes attributes) {
890         figure();
891     }
892 
893     /** {@inheritDoc} */
894     @Override
895     public void figureCaption(SinkEventAttributes attributes) {
896         figureCaption();
897     }
898 
899     /** {@inheritDoc} */
900     @Override
901     public void figureGraphics(String src, SinkEventAttributes attributes) {
902         figureGraphics(src);
903     }
904 
905     /** {@inheritDoc} */
906     @Override
907     public void table(SinkEventAttributes attributes) {
908         table();
909     }
910 
911     /** {@inheritDoc} */
912     @Override
913     public void tableRows(int[] justification, boolean grid) {
914         tableRows();
915     }
916 
917     /** {@inheritDoc} */
918     @Override
919     public void tableRow(SinkEventAttributes attributes) {
920         tableRow();
921     }
922 
923     /** {@inheritDoc} */
924     @Override
925     public void tableCell(SinkEventAttributes attributes) {
926         tableCell();
927     }
928 
929     /** {@inheritDoc} */
930     @Override
931     public void tableHeaderCell(SinkEventAttributes attributes) {
932         tableHeaderCell();
933     }
934 
935     /** {@inheritDoc} */
936     @Override
937     public void tableCaption(SinkEventAttributes attributes) {
938         tableCaption();
939     }
940 
941     /** {@inheritDoc} */
942     @Override
943     public void paragraph(SinkEventAttributes attributes) {
944         paragraph();
945     }
946 
947     /** {@inheritDoc} */
948     @Override
949     public void data(String value, SinkEventAttributes attributes) {
950         data(value);
951     }
952 
953     /** {@inheritDoc} */
954     @Override
955     public void time(String datetime, SinkEventAttributes attributes) {
956         time(datetime);
957     }
958 
959     /** {@inheritDoc} */
960     @Override
961     public void address(SinkEventAttributes attributes) {
962         address();
963     }
964 
965     /** {@inheritDoc} */
966     @Override
967     public void blockquote(SinkEventAttributes attributes) {
968         blockquote();
969     }
970 
971     /** {@inheritDoc} */
972     @Override
973     public void division(SinkEventAttributes attributes) {
974         division();
975     }
976 
977     /** {@inheritDoc} */
978     @Override
979     public void verbatim(SinkEventAttributes attributes) {
980         verbatim();
981     }
982 
983     /** {@inheritDoc} */
984     @Override
985     public void horizontalRule(SinkEventAttributes attributes) {
986         horizontalRule();
987     }
988 
989     /** {@inheritDoc} */
990     @Override
991     public void anchor(String name, SinkEventAttributes attributes) {
992         anchor(name);
993     }
994 
995     /** {@inheritDoc} */
996     @Override
997     public void link(String name, SinkEventAttributes attributes) {
998         link(name);
999     }
1000 
1001     /** {@inheritDoc} */
1002     @Override
1003     public void inline(SinkEventAttributes attributes) {
1004         inline();
1005     }
1006 
1007     /** {@inheritDoc} */
1008     @Override
1009     public void lineBreak(SinkEventAttributes attributes) {
1010         lineBreak();
1011     }
1012 
1013     /** {@inheritDoc} */
1014     @Override
1015     public void lineBreakOpportunity(SinkEventAttributes attributes) {
1016         lineBreakOpportunity();
1017     }
1018 
1019     /** {@inheritDoc} */
1020     @Override
1021     public void text(String text, SinkEventAttributes attributes) {
1022         text(text);
1023     }
1024 
1025     /** {@inheritDoc} */
1026     @Override
1027     public void unknown(String name, Object[] requiredParams, SinkEventAttributes attributes) {
1028         // nop
1029     }
1030 }