|
Milyn-Smooks Version 0.4 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
W3C Node Serailization interface definition.
Implementations of this interface are applied to the content during the Serialisation phase. This interface allows element targeted (by device, profile, DTD info etc) serialization code to be implemented. It gives control over how an element is "printed" to the target device. All implementations must contain a public constructor that takes aCDRDef
instance as
a parameter. For this reason condsider extending AbstractSerializationUnit
for
convienience (your IDE should auto-add the constructor).
Serialization Units are defined in the .cdrl file (in .cdrar file(s)) in the very
same way as any other content delivery resource (Assembly Units, Transformation Units,
DTDs etc).
Implementations must be stateless in nature.
Only one Serialisation Unit is applied to each element. If more than one
Serialization Unit is applicable to a given element, the most specific Serialization
Unit is choosen. See CDRDefSortComparator
.
See Delivery Overview.
Method Summary | |
boolean |
writeChildElements()
Write the child elements of the element this SerializationUnit is being applied to. |
void |
writeElementCDATA(org.w3c.dom.CDATASection cdata,
java.io.Writer writer,
ContainerRequest containerRequest)
Write element CDATA section. |
void |
writeElementComment(org.w3c.dom.Comment comment,
java.io.Writer writer,
ContainerRequest containerRequest)
Write element comment. |
void |
writeElementEnd(org.w3c.dom.Element element,
java.io.Writer writer,
ContainerRequest containerRequest)
Write the element end portion; close the element. |
void |
writeElementEntityRef(org.w3c.dom.EntityReference entityRef,
java.io.Writer writer,
ContainerRequest containerRequest)
Write element entity reference object. |
void |
writeElementNode(org.w3c.dom.Node node,
java.io.Writer writer,
ContainerRequest containerRequest)
Write element Node object. |
void |
writeElementStart(org.w3c.dom.Element element,
java.io.Writer writer,
ContainerRequest containerRequest)
Write the element start portion; the element name and it's attributes. |
void |
writeElementText(org.w3c.dom.Text text,
java.io.Writer writer,
ContainerRequest containerRequest)
Write element text. |
Methods inherited from interface org.milyn.delivery.ContentDeliveryUnit |
getDetailDescription, getShortDescription |
Method Detail |
public void writeElementStart(org.w3c.dom.Element element, java.io.Writer writer, ContainerRequest containerRequest) throws java.io.IOException
element
- The element start to write.writer
- The writer to be written to.containerRequest
- ContainerRequest instance for the delivery context.
java.io.IOException
- Exception writing output.public void writeElementEnd(org.w3c.dom.Element element, java.io.Writer writer, ContainerRequest containerRequest) throws java.io.IOException
element
- The element end to write.writer
- The writer to be written to.containerRequest
- ContainerRequest instance for the delivery context.
java.io.IOException
- Exception writing output.public void writeElementText(org.w3c.dom.Text text, java.io.Writer writer, ContainerRequest containerRequest) throws java.io.IOException
text
- The Text object to write.writer
- The writer to be written to.containerRequest
- ContainerRequest instance for the delivery context.
java.io.IOException
- Exception writing output.public void writeElementComment(org.w3c.dom.Comment comment, java.io.Writer writer, ContainerRequest containerRequest) throws java.io.IOException
comment
- The comment o write.writer
- The writer to be written to.containerRequest
- ContainerRequest instance for the delivery context.
java.io.IOException
- Exception writing output.public void writeElementEntityRef(org.w3c.dom.EntityReference entityRef, java.io.Writer writer, ContainerRequest containerRequest) throws java.io.IOException
entityRef
- The entity reference to write.writer
- The writer to be written to.containerRequest
- ContainerRequest instance for the delivery context.
java.io.IOException
- Exception writing output.public void writeElementCDATA(org.w3c.dom.CDATASection cdata, java.io.Writer writer, ContainerRequest containerRequest) throws java.io.IOException
cdata
- The CDATA section to write.writer
- The writer to be written to.containerRequest
- ContainerRequest instance for the delivery context.
java.io.IOException
- Exception writing output.public void writeElementNode(org.w3c.dom.Node node, java.io.Writer writer, ContainerRequest containerRequest) throws java.io.IOException
node
- The node to write.writer
- The writer to be written to.containerRequest
- ContainerRequest instance for the delivery context.
java.io.IOException
- Exception writing output.public boolean writeChildElements()
|
Milyn-Smooks Version 0.4 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |