You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@cocoon.apache.org by vg...@apache.org on 2007/09/29 16:25:29 UTC

svn commit: r580586 - /cocoon/trunk/blocks/cocoon-serializers/cocoon-serializers-impl/src/main/java/org/apache/cocoon/components/serializers/XHTMLSerializer.java

Author: vgritsenko
Date: Sat Sep 29 07:25:28 2007
New Revision: 580586

URL: http://svn.apache.org/viewvc?rev=580586&view=rev
Log:
javadoc, reorder methods

Modified:
    cocoon/trunk/blocks/cocoon-serializers/cocoon-serializers-impl/src/main/java/org/apache/cocoon/components/serializers/XHTMLSerializer.java

Modified: cocoon/trunk/blocks/cocoon-serializers/cocoon-serializers-impl/src/main/java/org/apache/cocoon/components/serializers/XHTMLSerializer.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-serializers/cocoon-serializers-impl/src/main/java/org/apache/cocoon/components/serializers/XHTMLSerializer.java?rev=580586&r1=580585&r2=580586&view=diff
==============================================================================
--- cocoon/trunk/blocks/cocoon-serializers/cocoon-serializers-impl/src/main/java/org/apache/cocoon/components/serializers/XHTMLSerializer.java (original)
+++ cocoon/trunk/blocks/cocoon-serializers/cocoon-serializers-impl/src/main/java/org/apache/cocoon/components/serializers/XHTMLSerializer.java Sat Sep 29 07:25:28 2007
@@ -39,10 +39,10 @@
  * proper HTML names.</p>
  *
  * <p>For configuration options of this serializer, please look at the
- * {@link EncodingSerializer}, in addition to those, this serializer also
- * support the specification of a default doctype. This default will be used
- * if no document type is received in the SAX events, and can be configured
- * in the following way:</p>
+ * {@link org.apache.cocoon.components.serializers.util.EncodingSerializer},
+ * in addition to those, this serializer also support the specification of a
+ * default doctype. This default will be used if no document type is received
+ * in the SAX events, and can be configured in the following way:</p>
  *
  * <pre>
  * &lt;serializer class="org.apache.cocoon.components.serializers..." ... &gt;
@@ -65,45 +65,42 @@
  *
  * @version $Id$
  */
-public class XHTMLSerializer
-    extends org.apache.cocoon.components.serializers.util.XHTMLSerializer
-    implements Serializer, SitemapModelComponent, Recyclable, Configurable  {
+public class XHTMLSerializer extends org.apache.cocoon.components.serializers.util.XHTMLSerializer
+                             implements Serializer, SitemapModelComponent, Recyclable, Configurable  {
 
     /**
-     * @see org.apache.cocoon.sitemap.SitemapModelComponent#setup(org.apache.cocoon.environment.SourceResolver, java.util.Map, java.lang.String, org.apache.avalon.framework.parameters.Parameters)
+     * Set the configurations for this serializer.
+     */
+    public void configure(Configuration conf)
+    throws ConfigurationException {
+        String encoding = conf.getChild("encoding").getValue(null);
+        try {
+            setEncoding(encoding);
+        } catch (UnsupportedEncodingException exception) {
+            throw new ConfigurationException("Encoding not supported: "
+                                             + encoding, exception);
+        }
+
+        setIndentPerLevel(conf.getChild("indent").getValueAsInteger(0));
+        setOmitXmlDeclaration(conf.getChild("omit-xml-declaration").getValue(null));
+        setDoctypeDefault(conf.getChild("doctype-default").getValue(null));
+    }
+
+    /**
+     * @see SitemapModelComponent#setup(SourceResolver, Map, String, Parameters)
      */
     public void setup(SourceResolver resolver,
                       Map            objectModel,
                       String         src,
                       Parameters     par)
     throws ProcessingException, SAXException, IOException {
-        this.setup((HttpServletRequest) objectModel.get(HttpEnvironment.HTTP_REQUEST_OBJECT));
+        setup((HttpServletRequest) objectModel.get(HttpEnvironment.HTTP_REQUEST_OBJECT));
     }
 
-
     /**
      * Test if the component wants to set the content length.
      */
     public boolean shouldSetContentLength() {
         return false;
     }
-
-    /**
-     * Set the configurations for this serializer.
-     */
-    public void configure(Configuration conf)
-    throws ConfigurationException {
-        String encoding = conf.getChild("encoding").getValue(null);
-        try {
-            this.setEncoding(encoding);
-        } catch (UnsupportedEncodingException exception) {
-            throw new ConfigurationException("Encoding not supported: "
-                                             + encoding, exception);
-        }
-
-        this.setIndentPerLevel(conf.getChild("indent").getValueAsInteger(0));
-        this.setOmitXmlDeclaration(conf.getChild("omit-xml-declaration").getValue(null));
-        this.setDoctypeDefault(conf.getChild("doctype-default").getValue(null));
-    }
-
 }