Image Directory Generator

User Documentation


File Generator

Directory Generator
Fragment Extractor Generator
HTML Generator
Image Directory Generator
JSP Generator
Notifying Generator
Request Generator
Script Generator
Search Generator
Server Pages Generator
Status Generator
Stream Generator
Velocity Generator

PHP Generator
XML:DB Generator
XML:DB Collection Generator

Image Directory Generator

Generates an XML directory listing. This is an extension of the Directory Generator. It checks if the contained files are images and adds their size to the attributes.

The root node of the generated document will normally be a directory node, and a directory node can contain zero or more file or directory nodes. A file node has no children. Each node will contain the following attributes:

  • name : the name of the file or directory
  • lastModified : the time the file was last modified, measured as the number of milliseconds since the epoch (as in
  • date (optional) : the time the file was last modified in human-readable form
  • width (optional) : the width of the image if it is an image file
  • height (optional) : the height of the image if it is an image file

All generated elements have the namespace The root directory node has the attribute requested with the value true.

  • Name : imagedirectory
  • Class: org.apache.cocoon.generation.ImageDirectoryGenerator
  • Cacheable: no.
  <map:generate type="imagedirectory" src="the_directory"/>

The following parameter can be specified in the pipeline for the generate command:

  • depth (optional) : Sets how deep Image Directory Generator should delve into the directory structure. If set to 1 (the default), only the starting directory's immediate contents will be returned.
  • dateFormat (optional) : Sets the format for the date attribute of each node, as described in java.text.SimpleDateFormat. If unset, the default format for the current locale will be used.
  • root (optional) : The root pattern
  • include (optional) : The include pattern
  • exclude (optional) : The exclude pattern
Copyright © 1999-2002 The Apache Software Foundation. All Rights Reserved.