Save This Page
Home » cocoon-2.1.11-src » org.apache » cocoon » generation » [javadoc | source]
org.apache.cocoon.generation
public class: LinkStatusGenerator [javadoc | source]
java.lang.Object
   org.apache.avalon.framework.logger.AbstractLogEnabled
      org.apache.cocoon.xml.AbstractXMLProducer
         org.apache.cocoon.generation.AbstractGenerator
            org.apache.cocoon.generation.ServiceableGenerator
               org.apache.cocoon.generation.LinkStatusGenerator

All Implemented Interfaces:
    org.apache.avalon.framework.configuration.Configurable, org.apache.avalon.framework.activity.Disposable, org.apache.avalon.framework.service.Serviceable, Generator, org.apache.avalon.excalibur.pool.Recyclable, XMLProducer

Field Summary
protected static final  String URI    The URI of the namespace of this generator. 
protected static final  String PREFIX    The namespace prefix for this namespace. 
protected static final  String TOP_NODE_NAME     
protected static final  String LINK_NODE_NAME     
protected static final  String HREF_ATTR_NAME     
protected static final  String REFERRER_ATTR_NAME     
protected static final  String CONTENT_ATTR_NAME     
protected static final  String STATUS_ATTR_NAME     
protected static final  String MESSAGE_ATTR_NAME     
protected  AttributesImpl attributes     
public static final  String LINK_CONTENT_TYPE_CONFIG    Config element name specifying expected link content-typ.

Its value is link-content-type.

    since:
 
public final  String LINK_CONTENT_TYPE_DEFAULT    Default value of link-content-type configuration value.

Its value is application/x-cocoon-links.

    since:
 
public static final  String LINK_VIEW_QUERY_CONFIG    Config element name specifying query-string appendend for requesting links of an URL.

Its value is link-view-query.

    since:
 
public static final  String LINK_VIEW_QUERY_DEFAULT    Default value of link-view-query configuration value.

Its value is ?cocoon-view=links.

    since:
 
public static final  String EXCLUDE_CONFIG    Config element name specifying excluding regular expression pattern.

Its value is exclude.

    since:
 
public static final  String INCLUDE_CONFIG    Config element name specifying including regular expression pattern.

Its value is include.

    since:
 
public static final  String USER_AGENT_CONFIG    Config element name specifying http header value for user-Agent.

Its value is user-agent.

    since:
 
public static final  String USER_AGENT_DEFAULT    Default value of user-agent configuration value.
    Also see:
    org.apache.cocoon.Constants#COMPLETE_NAME
    since:
 
public static final  String ACCEPT_CONFIG    Config element name specifying http header value for accept.

Its value is accept.

    since:
 
public static final  String ACCEPT_DEFAULT    Default value of accept configuration value.

Its value is * / *

    since:
 
Fields inherited from org.apache.cocoon.generation.ServiceableGenerator:
manager
Fields inherited from org.apache.cocoon.generation.AbstractGenerator:
resolver,  objectModel,  parameters,  source
Fields inherited from org.apache.cocoon.xml.AbstractXMLProducer:
EMPTY_CONTENT_HANDLER,  xmlConsumer,  contentHandler,  lexicalHandler
Method from org.apache.cocoon.generation.LinkStatusGenerator Summary:
configure,   generate,   getLinksFromConnection,   processURL,   recycle,   setup
Methods from org.apache.cocoon.generation.ServiceableGenerator:
dispose,   service
Methods from org.apache.cocoon.generation.AbstractGenerator:
recycle,   setup
Methods from org.apache.cocoon.xml.AbstractXMLProducer:
recycle,   setConsumer,   setContentHandler,   setLexicalHandler
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.cocoon.generation.LinkStatusGenerator Detail:
 public  void configure(Configuration configuration) throws ConfigurationException 
    Configure the crawler component.

    Configure can specify which URI to include, and which URI to exclude from crawling. You specify the patterns as regular expressions.

    Morover you can configure the required content-type of crawling request, and the query-string appended to each crawling request.

    
    <include>.*\.html?</include> or <include>.*\.html?, .*\.xsp</include>
    <exclude>.*\.gif</exclude> or <exclude>.*\.gif, .*\.jpe?g</exclude>
    <link-content-type> application/x-cocoon-links </link-content-type>
    <link-view-query> ?cocoon-view=links </link-view-query>
    <user-agent> Cocoon </user-agent>
    <accept> text/xml </accept>
    
 public  void generate() throws SAXException, ProcessingException 
    Generate XML data.
 protected List getLinksFromConnection(String url_link_string,
    URL url_of_referrer) 
    Retrieve a list of links of a url
 protected String processURL(URL url,
    String referrer) throws SAXException 
    Generate xml attributes of a url, calculate url for retrieving links
 public  void recycle() 
 public  void setup(SourceResolver resolver,
    Map objectModel,
    String src,
    Parameters par) throws IOException, SAXException, ProcessingException