|
||||||||||
| 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.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 SitemapModelComponentsetup in class AbstractGeneratorresolver - 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 Recyclablerecycle in class AbstractGeneratorpublic Serializable getKey()
getKey in interface CacheableProcessingComponentpublic SourceValidity getValidity()
getValidity in interface CacheableProcessingComponentnull if the
component is currently not cacheable.
public void generate()
throws IOException,
SAXException,
ProcessingException
generate in interface GeneratorIOException
SAXException
ProcessingException
protected String[] readAsciiArt()
throws IOException
IOException - reading the ascii art fails
protected 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 fails
protected void characters(String s)
throws SAXException
s - Description of the Parameter
SAXException - iff SAX generation fails
protected void endElement(String nodeName)
throws SAXException
nodeName - name of the element's name
SAXException - iff SAX generation fails
protected 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 | |||||||||