org.apache.cocoon.generation
Class FragmentExtractorGenerator
java.lang.Object
|
+--org.apache.avalon.framework.logger.AbstractLoggable
|
+--org.apache.cocoon.xml.AbstractXMLProducer
|
+--org.apache.cocoon.generation.AbstractGenerator
|
+--org.apache.cocoon.generation.FragmentExtractorGenerator
- All Implemented Interfaces:
- Cacheable, org.apache.avalon.framework.component.Component, Generator, org.apache.avalon.framework.logger.Loggable, org.apache.avalon.excalibur.pool.Poolable, org.apache.avalon.excalibur.pool.Recyclable, SitemapModelComponent, XMLProducer
- public class FragmentExtractorGenerator
- extends AbstractGenerator
- implements Cacheable
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 on a clustered server.
- Version:
- CVS $Id: FragmentExtractorGenerator.java,v 1.7.2.1 2002/10/22 02:51:29 vgritsenko Exp $
- Author:
- Paul Russell
Fields inherited from interface org.apache.cocoon.generation.Generator |
ROLE |
Method Summary |
void |
generate()
|
long |
generateKey()
Generate the unique key.
|
CacheValidity |
generateValidity()
Generate the validity object. |
void |
setup(SourceResolver resolver,
java.util.Map objectModel,
java.lang.String src,
org.apache.avalon.framework.parameters.Parameters par)
Set the SourceResolver , object model Map ,
the source and sitemap Parameters used to process the request. |
static java.lang.String |
store(org.w3c.dom.Document doc)
|
Methods inherited from class org.apache.avalon.framework.logger.AbstractLoggable |
getLogger, setLogger, setupLogger, setupLogger, setupLogger |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FragmentExtractorGenerator
public FragmentExtractorGenerator()
setup
public void setup(SourceResolver resolver,
java.util.Map objectModel,
java.lang.String src,
org.apache.avalon.framework.parameters.Parameters par)
throws ProcessingException,
org.xml.sax.SAXException,
java.io.IOException
- Description copied from class:
AbstractGenerator
- Set the
SourceResolver
, object model Map
,
the source and sitemap Parameters
used to process the request.
- Overrides:
setup
in class AbstractGenerator
generateKey
public long generateKey()
- Generate the unique key.
This key must be unique inside the space of this component.
- Specified by:
generateKey
in interface Cacheable
- Returns:
- The generated key hashes the src
generateValidity
public CacheValidity generateValidity()
- Generate the validity object.
- Specified by:
generateValidity
in interface Cacheable
- Returns:
- The generated validity object or
null
if the
component is currently not cacheable.
generate
public void generate()
throws org.xml.sax.SAXException
store
public static java.lang.String store(org.w3c.dom.Document doc)
Copyright � 1999-2002 Apache Software Foundation. All Rights Reserved.