Class XMLMarshaller<ABSTRACT_SESSION extends CoreAbstractSession,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>
- java.lang.Object
-
- org.eclipse.persistence.internal.oxm.Marshaller<CHARACTER_ESCAPE_HANDLER,CONTEXT,MARSHALLER_LISTENER,MEDIA_TYPE,NAMESPACE_PREFIX_MAPPER>
-
- org.eclipse.persistence.internal.oxm.XMLMarshaller<ABSTRACT_SESSION,CHARACTER_ESCAPE_HANDLER,CONTEXT,DESCRIPTOR,MARSHALLER_LISTENER,MEDIA_TYPE,NAMESPACE_PREFIX_MAPPER,OBJECT_BUILDER,SESSION>
-
- Direct Known Subclasses:
XMLMarshaller
public abstract class XMLMarshaller<ABSTRACT_SESSION extends CoreAbstractSession,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> extends Marshaller<CHARACTER_ESCAPE_HANDLER,CONTEXT,MARSHALLER_LISTENER,MEDIA_TYPE,NAMESPACE_PREFIX_MAPPER>
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.eclipse.persistence.internal.oxm.Marshaller
Marshaller.Listener
-
-
Field Summary
Fields Modifier and Type Field Description protected XMLAttachmentMarshallerattachmentMarshallerprotected static java.lang.StringDEFAULT_XML_VERSIONprotected static java.lang.ClassdomToEventWriterClassprotected static java.lang.ClassdomToStreamWriterClassprotected MEDIA_TYPEmediaTypeprotected static java.lang.ClassstaxResultClassprotected static java.lang.reflect.MethodstaxResultGetEventWriterMethodprotected static java.lang.reflect.MethodstaxResultGetStreamWriterMethodprotected XMLTransformertransformerprotected static java.lang.reflect.MethodwriteToEventWriterMethodprotected static java.lang.reflect.MethodwriteToStreamMethod-
Fields inherited from class org.eclipse.persistence.internal.oxm.Marshaller
context, mapper, marshalProperties
-
-
Constructor Summary
Constructors Modifier Constructor Description XMLMarshaller(CONTEXT context)protectedXMLMarshaller(XMLMarshaller xmlMarshaller)Copy constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidaddDescriptorNamespacesToXMLRecord(DESCRIPTOR xmlDescriptor, AbstractMarshalRecord record)protected voidcopyNamespaces(NamespaceResolver source, NamespaceResolver target)XMLAttachmentMarshallergetAttachmentMarshaller()java.lang.StringgetAttributePrefix()Value that will be used to prefix attributes.protected DESCRIPTORgetDescriptor(java.lang.Class clazz, ABSTRACT_SESSION session)INTERNAL: Return the descriptor for the root object.DESCRIPTORgetDescriptor(java.lang.Object object)INTERNAL: Return the descriptor for the root object.protected DESCRIPTORgetDescriptor(java.lang.Object object, boolean isXMLRoot)protected DESCRIPTORgetDescriptor(java.lang.Object object, ABSTRACT_SESSION session)INTERNAL: Return the descriptor for the root object.protected DESCRIPTORgetDescriptor(Root object)protected DESCRIPTORgetDescriptor(Root object, ABSTRACT_SESSION session)java.lang.ObjectgetMarshalAttributeGroup()chargetNamespaceSeparator()Get the namespace separator used during marshal operations.protected org.w3c.dom.NodegetNode(java.lang.Object object, org.w3c.dom.Node parentNode, ABSTRACT_SESSION session, DESCRIPTOR descriptor, boolean isRoot)java.lang.StringgetNoNamespaceSchemaLocation()Get the no namespace schema location set on this XMLMarshallerjavax.xml.validation.SchemagetSchema()java.lang.StringgetSchemaLocation()Get the schema location set on this XMLMarshallerXMLTransformergetTransformer()INTERNALjava.lang.StringgetValueWrapper()Name of the property to marshal/unmarshal as a wrapper on the text() mappings Ignored marshalling XML.java.lang.StringgetXmlHeader()Get this Marshaller's XML Header.booleanisApplicationJSON()INTERNALbooleanisApplicationXML()INTERNALbooleanisFragment()PUBLIC: Returns if this should marshal to a fragment.booleanisIncludeRoot()Determine if the @XMLRootElement should be marshalled when present.java.lang.BooleanisLogPayload()booleanisMarshalEmptyCollections()Name of the property to determine if empty collections should be marshalled as [] Ignored marshalling XML.booleanisReduceAnyArrays()Property to determine if size 1 any collections should be treated as collections Ignored marshalling XML.protected booleanisSimpleXMLRoot(Root xmlRoot)booleanisWrapperAsCollectionName()voidmarshal(java.lang.Object object, java.io.OutputStream outputStream)PUBLIC: Convert the given object to XML and update the given outputStream with that XML Documentvoidmarshal(java.lang.Object object, java.io.Writer writer)PUBLIC: Convert the given object to XML and update the given writer with that XML Documentvoidmarshal(java.lang.Object object, javax.xml.transform.Result result)PUBLIC: Convert the given object to XML and update the given result with that XML Documentvoidmarshal(java.lang.Object object, MarshalRecord marshalRecord)Convert the given object to XML and update the given marshal record with that XML Document.protected voidmarshal(java.lang.Object object, MarshalRecord marshalRecord, ABSTRACT_SESSION session, DESCRIPTOR descriptor, boolean isXMLRoot)Convert the given object to XML and update the given marshal record with that XML Document.voidmarshal(java.lang.Object object, org.w3c.dom.Node node)PUBLIC:voidmarshal(java.lang.Object object, org.xml.sax.ContentHandler contentHandler)PUBLIC: Convert the given object to XML and update the given contentHandler with that XML Documentvoidmarshal(java.lang.Object object, org.xml.sax.ContentHandler contentHandler, org.xml.sax.ext.LexicalHandler lexicalHandler)PUBLIC: Convert the given object to XML and update the given contentHandler with that XML Documentorg.w3c.dom.DocumentobjectToXML(java.lang.Object object)PUBLIC: Convert the given object to an XML Documentprotected org.w3c.dom.DocumentobjectToXML(java.lang.Object object, DESCRIPTOR descriptor, boolean isXMLRoot)INTERNAL: Convert the given object to an XML Documentprotected org.w3c.dom.NodeobjectToXMLNode(java.lang.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 org.w3c.dom.NodeobjectToXMLNode(java.lang.Object object, org.w3c.dom.Node rootNode, ABSTRACT_SESSION session, DESCRIPTOR descriptor, boolean isXMLRoot)voidsetAttachmentMarshaller(XMLAttachmentMarshaller atm)voidsetAttributePrefix(java.lang.String attributePrefix)Value that will be used to prefix attributes.voidsetEncoding(java.lang.String newEncoding)Set the encoding on this XMLMarshaller If the encoding is not set the default UTF-8 will be usedvoidsetFormattedOutput(boolean shouldFormat)Set if this XMLMarshaller should format the XML By default this is set to true and the XML marshalled will be formatted.voidsetFragment(boolean fragment)PUBLIC: Set if this should marshal to a fragment.voidsetIncludeRoot(boolean includeRoot)Determine if the @XMLRootElement should be marshalled when present.voidsetLogPayload(java.lang.Boolean logPayload)voidsetMarshalAttributeGroup(java.lang.Object group)voidsetMarshalEmptyCollections(java.lang.Boolean marshalEmptyCollections)Name of the property to determine if empty collections should be marshalled as [] Ignored marshalling XML.voidsetMediaType(MEDIA_TYPE mediaType)Set the MediaType for this xmlMarshaller.voidsetNamespaceSeparator(char namespaceSeparator)Set the namespace separator used during marshal operations.voidsetNoNamespaceSchemaLocation(java.lang.String newNoNamespaceSchemaLocation)Set the no namespace schema location on this XMLMarshallervoidsetReduceAnyArrays(boolean reduceAnyArrays)Property to determine if size 1 any collections should be treated as collections Ignored marshalling XML.voidsetSchema(javax.xml.validation.Schema schema)voidsetSchemaLocation(java.lang.String newSchemaLocation)Set the schema location on this XMLMarshallervoidsetValueWrapper(java.lang.String valueWrapper)Name of the property to marshal/unmarshal as a wrapper on the text() mappings Ignored marshalling XML.voidsetWrapperAsCollectionName(boolean wrapperAsCollectionName)voidsetXmlHeader(java.lang.String xmlHeader)Set this Marshaller's XML Header.-
Methods inherited from class org.eclipse.persistence.internal.oxm.Marshaller
getCharacterEscapeHandler, getContext, getEncoding, getErrorHandler, getIndentString, getJsonTypeConfiguration, getMarshalListener, getNamespacePrefixMapper, getProperty, isEqualUsingIdenity, isFormattedOutput, setCharacterEscapeHandler, setEqualUsingIdenity, setErrorHandler, setIndentString, setMarshalListener, setNamespacePrefixMapper
-
-
-
-
Field Detail
-
DEFAULT_XML_VERSION
protected static final java.lang.String DEFAULT_XML_VERSION
- See Also:
- Constant Field Values
-
staxResultClass
protected static java.lang.Class staxResultClass
-
staxResultGetStreamWriterMethod
protected static java.lang.reflect.Method staxResultGetStreamWriterMethod
-
staxResultGetEventWriterMethod
protected static java.lang.reflect.Method staxResultGetEventWriterMethod
-
writeToStreamMethod
protected static java.lang.reflect.Method writeToStreamMethod
-
writeToEventWriterMethod
protected static java.lang.reflect.Method writeToEventWriterMethod
-
domToStreamWriterClass
protected static java.lang.Class domToStreamWriterClass
-
domToEventWriterClass
protected static java.lang.Class domToEventWriterClass
-
attachmentMarshaller
protected XMLAttachmentMarshaller attachmentMarshaller
-
mediaType
protected MEDIA_TYPE extends MediaType mediaType
-
transformer
protected XMLTransformer transformer
-
-
Constructor Detail
-
XMLMarshaller
public XMLMarshaller(CONTEXT context)
-
XMLMarshaller
protected XMLMarshaller(XMLMarshaller xmlMarshaller)
Copy constructor
-
-
Method Detail
-
addDescriptorNamespacesToXMLRecord
protected void addDescriptorNamespacesToXMLRecord(DESCRIPTOR xmlDescriptor, AbstractMarshalRecord record)
-
copyNamespaces
protected void copyNamespaces(NamespaceResolver source, NamespaceResolver target)
-
getAttachmentMarshaller
public XMLAttachmentMarshaller getAttachmentMarshaller()
- Specified by:
getAttachmentMarshallerin classMarshaller<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>
-
getAttributePrefix
public java.lang.String getAttributePrefix()
Value that will be used to prefix attributes. Ignored marshalling XML.- Since:
- 2.4
-
getDescriptor
protected DESCRIPTOR getDescriptor(java.lang.Class clazz, ABSTRACT_SESSION session) throws XMLMarshalException
INTERNAL: Return the descriptor for the root object.- Throws:
XMLMarshalException
-
getDescriptor
public DESCRIPTOR getDescriptor(java.lang.Object object) throws XMLMarshalException
INTERNAL: Return the descriptor for the root object.- Throws:
XMLMarshalException
-
getDescriptor
protected DESCRIPTOR getDescriptor(java.lang.Object object, ABSTRACT_SESSION session) throws XMLMarshalException
INTERNAL: Return the descriptor for the root object.- Throws:
XMLMarshalException
-
getDescriptor
protected DESCRIPTOR getDescriptor(java.lang.Object object, boolean isXMLRoot)
-
getDescriptor
protected DESCRIPTOR getDescriptor(Root object) throws XMLMarshalException
- Throws:
XMLMarshalException
-
getDescriptor
protected DESCRIPTOR getDescriptor(Root object, ABSTRACT_SESSION session) throws XMLMarshalException
- Throws:
XMLMarshalException
-
getNode
protected org.w3c.dom.Node getNode(java.lang.Object object, org.w3c.dom.Node parentNode, ABSTRACT_SESSION session, DESCRIPTOR descriptor, boolean isRoot)
-
getNoNamespaceSchemaLocation
public java.lang.String getNoNamespaceSchemaLocation()
Get the no namespace schema location set on this XMLMarshaller- Returns:
- the no namespace schema location specified on this XMLMarshaller
-
getSchema
public javax.xml.validation.Schema getSchema()
-
getTransformer
public XMLTransformer getTransformer()
INTERNAL- Specified by:
getTransformerin classMarshaller<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>- Returns:
- the transformer instance for this marshaller
-
getValueWrapper
public java.lang.String getValueWrapper()
Name of the property to marshal/unmarshal as a wrapper on the text() mappings Ignored marshalling XML.- Since:
- 2.4
-
getXmlHeader
public java.lang.String getXmlHeader()
Get this Marshaller's XML Header.- Since:
- 2.4
-
getSchemaLocation
public java.lang.String getSchemaLocation()
Get the schema location set on this XMLMarshaller- Returns:
- the schema location specified on this XMLMarshaller
-
isApplicationJSON
public boolean isApplicationJSON()
INTERNAL- Specified by:
isApplicationJSONin classMarshaller<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>- Returns:
- true if the media type is application/json, else false.
- Since:
- EclipseLink 2.6.0
-
isApplicationXML
public boolean isApplicationXML()
INTERNAL- Specified by:
isApplicationXMLin classMarshaller<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>- Returns:
- true if the media type is application/xml, else false.
- Since:
- EclipseLink 2.6.0
-
isFragment
public boolean isFragment()
PUBLIC: Returns if this should marshal to a fragment. If true an XML header string is not written out.- Returns:
- if this should marshal to a fragment or not
-
isIncludeRoot
public boolean isIncludeRoot()
Determine if the @XMLRootElement should be marshalled when present. Ignored marshalling XML.- Specified by:
isIncludeRootin classMarshaller<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>- Returns:
- Since:
- 2.4
-
isReduceAnyArrays
public boolean isReduceAnyArrays()
Property to determine if size 1 any collections should be treated as collections Ignored marshalling XML.- Specified by:
isReduceAnyArraysin classMarshaller<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>
-
getNamespaceSeparator
public char getNamespaceSeparator()
Get the namespace separator used during marshal operations. If mediaType is application/json '.' is the default Ignored marshalling XML.- Since:
- 2.4
-
isMarshalEmptyCollections
public boolean isMarshalEmptyCollections()
Name of the property to determine if empty collections should be marshalled as [] Ignored marshalling XML.- Since:
- 2.4
-
isWrapperAsCollectionName
public boolean isWrapperAsCollectionName()
- Specified by:
isWrapperAsCollectionNamein classMarshaller<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>
-
isSimpleXMLRoot
protected boolean isSimpleXMLRoot(Root xmlRoot)
-
marshal
public void marshal(java.lang.Object object, org.xml.sax.ContentHandler contentHandler) throws XMLMarshalExceptionPUBLIC: Convert the given object to XML and update the given contentHandler with that XML Document- Parameters:
object- the object to marshalcontentHandler- the contentHandler which the specified object should be marshalled to- Throws:
XMLMarshalException- if an error occurred during marshalling
-
marshal
public void marshal(java.lang.Object object, org.xml.sax.ContentHandler contentHandler, org.xml.sax.ext.LexicalHandler lexicalHandler) throws XMLMarshalExceptionPUBLIC: Convert the given object to XML and update the given contentHandler with that XML Document- Parameters:
object- the object to marshalcontentHandler- the contentHandler which the specified object should be marshalled to- Throws:
XMLMarshalException- if an error occurred during marshalling
-
marshal
public void marshal(java.lang.Object object, MarshalRecord marshalRecord)Convert the given object to XML and update the given marshal record with that XML Document.- Parameters:
object- the object to marshalmarshalRecord- the marshalRecord to marshal the object to
-
marshal
protected void marshal(java.lang.Object object, MarshalRecord marshalRecord, ABSTRACT_SESSION session, DESCRIPTOR descriptor, boolean isXMLRoot)Convert the given object to XML and update the given marshal record with that XML Document.- Parameters:
object- the object to marshalmarshalRecord- the marshalRecord to marshal the object todescriptor- the XMLDescriptor for the object being marshalled
-
marshal
public void marshal(java.lang.Object object, org.w3c.dom.Node node) throws XMLMarshalExceptionPUBLIC:- Parameters:
object- the object to marshalnode- the node which the specified object should be marshalled to- Throws:
XMLMarshalException- if an error occurred during marshalling
-
marshal
public void marshal(java.lang.Object object, java.io.OutputStream outputStream) throws XMLMarshalExceptionPUBLIC: Convert the given object to XML and update the given outputStream with that XML Document- Parameters:
object- the object to marshaloutputStream- the outputStream to marshal the object to- Throws:
XMLMarshalException- if an error occurred during marshalling
-
marshal
public void marshal(java.lang.Object object, javax.xml.transform.Result result) throws XMLMarshalExceptionPUBLIC: Convert the given object to XML and update the given result with that XML Document- Parameters:
object- the object to marshalresult- the result to marshal the object to- Throws:
XMLMarshalException- if an error occurred during marshalling
-
marshal
public void marshal(java.lang.Object object, java.io.Writer writer) throws XMLMarshalExceptionPUBLIC: Convert the given object to XML and update the given writer with that XML Document- Parameters:
object- the object to marshalwriter- the writer to marshal the object to- Throws:
XMLMarshalException- if an error occurred during marshalling
-
objectToXML
public org.w3c.dom.Document objectToXML(java.lang.Object object) throws XMLMarshalExceptionPUBLIC: Convert the given object to an XML Document- Parameters:
object- the object to marshal- Returns:
- the document which the specified object has been marshalled to
- Throws:
XMLMarshalException- if an error occurred during marshalling
-
objectToXML
protected org.w3c.dom.Document objectToXML(java.lang.Object object, DESCRIPTOR descriptor, boolean isXMLRoot) throws XMLMarshalExceptionINTERNAL: Convert the given object to an XML Document- Parameters:
object- the object to marshaldescriptor- the XMLDescriptor for the object being marshalled- Returns:
- the document which the specified object has been marshalled to
- Throws:
XMLMarshalException- if an error occurred during marshalling
-
objectToXMLNode
protected org.w3c.dom.Node objectToXMLNode(java.lang.Object object, ABSTRACT_SESSION session, DESCRIPTOR descriptor, boolean isXMLRoot) throws XMLMarshalExceptionINTERNAL: Like ObjectToXML but is may also return a document fragment instead of a document in the case of a non-root object.- Throws:
XMLMarshalException
-
objectToXMLNode
protected org.w3c.dom.Node objectToXMLNode(java.lang.Object object, org.w3c.dom.Node rootNode, ABSTRACT_SESSION session, DESCRIPTOR descriptor, boolean isXMLRoot) throws XMLMarshalException- Throws:
XMLMarshalException
-
setAttachmentMarshaller
public void setAttachmentMarshaller(XMLAttachmentMarshaller atm)
-
setAttributePrefix
public void setAttributePrefix(java.lang.String attributePrefix)
Value that will be used to prefix attributes. Ignored marshalling XML.- Since:
- 2.4
-
setEncoding
public void setEncoding(java.lang.String newEncoding)
Set the encoding on this XMLMarshaller If the encoding is not set the default UTF-8 will be used- Overrides:
setEncodingin classMarshaller<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>- Parameters:
newEncoding- the encoding to set on this XMLMarshaller
-
setFormattedOutput
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.- Overrides:
setFormattedOutputin classMarshaller<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>- Parameters:
shouldFormat- if this XMLMarshaller should format the XML
-
setFragment
public void setFragment(boolean fragment)
PUBLIC: Set if this should marshal to a fragment. If true an XML header string is not written out.- Parameters:
fragment- if this should marshal to a fragment or not
-
setIncludeRoot
public void setIncludeRoot(boolean includeRoot)
Determine if the @XMLRootElement should be marshalled when present. Ignored marshalling XML.- Since:
- 2.4
-
setMarshalEmptyCollections
public void setMarshalEmptyCollections(java.lang.Boolean marshalEmptyCollections)
Name of the property to determine if empty collections should be marshalled as [] Ignored marshalling XML.- Since:
- 2.4
-
setMediaType
public void setMediaType(MEDIA_TYPE mediaType)
Set the MediaType for this xmlMarshaller. See org.eclipse.persistence.oxm.MediaType for the media types supported by EclipseLink MOXy- Parameters:
mediaType-
-
setNamespaceSeparator
public void setNamespaceSeparator(char namespaceSeparator)
Set the namespace separator used during marshal operations. If mediaType is application/json '.' is the default Ignored marshalling XML.- Since:
- 2.4
-
setNoNamespaceSchemaLocation
public void setNoNamespaceSchemaLocation(java.lang.String newNoNamespaceSchemaLocation)
Set the no namespace schema location on this XMLMarshaller- Parameters:
newNoNamespaceSchemaLocation- no namespace schema location to be seton this XMLMarshaller
-
setReduceAnyArrays
public void setReduceAnyArrays(boolean reduceAnyArrays)
Property to determine if size 1 any collections should be treated as collections Ignored marshalling XML.
-
setSchema
public void setSchema(javax.xml.validation.Schema schema)
-
setSchemaLocation
public void setSchemaLocation(java.lang.String newSchemaLocation)
Set the schema location on this XMLMarshaller- Parameters:
newSchemaLocation- the schema location to be seton this XMLMarshaller
-
setWrapperAsCollectionName
public void setWrapperAsCollectionName(boolean wrapperAsCollectionName)
-
setValueWrapper
public void setValueWrapper(java.lang.String valueWrapper)
Name of the property to marshal/unmarshal as a wrapper on the text() mappings Ignored marshalling XML.- Since:
- 2.4
-
setXmlHeader
public void setXmlHeader(java.lang.String xmlHeader)
Set this Marshaller's XML Header. This header string will appear after the XML processing instruction (<?xml ...>), but before the start of the document's data.
This feature is only supported when marshalling to Stream, Writer, or StreamResult.
- Since:
- 2.4
-
setMarshalAttributeGroup
public void setMarshalAttributeGroup(java.lang.Object group)
-
getMarshalAttributeGroup
public java.lang.Object getMarshalAttributeGroup()
-
isLogPayload
public java.lang.Boolean isLogPayload()
-
setLogPayload
public void setLogPayload(java.lang.Boolean logPayload)
-
-