|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.commons.betwixt.strategy.MixedContentEncodingStrategy
public abstract class MixedContentEncodingStrategy
Encodes body content.
Usage:
Used by BeanWriter
to encode body content before it is written
into the textual output.
This gives flexibility in this stage allowing (for example)
some properties to use character escaping whilst others
use CDATA
wrapping.
Note: the word encoding
here is used
in the sense of escaping a sequence of character data.
Field Summary | |
---|---|
static MixedContentEncodingStrategy |
CDATA
Encodes element content within a CDATA section. |
static java.lang.String |
CDATA_ENCODING
The option value for CDATA |
static MixedContentEncodingStrategy |
DEFAULT
The standard implementation used by Betwixt by default. |
static java.lang.String |
ENCODING_OPTION_NAME
The name of the option used to specify encoding on a per-element basis is org.apache.commons.betwixt.mixed-content-encoding |
static MixedContentEncodingStrategy |
ESCAPED_CHARACTERS
Encodes by escaping character data. |
Constructor Summary | |
---|---|
MixedContentEncodingStrategy()
|
Method Summary | |
---|---|
abstract java.lang.String |
encode(java.lang.String bodyContent,
ElementDescriptor element)
Encodes the body content into a form suitable for output as (textual) xml. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String ENCODING_OPTION_NAME
org.apache.commons.betwixt.mixed-content-encoding
public static final java.lang.String CDATA_ENCODING
public static final MixedContentEncodingStrategy DEFAULT
ElementDescriptor
contains
an option with name
org.apache.commons.betwixt.mixed-content-encoding
and value CDATA
.
This is a singleton.
public static final MixedContentEncodingStrategy CDATA
CDATA
section.
This is a singleton.
public static final MixedContentEncodingStrategy ESCAPED_CHARACTERS
Constructor Detail |
---|
public MixedContentEncodingStrategy()
Method Detail |
---|
public abstract java.lang.String encode(java.lang.String bodyContent, ElementDescriptor element)
bodyContent
- the raw (unescaped) character data, not nullelement
- the ElementDescriptor
describing the element
whose content is being encoded.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |