public abstract class Marshaller<CHARACTER_ESCAPE_HANDLER extends CharacterEscapeHandler,CONTEXT extends Context,MARSHALLER_LISTENER extends Marshaller.Listener,MEDIA_TYPE extends MediaType,NAMESPACE_PREFIX_MAPPER extends NamespacePrefixMapper>
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static interface |
Marshaller.Listener
An implementation of Marshaller.Listener can be set on an Marshaller
to provide additional behaviour during marshal operations.
|
Constructor and Description |
---|
Marshaller(CONTEXT context) |
Modifier and Type | Method and Description |
---|---|
abstract XMLAttachmentMarshaller |
getAttachmentMarshaller() |
CHARACTER_ESCAPE_HANDLER |
getCharacterEscapeHandler()
Return this Marshaller's CharacterEscapeHandler.
|
CONTEXT |
getContext()
Return the instance of Context that was used to create this instance
of Marshaller.
|
java.lang.String |
getEncoding()
Get the encoding set on this Marshaller.
|
org.xml.sax.ErrorHandler |
getErrorHandler() |
java.lang.String |
getIndentString()
Return the String that will be used to perform indenting in marshalled
documents.
|
abstract JsonTypeConfiguration |
getJsonTypeConfiguration()
Returns json type configuration.
|
MARSHALLER_LISTENER |
getMarshalListener() |
NAMESPACE_PREFIX_MAPPER |
getNamespacePrefixMapper()
NamespacePrefixMapper that can be used during marshal (instead of those set in the project meta data)
|
java.lang.Object |
getProperty(java.lang.Object key)
Return the property for a given key, if one exists.
|
abstract XMLTransformer |
getTransformer()
INTERNAL
|
abstract boolean |
isApplicationJSON()
INTERNAL
|
abstract boolean |
isApplicationXML()
INTERNAL
|
boolean |
isEqualUsingIdenity()
INTERNAL
|
boolean |
isFormattedOutput()
Returns if this Marshaller should format the output.
|
abstract boolean |
isIncludeRoot()
Determine if the root not should be marshalled.
|
abstract boolean |
isReduceAnyArrays()
Property to determine if size 1 any collections should be treated as
collections.
|
abstract boolean |
isWrapperAsCollectionName() |
void |
setCharacterEscapeHandler(CHARACTER_ESCAPE_HANDLER c)
Set this Marshaller's CharacterEscapeHandler.
|
void |
setEncoding(java.lang.String newEncoding)
Set the encoding on this Marshaller.
|
void |
setEqualUsingIdenity(boolean equalUsingIdenity)
INTERNAL
|
void |
setErrorHandler(org.xml.sax.ErrorHandler errorHandler) |
void |
setFormattedOutput(boolean shouldFormat)
Set if this XMLMarshaller should format the XML
By default this is set to true and the XML marshalled will be formatted.
|
void |
setIndentString(java.lang.String s)
Set the String that will be used to perform indenting in marshalled
documents.
|
void |
setMarshalListener(MARSHALLER_LISTENER listener) |
void |
setNamespacePrefixMapper(NAMESPACE_PREFIX_MAPPER mapper)
NamespacePrefixMapper that can be used during marshal (instead of those
set in the project meta data)
|
public Marshaller(CONTEXT context)
public abstract XMLAttachmentMarshaller getAttachmentMarshaller()
public CHARACTER_ESCAPE_HANDLER getCharacterEscapeHandler()
public CONTEXT getContext()
public java.lang.String getEncoding()
public org.xml.sax.ErrorHandler getErrorHandler()
public java.lang.String getIndentString()
public MARSHALLER_LISTENER getMarshalListener()
public NAMESPACE_PREFIX_MAPPER getNamespacePrefixMapper()
public java.lang.Object getProperty(java.lang.Object key)
public abstract XMLTransformer getTransformer()
public abstract boolean isApplicationJSON()
public abstract boolean isApplicationXML()
public boolean isEqualUsingIdenity()
public boolean isFormattedOutput()
public abstract boolean isIncludeRoot()
public abstract boolean isReduceAnyArrays()
public abstract boolean isWrapperAsCollectionName()
public void setCharacterEscapeHandler(CHARACTER_ESCAPE_HANDLER c)
public void setEncoding(java.lang.String newEncoding)
newEncoding
- the encoding to set on this Marshallerpublic void setEqualUsingIdenity(boolean equalUsingIdenity)
public void setErrorHandler(org.xml.sax.ErrorHandler errorHandler)
public void setFormattedOutput(boolean shouldFormat)
shouldFormat
- if this XMLMarshaller should format the XMLpublic void setIndentString(java.lang.String s)
public void setMarshalListener(MARSHALLER_LISTENER listener)
public void setNamespacePrefixMapper(NAMESPACE_PREFIX_MAPPER mapper)
public abstract JsonTypeConfiguration getJsonTypeConfiguration()
EclipseLink 2.6.3, "build v20160428-59c81c5" API Reference