| org.apache.cocoon.transformation.ParserTransformer
ParserTransformer | public class ParserTransformer extends ParserProcessor implements Transformer,LogEnabled,Serviceable,Parameterizable,Recyclable,Disposable,CacheableProcessingComponent(Code) | | This transfomer transforms lexical tokens in a XML file into a XML hirachy by using a grammar
file.
Input:
<lexemes xmlns="http://chaperon.sourceforge.net/schema/lexemes/1.0">
<lexeme symbol="word" text="Text"/>
<lexeme symbol="number" text="123"/>
<lexeme symbol="word" text="bla"/>
</lexemes>
were transform into the following output:
<sentence xmlns="http://chaperon.sourceforge.net/schema/syntaxtree/1.0">
<word>Text</word>
<number>123</number>
<word>bla</word>
</sentence>
author: Stephan Michels version: CVS $Id: ParserTransformer.java 433543 2006-08-22 06:22:54Z crossley $ |
Inner Class :public static class ParserAutomatonEntry implements Serializable | |
Method Summary | |
public void | dispose() The dispose operation is called at the end of a components lifecycle. | public void | enableLogging(Logger logger) Provide component with a logger. | public Serializable | getKey() Generate the unique key. | public SourceValidity | getValidity() Generate the validity object. | public void | parameterize(Parameters parameters) Provide component with parameters. | public void | recycle() Recycle this component. | public void | service(ServiceManager manager) Pass the ServiceManager to the object. | public void | setConsumer(XMLConsumer consumer) Set the XMLConsumer that will receive XML data. | public void | setup(SourceResolver resolver, Map objectmodel, String src, Parameters parameters) Set the SourceResolver, objectModel Map, the source and sitemap Parameters used to process the
request. |
dispose | public void dispose()(Code) | | The dispose operation is called at the end of a components lifecycle.
|
enableLogging | public void enableLogging(Logger logger)(Code) | | Provide component with a logger.
Parameters: logger - the logger |
getKey | public Serializable getKey()(Code) | | Generate the unique key. This key must be unique inside the space of this component.
The generated key hashes the src |
getValidity | public SourceValidity getValidity()(Code) | | Generate the validity object.
The generated validity object or null if the component is currently notcacheable. |
parameterize | public void parameterize(Parameters parameters) throws ParameterException(Code) | | Provide component with parameters.
Parameters: parameters - the parameters throws: ParameterException - if parameters are invalid |
recycle | public void recycle()(Code) | | Recycle this component. All instance variables are set to null .
|
service | public void service(ServiceManager manager)(Code) | | Pass the ServiceManager to the object. The Serviceable implementation should use the
specified ServiceManager to acquire the services it needs for execution.
Parameters: manager - The ServiceManager which this Serviceable uses. |
setConsumer | public void setConsumer(XMLConsumer consumer)(Code) | | Set the XMLConsumer that will receive XML data.
Parameters: consumer - |
|
|