org.apache.cocoon.serialization
Class LinkSerializer

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

public class LinkSerializer
extends ExtendedXLinkPipe
implements Serializer

Version:
CVS $Id: LinkSerializer.html 1304258 2012-03-23 10:09:27Z ilgrosso $
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
Throws:
IOException

getMimeType

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

Specified by:
getMimeType in interface SitemapOutputComponent
See Also:
AbstractProcessingPipeline.setMimeTypeForSerializer(org.apache.cocoon.environment.Environment), AbstractProcessingPipeline.setMimeTypeForReader(org.apache.cocoon.environment.Environment)

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

recycle

public void recycle()
Recyclable

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


Copyright © 1999-2010 The Apache Software Foundation. All Rights Reserved.