| org.apache.cocoon.transformation.AbstractTransformer org.apache.cocoon.transformation.CachingCIncludeTransformer
CachingCIncludeTransformer | public class CachingCIncludeTransformer extends AbstractTransformer implements Composable,Cacheable(Code) | | This transformer triggers for the element include in the
namespace "http://apache.org/cocoon/include/1.0".
The src attribute contains the url which points to
an xml resource which is include instead of the element.
With the attributes element , ns and
prefix it is possible to specify an element
which surrounds the included content.
Validity of cached pipelines is calculated not by comparing old and new
IncludeCacheValidity objects (as in AggregatedCacheValidity) but by comparing
timestamps. Validity object of cached pipeline contain two lists: source urls
and timestamps. When it comes to checking validity of cached pipeline we know
that generation/transformation steps before CIncludeTransformer are valid (otherwise
we would have had discarded cached pipeline already) so source url list
of new validity will be the same as of old one. Only timestamps have to be
recalculated and compared.
See Also: IncludeTransformer See Also: (scratchpad) author: Maciek Kaminski version: $Id: CachingCIncludeTransformer.java 433543 2006-08-22 06:22:54Z crossley $ |
Method Summary | |
final public void | compose(ComponentManager manager) | public void | endDocument() | public void | endElement(String uri, String name, String raw) | public long | generateKey() Generate the unique key. | public CacheValidity | generateValidity() Generate the validity object. | protected IncludeXMLConsumer | getConsumer() | protected void | processCIncludeElement(String src, String element, String ns, String prefix) | public void | recycle() | public void | setup(SourceResolver resolver, Map objectModel, String source, Parameters parameters) Setup the component. | public void | startElement(String uri, String name, String raw, Attributes attr) |
CINCLUDE_INCLUDE_ELEMENT | final public static String CINCLUDE_INCLUDE_ELEMENT(Code) | | |
CINCLUDE_INCLUDE_ELEMENT_ELEMENT_ATTRIBUTE | final public static String CINCLUDE_INCLUDE_ELEMENT_ELEMENT_ATTRIBUTE(Code) | | |
CINCLUDE_INCLUDE_ELEMENT_NS_ATTRIBUTE | final public static String CINCLUDE_INCLUDE_ELEMENT_NS_ATTRIBUTE(Code) | | |
CINCLUDE_INCLUDE_ELEMENT_PREFIX_ATTRIBUTE | final public static String CINCLUDE_INCLUDE_ELEMENT_PREFIX_ATTRIBUTE(Code) | | |
CINCLUDE_INCLUDE_ELEMENT_SRC_ATTRIBUTE | final public static String CINCLUDE_INCLUDE_ELEMENT_SRC_ATTRIBUTE(Code) | | |
CINCLUDE_NAMESPACE_URI | final public static String CINCLUDE_NAMESPACE_URI(Code) | | |
consumer | protected IncludeXMLConsumer consumer(Code) | | The current IncludeXMLConsumer that ommits start and endDocument events.
|
manager | protected ComponentManager manager(Code) | | The current ComponentManager .
|
compose | final public void compose(ComponentManager manager) throws ComponentException(Code) | | Composable Interface
|
generateKey | public long generateKey()(Code) | | Generate the unique key.
This key must be unique inside the space of this component.
CachingCIncludeTransformer always generates the same key since which documents
are included depends only on former generation/transformation stages.
The generated key hashes the src |
generateValidity | public CacheValidity generateValidity()(Code) | | Generate the validity object.
CachingCIncludeTransformer generates "empty" IncludeCacheValidity
and completes it with validity data during transformation.
See processCIncludeElement method.
The generated validity object or null if thecomponent is currently not cacheable. |
recycle | public void recycle()(Code) | | Recycle the component
|
|
|