|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.avalon.framework.logger.AbstractLogEnabled org.apache.cocoon.xml.AbstractXMLProducer org.apache.cocoon.generation.AbstractGenerator org.apache.cocoon.generation.asciiart.AsciiArtSVGGenerator
public class AsciiArtSVGGenerator
A simple AsciiArt text SVG XML generator.
Field Summary | |
---|---|
protected Source |
inputSource
The input source |
Fields inherited from class org.apache.cocoon.generation.AbstractGenerator |
---|
objectModel, parameters, resolver, source |
Fields inherited from class org.apache.cocoon.xml.AbstractXMLProducer |
---|
contentHandler, EMPTY_CONTENT_HANDLER, lexicalHandler, xmlConsumer |
Fields inherited from interface org.apache.cocoon.generation.Generator |
---|
ROLE |
Constructor Summary | |
---|---|
AsciiArtSVGGenerator()
|
Method Summary | |
---|---|
protected void |
addAttribute(String nodeName,
String nodeValue)
Adds a feature to the Attribute attribute of the MailXMLSerializer object |
protected void |
characters(String s)
SAX character helper |
protected void |
endElement(String nodeName)
SAX endElement helper |
void |
generate()
Generate XML data. |
protected void |
generateSVGLineElements()
Generate SVG path elements. |
protected void |
generateSVGTextElements()
Generate SVG text elements. |
Serializable |
getKey()
Generate the unique key. |
SourceValidity |
getValidity()
Generate the validity object. |
protected String[] |
readAsciiArt()
Read the ascii art from the input source. |
void |
recycle()
Recycle this component. |
void |
setup(SourceResolver resolver,
Map objectModel,
String src,
Parameters par)
Setup the AsciiArtSVG generator. |
protected void |
startElement(String nodeName,
Attributes attributes)
SAX startElement helper |
Methods inherited from class org.apache.cocoon.xml.AbstractXMLProducer |
---|
setConsumer, setContentHandler, setLexicalHandler |
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled |
---|
enableLogging, 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.apache.cocoon.xml.XMLProducer |
---|
setConsumer |
Field Detail |
---|
protected Source inputSource
Constructor Detail |
---|
public AsciiArtSVGGenerator()
Method Detail |
---|
public void setup(SourceResolver resolver, Map objectModel, String src, Parameters par) throws ProcessingException, SAXException, IOException
setup
in interface SitemapModelComponent
setup
in class AbstractGenerator
resolver
- Cocoon's resolverobjectModel
- Cocoon's objectModelsrc
- generator's src attributepar
- sitemap parameters
ProcessingException
- setup fails
SAXException
- sax generation fails
IOException
- general io failspublic void recycle()
null
.
recycle
in interface Recyclable
recycle
in class AbstractGenerator
public Serializable getKey()
getKey
in interface CacheableProcessingComponent
public SourceValidity getValidity()
getValidity
in interface CacheableProcessingComponent
null
if the
component is currently not cacheable.public void generate() throws IOException, SAXException, ProcessingException
generate
in interface Generator
IOException
SAXException
ProcessingException
protected String[] readAsciiArt() throws IOException
IOException
- reading the ascii art failsprotected void generateSVGLineElements() throws SAXException
SAXException
- iff SAX generation fails.protected void generateSVGTextElements() throws SAXException
SAXException
- iff SAX generation fails.protected void startElement(String nodeName, Attributes attributes) throws SAXException
nodeName
- name of the element's nameattributes
- of the node
SAXException
- iff SAX generation failsprotected void characters(String s) throws SAXException
s
- Description of the Parameter
SAXException
- iff SAX generation failsprotected void endElement(String nodeName) throws SAXException
nodeName
- name of the element's name
SAXException
- iff SAX generation failsprotected void addAttribute(String nodeName, String nodeValue)
nodeName
- name of the attriute's namenodeValue
- value of the attribute
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |