org.apache.cocoon.serialization
Class LinkSerializer

java.lang.Object
  extended byorg.apache.avalon.framework.logger.AbstractLogEnabled
      extended byorg.apache.cocoon.xml.AbstractXMLProducer
          extended byorg.apache.cocoon.xml.AbstractXMLPipe
              extended byorg.apache.cocoon.xml.xlink.XLinkPipe
                  extended byorg.apache.cocoon.xml.xlink.ExtendedXLinkPipe
                      extended byorg.apache.cocoon.serialization.LinkSerializer
All Implemented Interfaces:
ContentHandler, LexicalHandler, LogEnabled, Poolable, Recyclable, Serializer, SitemapOutputComponent, XLinkHandler, XMLConsumer, XMLConsumer, XMLPipe, XMLProducer

public class LinkSerializer
extends ExtendedXLinkPipe
implements Serializer

Version:
CVS $Id: LinkSerializer.java 30941 2004-07-29 19:56:58Z vgritsenko $
Author:
Stefano Mazzocchi

Field Summary
 
Fields inherited from class org.apache.cocoon.xml.xlink.XLinkPipe
XLINK_ACTUATE, XLINK_ARCROLE, XLINK_FROM, XLINK_HREF, XLINK_LABEL, XLINK_NAMESPACE_URI, XLINK_ROLE, XLINK_SHOW, XLINK_TITLE, XLINK_TO, XLINK_TYPE, XLINK_TYPE_ARC, XLINK_TYPE_EXTENDED, XLINK_TYPE_LOCATOR, XLINK_TYPE_RESOURCE, XLINK_TYPE_SIMPLE, XLINK_TYPE_TITLE
 
Fields inherited from class org.apache.cocoon.xml.AbstractXMLProducer
contentHandler, EMPTY_CONTENT_HANDLER, lexicalHandler, xmlConsumer
 
Fields inherited from interface org.apache.cocoon.serialization.Serializer
ROLE
 
Constructor Summary
LinkSerializer()
           
 
Method Summary
 String getMimeType()
          Get the mime-type of the output of this Component.
 void recycle()
          Recyclable
 void setOutputStream(OutputStream out)
          Set the OutputStream where the requested resource should be serialized.
 boolean shouldSetContentLength()
          Test if the component wants to set the content length
 void simpleLink(String href, String role, String arcrole, String title, String show, String actuate, String uri, String name, String raw, Attributes attr)
           
 void startLocator(String href, String role, String title, String label, String uri, String name, String raw, Attributes attr)
           
 
Methods inherited from class org.apache.cocoon.xml.xlink.ExtendedXLinkPipe
arrayToSet, startElement
 
Methods inherited from class org.apache.cocoon.xml.xlink.XLinkPipe
endArc, endElement, endExtendedLink, endLocator, linkResource, linkTitle, startArc, startExtendedLink
 
Methods inherited from class org.apache.cocoon.xml.AbstractXMLPipe
characters, comment, endCDATA, endDocument, endDTD, endEntity, endPrefixMapping, ignorableWhitespace, processingInstruction, setDocumentLocator, skippedEntity, startCDATA, startDocument, startDTD, startEntity, startPrefixMapping
 
Methods inherited from class org.apache.cocoon.xml.AbstractXMLProducer
setConsumer, setContentHandler, setLexicalHandler
 
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.xml.sax.ContentHandler
characters, endDocument, endElement, endPrefixMapping, ignorableWhitespace, processingInstruction, setDocumentLocator, skippedEntity, startDocument, startElement, startPrefixMapping
 
Methods inherited from interface org.xml.sax.ext.LexicalHandler
comment, endCDATA, endDTD, endEntity, startCDATA, startDTD, startEntity
 
Methods inherited from interface org.apache.cocoon.xml.XMLProducer
setConsumer
 

Constructor Detail

LinkSerializer

public LinkSerializer()
Method Detail

setOutputStream

public void setOutputStream(OutputStream out)
                     throws IOException
Set the OutputStream where the requested resource should be serialized.

Specified by:
setOutputStream in interface SitemapOutputComponent
Parameters:
out - The OutputStream target for the rendered results.
Throws:
IOException - if the stream can't be used.

getMimeType

public String getMimeType()
Get the mime-type of the output of this Component.

Specified by:
getMimeType in interface SitemapOutputComponent
Returns:
the mime-type for the results.

simpleLink

public void simpleLink(String href,
                       String role,
                       String arcrole,
                       String title,
                       String show,
                       String actuate,
                       String uri,
                       String name,
                       String raw,
                       Attributes attr)
                throws SAXException
Specified by:
simpleLink in interface XLinkHandler
Overrides:
simpleLink in class ExtendedXLinkPipe
Throws:
SAXException

startLocator

public void startLocator(String href,
                         String role,
                         String title,
                         String label,
                         String uri,
                         String name,
                         String raw,
                         Attributes attr)
                  throws SAXException
Specified by:
startLocator in interface XLinkHandler
Overrides:
startLocator in class XLinkPipe
Throws:
SAXException

shouldSetContentLength

public boolean shouldSetContentLength()
Test if the component wants to set the content length

Specified by:
shouldSetContentLength in interface SitemapOutputComponent
Returns:
true if the content length needs to be set.

recycle

public void recycle()
Recyclable

Specified by:
recycle in interface Recyclable
Overrides:
recycle in class AbstractXMLProducer


Copyright ? 1999-2005 The Apache Software Foundation. All Rights Reserved.