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

public abstract Class XMLMarshaller<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>>, CHARACTER_ESCAPE_HANDLER extends CharacterEscapeHandler, CONTEXT extends Context<ABSTRACT_SESSION, DESCRIPTOR, ?, ?, ?, SESSION, ?>, DESCRIPTOR extends Descriptor<?, ?, ?, ?, ?, ?, ?, ?, ?, ?>, MARSHALLER_LISTENER extends Marshaller.Listener, MEDIA_TYPE extends MediaType, NAMESPACE_PREFIX_MAPPER extends NamespacePrefixMapper, OBJECT_BUILDER extends ObjectBuilder<?, ABSTRACT_SESSION, ?, XMLMarshaller ...>, 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>>

extends Marshaller<CHARACTER_ESCAPE_HANDLER extends CharacterEscapeHandler, CONTEXT extends Context<ABSTRACT_SESSION, DESCRIPTOR, ?, ?, ?, SESSION, ?>, MARSHALLER_LISTENER extends Marshaller.Listener, MEDIA_TYPE extends MediaType, NAMESPACE_PREFIX_MAPPER extends NamespacePrefixMapper>
Class Inheritance
Known Direct Subclasses
org.eclipse.persistence.oxm.XMLMarshaller
Imports
java.io.BufferedWriter, .File, .FileWriter, .OutputStream, .OutputStreamWriter, .Writer, java.lang.reflect.Array, .Constructor, .Method, java.net.MalformedURLException, .URL, java.util.Collection, javax.xml.namespace.QName, javax.xml.transform.Result, javax.xml.transform.dom.DOMResult, javax.xml.transform.sax.SAXResult, javax.xml.transform.stream.StreamResult, javax.xml.validation.Schema, org.eclipse.persistence.core.queries.CoreAttributeGroup, org.eclipse.persistence.core.sessions.CoreSession, org.eclipse.persistence.exceptions.EclipseLinkException, .XMLMarshalException, org.eclipse.persistence.internal.core.helper.CoreClassConstants, org.eclipse.persistence.internal.core.sessions.CoreAbstractSession, org.eclipse.persistence.internal.oxm.mappings.Descriptor, .Field, org.eclipse.persistence.internal.oxm.record.AbstractMarshalRecord, .ExtendedResult, org.eclipse.persistence.internal.oxm.record.namespaces.PrefixMapperNamespaceResolver, org.eclipse.persistence.internal.security.PrivilegedAccessHelper, org.eclipse.persistence.logging.AbstractSessionLog, .SessionLog, org.eclipse.persistence.oxm.JSONWithPadding, org.eclipse.persistence.oxm.attachment.XMLAttachmentMarshaller, org.eclipse.persistence.oxm.record.ContentHandlerRecord, .FormattedOutputStreamRecord, .FormattedWriterRecord, .JSONFormattedWriterRecord, .JSONWriterRecord, .MarshalRecord, .NodeRecord, .OutputStreamRecord, .ValidatingMarshalRecord, .WriterRecord, org.eclipse.persistence.oxm.schema.XMLSchemaReference, org.eclipse.persistence.platform.xml.XMLPlatform, .XMLPlatformFactory, .XMLTransformer, org.w3c.dom.Attr, .Document, .Element, .Node, org.xml.sax.ContentHandler, org.xml.sax.ext.LexicalHandler

Field Summary

Modifier and TypeField and Description
protected XMLAttachmentMarshaller
private String
protected static final String
private static final String
private static final String
protected static Class<?>
protected static Class<?>
private boolean
private static final String
private static final String
private boolean
private Boolean
private Object
private boolean
protected MEDIA_TYPE
private char
private String
private boolean
private Schema
private String
private static final String
protected static Class<?>
protected static Method
protected static Method
protected XMLTransformer
private String
private boolean
private static final String
private static final String
protected static Method
protected static Method
private static final String
private static final String
private static final String
private static final String
private static Constructor<T>
private String
private static Constructor<T>
Inherited from org.eclipse.persistence.internal.oxm.Marshaller:
contextmappermarshalProperties

Constructor Summary

AccessConstructor and Description
protected
XMLMarshaller(CONTEXT context)

protected
XMLMarshaller(XMLMarshaller<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>>, CHARACTER_ESCAPE_HANDLER extends CharacterEscapeHandler, CONTEXT extends Context<ABSTRACT_SESSION, DESCRIPTOR, ?, ?, ?, SESSION, ?>, DESCRIPTOR extends Descriptor<?, ?, ?, ?, ?, ?, ?, ?, ?, ?>, MARSHALLER_LISTENER extends Marshaller.Listener, MEDIA_TYPE extends MediaType, NAMESPACE_PREFIX_MAPPER extends NamespacePrefixMapper, OBJECT_BUILDER extends ObjectBuilder<?, ABSTRACT_SESSION, ?, XMLMarshaller ...>, 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>> xmlMarshaller)

Copy constructor

Method Summary

Modifier and TypeMethod and Description
protected void
addDescriptorNamespacesToXMLRecord(DESCRIPTOR xmlDescriptor, AbstractMarshalRecord<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>>, FIELD extends CoreField, MARSHALLER extends 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>, NAMESPACE_RESOLVER extends NamespaceResolver> record)

private XPathFragment<XML_FIELD extends Field>
buildRootFragment(Object object, DESCRIPTOR descriptor, boolean isXMLRoot, MarshalRecord<MARSHALLER extends Marshaller> marshalRecord)

protected void
public XMLAttachmentMarshaller
public String
getAttributePrefix()

Value that will be used to prefix attributes.

protected DESCRIPTOR
getDescriptor(Class<?> clazz, ABSTRACT_SESSION session)

INTERNAL: Return the descriptor for the root object.

public DESCRIPTOR
getDescriptor(Object object)

INTERNAL: Return the descriptor for the root object.

protected DESCRIPTOR
getDescriptor(Object object, ABSTRACT_SESSION session)

INTERNAL: Return the descriptor for the root object.

protected DESCRIPTOR
getDescriptor(Object object, boolean isXMLRoot)

protected DESCRIPTOR
protected DESCRIPTOR
getDescriptor(Root object, ABSTRACT_SESSION session)

public Object
public char
getNamespaceSeparator()

Get the namespace separator used during marshal operations.

protected Node
getNode(Object object, Node parentNode, ABSTRACT_SESSION session, DESCRIPTOR descriptor, boolean isRoot)

public String

Returns:

the no namespace schema location specified on this XMLMarshaller
getNoNamespaceSchemaLocation
()

Get the no namespace schema location set on this XMLMarshaller

public Schema
public String

Returns:

the schema location specified on this XMLMarshaller
getSchemaLocation
()

Get the schema location set on this XMLMarshaller

public XMLTransformer

Returns:

the transformer instance for this marshaller
getTransformer
()

Implements abstract org.eclipse.persistence.internal.oxm.Marshaller.getTransformer.

INTERNAL
public String
getValueWrapper()

Name of the property to marshal/unmarshal as a wrapper on the text() mappings Ignored marshalling XML.

public String
getXmlHeader()

Get this Marshaller's XML Header.

public boolean

Returns:

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

Implements abstract org.eclipse.persistence.internal.oxm.Marshaller.isApplicationJSON.

INTERNAL
public boolean

Returns:

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

Implements abstract org.eclipse.persistence.internal.oxm.Marshaller.isApplicationXML.

INTERNAL
public boolean

Returns:

if this should marshal to a fragment or not
isFragment
()

PUBLIC: Returns if this should marshal to a fragment.

public boolean
isIncludeRoot()

Implements abstract org.eclipse.persistence.internal.oxm.Marshaller.isIncludeRoot.

Determine if the @XMLRootElement should be marshalled when present.
public Boolean
public boolean
isMarshalEmptyCollections()

Name of the property to determine if empty collections should be marshalled as [] Ignored marshalling XML.

public boolean
isReduceAnyArrays()

Implements abstract org.eclipse.persistence.internal.oxm.Marshaller.isReduceAnyArrays.

Property to determine if size 1 any collections should be treated as collections Ignored marshalling XML.
protected boolean
public boolean
public void
marshal(Object
the object to marshal
object
,
ContentHandler
the contentHandler which the specified object should be marshalled to
contentHandler
)

PUBLIC: Convert the given object to XML and update the given contentHandler with that XML Document

public void
marshal(Object
the object to marshal
object
,
ContentHandler
the contentHandler which the specified object should be marshalled to
contentHandler
,
LexicalHandler lexicalHandler)

PUBLIC: Convert the given object to XML and update the given contentHandler with that XML Document

public void
marshal(Object
the object to marshal
object
,
MarshalRecord<MARSHALLER extends Marshaller>
the marshalRecord to marshal the object to
marshalRecord
)

Convert the given object to XML and update the given marshal record with that XML Document.

protected void
marshal(Object
the object to marshal
object
,
MarshalRecord<MARSHALLER extends Marshaller>
the marshalRecord to marshal the object to
marshalRecord
,
ABSTRACT_SESSION session, DESCRIPTOR
the XMLDescriptor for the object being marshalled
descriptor
,
boolean isXMLRoot)

Convert the given object to XML and update the given marshal record with that XML Document.

public void
marshal(Object
the object to marshal
object
,
Node
the node which the specified object should be marshalled to
node
)

PUBLIC:

public void
marshal(Object
the object to marshal
object
,
OutputStream
the outputStream to marshal the object to
outputStream
)

PUBLIC: Convert the given object to XML and update the given outputStream with that XML Document

private void
marshal(Object object, OutputStream outputStream, ABSTRACT_SESSION session, DESCRIPTOR xmlDescriptor)

public void
marshal(Object
the object to marshal
object
,
Result
the result to marshal the object to
result
)

PUBLIC: Convert the given object to XML and update the given result with that XML Document

public void
marshal(Object
the object to marshal
object
,
Writer
the writer to marshal the object to
writer
)

PUBLIC: Convert the given object to XML and update the given writer with that XML Document

private void
marshal(Object object, Writer writer, ABSTRACT_SESSION session, DESCRIPTOR xmlDescriptor)

private void
marshalStreamOrWriter(Object object, MarshalRecord<MARSHALLER extends Marshaller> marshalRecord, ABSTRACT_SESSION session, DESCRIPTOR descriptor, boolean isXMLRoot)

public Document

Returns:

the document which the specified object has been marshalled to
objectToXML
(Object
the object to marshal
object
)

PUBLIC: Convert the given object to an XML Document

protected Document

Returns:

the document which the specified object has been marshalled to
objectToXML
(Object
the object to marshal
object
,
DESCRIPTOR
the XMLDescriptor for the object being marshalled
descriptor
,
boolean isXMLRoot)

INTERNAL: Convert the given object to an XML Document

protected Node
objectToXMLNode(Object object, ABSTRACT_SESSION session, DESCRIPTOR descriptor, boolean isXMLRoot)

INTERNAL: Like ObjectToXML but is may also return a document fragment instead of a document in the case of a non-root object.

protected Node
objectToXMLNode(Object object, Node rootNode, ABSTRACT_SESSION session, DESCRIPTOR descriptor, boolean isXMLRoot)

public void
public void
setAttributePrefix(String attributePrefix)

Value that will be used to prefix attributes.

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

Overrides org.eclipse.persistence.internal.oxm.Marshaller.setEncoding.

Set the encoding on this XMLMarshaller If the encoding is not set the default UTF-8 will be used
public void
setFormattedOutput(boolean
if this XMLMarshaller should format the XML
shouldFormat
)

Overrides org.eclipse.persistence.internal.oxm.Marshaller.setFormattedOutput.

Set if this XMLMarshaller should format the XML By default this is set to true and the XML marshalled will be formatted.
public void
setFragment(boolean
if this should marshal to a fragment or not
fragment
)

PUBLIC: Set if this should marshal to a fragment.

public void
setIncludeRoot(boolean includeRoot)

Determine if the @XMLRootElement should be marshalled when present.

public void
setLogPayload(Boolean logPayload)

public void
public void
setMarshalEmptyCollections(Boolean marshalEmptyCollections)

Name of the property to determine if empty collections should be marshalled as [] Ignored marshalling XML.

public void
setMediaType(MEDIA_TYPE mediaType)

Set the MediaType for this xmlMarshaller.

public void
setNamespaceSeparator(char namespaceSeparator)

Set the namespace separator used during marshal operations.

public void
setNoNamespaceSchemaLocation(String
no namespace schema location to be seton this XMLMarshaller
newNoNamespaceSchemaLocation
)

Set the no namespace schema location on this XMLMarshaller

public void
setReduceAnyArrays(boolean reduceAnyArrays)

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

public void
setSchema(Schema schema)

public void
setSchemaLocation(String
the schema location to be seton this XMLMarshaller
newSchemaLocation
)

Set the schema location on this XMLMarshaller

public void
setValueWrapper(String valueWrapper)

Name of the property to marshal/unmarshal as a wrapper on the text() mappings Ignored marshalling XML.

public void
setWrapperAsCollectionName(boolean wrapperAsCollectionName)

public void
setXmlHeader(String xmlHeader)

Set this Marshaller's XML Header.

private Writer
wrapWriter(Writer writer)

INTERNAL: Wrap Writer in a BufferedWriter only if its write() operations may be costly (such as FileWriters and OutputStreamWriters).

Inherited from org.eclipse.persistence.internal.oxm.Marshaller:
getCharacterEscapeHandlergetContextgetEncodinggetErrorHandlergetIndentStringgetJsonTypeConfigurationgetMarshalListenergetNamespacePrefixMappergetPropertyisEqualUsingIdenityisFormattedOutputsetCharacterEscapeHandlersetEqualUsingIdenitysetErrorHandlersetIndentStringsetMarshalListenersetNamespacePrefixMapper