Class Marshaller<CHARACTER_ESCAPE_HANDLER extends CharacterEscapeHandler,CONTEXT extends Context,MARSHALLER_LISTENER extends Marshaller.Listener,MEDIA_TYPE extends MediaType,NAMESPACE_PREFIX_MAPPER extends NamespacePrefixMapper>

java.lang.Object
org.eclipse.persistence.internal.oxm.Marshaller<CHARACTER_ESCAPE_HANDLER,CONTEXT,MARSHALLER_LISTENER,MEDIA_TYPE,NAMESPACE_PREFIX_MAPPER>
Direct Known Subclasses:
XMLMarshaller

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 Object
  • Field Details

  • Constructor Details

    • Marshaller

      protected Marshaller(CONTEXT context)
    • Marshaller

      protected Marshaller(Marshaller marshaller)
      Copy constructor
  • Method Details

    • getAttachmentMarshaller

      public abstract XMLAttachmentMarshaller getAttachmentMarshaller()
    • getCharacterEscapeHandler

      public CHARACTER_ESCAPE_HANDLER getCharacterEscapeHandler()
      Return this Marshaller's CharacterEscapeHandler.
      Since:
      2.3.3
    • getContext

      public CONTEXT getContext()
      Return the instance of Context that was used to create this instance of Marshaller.
    • getEncoding

      public String getEncoding()
      Get the encoding set on this Marshaller. If the encoding has not been set the default UTF-8 will be used
    • getErrorHandler

      public ErrorHandler getErrorHandler()
    • getIndentString

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

      public MARSHALLER_LISTENER getMarshalListener()
    • getNamespacePrefixMapper

      public NAMESPACE_PREFIX_MAPPER getNamespacePrefixMapper()
      NamespacePrefixMapper that can be used during marshal (instead of those set in the project meta data)
    • getProperty

      public Object getProperty(Object key)
      Return the property for a given key, if one exists.
    • getTransformer

      public abstract XMLTransformer getTransformer()
      INTERNAL
      Returns:
      the transformer instance for this Marshaller
    • isApplicationJSON

      public abstract boolean isApplicationJSON()
      INTERNAL
      Returns:
      true if the media type is application/json, else false.
      Since:
      EclipseLink 2.6.0
    • isApplicationXML

      public abstract boolean isApplicationXML()
      INTERNAL
      Returns:
      true if the media type is application/xml, else false.
      Since:
      EclipseLink 2.6.0
    • isEqualUsingIdenity

      public boolean isEqualUsingIdenity()
      INTERNAL
    • isFormattedOutput

      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:
      if this Marshaller should format the output
    • isIncludeRoot

      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.
    • isReduceAnyArrays

      public abstract boolean isReduceAnyArrays()
      Property to determine if size 1 any collections should be treated as collections.
    • isWrapperAsCollectionName

      public abstract boolean isWrapperAsCollectionName()
    • setCharacterEscapeHandler

      public void setCharacterEscapeHandler(CHARACTER_ESCAPE_HANDLER c)
      Set this Marshaller's CharacterEscapeHandler.
      Since:
      2.3.3
    • setEncoding

      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 - the encoding to set on this Marshaller
    • setEqualUsingIdenity

      public void setEqualUsingIdenity(boolean equalUsingIdenity)
      INTERNAL
    • setErrorHandler

      public void setErrorHandler(ErrorHandler errorHandler)
    • 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.
      Parameters:
      shouldFormat - if this XMLMarshaller should format the XML
    • setIndentString

      public void setIndentString(String s)
      Set the String that will be used to perform indenting in marshalled documents.
      Since:
      2.3.3
    • setMarshalListener

      public void setMarshalListener(MARSHALLER_LISTENER listener)
    • setNamespacePrefixMapper

      public void setNamespacePrefixMapper(NAMESPACE_PREFIX_MAPPER mapper)
      NamespacePrefixMapper that can be used during marshal (instead of those set in the project meta data)
    • getJsonTypeConfiguration

      public abstract JsonTypeConfiguration getJsonTypeConfiguration()
      Returns json type configuration.
      Returns:
      json type configuration
      Since:
      2.6.0