| Home >> All >> org >> apache >> cocoon >> [ generation Javadoc ] |
org.apache.cocoon.generation: Javadoc index of package org.apache.cocoon.generation.
Package Samples:
org.apache.cocoon.generation
Classes:
VelocityGenerator: Cocoon Generator that produces dynamic XML SAX events from a Velocity template file. Sitemap Configuration Attributes: usecache (optional; default: 'false') set to 'true' to enable template caching on the 'cocoon' resource loader checkInterval (optional; default: '0') This is the number of seconds between modification checks when caching is turned on. When this is an integer > 0, this represents the number of seconds between checks to see if the template was modified. If the template has been modified since last check, then it is reloaded and reparsed. Otherwise nothing is done. When <= 0, ...
SearchGenerator: Generates an XML representation of a search result. This generator generates xml content representening an XML search. The generated xml content contains the search result, the search query information, and navigation information about the search results. Search xml sample generated by this generator: <?xml version="1.0" encoding="UTF-8"?> <search:results date="1008437081064" query-string="cocoon" start-index="0" page-length="10" xmlns:search="http://apache.org/cocoon/search/1.0" xmlns:xlink="http://www.w3.org/1999/xlink"> ...
SessionAttributeGenerator: Generates a document from a session attribute. The attribute may be a DOM node, an XMLizable , or any other object, and is streamed using the same rules as for <xsp:expr> in XSPs (see org.apache.cocoon.components.language.markup.xsp.XSPObjectHelper ). Name of the session attribute is specified using src attribute of the generate tag, or, if no src tag present, using attr-name parameter. This generator has 2 parameters: attr-name : the session attribute name (mandatory if no src attribute specified). root-element (optional) : the name of the root element of the produced document. This parameter ...
XPathDirectoryGenerator: Generates an XML directory listing performing XPath queries on XML files. It can be used both as a plain DirectoryGenerator or, using an "xpointerinsh" syntax it will perform an XPath query on every XML resource. Sample usage: Sitemap: <map:match pattern="documents/**"> <map:generate type="xpathdirectory" src="docs/{1}#/article/title|/article/abstract" /> <map:serialize type="xml" /> </map:match> Request: http://www.some.host/documents/test Result: <dir:directory name="test" lastModified="1010400942000" date="1/7/02 11:55 AM" requested="true" xmlns:dir="http://apache.org/cocoon/directory/2.0"> ...
DirectoryGenerator: Generates an XML directory listing. 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 java.io.File.lastModified) date (optional) the time the file was last modified in human-readable form Configuration options: depth (optional) Sets how deep DirectoryGenerator should delve into ...
StreamGenerator: The StreamGenerator is a class that reads XML from a request InputStream and generates SAX Events. For the POST requests with mimetype of application/x-www-form-urlencoded the xml data is expected to be associated with the name specified in the sitemap parameter. For the POST requests with mimetypes: text/plain, text/xml, application/xml the xml data is in the body of the POST request and its length is specified by the value returned by getContentLength() method. The StreamGenerator uses helper org.apache.cocoon.util.PostInputStream class for InputStream reading operations. At the time that Parser ...
MP3DirectoryGenerator: An extension of DirectoryGenerators that adds extra attributes for MP3 files. Following extra attributes added to valid MP3 files: frequency the frequency of the MP3 file in KHz (most common: 44.1) bitrate the bitrate of the MP3 file in Kbit, from 8 to 448. mode the mode of the MP3 file, one of the following: Stereo, Joint stereo, Dual channel, Single channel. variable-rate (optional) value is "yes" if VBR header is detected title, artitst, album, year, comment, track, genre (all optional) values obtained from MP3 ID3 tag
ServerPagesGenerator: This class acts as a proxy to a dynamically loaded Generator delegating actual SAX event generation. It has a single configuration item : <autocomplete-documents>true|false<autocomplete-documents> (default is false ). This tells the generator to automatically close all elements that weren't properly closed by the XSP, such as when a return statement is used to prematurely end processing. Activating this feature sensibly increases CPU-usage and should therefore be used only if really needed (it's better to have clean XSP pages that don't break abruptly generation flow).
FragmentExtractorGenerator: The generation half of FragmentExtractor. FragmentExtractor is a transformer-generator pair which is designed to allow sitemap managers to extract certain nodes from a SAX stream and move them into a separate pipeline. The main use for this is to extract inline SVG images and serve them up through a separate pipeline, usually serializing them to PNG or JPEG format first. This is by no means complete yet, but it should prove useful, particularly for offline generation. Warning : since fragments are stored locally in the class, this generator and the associated transformer are very likely to fail ...
ScriptGenerator: The Scriptgenerator executes arbitraty scripts using the BSF framework and additional interpreter (Rhino, Jython, etc.) as a Cocoon Generator. Additional language support can be added during configuration, eg using: <add-languages> <language name="potatoscript" src="edu.purdue.cs.bsf.engines.Potatoscript"> <extension>pos</extension> <extension>psc</extension> <language> <language name="kawa-scheme" src="org.gnu.kawa.bsf.engines.KawaEngine"> <extension>scm</extension> <language> </add-languages>
XMLDBGenerator: This class implements generation of XML documents from a XML:DB compliant database. It must to be configured as follows: <driver> (a valid DB:XML compliant driver) </driver> <base> xmldb:yourdriver://host/an/optional/path/to/be/prepended </base> NOTE: the driver can be any DB:XML compliant driver (although this component has been tested only with dbXML , and the trailing slash in the base tag is important!
XMLDBCollectionGenerator: This class implements generation of a XML:DB collection contents as a directory listing. <driver> (a valid DB:XML compliant driver) </driver> <base> xmldb:yourdriver://host/an/optional/path/to/be/prepended </base> NOTE: the driver can be any DB:XML compliant driver (although this component has been tested only with dbXML , and the trailing slash in the base tag is important!
StatusGenerator: Generates an XML representation of the current status of Cocoon. Potted DTD: <!ELEMENT statusinfo (group|value)*> <!ATTLIST statusinfo date CDATA #IMPLIED host CDATA #IMPLIED > <!ELEMENT group (group|value)*> <!ATTLIST group name CDATA #IMPLIED > <!ELEMENT value (line)+> <!ATTLIST value name CDATA #REQUIRED <!ELEMENT line (#PCDATA)+> >
RequestGenerator: Generates an XML representation of the incoming request. Configuration options: container-encoding (optional) The encoding used by container. Default value is ISO-8859-1. form-encoding (optional) The supposed encoding of the request parameter. Default is null. These configuration options supported in both declaration and use time.
FileGenerator: The FileGenerator is a class that reads XML from a source and generates SAX Events. The FileGenerator implements the Cacheable interface.
PhpGenerator: Allows PHP to be used as a generator. Builds upon the PHP servlet functionallity - overrides the output method in order to pipe the results into SAX events.
JspGenerator: Allows JSP to be used as a generator. Builds upon the JSP servlet functionality - overrides the output method in order to pipe the results into SAX events.
AbstractServerPage: Base implementation of ServerPagesGenerator . This class declares variables that must be explicitly initialized by code generators.
ImageDirectoryGenerator: An extension of DirectoryGenerators that adds extra attributes for image files.
LinkStatusGenerator: Generates a list of links that are reachable from the src and their status.
| Home | Contact Us | Privacy Policy | Terms of Service |