Class Unmarshaller<ABSTRACT_SESSION extends CoreAbstractSession,CONTEXT extends Context,DESCRIPTOR extends Descriptor,ID_RESOLVER extends IDResolver,MEDIA_TYPE extends MediaType,ROOT extends Root,UNMARSHALLER_HANDLER extends UnmarshallerHandler,UNMARSHALLER_LISTENER extends Unmarshaller.Listener>
- java.lang.Object
-
- org.eclipse.persistence.internal.oxm.Unmarshaller<ABSTRACT_SESSION,CONTEXT,DESCRIPTOR,ID_RESOLVER,MEDIA_TYPE,ROOT,UNMARSHALLER_HANDLER,UNMARSHALLER_LISTENER>
-
- Direct Known Subclasses:
XMLUnmarshaller
public abstract class Unmarshaller<ABSTRACT_SESSION extends CoreAbstractSession,CONTEXT extends Context,DESCRIPTOR extends Descriptor,ID_RESOLVER extends IDResolver,MEDIA_TYPE extends MediaType,ROOT extends Root,UNMARSHALLER_HANDLER extends UnmarshallerHandler,UNMARSHALLER_LISTENER extends Unmarshaller.Listener> extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
Unmarshaller.Listener
An implementation of UnmarshalListener can be set on an Unmarshaller to provide additional behaviour during unmarshal operations.
-
Constructor Summary
Constructors Modifier Constructor Description Unmarshaller(CONTEXT context)
protected
Unmarshaller(Unmarshaller unmarshaller)
Copy constructor
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract ROOT
createRoot()
INTERNALabstract UnmarshalRecord
createRootUnmarshalRecord(java.lang.Class clazz)
INTERNALabstract UnmarshalRecord
createUnmarshalRecord(DESCRIPTOR descriptor, ABSTRACT_SESSION session)
INTERNALabstract XMLAttachmentUnmarshaller
getAttachmentUnmarshaller()
abstract java.lang.String
getAttributePrefix()
Value that will be used to prefix attributes.CONTEXT
getContext()
Return the instance of XMLContext that was used to create this instance of Unmarshaller.abstract org.xml.sax.ErrorHandler
getErrorHandler()
Get the ErrorHandler set on this Unmarshallerabstract ID_RESOLVER
getIDResolver()
Return this Unmarshaller's custom IDResolver.abstract JsonTypeConfiguration
getJsonTypeConfiguration()
Returns json type configuration.abstract MEDIA_TYPE
getMediaType()
Get the MediaType for this unmarshaller.abstract NamespaceResolver
getNamespaceResolver()
Name of the NamespaceResolver to be used during unmarshal Ignored unmarshalling XML.abstract char
getNamespaceSeparator()
Get the namespace separator used during unmarshal operations.abstract java.lang.Object
getProperty(java.lang.Object key)
Return the property for a given key, if one exists.abstract javax.xml.validation.Schema
getSchema()
abstract StrBuffer
getStringBuffer()
INTERNAL: This is the text handler during unmarshal operations.abstract java.lang.Class
getUnmappedContentHandlerClass()
Get the class that will be instantiated to handled unmapped content Class must implement the org.eclipse.persistence.oxm.unmapped.UnmappedContentHandler interfaceabstract java.lang.Object
getUnmarshalAttributeGroup()
INTERNAL: Returns the AttributeGroup or the name of the AttributeGroup to be used to unmarshal.abstract UNMARSHALLER_HANDLER
getUnmarshallerHandler()
UNMARSHALLER_LISTENER
getUnmarshalListener()
abstract java.lang.String
getValueWrapper()
Name of the property to marshal/unmarshal as a wrapper on the text() mappings Ignored unmarshalling XML.abstract boolean
isApplicationJSON()
INTERNALabstract boolean
isApplicationXML()
INTERNALabstract boolean
isAutoDetectMediaType()
Return if this Unmarshaller should try to automatically determine the MediaType of the document (instead of using the MediaType set by setMediaType)abstract boolean
isCaseInsensitive()
Return whether this Unmarshaller should perform case insensitive unmarshalling.abstract boolean
isIncludeRoot()
Determine if the @XMLRootElement should be marshalled when present.abstract boolean
isResultAlwaysXMLRoot()
abstract boolean
isWrapperAsCollectionName()
abstract void
setIDResolver(ID_RESOLVER idResolver)
void
setUnmarshalListener(UNMARSHALLER_LISTENER unmarshalListener)
abstract boolean
shouldWarnOnUnmappedElement()
-
-
-
Constructor Detail
-
Unmarshaller
public Unmarshaller(CONTEXT context)
-
Unmarshaller
protected Unmarshaller(Unmarshaller unmarshaller)
Copy constructor
-
-
Method Detail
-
createRoot
public abstract ROOT createRoot()
INTERNAL
-
createRootUnmarshalRecord
public abstract UnmarshalRecord createRootUnmarshalRecord(java.lang.Class clazz)
INTERNAL
-
createUnmarshalRecord
public abstract UnmarshalRecord createUnmarshalRecord(DESCRIPTOR descriptor, ABSTRACT_SESSION session)
INTERNAL
-
getAttachmentUnmarshaller
public abstract XMLAttachmentUnmarshaller getAttachmentUnmarshaller()
-
getAttributePrefix
public abstract java.lang.String getAttributePrefix()
Value that will be used to prefix attributes. Ignored unmarshalling XML.- Returns:
-
getContext
public CONTEXT getContext()
Return the instance of XMLContext that was used to create this instance of Unmarshaller.
-
getErrorHandler
public abstract org.xml.sax.ErrorHandler getErrorHandler()
Get the ErrorHandler set on this Unmarshaller- Returns:
- the ErrorHandler set on this Unmarshaller
-
getIDResolver
public abstract ID_RESOLVER getIDResolver()
Return this Unmarshaller's custom IDResolver.- Returns:
- the custom IDResolver, or null if one has not been specified.
- See Also:
IDResolver
-
getMediaType
public abstract MEDIA_TYPE getMediaType()
Get the MediaType for this unmarshaller. See org.eclipse.persistence.oxm.MediaType for the media types supported by EclipseLink MOXy If not set the default is MediaType.APPLICATION_XML- Returns:
- MediaType
-
getNamespaceResolver
public abstract NamespaceResolver getNamespaceResolver()
Name of the NamespaceResolver to be used during unmarshal Ignored unmarshalling XML.
-
getNamespaceSeparator
public abstract char getNamespaceSeparator()
Get the namespace separator used during unmarshal operations. If mediaType is application/json '.' is the default Ignored unmarshalling XML.
-
getProperty
public abstract java.lang.Object getProperty(java.lang.Object key)
Return the property for a given key, if one exists.- Returns:
-
getSchema
public abstract javax.xml.validation.Schema getSchema()
-
getStringBuffer
public abstract StrBuffer getStringBuffer()
INTERNAL: This is the text handler during unmarshal operations.
-
getUnmappedContentHandlerClass
public abstract java.lang.Class getUnmappedContentHandlerClass()
Get the class that will be instantiated to handled unmapped content Class must implement the org.eclipse.persistence.oxm.unmapped.UnmappedContentHandler interface
-
getUnmarshalAttributeGroup
public abstract java.lang.Object getUnmarshalAttributeGroup()
INTERNAL: Returns the AttributeGroup or the name of the AttributeGroup to be used to unmarshal.
-
getUnmarshallerHandler
public abstract UNMARSHALLER_HANDLER getUnmarshallerHandler()
-
getUnmarshalListener
public UNMARSHALLER_LISTENER getUnmarshalListener()
-
getValueWrapper
public abstract java.lang.String getValueWrapper()
Name of the property to marshal/unmarshal as a wrapper on the text() mappings Ignored unmarshalling XML.
-
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
-
isAutoDetectMediaType
public abstract boolean isAutoDetectMediaType()
Return if this Unmarshaller should try to automatically determine the MediaType of the document (instead of using the MediaType set by setMediaType)
-
isCaseInsensitive
public abstract boolean isCaseInsensitive()
Return whether this Unmarshaller should perform case insensitive unmarshalling.
-
isIncludeRoot
public abstract boolean isIncludeRoot()
Determine if the @XMLRootElement should be marshalled when present. Ignored unmarshalling XML.- Returns:
-
isResultAlwaysXMLRoot
public abstract boolean isResultAlwaysXMLRoot()
-
isWrapperAsCollectionName
public abstract boolean isWrapperAsCollectionName()
-
setIDResolver
public abstract void setIDResolver(ID_RESOLVER idResolver)
-
shouldWarnOnUnmappedElement
public abstract boolean shouldWarnOnUnmappedElement()
-
setUnmarshalListener
public void setUnmarshalListener(UNMARSHALLER_LISTENER unmarshalListener)
-
getJsonTypeConfiguration
public abstract JsonTypeConfiguration getJsonTypeConfiguration()
Returns json type configuration.- Returns:
- json type configuration
- Since:
- 2.6.0
-
-