org.apache.cocoon.sitemap
Class LinkGatherer

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.sitemap.LinkGatherer
All Implemented Interfaces:
CacheableProcessingComponent, ContentHandler, LexicalHandler, LogEnabled, Poolable, Recyclable, SitemapModelComponent, Transformer, XLinkHandler, XMLConsumer, XMLConsumer, XMLPipe, XMLProducer

public class LinkGatherer
extends ExtendedXLinkPipe
implements Transformer, CacheableProcessingComponent

Version:
CVS $Id: LinkGatherer.java 30941 2004-07-29 19:56:58Z vgritsenko $
Author:
Upayavira

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.transformation.Transformer
ROLE
 
Constructor Summary
LinkGatherer()
           
 
Method Summary
 Serializable getKey()
          Generate the unique key.
 SourceValidity getValidity()
          Generate the validity object.
 void setup(SourceResolver resolver, Map objectModel, String src, Parameters par)
          Set the SourceResolver, objectModel Map, the source and sitemap Parameters used to process the request.
 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
recycle, 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

LinkGatherer

public LinkGatherer()
Method Detail

setup

public void setup(SourceResolver resolver,
                  Map objectModel,
                  String src,
                  Parameters par)
           throws ProcessingException,
                  SAXException,
                  IOException
Set the SourceResolver, objectModel Map, the source and sitemap Parameters used to process the request.

Specified by:
setup in interface SitemapModelComponent
Parameters:
resolver - The SourceResolver to find resources within your context.
objectModel - A java.util.Map that contains the request and session information.
src - The value of the "src" attribute in the sitemap.
par - The sitemap parameters passed into your component.
Throws:
ProcessingException - if there is any other unexpected problem.
IOException - if there is a problem reading files.
SAXException - if there is a problem reading a SAX stream.

getKey

public Serializable getKey()
Generate the unique key. This key must be unique inside the space of this component.

Specified by:
getKey in interface CacheableProcessingComponent
Returns:
The generated key hashes the src

getValidity

public SourceValidity getValidity()
Generate the validity object.

Specified by:
getValidity in interface CacheableProcessingComponent
Returns:
The generated validity object or null if the component is currently not cacheable.

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


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