org.apache.cocoon.transformation
public class: DeliTransformer [javadoc |
source]
java.lang.Object
org.apache.avalon.framework.logger.AbstractLogEnabled
org.apache.cocoon.xml.AbstractXMLProducer
org.apache.cocoon.xml.AbstractXMLPipe
org.apache.cocoon.transformation.AbstractTransformer
org.apache.cocoon.transformation.TraxTransformer
org.apache.cocoon.transformation.DeliTransformer
All Implemented Interfaces:
org.apache.avalon.framework.activity.Disposable, CacheableProcessingComponent, org.apache.avalon.framework.service.Serviceable, org.apache.avalon.framework.configuration.Configurable, Transformer, XMLPipe, org.apache.avalon.excalibur.pool.Recyclable, XMLProducer
This Transformer is used to transform this incoming SAX stream using
a XSLT stylesheet and have parameters available to the stylesheet
augmented by the DELI CC/PP user-agent profile database
This transformer extends the default TraxTransformer and thus inherits
all the properties and configuration parameters of that transformer.
Please refer to its documentation for more information.
- author:
< - a href="mailto:marbut@hplb.hpl.hp.com">Mark H. Butler
- author:
< - a href="mailto:stefano@apache.org">Stefano Mazzocchi
- version:
CVS - $Id: DeliTransformer.java 433543 2006-08-22 06:22:54Z crossley $
| Methods from org.apache.cocoon.transformation.TraxTransformer: |
|---|
|
configure, dispose, endDocument, getKey, getLogicSheetParameters, getValidity, isValidXSLTParameterName, recycle, service, setConsumer, setup, startDocument |
| Methods from org.apache.cocoon.xml.AbstractXMLPipe: |
|---|
|
characters, comment, endCDATA, endDTD, endDocument, endElement, endEntity, endPrefixMapping, ignorableWhitespace, processingInstruction, setDocumentLocator, skippedEntity, startCDATA, startDTD, startDocument, startElement, startEntity, startPrefixMapping |
| Method from org.apache.cocoon.transformation.DeliTransformer Detail: |
public void dispose() {
if ( this.manager != null ) {
this.manager.release(this.deli);
this.deli = null;
}
super.dispose();
}
|
protected Map getLogicSheetParameters() {
Map map = super.getLogicSheetParameters();
if (this.deli != null) {
try {
Request request = ObjectModelHelper.getRequest(objectModel);
if (map == null) {
map = new HashMap();
}
org.w3c.dom.Document deliCapabilities = this.deli.getUACapabilities(request);
map.put("deli-capabilities", deliCapabilities);
String accept = request.getParameter("accept");
if (accept == null) {
accept = request.getHeader("accept");
}
// add the accept param
map.put("accept", accept);
} catch (Exception e) {
getLogger().error("Error setting DELI info", e);
}
}
this.logicSheetParameters = map;
return this.logicSheetParameters;
}
Get the parameters for the logicsheet |
public void service(ServiceManager manager) throws ServiceException {
super.service(manager);
this.deli = (Deli) this.manager.lookup(Deli.ROLE);
}
Set the current ServiceManager instance used by this
Serviceable. |