public abstract class AbstractPipeline extends AbstractSdxXMLPipe implements Pipeline
SdxObject.ConfigurationNode| Modifier and Type | Field and Description |
|---|---|
protected java.lang.String |
keepStep |
protected java.util.LinkedList |
transformations
A list of the transformations that make up this pipeline.
|
protected java.util.Vector |
transformsList
A list of the transformations that make up this pipeline.
|
_configuration, _context, _description, _encoding, _id, _locale, _logger, _manager, _xmlizable_objects, _xmlLang, isToSaxInitializedcontentHandler, EMPTY_CONTENT_HANDLER, lexicalHandler, xmlConsumerCLASS_NAME_SUFFIX, PACKAGE_QUALNAMEDEFAULT_ENCODING| Constructor and Description |
|---|
AbstractPipeline() |
| Modifier and Type | Method and Description |
|---|---|
void |
addTransformation(Transformation t)
Adds a transformation to the pipeline and sets the consumer of the last
transformation to be the newly added transformation.
|
void |
configure(org.apache.avalon.framework.configuration.Configuration configuration)
Configures the pipeline.
|
protected java.lang.String |
getClassNameSuffix()
Sub classes should element this method to return their class name suffix for SAX output
|
org.apache.avalon.framework.parameters.Parameters |
getParameters()
Returns the paramters for this pipeline
|
byte[] |
getTransformedBytes()
Returns a byte array which contains the
data of a transformation step.
|
java.io.File |
getTransformedFile()
Returns a file which contains the
data of a transformation step.
|
protected boolean |
initToSax()
Init the DefaultContext class _xmlizable_objects with the objects in order to describ them in XML
|
protected void |
initVolatileObjectsToSax()
Init the LinkedHashMap _xmlizable_volatile_objects with the objects in order to describ them in XML
Some objects need to be refresh each time a toSAX is called
|
Pipeline |
newInstance()
Returns a new instance of this object
|
void |
setConsumer(org.apache.cocoon.xml.XMLConsumer xmlConsumer)
Sets the consumer of the pipeline.
|
void |
setParameters(org.apache.avalon.framework.parameters.Parameters params)
Sets the Parameters for each step in the Pipeline
|
protected void |
setParametersToTransformations(org.apache.avalon.framework.parameters.Parameters parameters) |
protected void |
verifyConfigurationParameters(org.apache.avalon.framework.parameters.Parameters params) |
configureDescription, contextualize, enableLogging, getBaseAttributes, getConfiguration, getContext, getDescription, getEncoding, getId, getLocale, getLog, getServiceManager, getXmlLang, service, setDescription, setEncoding, setId, setLocale, setUpSdxObject, setUpSdxObject, setXmlLang, toSAX, verifyConfigurationResourcescharacters, comment, endCDATA, endDocument, endDTD, endElement, endEntity, endPrefixMapping, ignorableWhitespace, processingInstruction, setDocumentLocator, skippedEntity, startCDATA, startDocument, startDTD, startElement, startEntity, startPrefixMappingrecycle, setContentHandler, setLexicalHandlergetLogger, setupLogger, setupLogger, setupLoggerclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcharacters, endDocument, endElement, endPrefixMapping, ignorableWhitespace, processingInstruction, setDocumentLocator, skippedEntity, startDocument, startElement, startPrefixMappingcomment, endCDATA, endDTD, endEntity, startCDATA, startDTD, startEntitygetId, setIdgetDescription, setDescriptiongetEncoding, setEncodinggetLocale, getXmlLang, setLocale, setXmlLangprotected java.util.LinkedList transformations
protected java.util.Vector transformsList
protected java.lang.String keepStep
public void configure(org.apache.avalon.framework.configuration.Configuration configuration)
throws org.apache.avalon.framework.configuration.ConfigurationException
configure in interface org.apache.avalon.framework.configuration.Configurableconfigure in class AbstractSdxXMLPipeconfiguration - The configuration object provided from a document base object.
Retrieves the children elements named "transformation" and builds a transformation object for each element. Currently the only supported transformation type is "xslt".
Sample configuration snippet:
<sdx:pipeline sdx:id = "sdxIndexationPipeline">
<sdx:transformation src = "path to stylesheet, can be absolute or relative to the directory containing this file" sdx:id = "step2" sdx:type = "xslt"/>
<sdx:transformation src = "path to stylesheet, can be absolute or relative to the directory containing this file" sdx:id = "step3" sdx:type = "xslt" keep = "true"/>
</sdx:pipeline>
org.apache.avalon.framework.configuration.ConfigurationExceptionprotected void verifyConfigurationParameters(org.apache.avalon.framework.parameters.Parameters params)
public void addTransformation(Transformation t) throws SDXException
addTransformation in interface Pipelinet - The transformation to be added.SDXExceptionpublic void setConsumer(org.apache.cocoon.xml.XMLConsumer xmlConsumer)
setConsumer in interface org.apache.cocoon.xml.XMLProducersetConsumer in class org.apache.cocoon.xml.AbstractXMLProducerxmlConsumer - The XMLConsumer for the LAST step of the pipelinepublic void setParameters(org.apache.avalon.framework.parameters.Parameters params)
setParameters in interface Pipelineparams - The Parameters to use for each transformation step.
Each transformation step in the pipeline can call (getParameters() defined in the Transformation interface) and make use this Parameters object as needed before pipeline processing begins.
protected void setParametersToTransformations(org.apache.avalon.framework.parameters.Parameters parameters)
public Pipeline newInstance() throws SDXException
newInstance in interface PipelineSDXExceptionpublic org.apache.avalon.framework.parameters.Parameters getParameters()
getParameters in interface Pipelinepublic byte[] getTransformedBytes()
null will be returnedgetTransformedBytes in interface Pipelinepublic java.io.File getTransformedFile()
throws SDXException
null will be returnedgetTransformedFile in interface PipelineSDXExceptionprotected java.lang.String getClassNameSuffix()
AbstractSdxXMLPipegetClassNameSuffix in class AbstractSdxXMLPipeprotected boolean initToSax()
AbstractSdxXMLPipeinitToSax in class AbstractSdxXMLPipeprotected void initVolatileObjectsToSax()
initVolatileObjectsToSax in class AbstractSdxXMLPipeCopyright © 2000-2010 Ministere de la culture et de la communication / AJLSM. All Rights Reserved.