Class XMLUnmarshaller<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>
-
- org.eclipse.persistence.internal.oxm.XMLUnmarshaller<ABSTRACT_SESSION,CONTEXT,DESCRIPTOR,ID_RESOLVER,MEDIA_TYPE,ROOT,UNMARSHALLER_HANDLER,UNMARSHALLER_LISTENER>
-
- All Implemented Interfaces:
Cloneable
- Direct Known Subclasses:
XMLUnmarshaller
public class XMLUnmarshaller<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 Unmarshaller<ABSTRACT_SESSION,CONTEXT,DESCRIPTOR,ID_RESOLVER,MEDIA_TYPE,ROOT,UNMARSHALLER_HANDLER,UNMARSHALLER_LISTENER> implements Cloneable
Class used to unmarshal XML & JSON to objects.
Create an XMLUnmarshaller from an XMLContext.
Code Sample
XMLContext context = new XMLContext("mySessionName");
XMLUnmarshaller unmarshaller = context.createUnmarshaller();
XML can be unmarshalled from the following inputs:
- java.io.File
- java.io.InputStream
- java.io.Reader
- java.net.URL
- javax.xml.transform.Source
- org.w3c.dom.Node
- org.xml.sax.InputSource
XML that can be unmarshalled is XML which has a root tag that corresponds to a default root element on an XMLDescriptor in the TopLink project associated with the XMLContext.
- See Also:
XMLContext
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.eclipse.persistence.internal.oxm.Unmarshaller
Unmarshaller.Listener
-
-
Field Summary
Fields Modifier and Type Field Description static int
DTD_VALIDATION
static int
NONVALIDATING
protected PlatformUnmarshaller
platformUnmarshaller
static int
SCHEMA_VALIDATION
protected boolean
schemasAreInitialized
protected UNMARSHALLER_HANDLER
xmlUnmarshallerHandler
-
Fields inherited from class org.eclipse.persistence.internal.oxm.Unmarshaller
context
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
XMLUnmarshaller(CONTEXT xmlContext)
protected
XMLUnmarshaller(CONTEXT xmlContext, Map<String,Boolean> parserFeatures)
protected
XMLUnmarshaller(XMLUnmarshaller xmlUnmarshaller)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description XMLUnmarshaller
clone()
ROOT
createRoot()
INTERNALUnmarshalRecord
createRootUnmarshalRecord(Class clazz)
INTERNALUnmarshalRecord
createUnmarshalRecord(DESCRIPTOR xmlDescriptor, ABSTRACT_SESSION session)
INTERNALXMLAttachmentUnmarshaller
getAttachmentUnmarshaller()
String
getAttributePrefix()
Value that will be used to prefix attributes.EntityResolver
getEntityResolver()
Get the EntityResolver set on this XMLUnmarshallerErrorHandler
getErrorHandler()
Get the ErrorHandler set on this XMLUnmarshallerID_RESOLVER
getIDResolver()
Return this Unmarshaller's custom IDResolver.JsonTypeConfiguration
getJsonTypeConfiguration()
Returns json type configuration.MEDIA_TYPE
getMediaType()
Get the MediaType for this xmlUnmarshaller.NamespaceResolver
getNamespaceResolver()
Name of the NamespaceResolver to be used during unmarshal Ignored unmarshalling XML.char
getNamespaceSeparator()
Get the namespace separator used during unmarshal operations.Properties
getProperties()
Return a properties object for a given instance of the XMLUnmarshaller.Object
getProperty(Object key)
Return the property for a given key, if one exists.Schema
getSchema()
StrBuffer
getStringBuffer()
INTERNAL: This is the text handler during unmarshal operations.Class
getUnmappedContentHandlerClass()
Get the class that will be instantiated to handled unmapped content Class must implement the org.eclipse.persistence.oxm.unmapped.UnmappedContentHandler interfaceObject
getUnmarshalAttributeGroup()
INTERNAL: Returns the AttributeGroup or the name of the AttributeGroup to be used to unmarshal.UNMARSHALLER_HANDLER
getUnmarshallerHandler()
int
getValidationMode()
Get the validation mode set on this XMLUnmarshaller By default, the unmarshaller is set to be NONVALIDATINGString
getValueWrapper()
Name of the property to marshal/unmarshal as a wrapper on the text() mappings Ignored unmarshalling XML.CONTEXT
getXMLContext()
Return the instance of XMLContext that was used to create this instance of XMLUnmarshaller.protected void
initialize(Map<String,Boolean> parserFeatures)
boolean
isApplicationJSON()
INTERNALboolean
isApplicationXML()
INTERNALboolean
isAutoDetectMediaType()
Return if this XMLUnmarshaller should try to automatically determine the MediaType of the document (instead of using the MediaType set by setMediaType)boolean
isCaseInsensitive()
Return if this Unmarshaller should perform case insensitive unmarshalling.boolean
isIncludeRoot()
Determine if the @XMLRootElement should be marshalled when present.Boolean
isLogPayload()
boolean
isResultAlwaysXMLRoot()
boolean
isSecureProcessingDisabled()
boolean
isWrapperAsCollectionName()
void
setAttachmentUnmarshaller(XMLAttachmentUnmarshaller atu)
void
setAttributePrefix(String attributePrefix)
Value that will be used to prefix attributes.void
setAutoDetectMediaType(boolean autoDetectMediaType)
Set if this XMLUnmarshaller should try to automatically determine the MediaType of the document (instead of using the MediaType set by setMediaType)void
setCaseInsensitive(boolean caseInsensitive)
Set true to make this Unmarshaller perform case insensitive unmarshalling.void
setDisableSecureProcessing(boolean disableSecureProcessing)
void
setEntityResolver(EntityResolver entityResolver)
Set the EntityResolver on this XMLUnmarshallervoid
setErrorHandler(ErrorHandler errorHandler)
Set the ErrorHandler on this XMLUnmarshallervoid
setIDResolver(ID_RESOLVER idResolver)
Set this Unmarshaller's custom IDResolver.void
setIncludeRoot(boolean includeRoot)
Determine if the @XMLRootElement should be marshalled when present.void
setLogPayload(Boolean logPayload)
void
setMediaType(MEDIA_TYPE mediaType)
Set the MediaType for this xmlUnmarshaller.void
setNamespaceResolver(NamespaceResolver namespaceResolver)
Get the NamespaceResolver to be used during unmarshal Ignored unmarshalling XML.void
setNamespaceSeparator(char namespaceSeparator)
Set the namespace separator used during unmarshal operations.void
setResultAlwaysXMLRoot(boolean alwaysReturnRoot)
void
setSchema(Schema schema)
void
setUnmappedContentHandlerClass(Class aClass)
Set the class that will be instantiated to handled unmapped content Class must implement the org.eclipse.persistence.oxm.unmapped.UnmappedContentHandler interfacevoid
setUnmarshalAttributeGroup(Object attributeGroup)
void
setValueWrapper(String valueWrapper)
Name of the property to marshal/unmarshal as a wrapper on the text() mappings Ignored unmarshalling XML.void
setWarnOnUnmappedElement(boolean warnOnUnmappedElement)
INTERNAL: Set to true if a warning exception should be generated when an unmapped element is encountered, false otherwise.void
setWrapperAsCollectionName(boolean wrapperAsCollectionName)
void
setXMLContext(CONTEXT value)
Set the XMLContext used by this instance of XMLUnmarshaller.boolean
shouldWarnOnUnmappedElement()
INTERNAL: Returns true if a warning exception should be generated when an unmapped element is encountered.Object
unmarshal(File file)
PUBLIC: Read and parse the XML document from the file and map the XML data into an object.Object
unmarshal(File file, Class clazz)
PUBLIC: Read and parse the XML document from the file and map the XML data into an object.Object
unmarshal(InputStream inputStream)
PUBLIC: Read and parse the XML document from the inputStream and map the XML data into an object.Object
unmarshal(InputStream inputStream, Class clazz)
PUBLIC: Read and parse the XML document from the inputStream and map the XML data into an object.Object
unmarshal(Reader reader)
PUBLIC: Read and parse the XML document from the reader and map the XML data into an object.Object
unmarshal(Reader reader, Class clazz)
PUBLIC: Read and parse the XML document from the reader and map the XML data into an object.Object
unmarshal(URL url)
PUBLIC: Read and parse the XML document from the url and map the XML data into an object.Object
unmarshal(URL url, Class clazz)
PUBLIC: Read and parse the XML document from the url and map the XML data into an object.Object
unmarshal(Source source)
PUBLIC: Read and parse the XML document from the source and map the XML data into an object.Object
unmarshal(Source source, Class clazz)
PUBLIC: Read and parse the XML document from the source and map the XML data into an object.Object
unmarshal(Node node)
PUBLIC: Map the XML node into an object.Object
unmarshal(Node node, Class clazz)
PUBLIC: Map the XML node into an object.Object
unmarshal(InputSource inputSource)
PUBLIC: Read and parse the XML document from the inputSource and map the XML data into an object.Object
unmarshal(InputSource inputSource, Class clazz)
PUBLIC: Read and parse the XML document from the inputSource and map the XML data into an object.Object
unmarshal(XMLReader xmlReader, InputSource inputSource)
Object
unmarshal(XMLReader xmlReader, InputSource inputSource, Class clazz)
-
Methods inherited from class org.eclipse.persistence.internal.oxm.Unmarshaller
getContext, getUnmarshalListener, setUnmarshalListener
-
-
-
-
Field Detail
-
NONVALIDATING
public static final int NONVALIDATING
- See Also:
- Constant Field Values
-
SCHEMA_VALIDATION
public static final int SCHEMA_VALIDATION
- See Also:
- Constant Field Values
-
DTD_VALIDATION
public static final int DTD_VALIDATION
- See Also:
- Constant Field Values
-
xmlUnmarshallerHandler
protected UNMARSHALLER_HANDLER extends UnmarshallerHandler xmlUnmarshallerHandler
-
platformUnmarshaller
protected PlatformUnmarshaller platformUnmarshaller
-
schemasAreInitialized
protected boolean schemasAreInitialized
-
-
Method Detail
-
setMediaType
public void setMediaType(MEDIA_TYPE mediaType)
Set the MediaType for this xmlUnmarshaller. See org.eclipse.persistence.oxm.MediaType for the media types supported by EclipseLink MOXy- Parameters:
mediaType
-- Since:
- 2.4
-
getMediaType
public MEDIA_TYPE getMediaType()
Get the MediaType for this xmlUnmarshaller. See org.eclipse.persistence.oxm.MediaType for the media types supported by EclipseLink MOXy If not set the default is MediaType.APPLICATION_XML- Specified by:
getMediaType
in classUnmarshaller<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>
- Returns:
- MediaType
- Since:
- 2.4
-
getXMLContext
public CONTEXT getXMLContext()
Return the instance of XMLContext that was used to create this instance of XMLUnmarshaller.
-
setXMLContext
public void setXMLContext(CONTEXT value)
Set the XMLContext used by this instance of XMLUnmarshaller.
-
getValidationMode
public int getValidationMode()
Get the validation mode set on this XMLUnmarshaller By default, the unmarshaller is set to be NONVALIDATING- Returns:
- the validation mode
-
getEntityResolver
public EntityResolver getEntityResolver()
Get the EntityResolver set on this XMLUnmarshaller- Returns:
- the EntityResolver set on this XMLUnmarshaller
-
setEntityResolver
public void setEntityResolver(EntityResolver entityResolver)
Set the EntityResolver on this XMLUnmarshaller- Parameters:
entityResolver
- the EntityResolver to set on this XMLUnmarshaller
-
getErrorHandler
public ErrorHandler getErrorHandler()
Get the ErrorHandler set on this XMLUnmarshaller- Specified by:
getErrorHandler
in classUnmarshaller<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>
- Returns:
- the ErrorHandler set on this XMLUnmarshaller
-
setErrorHandler
public void setErrorHandler(ErrorHandler errorHandler)
Set the ErrorHandler on this XMLUnmarshaller- Parameters:
errorHandler
- the ErrorHandler to set on this XMLUnmarshaller
-
getUnmappedContentHandlerClass
public Class getUnmappedContentHandlerClass()
Get the class that will be instantiated to handled unmapped content Class must implement the org.eclipse.persistence.oxm.unmapped.UnmappedContentHandler interface- Specified by:
getUnmappedContentHandlerClass
in classUnmarshaller<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>
-
setUnmappedContentHandlerClass
public void setUnmappedContentHandlerClass(Class aClass)
Set the class that will be instantiated to handled unmapped content Class must implement the org.eclipse.persistence.oxm.unmapped.UnmappedContentHandler interface- Parameters:
aClass
-
-
getStringBuffer
public StrBuffer getStringBuffer()
INTERNAL: This is the text handler during unmarshal operations.- Specified by:
getStringBuffer
in classUnmarshaller<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>
-
unmarshal
public Object unmarshal(File file) throws XMLMarshalException
PUBLIC: Read and parse the XML document from the file and map the XML data into an object. The file must contain a valid XML document, and be mapped by a project used to create the XMLContext. The type of object returned will be based on the root element of the XML document.- Parameters:
file
- The file to unmarshal from- Returns:
- the object which resulted from unmarshalling the given file
- Throws:
XMLMarshalException
- if an error occurred during unmarshalling
-
unmarshal
public Object unmarshal(File file, Class clazz) throws XMLMarshalException
PUBLIC: Read and parse the XML document from the file and map the XML data into an object. The file must contain a valid XML document, and be mapped by a project used to create the XMLContext.- Parameters:
file
- The file to unmarshal fromclazz
- The type of object to return.- Returns:
- the object which resulted from unmarshalling the given file
- Throws:
XMLMarshalException
- if an error occurred during unmarshalling
-
unmarshal
public Object unmarshal(InputStream inputStream) throws XMLMarshalException
PUBLIC: Read and parse the XML document from the inputStream and map the XML data into an object. The inputStream must contain a valid XML document, and be mapped by a project used to create the XMLContext. The type of object returned will be based on the root element of the XML document.- Parameters:
inputStream
- The inputStream to unmarshal from- Returns:
- the object which resulted from unmarshalling the given inputStream
- Throws:
XMLMarshalException
- if an error occurred during unmarshalling
-
unmarshal
public Object unmarshal(InputStream inputStream, Class clazz) throws XMLMarshalException
PUBLIC: Read and parse the XML document from the inputStream and map the XML data into an object. The file must contain a valid XML document, and be mapped by a project used to create the XMLContext.- Parameters:
inputStream
- The inputStream to unmarshal fromclazz
- The type of object to return.- Returns:
- the object which resulted from unmarshalling the given inputStream
- Throws:
XMLMarshalException
- if an error occurred during unmarshalling
-
unmarshal
public Object unmarshal(Reader reader) throws XMLMarshalException
PUBLIC: Read and parse the XML document from the reader and map the XML data into an object. The reader must contain a valid XML document, and be mapped by a project used to create the XMLContext. The type of object returned will be based on the root element of the XML document.- Parameters:
reader
- The reader to unmarshal from- Returns:
- the object which resulted from unmarshalling the given reader
- Throws:
XMLMarshalException
- if an error occurred during unmarshalling
-
unmarshal
public Object unmarshal(Reader reader, Class clazz) throws XMLMarshalException
PUBLIC: Read and parse the XML document from the reader and map the XML data into an object. The file must contain a valid XML document, and be mapped by a project used to create the XMLContext.- Parameters:
reader
- The reader to unmarshal fromclazz
- The type of object to return.- Returns:
- the object which resulted from unmarshalling the given reader
- Throws:
XMLMarshalException
- if an error occurred during unmarshalling
-
unmarshal
public Object unmarshal(URL url) throws XMLMarshalException
PUBLIC: Read and parse the XML document from the url and map the XML data into an object. The url must reference a valid XML document, and be mapped by a project used to create the XMLContext. The type of object returned will be based on the root element of the XML document.- Parameters:
url
- The url to unmarshal from- Returns:
- the object which resulted from unmarshalling the given url
- Throws:
XMLMarshalException
- if an error occurred during unmarshalling
-
unmarshal
public Object unmarshal(URL url, Class clazz) throws XMLMarshalException
PUBLIC: Read and parse the XML document from the url and map the XML data into an object. The url must reference a valid XML document, and be mapped by a project used to create the XMLContext.- Parameters:
url
- The url to unmarshal fromclazz
- The type of object to return.- Returns:
- the object which resulted from unmarshalling the given url
- Throws:
XMLMarshalException
- if an error occurred during unmarshalling
-
unmarshal
public Object unmarshal(InputSource inputSource) throws XMLMarshalException
PUBLIC: Read and parse the XML document from the inputSource and map the XML data into an object. The inputSource must contain a valid XML document, and be mapped by a project used to create the XMLContext. The type of object returned will be based on the root element of the XML document.- Parameters:
inputSource
- The inputSource to unmarshal from- Returns:
- the object which resulted from unmarshalling the given inputSource
- Throws:
XMLMarshalException
- if an error occurred during unmarshalling
-
unmarshal
public Object unmarshal(InputSource inputSource, Class clazz) throws XMLMarshalException
PUBLIC: Read and parse the XML document from the inputSource and map the XML data into an object. The inputSource must contain a valid XML document, and be mapped by a project used to create the XMLContext.- Parameters:
inputSource
- The inputSource to unmarshal fromclazz
- The type of object to return.- Returns:
- the object which resulted from unmarshalling the given inputSource
- Throws:
XMLMarshalException
- if an error occurred during unmarshalling
-
unmarshal
public Object unmarshal(Node node) throws XMLMarshalException
PUBLIC: Map the XML node into an object. The node must be a valid XML document, and be mapped by a project used to create the XMLContext.- Parameters:
node
- The node to unmarshal from- Returns:
- the object which resulted from unmarshalling the given node
- Throws:
XMLMarshalException
- if an error occurred during unmarshalling
-
unmarshal
public Object unmarshal(Node node, Class clazz) throws XMLMarshalException
PUBLIC: Map the XML node into an object. The node must be a valid XML document, and be mapped by a project used to create the XMLContext.- Parameters:
node
- The node to unmarshal fromclazz
- The type of object to return.- Returns:
- the object which resulted from unmarshalling the given node
- Throws:
XMLMarshalException
- if an error occurred during unmarshalling
-
unmarshal
public Object unmarshal(Source source) throws XMLMarshalException
PUBLIC: Read and parse the XML document from the source and map the XML data into an object. The source must contain a valid XML document, and be mapped by a project used to create the XMLContext. The type of object returned will be based on the root element of the XML document.- Parameters:
source
- The source to unmarshal from- Returns:
- the object which resulted from unmarshalling the given source
- Throws:
XMLMarshalException
- if an error occurred during unmarshalling
-
getProperties
public Properties getProperties()
Return a properties object for a given instance of the XMLUnmarshaller.- Returns:
-
getProperty
public Object getProperty(Object key)
Return the property for a given key, if one exists.- Specified by:
getProperty
in classUnmarshaller<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>
- Parameters:
key
-- Returns:
-
unmarshal
public Object unmarshal(Source source, Class clazz) throws XMLMarshalException
PUBLIC: Read and parse the XML document from the source and map the XML data into an object. The source must contain a valid XML document, and be mapped by a project used to create the XMLContext.- Parameters:
source
- The inputSource to unmarshal fromclazz
- The type of object to return.- Returns:
- the object which resulted from unmarshalling the given source
- Throws:
XMLMarshalException
- if an error occurred during unmarshalling
-
unmarshal
public Object unmarshal(XMLReader xmlReader, InputSource inputSource)
-
unmarshal
public Object unmarshal(XMLReader xmlReader, InputSource inputSource, Class clazz)
-
getUnmarshallerHandler
public UNMARSHALLER_HANDLER getUnmarshallerHandler()
- Specified by:
getUnmarshallerHandler
in classUnmarshaller<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>
-
getAttachmentUnmarshaller
public XMLAttachmentUnmarshaller getAttachmentUnmarshaller()
- Specified by:
getAttachmentUnmarshaller
in classUnmarshaller<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>
-
setAttachmentUnmarshaller
public void setAttachmentUnmarshaller(XMLAttachmentUnmarshaller atu)
-
setResultAlwaysXMLRoot
public void setResultAlwaysXMLRoot(boolean alwaysReturnRoot)
-
isResultAlwaysXMLRoot
public boolean isResultAlwaysXMLRoot()
- Specified by:
isResultAlwaysXMLRoot
in classUnmarshaller<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>
-
setSchema
public void setSchema(Schema schema)
-
getSchema
public Schema getSchema()
- Specified by:
getSchema
in classUnmarshaller<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>
-
getAttributePrefix
public String getAttributePrefix()
Value that will be used to prefix attributes. Ignored unmarshalling XML.- Specified by:
getAttributePrefix
in classUnmarshaller<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>
- Returns:
- Since:
- 2.4
-
setAttributePrefix
public void setAttributePrefix(String attributePrefix)
Value that will be used to prefix attributes. Ignored unmarshalling XML.- Since:
- 2.4
-
getValueWrapper
public String getValueWrapper()
Name of the property to marshal/unmarshal as a wrapper on the text() mappings Ignored unmarshalling XML.- Specified by:
getValueWrapper
in classUnmarshaller<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>
- Since:
- 2.4
-
setValueWrapper
public void setValueWrapper(String valueWrapper)
Name of the property to marshal/unmarshal as a wrapper on the text() mappings Ignored unmarshalling XML.- Since:
- 2.4
-
getNamespaceSeparator
public char getNamespaceSeparator()
Get the namespace separator used during unmarshal operations. If mediaType is application/json '.' is the default Ignored unmarshalling XML.- Specified by:
getNamespaceSeparator
in classUnmarshaller<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>
- Since:
- 2.4
-
setNamespaceSeparator
public void setNamespaceSeparator(char namespaceSeparator)
Set the namespace separator used during unmarshal operations. If mediaType is application/json '.' is the default Ignored unmarshalling XML.- Since:
- 2.4
-
isIncludeRoot
public boolean isIncludeRoot()
Determine if the @XMLRootElement should be marshalled when present. Ignored unmarshalling XML.- Specified by:
isIncludeRoot
in classUnmarshaller<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>
- Returns:
- Since:
- 2.4
-
setIncludeRoot
public void setIncludeRoot(boolean includeRoot)
Determine if the @XMLRootElement should be marshalled when present. Ignored unmarshalling XML.- Since:
- 2.4
-
isApplicationJSON
public boolean isApplicationJSON()
INTERNAL- Specified by:
isApplicationJSON
in classUnmarshaller<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>
- Returns:
- true if the media type is application/json, else false.
- Since:
- EclipseLink 2.6.0
-
isApplicationXML
public boolean isApplicationXML()
INTERNAL- Specified by:
isApplicationXML
in classUnmarshaller<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>
- Returns:
- true if the media type is application/xml, else false.
- Since:
- EclipseLink 2.6.0
-
isAutoDetectMediaType
public boolean isAutoDetectMediaType()
Return if this XMLUnmarshaller should try to automatically determine the MediaType of the document (instead of using the MediaType set by setMediaType)- Specified by:
isAutoDetectMediaType
in classUnmarshaller<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>
-
setAutoDetectMediaType
public void setAutoDetectMediaType(boolean autoDetectMediaType)
Set if this XMLUnmarshaller should try to automatically determine the MediaType of the document (instead of using the MediaType set by setMediaType)
-
isCaseInsensitive
public boolean isCaseInsensitive()
Return if this Unmarshaller should perform case insensitive unmarshalling.- Specified by:
isCaseInsensitive
in classUnmarshaller<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>
-
setCaseInsensitive
public void setCaseInsensitive(boolean caseInsensitive)
Set true to make this Unmarshaller perform case insensitive unmarshalling.
-
getNamespaceResolver
public NamespaceResolver getNamespaceResolver()
Name of the NamespaceResolver to be used during unmarshal Ignored unmarshalling XML.- Specified by:
getNamespaceResolver
in classUnmarshaller<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>
- Since:
- 2.4
-
setNamespaceResolver
public void setNamespaceResolver(NamespaceResolver namespaceResolver)
Get the NamespaceResolver to be used during unmarshal Ignored unmarshalling XML.- Since:
- 2.4
-
isWrapperAsCollectionName
public boolean isWrapperAsCollectionName()
- Specified by:
isWrapperAsCollectionName
in classUnmarshaller<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>
- Since:
- 2.4.2
-
setWrapperAsCollectionName
public void setWrapperAsCollectionName(boolean wrapperAsCollectionName)
- Since:
- 2.4.2
-
clone
public XMLUnmarshaller clone()
-
getIDResolver
public ID_RESOLVER getIDResolver()
Return this Unmarshaller's custom IDResolver.- Specified by:
getIDResolver
in classUnmarshaller<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>
- Returns:
- the custom IDResolver, or null if one has not been specified.
- Since:
- 2.3.3
- See Also:
IDResolver
-
setIDResolver
public void setIDResolver(ID_RESOLVER idResolver)
Set this Unmarshaller's custom IDResolver.- Specified by:
setIDResolver
in classUnmarshaller<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>
- Since:
- 2.3.3
- See Also:
IDResolver
-
createRoot
public ROOT createRoot()
INTERNAL- Specified by:
createRoot
in classUnmarshaller<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>
- Since:
- 2.5.0
-
createRootUnmarshalRecord
public UnmarshalRecord createRootUnmarshalRecord(Class clazz)
INTERNAL- Specified by:
createRootUnmarshalRecord
in classUnmarshaller<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>
- Since:
- 2.5.0
-
createUnmarshalRecord
public UnmarshalRecord createUnmarshalRecord(DESCRIPTOR xmlDescriptor, ABSTRACT_SESSION session)
INTERNAL- Specified by:
createUnmarshalRecord
in classUnmarshaller<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>
- Since:
- 2.5.0
-
getUnmarshalAttributeGroup
public Object getUnmarshalAttributeGroup()
INTERNAL: Returns the AttributeGroup or the name of the AttributeGroup to be used to unmarshal.- Specified by:
getUnmarshalAttributeGroup
in classUnmarshaller<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>
-
setUnmarshalAttributeGroup
public void setUnmarshalAttributeGroup(Object attributeGroup)
-
shouldWarnOnUnmappedElement
public boolean shouldWarnOnUnmappedElement()
INTERNAL: Returns true if a warning exception should be generated when an unmapped element is encountered.- Specified by:
shouldWarnOnUnmappedElement
in classUnmarshaller<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>
- Since:
- 2.6.0
-
setWarnOnUnmappedElement
public void setWarnOnUnmappedElement(boolean warnOnUnmappedElement)
INTERNAL: Set to true if a warning exception should be generated when an unmapped element is encountered, false otherwise.- Since:
- 2.6.0
-
getJsonTypeConfiguration
public JsonTypeConfiguration getJsonTypeConfiguration()
Returns json type configuration.- Specified by:
getJsonTypeConfiguration
in classUnmarshaller<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>
- Returns:
- json type configuration
- Since:
- 2.6.0
-
isSecureProcessingDisabled
public final boolean isSecureProcessingDisabled()
-
setDisableSecureProcessing
public final void setDisableSecureProcessing(boolean disableSecureProcessing)
-
isLogPayload
public Boolean isLogPayload()
-
setLogPayload
public void setLogPayload(Boolean logPayload)
-
-