Top Inners Fields Constructors Methods
org.eclipse.persistence.internal.oxm

public abstract Class Marshaller<CHARACTER_ESCAPE_HANDLER extends CharacterEscapeHandler, CONTEXT extends Context<ABSTRACT_SESSION extends CoreAbstractSession<DESCRIPTOR extends CoreDescriptor<ATTRIBUTE_GROUP extends CoreAttributeGroup, DESCRIPTOR_EVENT_MANAGER extends CoreDescriptorEventManager, FIELD extends CoreField, INHERITANCE_POLICY extends CoreInheritancePolicy, INSTANTIATION_POLICY extends CoreInstantiationPolicy, LIST extends List<E>, OBJECT_BUILDER extends CoreObjectBuilder>, LOGIN extends CoreLogin<PLATFORM extends CorePlatform>, PLATFORM extends CorePlatform<CONVERSION_MANAGER extends CoreConversionManager>, PROJECT extends CoreProject<DESCRIPTOR extends CoreDescriptor<ATTRIBUTE_GROUP extends CoreAttributeGroup, DESCRIPTOR_EVENT_MANAGER extends CoreDescriptorEventManager, FIELD extends CoreField, INHERITANCE_POLICY extends CoreInheritancePolicy, INSTANTIATION_POLICY extends CoreInstantiationPolicy, LIST extends List<E>, OBJECT_BUILDER extends CoreObjectBuilder>, LOGIN extends CoreLogin<PLATFORM extends CorePlatform>, SESSION extends CoreSession>, SESSION_EVENT_MANAGER extends CoreSessionEventManager<SESSION_EVENT_LISTENER extends CoreSessionEventListener>>, DESCRIPTOR extends Descriptor<?, ?, ?, ?, ?, NAMESPACE_RESOLVER, ?, ?, ?, ?>, FIELD extends Field, NAMESPACE_RESOLVER extends NamespaceResolver, PROJECT extends CoreProject<DESCRIPTOR extends CoreDescriptor<ATTRIBUTE_GROUP extends CoreAttributeGroup, DESCRIPTOR_EVENT_MANAGER extends CoreDescriptorEventManager, FIELD extends CoreField, INHERITANCE_POLICY extends CoreInheritancePolicy, INSTANTIATION_POLICY extends CoreInstantiationPolicy, LIST extends List<E>, OBJECT_BUILDER extends CoreObjectBuilder>, LOGIN extends CoreLogin<PLATFORM extends CorePlatform>, SESSION extends CoreSession>, SESSION extends CoreSession<DESCRIPTOR extends CoreDescriptor<ATTRIBUTE_GROUP extends CoreAttributeGroup, DESCRIPTOR_EVENT_MANAGER extends CoreDescriptorEventManager, FIELD extends CoreField, INHERITANCE_POLICY extends CoreInheritancePolicy, INSTANTIATION_POLICY extends CoreInstantiationPolicy, LIST extends List<E>, OBJECT_BUILDER extends CoreObjectBuilder>, LOGIN extends CoreLogin<PLATFORM extends CorePlatform>, PLATFORM extends CorePlatform, PROJECT extends CoreProject<DESCRIPTOR extends CoreDescriptor<ATTRIBUTE_GROUP extends CoreAttributeGroup, DESCRIPTOR_EVENT_MANAGER extends CoreDescriptorEventManager, FIELD extends CoreField, INHERITANCE_POLICY extends CoreInheritancePolicy, INSTANTIATION_POLICY extends CoreInstantiationPolicy, LIST extends List<E>, OBJECT_BUILDER extends CoreObjectBuilder>, LOGIN extends CoreLogin<PLATFORM extends CorePlatform>, SESSION extends CoreSession>, SESSION_EVENT_MANAGER extends CoreSessionEventManager>, SESSION_EVENT_LISTENER extends CoreSessionEventListener>, MARSHALLER_LISTENER extends Marshaller.Listener, MEDIA_TYPE extends MediaType, NAMESPACE_PREFIX_MAPPER extends NamespacePrefixMapper>

extends Object
Class Inheritance
Known Direct Subclasses
org.eclipse.persistence.internal.oxm.XMLMarshaller
Imports
java.util.Properties, .Map.Entry, org.eclipse.persistence.internal.oxm.CharacterEscapeHandler, org.eclipse.persistence.oxm.attachment.XMLAttachmentMarshaller, org.eclipse.persistence.platform.xml.XMLTransformer, org.xml.sax.ErrorHandler

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static interface
Marshaller.Listener

An implementation of Marshaller.Listener can be set on an Marshaller to provide additional behaviour during marshal operations.

Field Summary

Modifier and TypeField and Description
private CHARACTER_ESCAPE_HANDLER
protected CONTEXT
private static String
private String
private boolean
private ErrorHandler
private boolean
private String
protected NAMESPACE_PREFIX_MAPPER
private MARSHALLER_LISTENER
protected Properties

Constructor Summary

AccessConstructor and Description
protected
Marshaller(CONTEXT context)

protected
Marshaller(Marshaller<CHARACTER_ESCAPE_HANDLER extends CharacterEscapeHandler, CONTEXT extends Context<ABSTRACT_SESSION extends CoreAbstractSession<DESCRIPTOR extends CoreDescriptor<ATTRIBUTE_GROUP extends CoreAttributeGroup, DESCRIPTOR_EVENT_MANAGER extends CoreDescriptorEventManager, FIELD extends CoreField, INHERITANCE_POLICY extends CoreInheritancePolicy, INSTANTIATION_POLICY extends CoreInstantiationPolicy, LIST extends List<E>, OBJECT_BUILDER extends CoreObjectBuilder>, LOGIN extends CoreLogin<PLATFORM extends CorePlatform>, PLATFORM extends CorePlatform<CONVERSION_MANAGER extends CoreConversionManager>, PROJECT extends CoreProject<DESCRIPTOR extends CoreDescriptor<ATTRIBUTE_GROUP extends CoreAttributeGroup, DESCRIPTOR_EVENT_MANAGER extends CoreDescriptorEventManager, FIELD extends CoreField, INHERITANCE_POLICY extends CoreInheritancePolicy, INSTANTIATION_POLICY extends CoreInstantiationPolicy, LIST extends List<E>, OBJECT_BUILDER extends CoreObjectBuilder>, LOGIN extends CoreLogin<PLATFORM extends CorePlatform>, SESSION extends CoreSession>, SESSION_EVENT_MANAGER extends CoreSessionEventManager<SESSION_EVENT_LISTENER extends CoreSessionEventListener>>, DESCRIPTOR extends Descriptor<?, ?, ?, ?, ?, NAMESPACE_RESOLVER, ?, ?, ?, ?>, FIELD extends Field, NAMESPACE_RESOLVER extends NamespaceResolver, PROJECT extends CoreProject<DESCRIPTOR extends CoreDescriptor<ATTRIBUTE_GROUP extends CoreAttributeGroup, DESCRIPTOR_EVENT_MANAGER extends CoreDescriptorEventManager, FIELD extends CoreField, INHERITANCE_POLICY extends CoreInheritancePolicy, INSTANTIATION_POLICY extends CoreInstantiationPolicy, LIST extends List<E>, OBJECT_BUILDER extends CoreObjectBuilder>, LOGIN extends CoreLogin<PLATFORM extends CorePlatform>, SESSION extends CoreSession>, SESSION extends CoreSession<DESCRIPTOR extends CoreDescriptor<ATTRIBUTE_GROUP extends CoreAttributeGroup, DESCRIPTOR_EVENT_MANAGER extends CoreDescriptorEventManager, FIELD extends CoreField, INHERITANCE_POLICY extends CoreInheritancePolicy, INSTANTIATION_POLICY extends CoreInstantiationPolicy, LIST extends List<E>, OBJECT_BUILDER extends CoreObjectBuilder>, LOGIN extends CoreLogin<PLATFORM extends CorePlatform>, PLATFORM extends CorePlatform, PROJECT extends CoreProject<DESCRIPTOR extends CoreDescriptor<ATTRIBUTE_GROUP extends CoreAttributeGroup, DESCRIPTOR_EVENT_MANAGER extends CoreDescriptorEventManager, FIELD extends CoreField, INHERITANCE_POLICY extends CoreInheritancePolicy, INSTANTIATION_POLICY extends CoreInstantiationPolicy, LIST extends List<E>, OBJECT_BUILDER extends CoreObjectBuilder>, LOGIN extends CoreLogin<PLATFORM extends CorePlatform>, SESSION extends CoreSession>, SESSION_EVENT_MANAGER extends CoreSessionEventManager>, SESSION_EVENT_LISTENER extends CoreSessionEventListener>, MARSHALLER_LISTENER extends Marshaller.Listener, MEDIA_TYPE extends MediaType, NAMESPACE_PREFIX_MAPPER extends NamespacePrefixMapper> marshaller)

Copy constructor

Method Summary

Modifier and TypeMethod and Description
public abstract XMLAttachmentMarshaller
public CHARACTER_ESCAPE_HANDLER
getCharacterEscapeHandler()

Return this Marshaller's CharacterEscapeHandler.

public CONTEXT
getContext()

Return the instance of Context that was used to create this instance of Marshaller.

public String
getEncoding()

Get the encoding set on this Marshaller.

public ErrorHandler
public String
getIndentString()

Return the String that will be used to perform indenting in marshalled documents.

public abstract JsonTypeConfiguration

Returns:

json type configuration
getJsonTypeConfiguration
()

Returns json type configuration.

public MARSHALLER_LISTENER
public NAMESPACE_PREFIX_MAPPER
getNamespacePrefixMapper()

NamespacePrefixMapper that can be used during marshal (instead of those set in the project meta data)

public Object
getProperty(Object key)

Return the property for a given key, if one exists.

public abstract XMLTransformer

Returns:

the transformer instance for this Marshaller
getTransformer
()

INTERNAL

public abstract boolean

Returns:

true if the media type is application/json, else false.
isApplicationJSON
()

INTERNAL

public abstract boolean

Returns:

true if the media type is application/xml, else false.
isApplicationXML
()

INTERNAL

public boolean
public boolean

Returns:

if this Marshaller should format the output
isFormattedOutput
()

Returns if this Marshaller should format the output.

public abstract boolean
isIncludeRoot()

Determine if the root not should be marshalled.

public abstract boolean
isReduceAnyArrays()

Property to determine if size 1 any collections should be treated as collections.

public abstract boolean
public void
setCharacterEscapeHandler(CHARACTER_ESCAPE_HANDLER c)

Set this Marshaller's CharacterEscapeHandler.

public void
setEncoding(String
the encoding to set on this Marshaller
newEncoding
)

Set the encoding on this Marshaller.

public void
setEqualUsingIdenity(boolean equalUsingIdenity)

INTERNAL

public void
public void
setFormattedOutput(boolean
if this XMLMarshaller should format the XML
shouldFormat
)

Set if this XMLMarshaller should format the XML By default this is set to true and the XML marshalled will be formatted.

public void
setIndentString(String s)

Set the String that will be used to perform indenting in marshalled documents.

public void
setMarshalListener(MARSHALLER_LISTENER listener)

public void
setNamespacePrefixMapper(NAMESPACE_PREFIX_MAPPER mapper)

NamespacePrefixMapper that can be used during marshal (instead of those set in the project meta data)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

charEscapeHandlerback to summary
private CHARACTER_ESCAPE_HANDLER charEscapeHandler
contextback to summary
protected CONTEXT context
DEFAULT_INDENTback to summary
private static String DEFAULT_INDENT
encodingback to summary
private String encoding
equalUsingIdenityback to summary
private boolean equalUsingIdenity
errorHandlerback to summary
private ErrorHandler errorHandler
formattedOutputback to summary
private boolean formattedOutput
indentStringback to summary
private String indentString
mapperback to summary
protected NAMESPACE_PREFIX_MAPPER mapper
marshalListenerback to summary
private MARSHALLER_LISTENER marshalListener
marshalPropertiesback to summary
protected Properties marshalProperties

Constructor Detail

Marshallerback to summary
protected Marshaller(CONTEXT context)
Marshallerback to summary
protected Marshaller(Marshaller<CHARACTER_ESCAPE_HANDLER extends CharacterEscapeHandler, CONTEXT extends Context<ABSTRACT_SESSION extends CoreAbstractSession<DESCRIPTOR extends CoreDescriptor<ATTRIBUTE_GROUP extends CoreAttributeGroup, DESCRIPTOR_EVENT_MANAGER extends CoreDescriptorEventManager, FIELD extends CoreField, INHERITANCE_POLICY extends CoreInheritancePolicy, INSTANTIATION_POLICY extends CoreInstantiationPolicy, LIST extends List<E>, OBJECT_BUILDER extends CoreObjectBuilder>, LOGIN extends CoreLogin<PLATFORM extends CorePlatform>, PLATFORM extends CorePlatform<CONVERSION_MANAGER extends CoreConversionManager>, PROJECT extends CoreProject<DESCRIPTOR extends CoreDescriptor<ATTRIBUTE_GROUP extends CoreAttributeGroup, DESCRIPTOR_EVENT_MANAGER extends CoreDescriptorEventManager, FIELD extends CoreField, INHERITANCE_POLICY extends CoreInheritancePolicy, INSTANTIATION_POLICY extends CoreInstantiationPolicy, LIST extends List<E>, OBJECT_BUILDER extends CoreObjectBuilder>, LOGIN extends CoreLogin<PLATFORM extends CorePlatform>, SESSION extends CoreSession>, SESSION_EVENT_MANAGER extends CoreSessionEventManager<SESSION_EVENT_LISTENER extends CoreSessionEventListener>>, DESCRIPTOR extends Descriptor<?, ?, ?, ?, ?, NAMESPACE_RESOLVER, ?, ?, ?, ?>, FIELD extends Field, NAMESPACE_RESOLVER extends NamespaceResolver, PROJECT extends CoreProject<DESCRIPTOR extends CoreDescriptor<ATTRIBUTE_GROUP extends CoreAttributeGroup, DESCRIPTOR_EVENT_MANAGER extends CoreDescriptorEventManager, FIELD extends CoreField, INHERITANCE_POLICY extends CoreInheritancePolicy, INSTANTIATION_POLICY extends CoreInstantiationPolicy, LIST extends List<E>, OBJECT_BUILDER extends CoreObjectBuilder>, LOGIN extends CoreLogin<PLATFORM extends CorePlatform>, SESSION extends CoreSession>, SESSION extends CoreSession<DESCRIPTOR extends CoreDescriptor<ATTRIBUTE_GROUP extends CoreAttributeGroup, DESCRIPTOR_EVENT_MANAGER extends CoreDescriptorEventManager, FIELD extends CoreField, INHERITANCE_POLICY extends CoreInheritancePolicy, INSTANTIATION_POLICY extends CoreInstantiationPolicy, LIST extends List<E>, OBJECT_BUILDER extends CoreObjectBuilder>, LOGIN extends CoreLogin<PLATFORM extends CorePlatform>, PLATFORM extends CorePlatform, PROJECT extends CoreProject<DESCRIPTOR extends CoreDescriptor<ATTRIBUTE_GROUP extends CoreAttributeGroup, DESCRIPTOR_EVENT_MANAGER extends CoreDescriptorEventManager, FIELD extends CoreField, INHERITANCE_POLICY extends CoreInheritancePolicy, INSTANTIATION_POLICY extends CoreInstantiationPolicy, LIST extends List<E>, OBJECT_BUILDER extends CoreObjectBuilder>, LOGIN extends CoreLogin<PLATFORM extends CorePlatform>, SESSION extends CoreSession>, SESSION_EVENT_MANAGER extends CoreSessionEventManager>, SESSION_EVENT_LISTENER extends CoreSessionEventListener>, MARSHALLER_LISTENER extends Marshaller.Listener, MEDIA_TYPE extends MediaType, NAMESPACE_PREFIX_MAPPER extends NamespacePrefixMapper> marshaller)

Copy constructor

Method Detail

getAttachmentMarshallerback to summary
public abstract XMLAttachmentMarshaller getAttachmentMarshaller()
getCharacterEscapeHandlerback to summary
public CHARACTER_ESCAPE_HANDLER getCharacterEscapeHandler()

Return this Marshaller's CharacterEscapeHandler.

Since
2.3.3
getContextback to summary
public CONTEXT getContext()

Return the instance of Context that was used to create this instance of Marshaller.

getEncodingback to summary
public String getEncoding()

Get the encoding set on this Marshaller. If the encoding has not been set the default UTF-8 will be used

getErrorHandlerback to summary
public ErrorHandler getErrorHandler()
getIndentStringback to summary
public String getIndentString()

Return the String that will be used to perform indenting in marshalled documents. Default is " " (three spaces).

getJsonTypeConfigurationback to summary
public abstract JsonTypeConfiguration getJsonTypeConfiguration()

Returns json type configuration.

Returns:JsonTypeConfiguration

json type configuration

Since
2.6.0
getMarshalListenerback to summary
public MARSHALLER_LISTENER getMarshalListener()
getNamespacePrefixMapperback to summary
public NAMESPACE_PREFIX_MAPPER getNamespacePrefixMapper()

NamespacePrefixMapper that can be used during marshal (instead of those set in the project meta data)

getPropertyback to summary
public Object getProperty(Object key)

Return the property for a given key, if one exists.

getTransformerback to summary
public abstract XMLTransformer getTransformer()

INTERNAL

Returns:XMLTransformer

the transformer instance for this Marshaller

isApplicationJSONback to summary
public abstract boolean isApplicationJSON()

INTERNAL

Returns:boolean

true if the media type is application/json, else false.

Since
EclipseLink 2.6.0
isApplicationXMLback to summary
public abstract boolean isApplicationXML()

INTERNAL

Returns:boolean

true if the media type is application/xml, else false.

Since
EclipseLink 2.6.0
isEqualUsingIdenityback to summary
public boolean isEqualUsingIdenity()

INTERNAL

isFormattedOutputback to summary
public boolean isFormattedOutput()

Returns if this Marshaller should format the output. By default this is set to true and the marshalled output will be formatted.

Returns:boolean

if this Marshaller should format the output

isIncludeRootback to summary
public abstract boolean isIncludeRoot()

Determine if the root not should be marshalled. This property may ignored for media types that require a root node such as XML.

isReduceAnyArraysback to summary
public abstract boolean isReduceAnyArrays()

Property to determine if size 1 any collections should be treated as collections.

isWrapperAsCollectionNameback to summary
public abstract boolean isWrapperAsCollectionName()
setCharacterEscapeHandlerback to summary
public void setCharacterEscapeHandler(CHARACTER_ESCAPE_HANDLER c)

Set this Marshaller's CharacterEscapeHandler.

Since
2.3.3
setEncodingback to summary
public void setEncoding(String newEncoding)

Set the encoding on this Marshaller. If the encoding is not set the default UTF-8 will be used.

Parameters
newEncoding:String

the encoding to set on this Marshaller

setEqualUsingIdenityback to summary
public void setEqualUsingIdenity(boolean equalUsingIdenity)

INTERNAL

setErrorHandlerback to summary
public void setErrorHandler(ErrorHandler errorHandler)
setFormattedOutputback to summary
public 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.

Parameters
shouldFormat:boolean

if this XMLMarshaller should format the XML

setIndentStringback to summary
public void setIndentString(String s)

Set the String that will be used to perform indenting in marshalled documents.

Since
2.3.3
setMarshalListenerback to summary
public void setMarshalListener(MARSHALLER_LISTENER listener)
setNamespacePrefixMapperback to summary
public void setNamespacePrefixMapper(NAMESPACE_PREFIX_MAPPER mapper)

NamespacePrefixMapper that can be used during marshal (instead of those set in the project meta data)

org.eclipse.persistence.internal.oxm back to summary

public Interface Marshaller.Listener

Known Direct Subinterfaces
org.eclipse.persistence.oxm.XMLMarshalListener

An implementation of Marshaller.Listener can be set on an Marshaller to provide additional behaviour during marshal operations.

Method Summary

Modifier and TypeMethod and Description
public void
afterMarshal(Object
The object that was marshalled.
target
)

This event will be called after an object is marshalled.

public void
beforeMarshal(Object
The object that will be marshalled.
target
)

This event will be called before an object is marshalled.

Method Detail

afterMarshalback to summary
public void afterMarshal(Object target)

This event will be called after an object is marshalled.

Parameters
target:Object

The object that was marshalled.

beforeMarshalback to summary
public void beforeMarshal(Object target)

This event will be called before an object is marshalled.

Parameters
target:Object

The object that will be marshalled.