Class PlantUMLSerializer
- java.lang.Object
-
- org.xml.sax.helpers.DefaultHandler
-
- org.xml.sax.ext.DefaultHandler2
-
- org.ametys.plugins.contenttypeseditor.PlantUMLSerializer
-
- All Implemented Interfaces:
Initializable
,Component
,Serializer
,SitemapOutputComponent
,XMLConsumer
,XMLConsumer
,ContentHandler
,DTDHandler
,EntityResolver
,ErrorHandler
,DeclHandler
,EntityResolver2
,LexicalHandler
public class PlantUMLSerializer extends DefaultHandler2 implements Serializer, Initializable
Serialize PlantUML
-
-
Field Summary
Fields Modifier and Type Field Description private StringBuilder
_buffer
Buffer to store plantuml scriptprivate OutputStream
_out
OutputStream where the requested resource should be serializedprivate static String
PLANTUML_LIMIT_SIZE
Planuml picture size-
Fields inherited from interface org.apache.cocoon.serialization.Serializer
ROLE
-
-
Constructor Summary
Constructors Constructor Description PlantUMLSerializer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
characters(char[] ch, int start, int length)
void
endDocument()
String
getMimeType()
void
initialize()
void
setOutputStream(OutputStream out)
boolean
shouldSetContentLength()
void
startDocument()
-
Methods inherited from class org.xml.sax.ext.DefaultHandler2
attributeDecl, comment, elementDecl, endCDATA, endDTD, endEntity, externalEntityDecl, getExternalSubset, internalEntityDecl, resolveEntity, resolveEntity, startCDATA, startDTD, startEntity
-
Methods inherited from class org.xml.sax.helpers.DefaultHandler
endElement, endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, setDocumentLocator, skippedEntity, startElement, startPrefixMapping, unparsedEntityDecl, warning
-
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
endElement, endPrefixMapping, ignorableWhitespace, processingInstruction, setDocumentLocator, skippedEntity, startElement, startPrefixMapping
-
Methods inherited from interface org.xml.sax.ext.LexicalHandler
comment, endCDATA, endDTD, endEntity, startCDATA, startDTD, startEntity
-
-
-
-
Field Detail
-
PLANTUML_LIMIT_SIZE
private static final String PLANTUML_LIMIT_SIZE
Planuml picture size- See Also:
- Constant Field Values
-
_buffer
private StringBuilder _buffer
Buffer to store plantuml script
-
_out
private OutputStream _out
OutputStream where the requested resource should be serialized
-
-
Constructor Detail
-
PlantUMLSerializer
public PlantUMLSerializer()
-
-
Method Detail
-
initialize
public void initialize() throws Exception
- Specified by:
initialize
in interfaceInitializable
- Throws:
Exception
-
startDocument
public void startDocument() throws SAXException
- Specified by:
startDocument
in interfaceContentHandler
- Overrides:
startDocument
in classDefaultHandler
- Throws:
SAXException
-
endDocument
public void endDocument() throws SAXException
- Specified by:
endDocument
in interfaceContentHandler
- Overrides:
endDocument
in classDefaultHandler
- Throws:
SAXException
-
characters
public void characters(char[] ch, int start, int length) throws SAXException
- Specified by:
characters
in interfaceContentHandler
- Overrides:
characters
in classDefaultHandler
- Throws:
SAXException
-
setOutputStream
public void setOutputStream(OutputStream out) throws IOException
- Specified by:
setOutputStream
in interfaceSitemapOutputComponent
- Throws:
IOException
-
getMimeType
public String getMimeType()
- Specified by:
getMimeType
in interfaceSitemapOutputComponent
-
shouldSetContentLength
public boolean shouldSetContentLength()
- Specified by:
shouldSetContentLength
in interfaceSitemapOutputComponent
-
-