org.milyn.cdres.serialize
Class EmptyElementSU
java.lang.Object
org.milyn.delivery.dom.serialize.DefaultSerializationUnit
org.milyn.cdres.serialize.EmptyElementSU
- All Implemented Interfaces:
- ContentHandler, SerializationUnit, Visitor
public class EmptyElementSU
- extends DefaultSerializationUnit
Empty element serialization unit.
Writes empty elements well-formed (<xxx/>) or badly-formed (<xxx>). If
applied to an element, it also ensures that any child content is not
writen to the requesting device.
.cdrl Configuration
<smooks-resource useragent="device/profile" selector="target-element-name"
path="org.milyn.cdres.serialize.EmptyElementSU">
<!-- (Optional) Should the empty element be printed "well-formed". Default true. -->
<param name="wellFormed">true/false</param>
</smooks-resource>
See SmooksResourceConfiguration.
- Author:
- tfennelly
|
Method Summary |
String |
getDetailDescription()
|
String |
getShortDescription()
|
boolean |
writeChildElements()
|
void |
writeElementCDATA(CDATASection cdata,
Writer writer,
ExecutionContext executionContext)
|
void |
writeElementComment(Comment comment,
Writer writer,
ExecutionContext executionContext)
|
void |
writeElementEnd(Element element,
Writer writer,
ExecutionContext executionContext)
|
void |
writeElementEntityRef(EntityReference entityRef,
Writer writer,
ExecutionContext executionContext)
|
void |
writeElementNode(Node node,
Writer writer,
ExecutionContext executionContext)
|
void |
writeElementStart(Element element,
Writer writer,
ExecutionContext executionContext)
|
void |
writeElementText(Text text,
Writer writer,
ExecutionContext executionContext)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
EmptyElementSU
public EmptyElementSU()
writeElementStart
public void writeElementStart(Element element,
Writer writer,
ExecutionContext executionContext)
throws IOException
- Specified by:
writeElementStart in interface SerializationUnit- Overrides:
writeElementStart in class DefaultSerializationUnit
- Throws:
IOException
writeElementEnd
public void writeElementEnd(Element element,
Writer writer,
ExecutionContext executionContext)
throws IOException
- Specified by:
writeElementEnd in interface SerializationUnit- Overrides:
writeElementEnd in class DefaultSerializationUnit
- Throws:
IOException
writeElementText
public void writeElementText(Text text,
Writer writer,
ExecutionContext executionContext)
throws IOException
- Specified by:
writeElementText in interface SerializationUnit- Overrides:
writeElementText in class DefaultSerializationUnit
- Throws:
IOException
writeElementComment
public void writeElementComment(Comment comment,
Writer writer,
ExecutionContext executionContext)
throws IOException
- Specified by:
writeElementComment in interface SerializationUnit- Overrides:
writeElementComment in class DefaultSerializationUnit
- Throws:
IOException
writeElementEntityRef
public void writeElementEntityRef(EntityReference entityRef,
Writer writer,
ExecutionContext executionContext)
throws IOException
- Specified by:
writeElementEntityRef in interface SerializationUnit- Overrides:
writeElementEntityRef in class DefaultSerializationUnit
- Throws:
IOException
writeElementCDATA
public void writeElementCDATA(CDATASection cdata,
Writer writer,
ExecutionContext executionContext)
throws IOException
- Specified by:
writeElementCDATA in interface SerializationUnit- Overrides:
writeElementCDATA in class DefaultSerializationUnit
- Throws:
IOException
writeElementNode
public void writeElementNode(Node node,
Writer writer,
ExecutionContext executionContext)
throws IOException
- Specified by:
writeElementNode in interface SerializationUnit- Overrides:
writeElementNode in class DefaultSerializationUnit
- Throws:
IOException
getShortDescription
public String getShortDescription()
getDetailDescription
public String getDetailDescription()
writeChildElements
public boolean writeChildElements()
- Specified by:
writeChildElements in interface SerializationUnit- Overrides:
writeChildElements in class DefaultSerializationUnit
Copyright © 2011. All Rights Reserved.