org.milyn.delivery.dom.serialize
Class TextSerializationUnit
java.lang.Object
org.milyn.delivery.dom.serialize.DefaultSerializationUnit
org.milyn.delivery.dom.serialize.TextSerializationUnit
- All Implemented Interfaces:
- ContentHandler, SerializationUnit, SAXVisitBefore, SAXVisitor, Visitor
public class TextSerializationUnit
- extends DefaultSerializationUnit
- implements SAXVisitBefore
Write a <text> element.
Basically just drops the <text> tags.
- Author:
- tom.fennelly@jboss.com
| Methods inherited from class org.milyn.delivery.dom.serialize.DefaultSerializationUnit |
isRewriteEntities, setCloseEmptyElements, setRewriteEntities, writeAttributes, writeChildElements, writeElementCDATA, writeElementComment, writeElementEnd, writeElementEntityRef, writeElementNode, writeElementStart, writeElementText |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TextSerializationUnit
public TextSerializationUnit()
writeElementStart
public void writeElementStart(Element element,
Writer writer,
ExecutionContext executionContext)
throws IOException
- Description copied from interface:
SerializationUnit
- Write the element start portion; the element name and it's
attributes.
EG: <a href="http://www.x.com">
- Specified by:
writeElementStart in interface SerializationUnit- Overrides:
writeElementStart in class DefaultSerializationUnit
- Parameters:
element - The element start to write.writer - The writer to be written to.executionContext - ExecutionContext instance for the delivery context.
- Throws:
IOException - Exception writing output.
writeElementEnd
public void writeElementEnd(Element element,
Writer writer,
ExecutionContext executionContext)
throws IOException
- Description copied from interface:
SerializationUnit
- Write the element end portion; close the element.
EG: </a>
- Specified by:
writeElementEnd in interface SerializationUnit- Overrides:
writeElementEnd in class DefaultSerializationUnit
- Parameters:
element - The element end to write.writer - The writer to be written to.executionContext - ExecutionContext instance for the delivery context.
- Throws:
IOException - Exception writing output.
visitBefore
public void visitBefore(SAXElement element,
ExecutionContext executionContext)
throws SmooksException,
IOException
- Description copied from interface:
SAXVisitBefore
- Visit the supplied element before visiting its child elements.
- Specified by:
visitBefore in interface SAXVisitBefore
- Parameters:
element - The SAX element being visited.executionContext - Execution context.
- Throws:
SmooksException - Event processing failure.
IOException - Error writing event to output writer.
createTextElement
public static Element createTextElement(Element element,
String templatingResult)
isTextElement
public static boolean isTextElement(Element element)
getText
public static String getText(Element element)
Copyright © 2009. All Rights Reserved.