org.apache.cocoon.generation
Class ImageDirectoryGenerator

java.lang.Object
  extended byorg.apache.cocoon.util.AbstractLogEnabled
      extended byorg.apache.cocoon.xml.AbstractXMLProducer
          extended byorg.apache.cocoon.generation.AbstractGenerator
              extended byorg.apache.cocoon.generation.ServiceableGenerator
                  extended byorg.apache.cocoon.generation.DirectoryGenerator
                      extended byorg.apache.cocoon.generation.ImageDirectoryGenerator
All Implemented Interfaces:
org.apache.cocoon.caching.CacheableProcessingComponent, Disposable, org.apache.cocoon.generation.Generator, Poolable, Recyclable, Serviceable, org.apache.cocoon.sitemap.SitemapModelComponent, org.apache.cocoon.xml.XMLProducer

public final class ImageDirectoryGenerator
extends DirectoryGenerator

Generates an XML directory listing. This is an extension of the DirectoryGenerator that adds extra attributes for image files.

Version:
$Id: ImageDirectoryGenerator.html 1304280 2012-03-23 11:18:01Z ilgrosso $

Nested Class Summary
 
Nested classes inherited from class org.apache.cocoon.generation.DirectoryGenerator
DirectoryGenerator.DirValidity
 
Field Summary
protected static String IMAGE_COMMENT_ATTR_NAME
           
protected static String IMAGE_HEIGHT_ATTR_NAME
           
protected static String IMAGE_WIDTH_ATTR_NAME
           
 
Fields inherited from class org.apache.cocoon.generation.DirectoryGenerator
attributes, cacheKeyParList, DATE_ATTR_NAME, dateFormatter, depth, DIR_NODE_NAME, directorySource, excludeRE, FILE_NODE_NAME, FILENAME_ATTR_NAME, includeRE, isRequestedDirectory, LASTMOD_ATTR_NAME, PREFIX, refreshDelay, reverse, rootRE, SIZE_ATTR_NAME, sort, URI, validity
 
Fields inherited from class org.apache.cocoon.generation.ServiceableGenerator
manager
 
Fields inherited from class org.apache.cocoon.generation.AbstractGenerator
objectModel, parameters, resolver, source
 
Fields inherited from class org.apache.cocoon.xml.AbstractXMLProducer
contentHandler, EMPTY_CONTENT_HANDLER, lexicalHandler, xmlConsumer
 
Fields inherited from interface org.apache.cocoon.generation.Generator
ROLE
 
Constructor Summary
ImageDirectoryGenerator()
           
 
Method Summary
protected  void setNodeAttributes(File path)
          Extends the setNodeAttributes method from the DirectoryGenerator by adding width, height and comment attributes if the path is a GIF or a JPEG file.
 
Methods inherited from class org.apache.cocoon.generation.DirectoryGenerator
addAncestorPath, addPath, endNode, generate, getAncestors, getKey, getValidity, isExcluded, isIncluded, isRoot, recycle, setup, startNode
 
Methods inherited from class org.apache.cocoon.generation.ServiceableGenerator
dispose, service
 
Methods inherited from class org.apache.cocoon.xml.AbstractXMLProducer
setConsumer, setContentHandler, setLexicalHandler
 
Methods inherited from class org.apache.cocoon.util.AbstractLogEnabled
getLogger, setLogger
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.cocoon.xml.XMLProducer
setConsumer
 

Field Detail

IMAGE_WIDTH_ATTR_NAME

protected static final String IMAGE_WIDTH_ATTR_NAME
See Also:
Constant Field Values

IMAGE_HEIGHT_ATTR_NAME

protected static final String IMAGE_HEIGHT_ATTR_NAME
See Also:
Constant Field Values

IMAGE_COMMENT_ATTR_NAME

protected static final String IMAGE_COMMENT_ATTR_NAME
See Also:
Constant Field Values
Constructor Detail

ImageDirectoryGenerator

public ImageDirectoryGenerator()
Method Detail

setNodeAttributes

protected void setNodeAttributes(File path)
                          throws SAXException
Extends the setNodeAttributes method from the DirectoryGenerator by adding width, height and comment attributes if the path is a GIF or a JPEG file.

Overrides:
setNodeAttributes in class DirectoryGenerator
Parameters:
path - the file/directory to use when setting attributes
Throws:
SAXException - if an error occurs while setting the attributes


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