View Javadoc
1   package org.apache.maven.doxia.sink.impl;
2   
3   /*
4    * Licensed to the Apache Software Foundation (ASF) under one
5    * or more contributor license agreements.  See the NOTICE file
6    * distributed with this work for additional information
7    * regarding copyright ownership.  The ASF licenses this file
8    * to you under the Apache License, Version 2.0 (the
9    * "License"); you may not use this file except in compliance
10   * with the License.  You may obtain a copy of the License at
11   *
12   *   http://www.apache.org/licenses/LICENSE-2.0
13   *
14   * Unless required by applicable law or agreed to in writing,
15   * software distributed under the License is distributed on an
16   * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17   * KIND, either express or implied.  See the License for the
18   * specific language governing permissions and limitations
19   * under the License.
20   */
21  
22  import java.io.ByteArrayOutputStream;
23  import java.io.File;
24  import java.io.FileOutputStream;
25  import java.io.IOException;
26  import java.io.OutputStream;
27  import java.util.ArrayList;
28  import java.util.List;
29  
30  import org.apache.maven.doxia.sink.Sink;
31  import org.apache.maven.doxia.sink.SinkEventAttributes;
32  import org.apache.maven.doxia.sink.SinkFactory;
33  
34  /**
35   * The RandomAccessSink provides the ability to create a {@link Sink} with hooks.
36   * A page can be prepared by first creating its structure and specifying the positions of these hooks.
37   * After specifying the structure, the page can be filled with content from one or more models.
38   * These hooks can prevent you to have to loop over the model multiple times to build the page as desired.
39   *
40   * @author Robert Scholte
41   * @since 1.3
42   */
43  public class RandomAccessSink
44      implements Sink
45  {
46      private SinkFactory sinkFactory;
47  
48      private String encoding;
49  
50      private OutputStream coreOutputStream;
51  
52      private Sink coreSink;
53  
54      private List<Sink> sinks = new ArrayList<>();
55  
56      private List<ByteArrayOutputStream> outputStreams = new ArrayList<>();
57  
58      private Sink currentSink;
59  
60      /**
61       * <p>Constructor for RandomAccessSink.</p>
62       *
63       * @param sinkFactory a {@link org.apache.maven.doxia.sink.SinkFactory} object.
64       * @param stream a {@link java.io.OutputStream} object.
65       * @throws java.io.IOException if any.
66       */
67      public RandomAccessSink( SinkFactory sinkFactory, OutputStream stream )
68          throws IOException
69      {
70          this.sinkFactory = sinkFactory;
71          this.coreOutputStream = stream;
72          this.currentSink = sinkFactory.createSink( stream );
73          this.coreSink = this.currentSink;
74      }
75  
76      /**
77       * <p>Constructor for RandomAccessSink.</p>
78       *
79       * @param sinkFactory a {@link org.apache.maven.doxia.sink.SinkFactory} object.
80       * @param stream a {@link java.io.OutputStream} object.
81       * @param encoding a {@link java.lang.String} object.
82       * @throws java.io.IOException if any.
83       */
84      public RandomAccessSink( SinkFactory sinkFactory, OutputStream stream, String encoding )
85          throws IOException
86      {
87          this.sinkFactory = sinkFactory;
88          this.coreOutputStream = stream;
89          this.encoding = encoding;
90          this.currentSink = sinkFactory.createSink( stream, encoding );
91          this.coreSink = this.currentSink;
92      }
93  
94      /**
95       * <p>Constructor for RandomAccessSink.</p>
96       *
97       * @param sinkFactory a {@link org.apache.maven.doxia.sink.SinkFactory} object.
98       * @param outputDirectory a {@link java.io.File} object.
99       * @param outputName a {@link java.lang.String} object.
100      * @throws java.io.IOException if any.
101      */
102     public RandomAccessSink( SinkFactory sinkFactory, File outputDirectory, String outputName )
103         throws IOException
104     {
105         this.sinkFactory = sinkFactory;
106         this.coreOutputStream = new FileOutputStream( new File( outputDirectory, outputName ) );
107         this.currentSink = sinkFactory.createSink( coreOutputStream );
108         this.coreSink = this.currentSink;
109     }
110 
111     /**
112      * <p>Constructor for RandomAccessSink.</p>
113      *
114      * @param sinkFactory a {@link org.apache.maven.doxia.sink.SinkFactory} object.
115      * @param outputDirectory a {@link java.io.File} object.
116      * @param outputName a {@link java.lang.String} object.
117      * @param encoding a {@link java.lang.String} object.
118      * @throws java.io.IOException if any.
119      */
120     public RandomAccessSink( SinkFactory sinkFactory, File outputDirectory, String outputName, String encoding )
121         throws IOException
122     {
123         this.sinkFactory = sinkFactory;
124         this.coreOutputStream = new FileOutputStream( new File( outputDirectory, outputName ) );
125         this.encoding = encoding;
126         this.currentSink = sinkFactory.createSink( coreOutputStream, encoding );
127         this.coreSink = this.currentSink;
128     }
129 
130     /** {@inheritDoc} */
131     @Override
132     public void address()
133     {
134         currentSink.address();
135     }
136 
137     /** {@inheritDoc} */
138     @Override
139     public void address( SinkEventAttributes attributes )
140     {
141         currentSink.address( attributes );
142     }
143 
144     /** {@inheritDoc} */
145     @Override
146     public void address_()
147     {
148         currentSink.address_();
149     }
150 
151     /**
152      * By calling this method a sink reference is added at the current position. You can write to both the new sink
153      * reference and the original sink. After flushing all sinks will be flushed in the right order.
154      *
155      * @return a subsink reference you can write to
156      */
157     public Sink addSinkHook()
158     {
159         Sink subSink = null;
160         try
161         {
162             ByteArrayOutputStream subOut = new ByteArrayOutputStream();
163             ByteArrayOutputStream newOut = new ByteArrayOutputStream();
164 
165             outputStreams.add( subOut );
166             outputStreams.add( newOut );
167 
168             if ( encoding != null )
169             {
170                 subSink = sinkFactory.createSink( subOut, encoding );
171                 currentSink = sinkFactory.createSink( newOut, encoding );
172             }
173             else
174             {
175                 subSink = sinkFactory.createSink( subOut );
176                 currentSink = sinkFactory.createSink( newOut );
177             }
178             sinks.add( subSink );
179             sinks.add( currentSink );
180         }
181         catch ( IOException e )
182         {
183             // IOException can only be caused by our own ByteArrayOutputStream
184         }
185         return subSink;
186     }
187 
188     /** {@inheritDoc} */
189     @Override
190     public void anchor( String name )
191     {
192         currentSink.anchor( name );
193     }
194 
195     /** {@inheritDoc} */
196     @Override
197     public void anchor( String name, SinkEventAttributes attributes )
198     {
199         currentSink.anchor( name, attributes );
200     }
201 
202     /** {@inheritDoc} */
203     @Override
204     public void anchor_()
205     {
206         currentSink.anchor_();
207     }
208 
209     /** {@inheritDoc} */
210     @Override
211     public void article()
212     {
213         currentSink.article();
214     }
215 
216     /** {@inheritDoc} */
217     @Override
218     public void article( SinkEventAttributes attributes )
219     {
220         currentSink.article( attributes );
221     }
222 
223     /** {@inheritDoc} */
224     @Override
225     public void article_()
226     {
227         currentSink.article_();
228     }
229 
230     /** {@inheritDoc} */
231     @Override
232     public void author()
233     {
234         currentSink.author();
235     }
236 
237     /** {@inheritDoc} */
238     @Override
239     public void author( SinkEventAttributes attributes )
240     {
241         currentSink.author( attributes );
242     }
243 
244     /** {@inheritDoc} */
245     @Override
246     public void author_()
247     {
248         currentSink.author_();
249     }
250 
251     /** {@inheritDoc} */
252     @Override
253     public void blockquote()
254     {
255         currentSink.blockquote();
256     }
257 
258     /** {@inheritDoc} */
259     @Override
260     public void blockquote( SinkEventAttributes attributes )
261     {
262         currentSink.blockquote( attributes );
263     }
264 
265     /** {@inheritDoc} */
266     @Override
267     public void blockquote_()
268     {
269         currentSink.blockquote_();
270     }
271 
272     /** {@inheritDoc} */
273     @Override
274     public void body()
275     {
276         currentSink.body();
277     }
278 
279     /** {@inheritDoc} */
280     @Override
281     public void body( SinkEventAttributes attributes )
282     {
283         currentSink.body( attributes );
284     }
285 
286     /** {@inheritDoc} */
287     @Override
288     public void body_()
289     {
290         currentSink.body_();
291     }
292 
293     /** {@inheritDoc} */
294     @Override
295     public void bold()
296     {
297         currentSink.bold();
298     }
299 
300     /** {@inheritDoc} */
301     @Override
302     public void bold_()
303     {
304         currentSink.bold_();
305     }
306 
307     /**
308      * Close all sinks
309      */
310     public void close()
311     {
312         for ( Sink sink  : sinks )
313         {
314             // sink is responsible for closing it's stream
315             sink.close();
316         }
317         coreSink.close();
318     }
319 
320     /** {@inheritDoc} */
321     @Override
322     public void comment( String comment )
323     {
324         currentSink.comment( comment );
325     }
326 
327     /** {@inheritDoc} */
328     @Override
329     public void content()
330     {
331         currentSink.content();
332     }
333 
334     /** {@inheritDoc} */
335     @Override
336     public void content( SinkEventAttributes attributes )
337     {
338         currentSink.content( attributes );
339     }
340 
341     /** {@inheritDoc} */
342     @Override
343     public void content_()
344     {
345         currentSink.content_();
346     }
347 
348     /** {@inheritDoc} */
349     @Override
350     public void data( String value )
351     {
352         currentSink.data( value );
353     }
354 
355     /** {@inheritDoc} */
356     @Override
357     public void data( String value, SinkEventAttributes attributes )
358     {
359         currentSink.data( value, attributes );
360     }
361 
362     /** {@inheritDoc} */
363     @Override
364     public void data_()
365     {
366         currentSink.data_();
367     }
368 
369     /** {@inheritDoc} */
370     @Override
371     public void date()
372     {
373         currentSink.date();
374     }
375 
376     /** {@inheritDoc} */
377     @Override
378     public void date( SinkEventAttributes attributes )
379     {
380         currentSink.date( attributes );
381     }
382 
383     /** {@inheritDoc} */
384     @Override
385     public void date_()
386     {
387         currentSink.date_();
388     }
389 
390     /** {@inheritDoc} */
391     @Override
392     public void definedTerm()
393     {
394         currentSink.definedTerm();
395     }
396 
397     /** {@inheritDoc} */
398     @Override
399     public void definedTerm( SinkEventAttributes attributes )
400     {
401         currentSink.definedTerm( attributes );
402     }
403 
404     /** {@inheritDoc} */
405     @Override
406     public void definedTerm_()
407     {
408         currentSink.definedTerm_();
409     }
410 
411     /** {@inheritDoc} */
412     @Override
413     public void definition()
414     {
415         currentSink.definition();
416     }
417 
418     /** {@inheritDoc} */
419     @Override
420     public void definition( SinkEventAttributes attributes )
421     {
422         currentSink.definition( attributes );
423     }
424 
425     /** {@inheritDoc} */
426     @Override
427     public void definitionList()
428     {
429         currentSink.definitionList();
430     }
431 
432     /** {@inheritDoc} */
433     @Override
434     public void definitionList( SinkEventAttributes attributes )
435     {
436         currentSink.definitionList( attributes );
437     }
438 
439     /** {@inheritDoc} */
440     @Override
441     public void definitionListItem()
442     {
443         currentSink.definitionListItem();
444     }
445 
446     /** {@inheritDoc} */
447     @Override
448     public void definitionListItem( SinkEventAttributes attributes )
449     {
450         currentSink.definitionListItem( attributes );
451     }
452 
453     /** {@inheritDoc} */
454     @Override
455     public void definitionListItem_()
456     {
457         currentSink.definitionListItem_();
458     }
459 
460     /** {@inheritDoc} */
461     @Override
462     public void definitionList_()
463     {
464         currentSink.definitionList_();
465     }
466 
467     /** {@inheritDoc} */
468     @Override
469     public void definition_()
470     {
471         currentSink.definition_();
472     }
473 
474     /** {@inheritDoc} */
475     @Override
476     public void division()
477     {
478         currentSink.division();
479     }
480 
481     /** {@inheritDoc} */
482     @Override
483     public void division( SinkEventAttributes attributes )
484     {
485         currentSink.division( attributes );
486     }
487 
488     /** {@inheritDoc} */
489     @Override
490     public void division_()
491     {
492         currentSink.division_();
493     }
494 
495     /** {@inheritDoc} */
496     @Override
497     public void figure()
498     {
499         currentSink.figure();
500     }
501 
502     /** {@inheritDoc} */
503     @Override
504     public void figure( SinkEventAttributes attributes )
505     {
506         currentSink.figure( attributes );
507     }
508 
509     /** {@inheritDoc} */
510     @Override
511     public void figureCaption()
512     {
513         currentSink.figureCaption();
514     }
515 
516     /** {@inheritDoc} */
517     @Override
518     public void figureCaption( SinkEventAttributes attributes )
519     {
520         currentSink.figureCaption( attributes );
521     }
522 
523     /** {@inheritDoc} */
524     @Override
525     public void figureCaption_()
526     {
527         currentSink.figureCaption_();
528     }
529 
530     /** {@inheritDoc} */
531     @Override
532     public void figureGraphics( String name )
533     {
534         currentSink.figureGraphics( name );
535     }
536 
537     /** {@inheritDoc} */
538     @Override
539     public void figureGraphics( String src, SinkEventAttributes attributes )
540     {
541         currentSink.figureGraphics( src, attributes );
542     }
543 
544     /** {@inheritDoc} */
545     @Override
546     public void figure_()
547     {
548         currentSink.figure_();
549     }
550 
551     /**
552      * Flush all sinks
553      */
554     public void flush()
555     {
556         for ( int i = 0; i < sinks.size(); i++ )
557         {
558             // first flush to get complete buffer
559             // sink is responsible for flushing it's stream
560             Sink sink = sinks.get( i );
561             sink.flush();
562 
563             ByteArrayOutputStream stream = outputStreams.get( i );
564             try
565             {
566                 coreOutputStream.write( stream.toByteArray() );
567             }
568             catch ( IOException e )
569             {
570                 // @todo
571             }
572         }
573         coreSink.flush();
574     }
575 
576     /** {@inheritDoc} */
577     @Override
578     public void footer()
579     {
580         currentSink.footer();
581     }
582 
583     /** {@inheritDoc} */
584     @Override
585     public void footer( SinkEventAttributes attributes )
586     {
587         currentSink.footer( attributes );
588     }
589 
590     /** {@inheritDoc} */
591     @Override
592     public void footer_()
593     {
594         currentSink.footer_();
595     }
596 
597     /** {@inheritDoc} */
598     @Override
599     public void head()
600     {
601         currentSink.head();
602     }
603 
604     /** {@inheritDoc} */
605     @Override
606     public void head( SinkEventAttributes attributes )
607     {
608         currentSink.head( attributes );
609     }
610 
611     /** {@inheritDoc} */
612     @Override
613     public void head_()
614     {
615         currentSink.head_();
616     }
617 
618     /** {@inheritDoc} */
619     @Override
620     public void header()
621     {
622         currentSink.header();
623     }
624 
625     /** {@inheritDoc} */
626     @Override
627     public void header( SinkEventAttributes attributes )
628     {
629         currentSink.header( attributes );
630     }
631 
632     /** {@inheritDoc} */
633     @Override
634     public void header_()
635     {
636         currentSink.header_();
637     }
638 
639     /** {@inheritDoc} */
640     @Override
641     public void horizontalRule()
642     {
643         currentSink.horizontalRule();
644     }
645 
646     /** {@inheritDoc} */
647     @Override
648     public void horizontalRule( SinkEventAttributes attributes )
649     {
650         currentSink.horizontalRule( attributes );
651     }
652 
653     /** {@inheritDoc} */
654     @Override
655     public void inline()
656     {
657         currentSink.inline();
658     }
659 
660     /** {@inheritDoc} */
661     @Override
662     public void inline( SinkEventAttributes attributes )
663     {
664         currentSink.inline( attributes );
665     }
666 
667     /** {@inheritDoc} */
668     @Override
669     public void inline_()
670     {
671         currentSink.inline_();
672     }
673 
674     /** {@inheritDoc} */
675     @Override
676     public void italic()
677     {
678         currentSink.italic();
679     }
680 
681     /** {@inheritDoc} */
682     @Override
683     public void italic_()
684     {
685         currentSink.italic_();
686     }
687 
688     /** {@inheritDoc} */
689     @Override
690     public void lineBreak()
691     {
692         currentSink.lineBreak();
693     }
694 
695     /** {@inheritDoc} */
696     @Override
697     public void lineBreak( SinkEventAttributes attributes )
698     {
699         currentSink.lineBreak( attributes );
700     }
701 
702     /** {@inheritDoc} */
703     @Override
704     public void lineBreakOpportunity()
705     {
706         currentSink.lineBreakOpportunity();
707     }
708 
709     /** {@inheritDoc} */
710     @Override
711     public void lineBreakOpportunity( SinkEventAttributes attributes )
712     {
713         currentSink.lineBreakOpportunity( attributes );
714     }
715 
716     /** {@inheritDoc} */
717     @Override
718     public void link( String name )
719     {
720         currentSink.link( name );
721     }
722 
723     /** {@inheritDoc} */
724     @Override
725     public void link( String name, SinkEventAttributes attributes )
726     {
727         currentSink.link( name, attributes );
728     }
729 
730     /** {@inheritDoc} */
731     @Override
732     public void link_()
733     {
734         currentSink.link_();
735     }
736 
737     /** {@inheritDoc} */
738     @Override
739     public void list()
740     {
741         currentSink.list();
742     }
743 
744     /** {@inheritDoc} */
745     @Override
746     public void list( SinkEventAttributes attributes )
747     {
748         currentSink.list( attributes );
749     }
750 
751     /** {@inheritDoc} */
752     @Override
753     public void listItem()
754     {
755         currentSink.listItem();
756     }
757 
758     /** {@inheritDoc} */
759     @Override
760     public void listItem( SinkEventAttributes attributes )
761     {
762         currentSink.listItem( attributes );
763     }
764 
765     /** {@inheritDoc} */
766     @Override
767     public void listItem_()
768     {
769         currentSink.listItem_();
770     }
771 
772     /** {@inheritDoc} */
773     @Override
774     public void list_()
775     {
776         currentSink.list_();
777     }
778 
779     /** {@inheritDoc} */
780     @Override
781     public void monospaced()
782     {
783         currentSink.monospaced();
784     }
785 
786     /** {@inheritDoc} */
787     @Override
788     public void monospaced_()
789     {
790         currentSink.monospaced_();
791     }
792 
793     /** {@inheritDoc} */
794     @Override
795     public void navigation()
796     {
797         currentSink.navigation();
798     }
799 
800     /** {@inheritDoc} */
801     @Override
802     public void navigation( SinkEventAttributes attributes )
803     {
804         currentSink.navigation( attributes );
805     }
806 
807     /** {@inheritDoc} */
808     @Override
809     public void navigation_()
810     {
811         currentSink.navigation_();
812     }
813 
814     /** {@inheritDoc} */
815     @Override
816     public void nonBreakingSpace()
817     {
818         currentSink.nonBreakingSpace();
819     }
820 
821     /** {@inheritDoc} */
822     @Override
823     public void numberedList( int numbering )
824     {
825         currentSink.numberedList( numbering );
826     }
827 
828     /** {@inheritDoc} */
829     @Override
830     public void numberedList( int numbering, SinkEventAttributes attributes )
831     {
832         currentSink.numberedList( numbering, attributes );
833     }
834 
835     /** {@inheritDoc} */
836     @Override
837     public void numberedListItem()
838     {
839         currentSink.numberedListItem();
840     }
841 
842     /** {@inheritDoc} */
843     @Override
844     public void numberedListItem( SinkEventAttributes attributes )
845     {
846         currentSink.numberedListItem( attributes );
847     }
848 
849     /** {@inheritDoc} */
850     @Override
851     public void numberedListItem_()
852     {
853         currentSink.numberedListItem_();
854     }
855 
856     /** {@inheritDoc} */
857     @Override
858     public void numberedList_()
859     {
860         currentSink.numberedList_();
861     }
862 
863     /** {@inheritDoc} */
864     @Override
865     public void pageBreak()
866     {
867         currentSink.pageBreak();
868     }
869 
870     /** {@inheritDoc} */
871     @Override
872     public void paragraph()
873     {
874         currentSink.paragraph();
875     }
876 
877     /** {@inheritDoc} */
878     @Override
879     public void paragraph( SinkEventAttributes attributes )
880     {
881         currentSink.paragraph( attributes );
882     }
883 
884     /** {@inheritDoc} */
885     @Override
886     public void paragraph_()
887     {
888         currentSink.paragraph_();
889     }
890 
891     /** {@inheritDoc} */
892     @Override
893     public void rawText( String text )
894     {
895         currentSink.rawText( text );
896     }
897 
898     /** {@inheritDoc} */
899     @Override
900     public void section( int level, SinkEventAttributes attributes )
901     {
902         currentSink.section( level, attributes );
903     }
904 
905     /** {@inheritDoc} */
906     @Override
907     public void section1()
908     {
909         currentSink.section1();
910     }
911 
912     /** {@inheritDoc} */
913     @Override
914     public void section1_()
915     {
916         currentSink.section1_();
917     }
918 
919     /** {@inheritDoc} */
920     @Override
921     public void section2()
922     {
923         currentSink.section2();
924     }
925 
926     /** {@inheritDoc} */
927     @Override
928     public void section2_()
929     {
930         currentSink.section2_();
931     }
932 
933     /** {@inheritDoc} */
934     @Override
935     public void section3()
936     {
937         currentSink.section3();
938     }
939 
940     /** {@inheritDoc} */
941     @Override
942     public void section3_()
943     {
944         currentSink.section3_();
945     }
946 
947     /** {@inheritDoc} */
948     @Override
949     public void section4()
950     {
951         currentSink.section4();
952     }
953 
954     /** {@inheritDoc} */
955     @Override
956     public void section4_()
957     {
958         currentSink.section4_();
959     }
960 
961     /** {@inheritDoc} */
962     @Override
963     public void section5()
964     {
965         currentSink.section5();
966     }
967 
968     /** {@inheritDoc} */
969     @Override
970     public void section5_()
971     {
972         currentSink.section5_();
973     }
974 
975     /** {@inheritDoc} */
976     @Override
977     public void sectionTitle()
978     {
979         currentSink.sectionTitle();
980     }
981 
982     /** {@inheritDoc} */
983     @Override
984     public void sectionTitle( int level, SinkEventAttributes attributes )
985     {
986         currentSink.sectionTitle( level, attributes );
987     }
988 
989     /** {@inheritDoc} */
990     @Override
991     public void sectionTitle1()
992     {
993         currentSink.sectionTitle1();
994     }
995 
996     /** {@inheritDoc} */
997     @Override
998     public void sectionTitle1_()
999     {
1000         currentSink.sectionTitle1_();
1001     }
1002 
1003     /** {@inheritDoc} */
1004     @Override
1005     public void sectionTitle2()
1006     {
1007         currentSink.sectionTitle2();
1008     }
1009 
1010     /** {@inheritDoc} */
1011     @Override
1012     public void sectionTitle2_()
1013     {
1014         currentSink.sectionTitle2_();
1015     }
1016 
1017     /** {@inheritDoc} */
1018     @Override
1019     public void sectionTitle3()
1020     {
1021         currentSink.sectionTitle3();
1022     }
1023 
1024     /** {@inheritDoc} */
1025     @Override
1026     public void sectionTitle3_()
1027     {
1028         currentSink.sectionTitle3_();
1029     }
1030 
1031     /** {@inheritDoc} */
1032     @Override
1033     public void sectionTitle4()
1034     {
1035         currentSink.sectionTitle4();
1036     }
1037 
1038     /** {@inheritDoc} */
1039     @Override
1040     public void sectionTitle4_()
1041     {
1042         currentSink.sectionTitle4_();
1043     }
1044 
1045     /** {@inheritDoc} */
1046     @Override
1047     public void sectionTitle5()
1048     {
1049         currentSink.sectionTitle5();
1050     }
1051 
1052     /** {@inheritDoc} */
1053     @Override
1054     public void sectionTitle5_()
1055     {
1056         currentSink.sectionTitle5_();
1057     }
1058 
1059     /** {@inheritDoc} */
1060     @Override
1061     public void sectionTitle_()
1062     {
1063         currentSink.sectionTitle_();
1064     }
1065 
1066     /** {@inheritDoc} */
1067     @Override
1068     public void sectionTitle_( int level )
1069     {
1070         currentSink.sectionTitle_( level );
1071     }
1072 
1073     /** {@inheritDoc} */
1074     @Override
1075     public void section_( int level )
1076     {
1077         currentSink.section_( level );
1078     }
1079 
1080     /** {@inheritDoc} */
1081     @Override
1082     public void sidebar()
1083     {
1084         currentSink.sidebar();
1085     }
1086 
1087     /** {@inheritDoc} */
1088     @Override
1089     public void sidebar( SinkEventAttributes attributes )
1090     {
1091         currentSink.sidebar( attributes );
1092     }
1093 
1094     /** {@inheritDoc} */
1095     @Override
1096     public void sidebar_()
1097     {
1098         currentSink.sidebar_();
1099     }
1100 
1101     /** {@inheritDoc} */
1102     @Override
1103     public void table()
1104     {
1105         currentSink.table();
1106     }
1107 
1108     /** {@inheritDoc} */
1109     @Override
1110     public void table( SinkEventAttributes attributes )
1111     {
1112         currentSink.table( attributes );
1113     }
1114 
1115     /** {@inheritDoc} */
1116     @Override
1117     public void tableCaption()
1118     {
1119         currentSink.tableCaption();
1120     }
1121 
1122     /** {@inheritDoc} */
1123     @Override
1124     public void tableCaption( SinkEventAttributes attributes )
1125     {
1126         currentSink.tableCaption( attributes );
1127     }
1128 
1129     /** {@inheritDoc} */
1130     @Override
1131     public void tableCaption_()
1132     {
1133         currentSink.tableCaption_();
1134     }
1135 
1136     /** {@inheritDoc} */
1137     @Override
1138     public void tableCell()
1139     {
1140         currentSink.tableCell();
1141     }
1142 
1143     /** {@inheritDoc} */
1144     @Override
1145     public void tableCell( SinkEventAttributes attributes )
1146     {
1147         currentSink.tableCell( attributes );
1148     }
1149 
1150     /** {@inheritDoc} */
1151     @Override
1152     public void tableCell_()
1153     {
1154         currentSink.tableCell_();
1155     }
1156 
1157     /** {@inheritDoc} */
1158     @Override
1159     public void tableHeaderCell()
1160     {
1161         currentSink.tableHeaderCell();
1162     }
1163 
1164     /** {@inheritDoc} */
1165     @Override
1166     public void tableHeaderCell( SinkEventAttributes attributes )
1167     {
1168         currentSink.tableHeaderCell( attributes );
1169     }
1170 
1171     /** {@inheritDoc} */
1172     @Override
1173     public void tableHeaderCell_()
1174     {
1175         currentSink.tableHeaderCell_();
1176     }
1177 
1178     /** {@inheritDoc} */
1179     @Override
1180     public void tableRow()
1181     {
1182         currentSink.tableRow();
1183     }
1184 
1185     /** {@inheritDoc} */
1186     @Override
1187     public void tableRow( SinkEventAttributes attributes )
1188     {
1189         currentSink.tableRow( attributes );
1190     }
1191 
1192     /** {@inheritDoc} */
1193     @Override
1194     public void tableRow_()
1195     {
1196         currentSink.tableRow_();
1197     }
1198 
1199     /** {@inheritDoc} */
1200     @Override
1201     public void tableRows( int[] justification, boolean grid )
1202     {
1203         currentSink.tableRows( justification, grid );
1204     }
1205 
1206     /** {@inheritDoc} */
1207     @Override
1208     public void tableRows_()
1209     {
1210         currentSink.tableRows_();
1211     }
1212 
1213     /** {@inheritDoc} */
1214     @Override
1215     public void table_()
1216     {
1217         currentSink.table_();
1218     }
1219 
1220     /** {@inheritDoc} */
1221     @Override
1222     public void text( String text )
1223     {
1224         currentSink.text( text );
1225     }
1226 
1227     /** {@inheritDoc} */
1228     @Override
1229     public void text( String text, SinkEventAttributes attributes )
1230     {
1231         currentSink.text( text, attributes );
1232     }
1233 
1234     /** {@inheritDoc} */
1235     @Override
1236     public void time( String datetime )
1237     {
1238         currentSink.time( datetime );
1239     }
1240 
1241     /** {@inheritDoc} */
1242     @Override
1243     public void time( String datetime, SinkEventAttributes attributes )
1244     {
1245         currentSink.time( datetime, attributes );
1246     }
1247 
1248     /** {@inheritDoc} */
1249     @Override
1250     public void time_()
1251     {
1252         currentSink.time_();
1253     }
1254 
1255     /** {@inheritDoc} */
1256     @Override
1257     public void title()
1258     {
1259         currentSink.title();
1260     }
1261 
1262     /** {@inheritDoc} */
1263     @Override
1264     public void title( SinkEventAttributes attributes )
1265     {
1266         currentSink.title( attributes );
1267     }
1268 
1269     /** {@inheritDoc} */
1270     @Override
1271     public void title_()
1272     {
1273         currentSink.title_();
1274     }
1275 
1276     /** {@inheritDoc} */
1277     @Override
1278     public void unknown( String name, Object[] requiredParams, SinkEventAttributes attributes )
1279     {
1280         currentSink.unknown( name, requiredParams, attributes );
1281     }
1282 
1283     /** {@inheritDoc} */
1284     @Override
1285     public void verbatim( SinkEventAttributes attributes )
1286     {
1287         currentSink.verbatim( attributes );
1288     }
1289 
1290     /** {@inheritDoc} */
1291     @Override
1292     public void verbatim_()
1293     {
1294         currentSink.verbatim_();
1295     }
1296 }