|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.apache.avalon.framework.logger.AbstractLogEnabled
org.apache.cocoon.xml.AbstractXMLProducer
org.apache.cocoon.xml.AbstractXMLPipe
org.apache.cocoon.transformation.AbstractTransformer
net.sourceforge.chaperon.cocoon.PatternTransformer
This transfomer transforms text pattern of a XML file into lexemes by using a lexicon file.
Input:
<section> Text 123 bla </section>
can be transformed into the following output:
<section> Text <lexeme symbol="number" text="123"/> bla </section>
| Nested Class Summary | |
class |
PatternTransformer.LexicalAutomatonEntry
This class represent a entry in a store to cache the lexical automaton. |
| Field Summary | |
static java.lang.String |
NS
Namespace for the SAX events. |
| Fields inherited from class org.apache.cocoon.xml.AbstractXMLProducer |
contentHandler, EMPTY_CONTENT_HANDLER, lexicalHandler, xmlConsumer |
| Fields inherited from interface org.apache.cocoon.transformation.Transformer |
ROLE |
| Constructor Summary | |
PatternTransformer()
|
|
| Method Summary | |
void |
characters(char[] c,
int start,
int len)
Receive notification of character data. |
void |
comment(char[] ch,
int start,
int len)
Report an XML comment anywhere in the document. |
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. |
void |
endElement(java.lang.String uri,
java.lang.String loc,
java.lang.String raw)
Receive notification of the end of an element. |
java.io.Serializable |
getKey()
Generate the unique key. |
org.apache.excalibur.source.SourceValidity |
getValidity()
Generate the validity object. |
void |
ignorableWhitespace(char[] c,
int start,
int len)
Receive notification of ignorable whitespace in element content. |
void |
parameterize(org.apache.avalon.framework.parameters.Parameters parameters)
Provide component with parameters. |
void |
processingInstruction(java.lang.String target,
java.lang.String data)
Receive notification of a processing instruction. |
void |
recycle()
Recycle this component. |
void |
service(org.apache.avalon.framework.service.ServiceManager manager)
Pass the ServiceManager to the Serviceable. |
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. |
void |
startElement(java.lang.String uri,
java.lang.String loc,
java.lang.String raw,
org.xml.sax.Attributes a)
Receive notification of the beginning of an element. |
| Methods inherited from class org.apache.cocoon.xml.AbstractXMLPipe |
endCDATA, endDocument, endDTD, endEntity, endPrefixMapping, setDocumentLocator, skippedEntity, startCDATA, startDocument, startDTD, startEntity, startPrefixMapping |
| Methods inherited from class org.apache.cocoon.xml.AbstractXMLProducer |
setConsumer, setContentHandler, setLexicalHandler |
| Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled |
getLogger, setupLogger, setupLogger, setupLogger |
| 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 |
endDocument, endPrefixMapping, setDocumentLocator, skippedEntity, startDocument, startPrefixMapping |
| Methods inherited from interface org.xml.sax.ext.LexicalHandler |
endCDATA, endDTD, endEntity, startCDATA, startDTD, startEntity |
| Methods inherited from interface org.apache.cocoon.xml.XMLProducer |
setConsumer |
| Field Detail |
public static final java.lang.String NS
| Constructor Detail |
public PatternTransformer()
| 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 Serviceable 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 invalid
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
public void startElement(java.lang.String uri,
java.lang.String loc,
java.lang.String raw,
org.xml.sax.Attributes a)
throws org.xml.sax.SAXException
startElement in interface org.xml.sax.ContentHandleruri - The Namespace URI, or the empty string if the element has no Namespace URI or if
Namespace processing is not being performed.loc - The local name (without prefix), or the empty string if Namespace processing is not
being performed.raw - The raw XML 1.0 name (with prefix), or the empty string if raw names are not
available.a - The attributes attached to the element. If there are no attributes, it shall be an
empty Attributes object.
org.xml.sax.SAXException
public void endElement(java.lang.String uri,
java.lang.String loc,
java.lang.String raw)
throws org.xml.sax.SAXException
endElement in interface org.xml.sax.ContentHandleruri - The Namespace URI, or the empty string if the element has no Namespace URI or if
Namespace processing is not being performed.loc - The local name (without prefix), or the empty string if Namespace processing is not
being performed.raw - The raw XML 1.0 name (with prefix), or the empty string if raw names are not
available.
org.xml.sax.SAXException
public void characters(char[] c,
int start,
int len)
throws org.xml.sax.SAXException
characters in interface org.xml.sax.ContentHandlerc - The characters from the XML document.start - The start position in the array.len - The number of characters to read from the array.
org.xml.sax.SAXException
public void ignorableWhitespace(char[] c,
int start,
int len)
throws org.xml.sax.SAXException
ignorableWhitespace in interface org.xml.sax.ContentHandlerc - The characters from the XML document.start - The start position in the array.len - The number of characters to read from the array.
org.xml.sax.SAXException
public void processingInstruction(java.lang.String target,
java.lang.String data)
throws org.xml.sax.SAXException
processingInstruction in interface org.xml.sax.ContentHandlertarget - The processing instruction target.data - The processing instruction data, or null if none was supplied.
org.xml.sax.SAXException
public void comment(char[] ch,
int start,
int len)
throws org.xml.sax.SAXException
comment in interface org.xml.sax.ext.LexicalHandlerch - An array holding the characters in the comment.start - The starting position in the array.len - The number of characters to use from the array.
org.xml.sax.SAXException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||