| org.apache.cocoon.serialization.AbstractSerializer org.apache.cocoon.serialization.ZipArchiveSerializer
ZipArchiveSerializer | public class ZipArchiveSerializer extends AbstractSerializer implements Disposable,Serviceable(Code) | | A serializer that builds Zip archives by aggregating several sources.
The input document should describe entries of the archive by means of
their name (which can be a path) and their content either as URLs or
inline data :
- URLs, given by the "src" attribute, are Cocoon sources and as such
can use any of the protocols handled by Cocoon, including "cocoon:" to
include dynamically generated content in the archive.
- inline data is represented by an XML document that is serialized to the
zip entry using the serializer identified by the "serializer" attribute.
Example :
<zip:archive xmlns:zip="http://apache.org/cocoon/zip-archive/1.0">
<zip:entry name="foo.html" src="cocoon://dynFoo.html"/>
<zip:entry name="images/bar.jpeg" src="bar.jpeg"/>
<zip:entry name="index.html" serializer="html">
<html>
<head>
<title>Index page</title>
</head>
<body>
Please go <a href="foo.html">there</a>
</body<
</html>
</zip:entry>
</zip:archive:zip>
author: Sylvain Wallez version: $Id: ZipArchiveSerializer.java 437692 2006-08-28 13:09:39Z anathaniel $ |
ZIP_NAMESPACE | final public static String ZIP_NAMESPACE(Code) | | The namespace for elements handled by this serializer,
"http://apache.org/cocoon/zip-archive/1.0".
|
buffer | protected byte[] buffer(Code) | | Temporary byte buffer to read source data
|
contentDepth | protected int contentDepth(Code) | | Current depth of the serialized content
|
manager | protected ServiceManager manager(Code) | | The component manager
|
resolver | protected SourceResolver resolver(Code) | | The resolver to get sources
|
selector | protected ServiceSelector selector(Code) | | The serializer component selector
|
serializer | protected Serializer serializer(Code) | | Serializer used when in IN_CONTENT state
|
state | protected int state(Code) | | The current state
|
addEntry | protected void addEntry(Attributes atts) throws SAXException(Code) | | Add an entry in the archive.
Parameters: atts - the attributes that describe the entry |
dispose | public void dispose()(Code) | | |
getMimeType | public String getMimeType()(Code) | | Returns default mime type for zip archives, application/zip .
Can be overridden in the sitemap.
application/zip |
recycle | public void recycle()(Code) | | See Also: org.apache.avalon.excalibur.pool.Recyclable.recycle |
service | public void service(ServiceManager manager) throws ServiceException(Code) | | See Also: org.apache.avalon.framework.service.Serviceable.service(ServiceManager) |
startPrefixMapping | public void startPrefixMapping(String prefix, String uri) throws SAXException(Code) | | Begin the scope of a prefix-URI Namespace mapping.
Parameters: prefix - The Namespace prefix being declared. Parameters: uri - The Namespace URI the prefix is mapped to. |
|
|