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 2006/10/02 19:23:07 UTC

svn commit: r452133 - in /cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon: reading/AbstractReader.java serialization/AbstractSerializer.java sitemap/SitemapOutputComponent.java

Author: vgritsenko
Date: Mon Oct  2 10:23:06 2006
New Revision: 452133

URL: http://svn.apache.org/viewvc?view=rev&rev=452133
Log:
comments

Modified:
    cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/reading/AbstractReader.java
    cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/serialization/AbstractSerializer.java
    cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/sitemap/SitemapOutputComponent.java

Modified: cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/reading/AbstractReader.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/reading/AbstractReader.java?view=diff&rev=452133&r1=452132&r2=452133
==============================================================================
--- cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/reading/AbstractReader.java (original)
+++ cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/reading/AbstractReader.java Mon Oct  2 10:23:06 2006
@@ -5,9 +5,9 @@
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -65,7 +65,7 @@
      * Set the <code>OutputStream</code>
      */
     public void setOutputStream(OutputStream out) {
-        if ( out instanceof BufferedOutputStream 
+        if ( out instanceof BufferedOutputStream
              || out instanceof org.apache.cocoon.util.BufferedOutputStream ) {
             this.out = out;
         } else {
@@ -75,8 +75,6 @@
 
     /**
      * Get the mime-type of the output of this <code>Reader</code>
-     * This default implementation returns null to indicate that the
-     * mime-type specified in the sitemap is to be used
      */
     public String getMimeType() {
         return null;

Modified: cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/serialization/AbstractSerializer.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/serialization/AbstractSerializer.java?view=diff&rev=452133&r1=452132&r2=452133
==============================================================================
--- cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/serialization/AbstractSerializer.java (original)
+++ cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/serialization/AbstractSerializer.java Mon Oct  2 10:23:06 2006
@@ -5,9 +5,9 @@
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -36,15 +36,13 @@
      * Set the {@link OutputStream} where the requested resource should
      * be serialized.
      */
-    public void setOutputStream(OutputStream out) 
+    public void setOutputStream(OutputStream out)
     throws IOException {
         this.output = out;
     }
 
     /**
      * Get the mime-type of the output of this <code>Serializer</code>
-     * This default implementation returns null to indicate that the
-     * mime-type specified in the sitemap is to be used
      */
     public String getMimeType() {
         return null;

Modified: cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/sitemap/SitemapOutputComponent.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/sitemap/SitemapOutputComponent.java?view=diff&rev=452133&r1=452132&r2=452133
==============================================================================
--- cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/sitemap/SitemapOutputComponent.java (original)
+++ cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/sitemap/SitemapOutputComponent.java Mon Oct  2 10:23:06 2006
@@ -5,9 +5,9 @@
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -38,7 +38,7 @@
  * responsibility at this point in time is to give the user what he wants--the
  * rendered object (page/image/etc.).
  * </p>
- * 
+ *
  * @version $Id$
  */
 public interface SitemapOutputComponent {
@@ -54,9 +54,16 @@
     void setOutputStream(OutputStream out) throws IOException;
 
     /**
-     * Obtain the mime type for the results being serialized.  It helps
-     * responsible browsers to identify how to show the information to the
-     * user.
+     * Obtain the media type for the results being serialized. The
+     * returned value is used to set <code>Content-Type</code> header
+     * in the response, unless it was overwritten in the sitemap.
+     * It helps responsible browsers to identify how to show the
+     * information to the user.
+     *
+     * <p>
+     * Example content type value: <code>text/html; charset=utf-8</code>.
+     * </p>
+     *
      * <p>
      * <strong>Warning:</strong>Microsoft Internet Explorer is a poor
      * netizen and does not always respect this information.  I am talking
@@ -72,6 +79,7 @@
      * It is because the file extension ".xml" will be remapped to "text/xml"
      * even if you set the mime type correctly.
      * </p>
+     *
      * <p>
      * You may have some incorrectly configured servers that will work for one
      * browser and not the other because the mime-type and file extension do
@@ -79,7 +87,7 @@
      * accepted the mime type.  Just be aware of this issue when you are
      * creating your sitemap and serializing your results.
      *
-     * @return the mime-type for the results.
+     * @return the media type for the results.
      */
     String getMimeType();