maven-doxia-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vsive...@apache.org
Subject svn commit: r735667 - in /maven/doxia: doxia-sitetools/trunk/doxia-site-renderer/src/main/java/org/apache/maven/doxia/siterenderer/sink/ doxia/trunk/doxia-book/src/main/java/org/apache/maven/doxia/book/services/renderer/xhtml/ doxia/trunk/doxia-core/sr...
Date Mon, 19 Jan 2009 11:47:37 GMT
Author: vsiveton
Date: Mon Jan 19 03:47:30 2009
New Revision: 735667

URL: http://svn.apache.org/viewvc?rev=735667&view=rev
Log:
o clarify javadoc about XhtmlBaseSink#buffer
o renamed buffer to textBuffer

Modified:
    maven/doxia/doxia-sitetools/trunk/doxia-site-renderer/src/main/java/org/apache/maven/doxia/siterenderer/sink/SiteRendererSink.java
    maven/doxia/doxia/trunk/doxia-book/src/main/java/org/apache/maven/doxia/book/services/renderer/xhtml/XhtmlBookSink.java
    maven/doxia/doxia/trunk/doxia-core/src/main/java/org/apache/maven/doxia/sink/XhtmlBaseSink.java
    maven/doxia/doxia/trunk/doxia-modules/doxia-module-xdoc/src/main/java/org/apache/maven/doxia/module/xdoc/XdocSink.java
    maven/doxia/doxia/trunk/doxia-modules/doxia-module-xhtml/src/main/java/org/apache/maven/doxia/module/xhtml/XhtmlSink.java

Modified: maven/doxia/doxia-sitetools/trunk/doxia-site-renderer/src/main/java/org/apache/maven/doxia/siterenderer/sink/SiteRendererSink.java
URL: http://svn.apache.org/viewvc/maven/doxia/doxia-sitetools/trunk/doxia-site-renderer/src/main/java/org/apache/maven/doxia/siterenderer/sink/SiteRendererSink.java?rev=735667&r1=735666&r2=735667&view=diff
==============================================================================
--- maven/doxia/doxia-sitetools/trunk/doxia-site-renderer/src/main/java/org/apache/maven/doxia/siterenderer/sink/SiteRendererSink.java
(original)
+++ maven/doxia/doxia-sitetools/trunk/doxia-site-renderer/src/main/java/org/apache/maven/doxia/siterenderer/sink/SiteRendererSink.java
Mon Jan 19 03:47:30 2009
@@ -75,12 +75,12 @@
     /** {@inheritDoc} */
     public void title_()
     {
-        if ( getBuffer().length() > 0 )
+        if ( getTextBuffer().length() > 0 )
         {
-            title = getBuffer().toString();
+            title = getTextBuffer().toString();
         }
 
-        resetBuffer();
+        resetTextBuffer();
     }
 
     /**
@@ -101,12 +101,12 @@
     /** {@inheritDoc} */
     public void author_()
     {
-        if ( getBuffer().length() > 0 )
+        if ( getTextBuffer().length() > 0 )
         {
-            authors.add( getBuffer().toString() );
+            authors.add( getTextBuffer().toString() );
         }
 
-        resetBuffer();
+        resetTextBuffer();
     }
 
     public List getAuthors()
@@ -117,12 +117,12 @@
     /** {@inheritDoc} */
     public void date_()
     {
-        if ( getBuffer().length() > 0 )
+        if ( getTextBuffer().length() > 0 )
         {
-            date = getBuffer().toString();
+            date = getTextBuffer().toString();
         }
 
-        resetBuffer();
+        resetTextBuffer();
     }
 
     public String getDate()
@@ -190,12 +190,12 @@
         {
             String sectionTitle = "";
 
-            if ( getBuffer().length() > 0 )
+            if ( getTextBuffer().length() > 0 )
             {
-                sectionTitle = getBuffer().toString();
+                sectionTitle = getTextBuffer().toString();
             }
 
-            resetBuffer();
+            resetTextBuffer();
 
             setHeadFlag( false );
 

Modified: maven/doxia/doxia/trunk/doxia-book/src/main/java/org/apache/maven/doxia/book/services/renderer/xhtml/XhtmlBookSink.java
URL: http://svn.apache.org/viewvc/maven/doxia/doxia/trunk/doxia-book/src/main/java/org/apache/maven/doxia/book/services/renderer/xhtml/XhtmlBookSink.java?rev=735667&r1=735666&r2=735667&view=diff
==============================================================================
--- maven/doxia/doxia/trunk/doxia-book/src/main/java/org/apache/maven/doxia/book/services/renderer/xhtml/XhtmlBookSink.java
(original)
+++ maven/doxia/doxia/trunk/doxia-book/src/main/java/org/apache/maven/doxia/book/services/renderer/xhtml/XhtmlBookSink.java
Mon Jan 19 03:47:30 2009
@@ -73,19 +73,19 @@
     /** Does nothing. */
     public void title_()
     {
-        resetBuffer();
+        resetTextBuffer();
     }
 
     /** Does nothing. */
     public void author_()
     {
-        resetBuffer();
+        resetTextBuffer();
     }
 
     /** Does nothing. */
     public void date_()
     {
-        resetBuffer();
+        resetTextBuffer();
     }
 
     /** Does nothing. */

Modified: maven/doxia/doxia/trunk/doxia-core/src/main/java/org/apache/maven/doxia/sink/XhtmlBaseSink.java
URL: http://svn.apache.org/viewvc/maven/doxia/doxia/trunk/doxia-core/src/main/java/org/apache/maven/doxia/sink/XhtmlBaseSink.java?rev=735667&r1=735666&r2=735667&view=diff
==============================================================================
--- maven/doxia/doxia/trunk/doxia-core/src/main/java/org/apache/maven/doxia/sink/XhtmlBaseSink.java
(original)
+++ maven/doxia/doxia/trunk/doxia-core/src/main/java/org/apache/maven/doxia/sink/XhtmlBaseSink.java
Mon Jan 19 03:47:30 2009
@@ -56,8 +56,8 @@
      * like DOXIA-177. Calling the method {@link #close()} is needed to perform the changes
in the {@link #writer}. */
     private StringWriter tempWriter;
 
-    /** Used to collect text events. */
-    private StringBuffer buffer = new StringBuffer();
+    /** Used to collect text events mainly for the head events. */
+    private StringBuffer textBuffer = new StringBuffer();
 
     /** An indication on if we're inside a head. */
     private boolean headFlag;
@@ -115,11 +115,13 @@
     // ----------------------------------------------------------------------
 
     /**
-     * @return the current buffer.
+     * To use mainly when playing with the head events.
+     *
+     * @return the current buffer of text events.
      */
-    protected StringBuffer getBuffer()
+    protected StringBuffer getTextBuffer()
     {
-        return buffer;
+        return this.textBuffer;
     }
 
     /**
@@ -188,27 +190,11 @@
     }
 
     /**
-     * @param even an evenTableRow flag.
-     */
-    protected void setEvenTableRow( boolean even )
-    {
-        this.evenTableRow = even;
-    }
-
-    /**
-     * @return the current evenTableRow flag.
-     */
-    protected boolean isEvenTableRow()
-    {
-        return this.evenTableRow ;
-    }
-
-    /**
      * Reset all variables.
      */
     protected void resetState()
     {
-        resetBuffer();
+        resetTextBuffer();
         headFlag = false;
         verbatimFlag = false;
         cellJustif = null;
@@ -218,14 +204,13 @@
     }
 
     /**
-     * Reset the buffer.
+     * Reset the text buffer.
      */
-    protected void resetBuffer()
+    protected void resetTextBuffer()
     {
-        this.buffer = new StringBuffer();
+        this.textBuffer = new StringBuffer();
     }
 
-
     // ----------------------------------------------------------------------
     // Sections
     // ----------------------------------------------------------------------
@@ -1612,7 +1597,7 @@
     {
         if ( headFlag || isVerbatimFlag() )
         {
-            getBuffer().append( EOL );
+            getTextBuffer().append( EOL );
         }
         else
         {
@@ -1628,7 +1613,7 @@
     {
         if ( headFlag )
         {
-            getBuffer().append( EOL );
+            getTextBuffer().append( EOL );
         }
         else
         {
@@ -1650,7 +1635,7 @@
     {
         if ( headFlag )
         {
-            getBuffer().append( ' ' );
+            getTextBuffer().append( ' ' );
         }
         else
         {
@@ -1663,7 +1648,7 @@
     {
         if ( headFlag )
         {
-            getBuffer().append( text );
+            getTextBuffer().append( text );
         }
         else if ( verbatimFlag )
         {
@@ -1675,7 +1660,7 @@
         }
     }
 
-    public void text ( String text, SinkEventAttributes attributes )
+    public void text( String text, SinkEventAttributes attributes )
     {
         if ( attributes == null )
         {

Modified: maven/doxia/doxia/trunk/doxia-modules/doxia-module-xdoc/src/main/java/org/apache/maven/doxia/module/xdoc/XdocSink.java
URL: http://svn.apache.org/viewvc/maven/doxia/doxia/trunk/doxia-modules/doxia-module-xdoc/src/main/java/org/apache/maven/doxia/module/xdoc/XdocSink.java?rev=735667&r1=735666&r2=735667&view=diff
==============================================================================
--- maven/doxia/doxia/trunk/doxia-modules/doxia-module-xdoc/src/main/java/org/apache/maven/doxia/module/xdoc/XdocSink.java
(original)
+++ maven/doxia/doxia/trunk/doxia-modules/doxia-module-xdoc/src/main/java/org/apache/maven/doxia/module/xdoc/XdocSink.java
Mon Jan 19 03:47:30 2009
@@ -142,11 +142,11 @@
      */
     public void title_()
     {
-        content( getBuffer().toString() );
+        content( getTextBuffer().toString() );
 
         writeEndTag( Tag.TITLE );
 
-        resetBuffer();
+        resetTextBuffer();
     }
 
     /**
@@ -155,12 +155,12 @@
      */
     public void author_()
     {
-        if ( getBuffer().length() > 0 )
+        if ( getTextBuffer().length() > 0 )
         {
             writeStartTag( AUTHOR_TAG );
-            content( getBuffer().toString() );
+            content( getTextBuffer().toString() );
             writeEndTag( AUTHOR_TAG );
-            resetBuffer();
+            resetTextBuffer();
         }
     }
 
@@ -170,12 +170,12 @@
      */
     public void date_()
     {
-        if ( getBuffer().length() > 0 )
+        if ( getTextBuffer().length() > 0 )
         {
             writeStartTag( DATE_TAG );
-            content( getBuffer().toString() );
+            content( getTextBuffer().toString() );
             writeEndTag( DATE_TAG );
-            resetBuffer();
+            resetTextBuffer();
         }
     }
 

Modified: maven/doxia/doxia/trunk/doxia-modules/doxia-module-xhtml/src/main/java/org/apache/maven/doxia/module/xhtml/XhtmlSink.java
URL: http://svn.apache.org/viewvc/maven/doxia/doxia/trunk/doxia-modules/doxia-module-xhtml/src/main/java/org/apache/maven/doxia/module/xhtml/XhtmlSink.java?rev=735667&r1=735666&r2=735667&view=diff
==============================================================================
--- maven/doxia/doxia/trunk/doxia-modules/doxia-module-xhtml/src/main/java/org/apache/maven/doxia/module/xhtml/XhtmlSink.java
(original)
+++ maven/doxia/doxia/trunk/doxia-modules/doxia-module-xhtml/src/main/java/org/apache/maven/doxia/module/xhtml/XhtmlSink.java
Mon Jan 19 03:47:30 2009
@@ -169,11 +169,11 @@
      */
     public void title_()
     {
-        content( getBuffer().toString() );
+        content( getTextBuffer().toString() );
 
         writeEndTag( Tag.TITLE );
 
-        resetBuffer();
+        resetTextBuffer();
 
     }
 
@@ -183,15 +183,15 @@
      */
     public void author_()
     {
-        if ( getBuffer().length() > 0 )
+        if ( getTextBuffer().length() > 0 )
         {
             MutableAttributeSet att = new SinkEventAttributeSet();
             att.addAttribute( Attribute.NAME, "author" );
-            att.addAttribute( Attribute.CONTENT, getBuffer().toString() );
+            att.addAttribute( Attribute.CONTENT, getTextBuffer().toString() );
 
             writeSimpleTag( Tag.META, att );
 
-            resetBuffer();
+            resetTextBuffer();
         }
     }
 
@@ -201,15 +201,15 @@
      */
     public void date_()
     {
-        if ( getBuffer().length() > 0 )
+        if ( getTextBuffer().length() > 0 )
         {
             MutableAttributeSet att = new SinkEventAttributeSet();
             att.addAttribute( Attribute.NAME, "date" );
-            att.addAttribute( Attribute.CONTENT, getBuffer().toString() );
+            att.addAttribute( Attribute.CONTENT, getTextBuffer().toString() );
 
             writeSimpleTag( Tag.META, att );
 
-            resetBuffer();
+            resetTextBuffer();
         }
     }
 



Mime
View raw message