|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.sourceforge.chaperon.process.ParserProcessor
net.sourceforge.chaperon.cocoon.ParserTransformer
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>
| Nested Class Summary | |
class |
ParserTransformer.ParserAutomatonEntry
This class represent a entry in a store to cache the parser automaton. |
| Field Summary |
| Fields inherited from class net.sourceforge.chaperon.process.ParserProcessor |
ERROR, NS_OUTPUT, OUTPUT |
| Fields inherited from interface org.apache.cocoon.transformation.Transformer |
ROLE |
| Constructor Summary | |
ParserTransformer()
|
|
| Method Summary | |
void |
dispose()
The dispose operation is called at the end of a components lifecycle. |
void |
enableLogging(org.apache.avalon.framework.logger.Logger logger)
Provide component with a logger. |
java.io.Serializable |
getKey()
Generate the unique key. |
org.apache.excalibur.source.SourceValidity |
getValidity()
Generate the validity object. |
void |
parameterize(org.apache.avalon.framework.parameters.Parameters parameters)
Provide component with parameters. |
void |
recycle()
Recycle this component. |
void |
service(org.apache.avalon.framework.service.ServiceManager manager)
Pass the ServiceManager to the service. |
void |
setConsumer(org.apache.cocoon.xml.XMLConsumer consumer)
Set the XMLConsumer that will receive XML data. |
void |
setup(org.apache.cocoon.environment.SourceResolver resolver,
java.util.Map objectmodel,
java.lang.String src,
org.apache.avalon.framework.parameters.Parameters parameters)
Set the SourceResolver, objectModel Map, the source and sitemap Parameters used to process the request. |
| Methods inherited from class net.sourceforge.chaperon.process.ParserProcessor |
characters, comment, endCDATA, endDocument, endDTD, endElement, endEntity, endPrefixMapping, ignorableWhitespace, processingInstruction, setContentHandler, setDocumentLocator, setFailSafe, setFlatten, setLexicalHandler, setLocalizable, setLog, setParserAutomaton, skippedEntity, startCDATA, startDocument, startDTD, startElement, startEntity, startPrefixMapping |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.xml.sax.ContentHandler |
characters, endDocument, endElement, endPrefixMapping, ignorableWhitespace, processingInstruction, setDocumentLocator, skippedEntity, startDocument, startElement, startPrefixMapping |
| Methods inherited from interface org.xml.sax.ext.LexicalHandler |
comment, endCDATA, endDTD, endEntity, startCDATA, startDTD, startEntity |
| Constructor Detail |
public ParserTransformer()
| Method Detail |
public void enableLogging(org.apache.avalon.framework.logger.Logger logger)
enableLogging in interface org.apache.avalon.framework.logger.LogEnabledlogger - the loggerpublic void service(org.apache.avalon.framework.service.ServiceManager manager)
service in interface org.apache.avalon.framework.service.Serviceablemanager - The ServiceManager which this Composable uses.
public void parameterize(org.apache.avalon.framework.parameters.Parameters parameters)
throws org.apache.avalon.framework.parameters.ParameterException
parameterize in interface org.apache.avalon.framework.parameters.Parameterizableparameters - the parameters
org.apache.avalon.framework.parameters.ParameterException - if parameters are invalidpublic void setConsumer(org.apache.cocoon.xml.XMLConsumer consumer)
XMLConsumer that will receive XML data.
setConsumer in interface org.apache.cocoon.xml.XMLProducerconsumer -
public void setup(org.apache.cocoon.environment.SourceResolver resolver,
java.util.Map objectmodel,
java.lang.String src,
org.apache.avalon.framework.parameters.Parameters parameters)
throws org.apache.cocoon.ProcessingException,
org.xml.sax.SAXException,
java.io.IOException
setup in interface org.apache.cocoon.sitemap.SitemapModelComponentresolver - Source resolverobjectmodel - Object modelsrc - Sourceparameters - Parameters
java.io.IOException
org.apache.cocoon.ProcessingException
org.xml.sax.SAXExceptionpublic java.io.Serializable getKey()
getKey in interface org.apache.cocoon.caching.CacheableProcessingComponentpublic org.apache.excalibur.source.SourceValidity getValidity()
getValidity in interface org.apache.cocoon.caching.CacheableProcessingComponentnull if the component is currently not
cacheable.public void recycle()
null.
recycle in interface org.apache.avalon.excalibur.pool.Recyclablepublic void dispose()
dispose in interface org.apache.avalon.framework.activity.Disposable
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||